• Simplifies signing transactions using SignerInterface signers by wrapping it in a Polkadot signer interface.

    Parameters

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

      An array of SignerInterface signers.

    • hasher: ((data) => Uint8Array) = blake2AsU8a

      The hasher used in signing extrinsics. Must match the hasher used by the chain in order to produce verifiable extrinsic signatures. Defaults to blake2b.

        • (data): Uint8Array
        • Parameters

          • data: Uint8Array

          Returns Uint8Array

    • Optional updatesCallback: ((id, status) => void)

      Receives updates from the caller of the signer on the status of the extrinsic submission.

        • (id, status): void
        • Parameters

          • id: number
          • status: ISubmittableResult | H256

          Returns void

          Description

          Receives an update for the extrinsic signed by a signer.sign

    Returns Signer

    An object implementing polkadot's signRaw interface.

    Example

    const signedTx = await tx.signAsync(<address>, {signer: getExtrinsicSigner(<signers>)})