musig.keyagg
musig.keyagg ["pubkey",...] Aggregate public keys for MuSig2 multi-signature scheme. Returns aggregated pubkey and keyagg_cache for use in adaptor ceremonies. Arguments: 1. pubkeys (json array, required) Array of compressed public keys (33-byte hex) to aggregate [ "pubkey", (string, required) Compressed public key (33-byte hex) ... ] Result: { (json object) "agg_pubkey" : "hex", (string) Aggregated x-only public key (32 bytes) "keyagg_cache" : "hex" (string) Serialized keyagg cache (opaque blob for later use) } Examples: > bitcoin-cli musig.keyagg '["pubkey1", "pubkey2"]'
Signature
musig.keyagg(pubkeys: array) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"musig.keyagg","params":[[]]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| pubkeys | any[] | yes | Array of compressed public keys (33-byte hex) to aggregate [ "pubkey", (string, required) Compressed public key (33-byte hex) ... ] |
Result
Type: any
{ (json object) "agg_pubkey" : "hex", (string) Aggregated x-only public key (32 bytes) "keyagg_cache" : "hex" (string) Serialized keyagg cache (opaque blob for later use) }
Source: services/core-node/bcore/src/wallet/rpc/adaptor.cpp:4032
C++ symbol: musig_keyagg