Function authorizeTx

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

    Returns

    The DID-signed submittable extrinsic.

    Parameters

    • did: DidUri

      The DID data.

    • extrinsic: Extrinsic

      The unsigned extrinsic to sign.

    • sign: SignExtrinsicCallback

      The callback to sign the operation.

    • 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>