UNPKG

hapi-ton-sdk

Version:

SDK for managing HAPI attestations on TON network

63 lines (61 loc) 1.51 kB
interface UserResponse { errorCode: number; scores: [ { address: string; expirationDate: number | null; isMinted: boolean; network: string; score: number | null; } ]; } interface TrustResponseData { errorCode: number; wallet: string; score: number; expiration: number; signature: string; validation?: string; attestationId?: string | null; recovery_id?: string; isRemint?: boolean; } interface AttestationParams { signature: string; trust: number; expiration: number; ref_id: number; } interface CreateAttestationOptions { queryId: number; trustScore: number; expirationDate: number; signature: Buffer; value: bigint; referralId?: bigint; } interface UpdateAttestationOptions { queryId: number; trustScore: number; expirationDate: number; signature: Buffer; value: bigint; } interface SDKConfig { hapiEndpoint: string; contractAddress: string; nodeUrl: string; referralId: number; network: number; tonApiKey?: string; } interface AttestationChangeEvent { userAddress: string; refId: number; } declare const OpCode: { readonly createAttestation: number; readonly updateAttestation: number; }; export { type AttestationChangeEvent, type AttestationParams, type CreateAttestationOptions, OpCode, type SDKConfig, type TrustResponseData, type UpdateAttestationOptions, type UserResponse };