hapi-ton-sdk
Version:
SDK for managing HAPI attestations on TON network
70 lines (67 loc) • 2.27 kB
TypeScript
import * as _ton_core from '@ton/core';
import { Contract, Address, Cell, ContractProvider, SendMode, Sender } from '@ton/core';
import { ContractAdapter } from '@ton-api/ton-adapter';
declare class HapiTonAttestation implements Contract {
readonly address: Address;
readonly init?: {
code: Cell;
data: Cell;
} | undefined;
constructor(address: Address, init?: {
code: Cell;
data: Cell;
} | undefined);
static createFromAddress(address: string | undefined, contractAdapter: ContractAdapter): _ton_core.OpenedContract<HapiTonAttestation>;
getCreateAttestationFee(provider: ContractProvider): Promise<bigint>;
getUpdateAttestationFee(provider: ContractProvider): Promise<bigint>;
getAttestationData(provider: ContractProvider): Promise<{
userCount: bigint;
contractOwner: Address;
commissionOwner: Address;
createAttestatioFee: bigint;
updateAttestatioFee: bigint;
walletCode: Cell;
}>;
static getUserJettonAddress(provider: ContractProvider, address: string): Promise<Address>;
static getStaticUserJettonAddress(address: string): Address;
prepareCreateAttestation(opts: {
queryId: number;
trustScore: number;
expirationDate: number;
signature: Buffer;
value: bigint;
referralId?: bigint;
}): {
value: bigint;
sendMode: SendMode;
body: Cell;
};
sendCreateAttestation(provider: ContractProvider, via: Sender, opts: {
queryId: number;
trustScore: number;
expirationDate: number;
signature: Buffer;
value: bigint;
referralId?: bigint;
}): Promise<void>;
prepareUpdateAttestation(opts: {
queryId: number;
trustScore: number;
expirationDate: number;
signature: Buffer;
value: bigint;
referralId?: bigint;
}): {
value: bigint;
sendMode: SendMode;
body: Cell;
};
sendUpdateAttestation(provider: ContractProvider, via: Sender, opts: {
queryId: number;
trustScore: number;
expirationDate: number;
signature: Buffer;
value: bigint;
}): Promise<void>;
}
export { HapiTonAttestation };