You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to document the required steps for making this library support multiple signatures as per the JWS standard
Support General JWS JSON Serialization Syntax
the schema is:
{
"payload":"<payload contents>",
"signatures":[
{"protected":"<integrity-protected header 1 contents>",
"header":<non-integrity-protected header 1 contents>,
"signature":"<signature 1 contents>"},
...
{"protected":"<integrity-protected header N contents>",
"header":<non-integrity-protected header N contents>,
"signature":"<signature N contents>"}]
}
Additional code
the current structure of the code is very much relying on the assumption of there being 1 signature. Instead of trying to add code to the existing classes I would add use-case specific classes and potentially if deemed useful extract / generalize the code to work for 1 or N sigs.
this would mean adding the following files:
src/multi-signer.js
src/multi-verifier.js
Payload structure
public_keys this is already an array in the current structure so no problems here.
iss this holds the address of the bucket which is the bitcoin address connected to the exposed public key(eg. did:btc-addr:1Bjw4R9q38f8NR6TPy64YDsHLqYgR5BvNa). There are multiple ways of deriving a multi sig address from a set of public keys. When represented as a P2SH address bip-0067 describes how to create a deterministic address. Potentially we may also want to support p2sh-p2wsh.
How would we identify which address generation scheme should be used? ['p2pkh', 'p2sh', 'p2sh-p2swsh'] or since ps2h could mean a lot of other things than a multi-sig address perhaps: ['p2pkh', 'multi-sig', 'segwit-multi-sig']
And under what key should this information be stored in the payload?
I would like to document the required steps for making this library support multiple signatures as per the JWS standard
Support General JWS JSON Serialization Syntax
the schema is:
Additional code
the current structure of the code is very much relying on the assumption of there being 1 signature. Instead of trying to add code to the existing classes I would add use-case specific classes and potentially if deemed useful extract / generalize the code to work for 1 or N sigs.
this would mean adding the following files:
Payload structure
public_keysthis is already an array in the current structure so no problems here.issthis holds the address of the bucket which is the bitcoin address connected to the exposed public key(eg.did:btc-addr:1Bjw4R9q38f8NR6TPy64YDsHLqYgR5BvNa). There are multiple ways of deriving a multi sig address from a set of public keys. When represented as aP2SHaddress bip-0067 describes how to create a deterministic address. Potentially we may also want to supportp2sh-p2wsh.How would we identify which address generation scheme should be used?
['p2pkh', 'p2sh', 'p2sh-p2swsh']or sinceps2hcould mean a lot of other things than a multi-sig address perhaps:['p2pkh', 'multi-sig', 'segwit-multi-sig']And under what key should this information be stored in the payload?