import { NotVault } from './notvault'; import { PopulatedTransaction } from 'ethers'; export type SendRequest = { idHash: string; sender: string; amount: bigint; created: number; unlock_sender: number; unlock_receiver: number; redeemed: number; active: boolean; amount_hash: bigint; deal_address: string; deal_group_id: string; deal_id: bigint; denomination: string; obligor: string; oracle_address: string; oracle_owner: string; oracle_key_sender: bigint; oracle_value_sender: bigint; oracle_key_recipient: bigint; oracle_value_recipient: bigint; decimals?: bigint; }; export type Cashflows = { lockedOut: SendRequest[]; lockedIn: SendRequest[]; }; export type Balance = Cashflows & { privateBalance: bigint; lockedOut: SendRequest[]; lockedIn: SendRequest[]; balance: bigint; decimals: bigint; }; export declare const zeroAddress = "0x0000000000000000000000000000000000000000"; export declare class Tokens { private tokenDecimalCache; vault: NotVault; constructor(vault: NotVault); getBalance: (denomination: string, obligor: string, type?: "all" | "in" | "out" | "none" | "public", groupId?: BigInt) => Promise; getCashflows: (dealId: BigInt, groupId?: BigInt) => Promise; tokenBalance: (denomination: string) => Promise<{ balance: bigint; decimals: bigint; }>; depositTx: (denomination: string, obligor: string, amount: bigint, treasurer_secret?: string) => Promise<{ approveTx: PopulatedTransaction; depositTx: PopulatedTransaction; setBalanceTx: PopulatedTransaction; privateAfterBalance: string; }>; depositUnfundedTx: (denomination: string, obligor: string, amount: bigint, treasurer_secret?: string) => Promise<{ depositTx: PopulatedTransaction; setBalanceTx: PopulatedTransaction; privateAfterBalance: string; }>; withdrawTx: (denomination: string, obligor: string, amount: bigint, treasurer_secret?: string) => Promise<{ idHash: string; withdrawTx: PopulatedTransaction; setBalanceTx: PopulatedTransaction; privateAfterBalance: string; }>; sendTx: (denomination: string, obligor: string, destination: string, amount: bigint, oracleAddress?: string, oracleOwner?: string, oracleKeySender?: bigint | string, oracleValueSender?: bigint | string, oracleKeyRecipient?: bigint | string, oracleValueRecipient?: bigint | string, unlockSender?: number, unlockReceiver?: number, dealGroupId?: bigint, dealId?: bigint) => Promise<{ idHash: string; createRequestTx: PopulatedTransaction; setBalanceTx: PopulatedTransaction; privateAfterBalance: string; privateAfterAmount_from: string; privateAfterAmount_to: string; }>; retreiveTx: (idHash: string) => Promise<{ acceptRequestTx: PopulatedTransaction; setBalanceTx: PopulatedTransaction; privateAfterBalance: string; sendRequest: any; }>; }