Function authorizeBatch

  • Authorizes/signs a list of extrinsics grouping them in batches by required verification relationship.

    Parameters

    • input: {
          batchFunction: SubmittableExtrinsicFunction<"promise", AnyTuple>;
          did: Did | DidDocument<DidUrl>;
          extrinsics: Extrinsic[];
          nonce?: BN;
          signers: readonly SignerInterface<string, string>[];
          submitter: `4${string}`;
      }

      The object with named parameters.

      • batchFunction: SubmittableExtrinsicFunction<"promise", AnyTuple>

        The batch function to use, for example api.tx.utility.batchAll.

      • did: Did | DidDocument<DidUrl>

        The DID or DID Document of the authorizing DID.

      • extrinsics: Extrinsic[]

        The array of unsigned extrinsics to sign.

      • Optional nonce?: BN

        The optional nonce to use for the first batch, next batches will use incremented value.

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

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

      • submitter: `4${string}`

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

    Returns Promise<SubmittableExtrinsic>

    The DID-signed submittable extrinsic.