UNPKG

jton-contracts

Version:
116 lines 3.66 kB
import { Contract, ResultOfCall } from 'jton'; import { KeyPair } from '@tonclient/core/dist/modules'; import { TonClient } from '@tonclient/core'; import TONTokenWalletContract from './source/build/TONTokenWallet'; export { TONTokenWalletContract }; export interface InitialData { root_address: string; code: string; wallet_public_key: number | string; owner_address: string; } export interface GetDetailsOut { root_address: string; wallet_public_key: string; owner_address: string; balance: string; receive_callback: string; bounced_callback: string; allow_non_notifiable: boolean; } export interface AllowanceInfo { remaining_tokens: string; spender: string; } export interface ApproveIn { spender: string; remaining_tokens: number | string; tokens: number | string; } export interface TransferToRecipientIn { recipient_public_key: number | string; recipient_address: string; tokens: number | string; deploy_grams: number | string; transfer_grams: number | string; send_gas_to: string; notify_receiver: boolean; payload: string; } export interface TransferIn { to: string; tokens: number | string; grams: number | string; send_gas_to: string; notify_receiver: boolean; payload: string; } export interface TransferFromIn { from: string; to: string; tokens: number | string; grams: number | string; send_gas_to: string; notify_receiver: boolean; payload: string; } export interface BurnByOwnerIn { tokens: number | string; grams: number | string; send_gas_to: string; callback_address: string; callback_payload: string; } export interface SetReceiveCallbackIn { receive_callback_: string; allow_non_notifiable_: boolean; } export interface SetBouncedCallbackIn { bounced_callback_: string; } export interface DestroyIn { gas_dest: string; } export declare class TONTokenWallet extends Contract { static readonly EXTERNAL: { getVersion: string; balance: string; getDetails: string; getWalletCode: string; allowance: string; approve: string; disapprove: string; transferToRecipient: string; transfer: string; transferFrom: string; internalTransfer: string; internalTransferFrom: string; burnByOwner: string; burnByRoot: string; setReceiveCallback: string; setBouncedCallback: string; destroy: string; }; constructor(client: TonClient, keys: KeyPair, initialData: InitialData, timeout?: number); /********** * PUBLIC * **********/ approve(input: ApproveIn, keys?: KeyPair): Promise<ResultOfCall>; disapprove(keys?: KeyPair): Promise<ResultOfCall>; transferToRecipient(input: TransferToRecipientIn, keys?: KeyPair): Promise<ResultOfCall>; transfer(input: TransferIn, keys?: KeyPair): Promise<ResultOfCall>; transferFrom(input: TransferFromIn, keys?: KeyPair): Promise<ResultOfCall>; burnByOwner(input: BurnByOwnerIn, keys?: KeyPair): Promise<ResultOfCall>; setReceiveCallback(input: SetReceiveCallbackIn, keys?: KeyPair): Promise<ResultOfCall>; setBouncedCallback(input: SetBouncedCallbackIn, keys?: KeyPair): Promise<ResultOfCall>; destroy(input: DestroyIn, keys?: KeyPair): Promise<ResultOfCall>; /*********** * GETTERS * ***********/ getVersion(): Promise<string>; balance(): Promise<string>; getDetails(): Promise<GetDetailsOut>; getWalletCode(): Promise<string>; allowance(): Promise<AllowanceInfo>; } //# sourceMappingURL=TONTokenWallet.d.ts.map