@funded-labs/dab-js
Version:
JS adapter for DAB
79 lines (78 loc) • 1.92 kB
TypeScript
import type { Principal } from '@dfinity/principal';
import type { ActorMethod } from '@dfinity/agent';
export interface Account {
'owner': Principal;
'subaccount': [] | [Subaccount];
}
export declare type Duration = bigint;
export declare type Subaccount = Uint8Array | number[];
export declare type Timestamp = bigint;
export interface TransferArgs {
'to': Account;
'fee': [] | [bigint];
'memo': [] | [Uint8Array | number[]];
'from_subaccount': [] | [Subaccount];
'created_at_time': [] | [Timestamp];
'amount': bigint;
}
export declare type TransferError = {
'GenericError': {
'message': string;
'error_code': bigint;
};
} | {
'TemporarilyUnavailable': null;
} | {
'BadBurn': {
'min_burn_amount': bigint;
};
} | {
'Duplicate': {
'duplicate_of': bigint;
};
} | {
'BadFee': {
'expected_fee': bigint;
};
} | {
'CreatedInFuture': {
'ledger_time': Timestamp;
};
} | {
'TooOld': null;
} | {
'InsufficientFunds': {
'balance': bigint;
};
};
export declare type Value = {
'Int': bigint;
} | {
'Nat': bigint;
} | {
'Blob': Uint8Array | number[];
} | {
'Text': string;
};
export default interface _SERVICE {
'icrc1_balance_of': ActorMethod<[Account], bigint>;
'icrc1_decimals': ActorMethod<[], number>;
'icrc1_fee': ActorMethod<[], bigint>;
'icrc1_metadata': ActorMethod<[], Array<[string, Value]>>;
'icrc1_minting_account': ActorMethod<[], [] | [Account]>;
'icrc1_name': ActorMethod<[], string>;
'icrc1_supported_standards': ActorMethod<[
], Array<{
'url': string;
'name': string;
}>>;
'icrc1_symbol': ActorMethod<[], string>;
'icrc1_total_supply': ActorMethod<[], bigint>;
'icrc1_transfer': ActorMethod<[
TransferArgs
], {
'Ok': bigint;
} | {
'Err': TransferError;
}>;
}