๐Read Client
Instantiating a PreAuthorizedDebitReadClient
PreAuthorizedDebitReadClientMainnet
import { clusterApiUrl, Connection } from "@solana/web3.js";
import { PreAuthorizedDebitReadClientImpl } from "@seabed-labs/pre-authorized-debit";
// You can use any connection object you'd like, this is just an example
const connection = new Connection(clusterApiUrl("mainnet-beta"));
const readClient = PreAuthorizedDebitReadClientImpl.mainnet(connection);Devnet
import { clusterApiUrl, Connection } from "@solana/web3.js";
import { PreAuthorizedDebitReadClientImpl } from "@seabed-labs/pre-authorized-debit";
// You can use any connection object you'd like, this is just an example
const connection = new Connection(clusterApiUrl("devnet"));
const readClient = PreAuthorizedDebitReadClientImpl.devnet(connection);Custom
Supported Methods
Fetch IDL from chain
Derive the Smart Delegate PDA
Derive the Pre-Authorization PDA
Fetch the Smart Delegate account
Fetch a Pre Authorization account
Fetch all Pre-Authorizations associated with a token account
Fetch all Pre-Authorizations associated with a debit authority
Fetch maximum debit amount for a Pre-Authorization
Check if amount can be debited against a pre-authorization
Fetch the token program ID for a token account
Fetch the current owner of a token account
Fetch the current delegation of a token account
Fetch the current owner of a Pre-Authorization's token account
Fetch the current delegation of a Pre-Authorization's token account
Last updated