UNPKG

pulsar-contracts

Version:

22 lines (21 loc) 1.19 kB
import { Field, PublicKey, UInt32 } from 'o1js'; import { PulsarAction } from '../types/PulsarAction.js'; import { SettlementContract, SettlementEvent } from '../SettlementContract.js'; export { fetchActions, fetchRawActions, fetchBlockHeight, fetchEvents, setMinaNetwork, waitForTransaction, }; declare function fetchRawActions(address: PublicKey, fromActionState: Field, endActionState?: Field): Promise<{ actions: string[][]; hash: string; }[] | undefined>; declare function fetchActions(address: PublicKey, fromActionState: Field, endActionState?: Field): Promise<{ action: PulsarAction; hash: bigint; }[]>; declare function fetchBlockHeight(network?: 'devnet' | 'mainnet' | 'lightnet'): Promise<number>; declare function fetchEvents(contractInstance: SettlementContract, from?: UInt32, to?: UInt32): Promise<SettlementEvent[]>; declare function setMinaNetwork(network?: 'devnet' | 'mainnet' | 'lightnet'): void; declare function waitForTransaction(transactionHash: string, endpoint: string, maxAttempts?: number, // 10 minutes if interval is 10 seconds interval?: number, // 10 seconds attempts?: number): Promise<{ success: boolean; failureReason: any; }>;