import { Principal } from '@dfinity/principal'; export declare type AccountIdentifier = string; export declare type TokenIdentifier = string; export declare type Balance = bigint; export declare type SubAccount = number[]; export declare type Memo = number[]; export declare type Fee = bigint; export declare type Time = bigint; export declare type TokenIndex = number; export declare type Tokens = TokenIndex[]; export declare type User = { addres?: AccountIdentifier; } | { principal?: Principal; }; export declare type CommonError = { InvalidToken: TokenIdentifier; } | { Other: string; }; export interface ResultOk { ok: T; } export interface ResultError { err: T; } export declare type Result = ResultOk | ResultError; interface BalanceRequest { token: TokenIdentifier; user: User; } export interface Listing { locked?: Time; seller: Principal; price: bigint; } export interface TokenMetaData { name: string; decimals: number; symbol: string; fee?: number; } export declare type Extension = string; declare type Details = [AccountIdentifier, Listing]; declare type BalanceResult = Result; declare type DetailsResult = Result; declare type TokensResult = Result; declare type TokenExt = [TokenIndex, Listing[], Int8Array[]]; declare type TokensExtResult = Result; declare type SupplyResponse = Result; interface TransferRequest { to: User; from: User; token: TokenIdentifier; amount: Balance; memo: Memo; notify: boolean; subaccount?: SubAccount; fee: bigint; } declare type TransferError = { Unauthorized: AccountIdentifier; } | { InsufficientBalance: null; } | { Rejected: null; } | { InvalidToken: TokenIdentifier; } | { CannotNotify: AccountIdentifier; } | { Other: string; }; declare type TransferResult = Result; export interface FungibleMetadata { fungible: TokenMetaData & { metadata?: Int8Array[]; }; } export interface NonFungibleMetadata { nonfungible: { metadata: Int8Array[]; }; } export declare type Metadata = FungibleMetadata | NonFungibleMetadata; export declare type MetadataResponse = Result; export default interface _SERVICE { extensions: () => Promise; balance: (arg_0: BalanceRequest) => Promise; details: (token: TokenIdentifier) => Promise; tokens: (account: AccountIdentifier) => Promise; tokens_ext: (account: AccountIdentifier) => Promise; transfer: (arg_0: TransferRequest) => Promise; metadata: (token: TokenIdentifier) => Promise; supply: (token: TokenIdentifier) => Promise; } export declare const init: () => never[]; export {};