UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

58 lines (57 loc) 4.33 kB
import { type Address, type DecodedAbiFunctionInputs, type DelayedMessageExecution, type FullContractState, type ProviderRpcClient, type SendInternalParams } from 'everscale-inpage-provider'; import { type TvmTokenOwnerAbiParams } from '../../models/tvm-token-wallet'; import { type TokenRootAbi } from '../../models/tvm-token/abi'; import { type TvmTokenData } from '../../models/tvm-token/TvmToken'; export interface TvmTokenDeployWalletAbiParams { deployWalletValue?: string | number; walletOwner: Address | string; } export interface TvmTokenBurnAbiParams { amount: string | number; callbackTo: Address | string; payload: string; remainingGasTo: Address | string; walletOwner: Address | string; } export interface TvmTokenMintAbiParams { amount: string | number; deployWalletValue?: string | number; notify?: boolean; payload?: string; recipient: Address | string; remainingGasTo: Address | string; } export interface TvmTokenTransferOwnershipAbiParams { callbacks?: [address: Address, value: { payload: string; value: string | number; }][]; newOwner: Address | string; remainingGasTo: Address | string; } export declare abstract class TvmTokenUtils { static deployWallet(provider: ProviderRpcClient, tokenAddress: Address | string, params: TvmTokenDeployWalletAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>; static burn(provider: ProviderRpcClient, tokenAddress: Address | string, params: TvmTokenBurnAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>; static mint(provider: ProviderRpcClient, tokenAddress: Address | string, params: TvmTokenMintAbiParams, args?: Partial<SendInternalParams>): Promise<DelayedMessageExecution>; static transferOwnership(provider: ProviderRpcClient, tokenAddress: Address | string, params: TvmTokenTransferOwnershipAbiParams, args: Partial<SendInternalParams>): Promise<DelayedMessageExecution>; static disableBurnByRoot(provider: ProviderRpcClient, tokenAddress: Address | string, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>; static disableMint(provider: ProviderRpcClient, tokenAddress: Address | string, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>; static setBurnPaused(provider: ProviderRpcClient, tokenAddress: Address | string, params: Omit<DecodedAbiFunctionInputs<typeof TokenRootAbi, 'setBurnPaused'>, 'answerId'>, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>; static getDetails(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<TvmTokenData | undefined>; static getDecimals(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<number>; static getSymbol(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<string>; static getName(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<string>; static rootOwnerAddress(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<Address>; static totalSupply(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<string>; static burnPaused(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<boolean>; static burnByRootDisabled(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<boolean>; static mintDisabled(connection: ProviderRpcClient, tokenAddress: Address | string, cachedState?: FullContractState): Promise<boolean>; /** * Returns expected token wallet address * @param {ProviderRpcClient} connection * @param {TvmTokenOwnerAbiParams} params * @param {FullContractState} [cachedState] * @returns Promise<Address> */ static walletOf(connection: ProviderRpcClient, params: TvmTokenOwnerAbiParams, cachedState?: FullContractState): Promise<Address>; }