near-api-js - v7.0.4
    Preparing search index...

    Signs using Multiple Keys, rotating through them for parallel transaction signing.

    This signer is designed for high-throughput scenarios where you want to sign multiple transactions in parallel using different keys (to avoid nonce conflicts).

    const signer = new MultiKeySigner([key1, key2, key3]);
    const account = new Account('account.near', provider, signer);

    // These will use different keys in rotation
    await Promise.all([
    account.transfer({ receiverId: 'bob.near', amount: 1n }),
    account.transfer({ receiverId: 'alice.near', amount: 2n }),
    account.transfer({ receiverId: 'carol.near', amount: 3n }),
    ]);

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Implement this method to sign given bytes payload.

      Parameters

      • _bytes: Uint8Array

      Returns Promise<Uint8Array<ArrayBufferLike>>

      • Promise of the bytes representation of the signature.