UNPKG

@tristeroresearch/mach-sdk

Version:

A TypeScript SDK for integrating with Mach's API.

45 lines 1.51 kB
/** * @description: Solana utils * @author: Mach Exchange */ import { Connection, PublicKey } from '@solana/web3.js'; export declare const IRIS_API_URL: string; export declare const SOLANA_SRC_DOMAIN_ID = 5; export declare const SOLANA_USDC_ADDRESS: PublicKey; export declare const SOLANA_CONNECTION: Connection; export declare const SOLANA_CHAIN_ID = 900; export declare const TRON_CHAIN_ID = 728126428; /** * @description: Check if the wallet is connected * @returns: The wallet address */ export declare const checkIfWalletIsConnected: () => Promise<string>; /** * @description: Find the program address * @returns: The program address */ export type FindProgramAddressResponse = { publicKey: PublicKey; bump: number; }; export declare const findProgramAddress: (label: string, programId: PublicKey, extraSeeds?: (string | number[] | Buffer | PublicKey)[]) => FindProgramAddressResponse; /** * @description: Get the solana transaction receipt * @returns: The transaction receipt */ export declare const getSolanaTransactionReceipt: (txHash: string) => Promise<import("@solana/web3.js").VersionedTransactionResponse>; /** * @description: Get the solana usdc token account * @returns: The token account */ export declare const getSolUSDCTokenAccount: (publicKey: PublicKey) => Promise<PublicKey>; /** * @description: The balance type */ export type Balance = { decimals: number; formatted: string; symbol: string; value: bigint; }; //# sourceMappingURL=utils.d.ts.map