@sen-use/web3
Version:
The library for Sentre
21 lines (20 loc) • 968 B
TypeScript
import { Address, AnchorProvider, Idl, Program, web3 } from '@project-serum/anchor';
export declare const toPublicKey: (address: Address) => web3.PublicKey;
export declare const toBase58: (address: Address) => string;
interface WalletInterface {
signTransaction(tx: web3.Transaction): Promise<web3.Transaction>;
signAllTransactions(txs: web3.Transaction[]): Promise<web3.Transaction[]>;
}
export declare const getAnchorProvider: (node: string, walletAddress: Address, wallet: WalletInterface) => AnchorProvider;
export declare const getRawAnchorProvider: () => AnchorProvider;
export declare const getRawProgram: <T extends Idl>(idl: T) => Program<T>;
/**
* RawWallet wallet.
*/
export default class RawWallet {
readonly publicKey: web3.PublicKey;
constructor(publicKey: web3.PublicKey);
signTransaction(tx: web3.Transaction): Promise<web3.Transaction>;
signAllTransactions(txs: web3.Transaction[]): Promise<web3.Transaction[]>;
}
export {};