Function authorizeTx

  • Signs and returns the provided unsigned extrinsic with the right DID verification method, if present. Otherwise, it will throw an error.

    Parameters

    • did: Did | DidDocument<DidUrl>

      The DID or DID Document of the authorizing DID.

    • extrinsic: Extrinsic

      The unsigned extrinsic to sign.

    • signers: readonly SignerInterface<string, string>[]

      An array of signer interfaces. The function will select the appropriate signer for signing this extrinsic.

    • submitterAccount: `4${string}`

      The KILT account to bind the DID operation to (to avoid MitM and replay attacks).

    • signingOptions: {
          txCounter?: BN;
      } = {}

      The signing options.

      • Optional txCounter?: BN

        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.