0.2.0 • Published 1 year ago

@dappio-wonderland/utils v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Dappio utilities: A Solana program development and debugging toolkit

Installation

yarn add @dappio-wonderland/utils

Usage

import {
  compress,
  compressV0,
  getAccountLookupTablesByAuthority,
} from "@dappio-wonderland/utils";
import { Transaction, PublicKey} from "@solana/web3.js";

let tx0 = new Transaction();
let tx1 = new Transaction();
let payer = new PublicKey("6ZRCB7AAqGre6c72PRz3MHLC73VMYvJ8bi9KHf1HFpNk")
...

let compressedTx = compress([tx0, tx1], payer)
let compressedV0Tx = compressV0([tx0, tx1], payer, connection)

Overview

This utility provides functionality for address lookups and processing transactions.

  • getAccountLookupTablesByAuthority, getAddressLookupTableAccounts: It's for fetching and deserializing lookup table accounts.
  • createExtendLookupTableIx: It's for creating and editing lookup tables.
  • signAndSend: This function can sign and send different version of Transactions. It's currently for debugging and testing only.
  • compress, compressV0: These functions can compress an array of Transaction objects to decrease the amount of Transaction needed for an action.