UNPKG

@dfinity/oisy-wallet-signer

Version:

A library designed to facilitate communication between a dApp and the OISY Wallet on the Internet Computer.

46 lines (44 loc) 1.7 kB
import type {ActorMethod} from '@dfinity/agent'; import type {IDL} from '@dfinity/candid'; import type {Principal} from '@dfinity/principal'; export interface Account { owner: Principal; subaccount: [] | [Subaccount]; } export type Duration = bigint; export type Subaccount = Uint8Array | number[]; export type Timestamp = bigint; export interface TransferArgs { to: Account; fee: [] | [bigint]; memo: [] | [Uint8Array | number[]]; from_subaccount: [] | [Subaccount]; created_at_time: [] | [Timestamp]; amount: bigint; } export 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 type Value = {Int: bigint} | {Nat: bigint} | {Blob: Uint8Array | number[]} | {Text: string}; export 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}>; } export declare const idlFactory: IDL.InterfaceFactory; export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];