@broxus/js-core
Version:
MobX-based JavaScript Core library
21 lines (20 loc) • 2.66 kB
TypeScript
import { type Address, type DecodedAbiFunctionOutputs, type DecodeEventParams, type DecodeTransactionParams, type DelayedMessageExecution, type FullContractState, type ProviderRpcClient, type SendInternalParams, type Transaction } from 'everscale-inpage-provider';
import { type StakingVaultAbi } from '../../models/staking-vault/abi';
import { type StakingVaultDecodedEvent, type StakingVaultDecodedTransaction } from '../../models/staking-vault/types';
export interface StakingVaultDepositAbiParams {
amount: string | number;
nonce: string | number;
}
export type StakingVaultDetails = DecodedAbiFunctionOutputs<typeof StakingVaultAbi, 'getDetails'>['value0'];
export declare abstract class StakingVaultUtils {
static deposit(provider: ProviderRpcClient, stakingVaultAddress: Address | string, params: StakingVaultDepositAbiParams, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>;
static removePendingWithdraw(provider: ProviderRpcClient, stakingVaultAddress: Address | string, nonce: string | number, args: Pick<SendInternalParams, 'from'> & Omit<Partial<SendInternalParams>, 'from'>): Promise<DelayedMessageExecution>;
static getAccountAddress(connection: ProviderRpcClient, stakingVaultAddress: Address | string, userAddress: Address | string, cachedState?: FullContractState): Promise<Address>;
static getDepositExpectedAmount(connection: ProviderRpcClient, stakingVaultAddress: Address | string, amount: string | number, cachedState?: FullContractState): Promise<string>;
static getWithdrawExpectedAmount(connection: ProviderRpcClient, stakingVaultAddress: Address | string, amount: string | number, cachedState?: FullContractState): Promise<string>;
static getDetails(connection: ProviderRpcClient, stakingVaultAddress: Address | string, cachedState?: FullContractState): Promise<StakingVaultDetails>;
static encodeDepositPayload(connection: ProviderRpcClient, stakingVaultAddress: Address | string, nonce: string | number, cachedState?: FullContractState): Promise<string>;
static decodeEvent(connection: ProviderRpcClient, stakingVaultAddress: Address | string, args: DecodeEventParams<typeof StakingVaultAbi>): Promise<StakingVaultDecodedEvent | undefined>;
static decodeTransaction(connection: ProviderRpcClient, stakingVaultAddress: Address | string, args: DecodeTransactionParams<typeof StakingVaultAbi>): Promise<StakingVaultDecodedTransaction | undefined>;
static decodeTransactionEvents(connection: ProviderRpcClient, stakingVaultAddress: Address | string, transaction: Transaction): Promise<StakingVaultDecodedEvent[]>;
}