authorizeTx
authorizeTx(
did
,extrinsic
,sign
,submitterAccount
,signingOptions
):Promise
<SubmittableExtrinsic
>
Signs and returns the provided unsigned extrinsic with the right DID key, if present. Otherwise, it will throw an error.
Parameters
• did: did:cord:3${string}
The DID data.
• extrinsic: Extrinsic
The unsigned extrinsic to sign.
• sign: SignExtrinsicCallback
The callback to sign the operation.
• submitterAccount: 3${string}
The account to bind the DID operation to (to avoid MitM and replay attacks).
• signingOptions= {}
The signing options.
• signingOptions.txCounter?: any
The optional DID nonce to include in the operation signatures. By default, it uses the next value of the nonce stored on chain.
Returns
Promise
<SubmittableExtrinsic
>
The DID-signed submittable extrinsic.