UNPKG

@tonkite/highload-wallet-v3

Version:

The wrapper for highload-wallet-v3.

54 lines (53 loc) 2.31 kB
/** * Copyright 2024 Scaleton Labs LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { Cell, Contract, ContractProvider, MessageRelaxed, SendMode } from '@ton/core'; import { HighloadWalletV3QueryIdSequence } from './highload-wallet-v3-query-id-sequence'; import { HighloadWalletV3Reader } from './highload-wallet-v3-reader'; export declare function highloadWalletV3ConfigToCell({ publicKey, subwalletId, timeout, }: { publicKey: Buffer; subwalletId: number; timeout: number; }): Cell; export declare class HighloadWalletV3 extends HighloadWalletV3Reader implements Contract { readonly sequence: HighloadWalletV3QueryIdSequence; readonly publicKey: Buffer; readonly timeout: number; readonly subwalletId: number; static readonly DEFAULT_SUBWALLET_ID = 4269; static readonly DEFAULT_TIMEOUT: number; readonly init: { code: Cell; data: Cell; }; constructor(sequence: HighloadWalletV3QueryIdSequence, publicKey: Buffer, timeout?: number, subwalletId?: number, workchain?: number, code?: Cell); static newSequence(): HighloadWalletV3QueryIdSequence; static restoreSequence(lastQueryId: number): HighloadWalletV3QueryIdSequence; static emergencySequence(): HighloadWalletV3QueryIdSequence; sendBatch(provider: ContractProvider, secretKey: Buffer, { messages, createdAt, valuePerBatch, }: { messages: { mode: SendMode; message: MessageRelaxed; }[]; createdAt?: number; valuePerBatch?: bigint; }): Promise<Cell>; sendExternal(provider: ContractProvider, secretKey: Buffer, { message, mode, queryId, createdAt, }: { message: MessageRelaxed; mode: number; queryId: number; createdAt?: number; }): Promise<Cell>; }