UNPKG

@frakt-protocol/frakt-sdk

Version:

Frakt SDK for interacting with frakt.xyz protocols

35 lines (34 loc) 1.27 kB
import { web3 } from '@project-serum/anchor'; import { Wallet } from '../../common/classes/nodewallet'; import { ProposeLoan, ProposeLoans } from './types'; interface TxnAndSigners { transaction: web3.Transaction; signers?: web3.Signer[]; } export declare type SignAndSendTransaction = (props: { txnAndSigners: TxnAndSigners; connection: web3.Connection; wallet: Wallet; commitment?: web3.Commitment; onBeforeApprove?: () => void; onAfterSend?: () => void; }) => Promise<web3.RpcResponseAndContext<web3.SignatureResult>>; export declare type SignAndSendAllTransactions = (props: { txnAndSignersArray: TxnAndSigners[]; connection: web3.Connection; wallet: Wallet; commitment?: web3.Commitment; onBeforeApprove?: () => void; onAfterSend?: () => void; }) => Promise<PromiseSettledResult<web3.RpcResponseAndContext<web3.SignatureResult>>[]>; declare type CreateProposeLoans = (props: { programPublicKey: string; adminPublicKey: string; }) => ProposeLoans; export declare const createProposeLoans: CreateProposeLoans; declare type CreateProposeLoan = (props: { programPublicKey: string; adminPublicKey: string; }) => ProposeLoan; export declare const createProposeLoan: CreateProposeLoan; export {};