0.1.8 • Published 2 years ago

@holaplex/solana-web3-tools v0.1.8

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
2 years ago

Solana Web3 Tools

  • Insert nice art here.

Installation

$ yarn add @holaplex/solana-web3-tools

Usage

import { SmartInstructionSender } from '@holaplex/solana-web3-tools';

const someMethod = async (
    instructions: TransactionInstruction[][],
    signers: Signer[][]
) => {
    const sender = SmartInstructionSender
        .build(wallet, connection)
        .config({
            maxSigningAttempts: 3,
            abortOnFailure: true,
            commitment: 'confirmed',
        })
        .withInstructionSets(instructions.map((ixs, i) => ({
            instructions: ixs,
            signers: signers[i]
        })))
        .onProgress((i) => {
            console.log(`Just sent: ${i}`);
        })
        .onFailure((err) => {
            console.error(`Error: ${err}`);
        })
        .onReSign((attempt, i) => {
            console.warn(`ReSigning: ${i} attempt: ${attempt}`);
        });
    await sender.send();
}
0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago