/* eslint-disable */ // @ts-nocheck // This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. import type { ActorMethod } from '@icp-sdk/core/agent'; import type { IDL } from '@icp-sdk/core/candid'; import type { Principal } from '@icp-sdk/core/principal'; export interface Account { 'owner' : Principal, 'subaccount' : [] | [Uint8Array], } export interface Allowance { 'allowance' : bigint, 'expires_at' : [] | [bigint], } export interface AllowanceArgs { 'account' : Account, 'spender' : Account } export type Allowances = Array< { 'from_account' : Account, 'to_spender' : Account, 'allowance' : bigint, 'expires_at' : [] | [bigint], } >; export interface ApproveArgs { 'fee' : [] | [bigint], 'memo' : [] | [Uint8Array], 'from_subaccount' : [] | [Uint8Array], 'created_at_time' : [] | [bigint], 'amount' : bigint, 'expected_allowance' : [] | [bigint], 'expires_at' : [] | [bigint], 'spender' : Account, } export type ApproveError = { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'TemporarilyUnavailable' : null } | { 'Duplicate' : { 'duplicate_of' : bigint } } | { 'BadFee' : { 'expected_fee' : bigint } } | { 'AllowanceChanged' : { 'current_allowance' : bigint } } | { 'CreatedInFuture' : { 'ledger_time' : bigint } } | { 'TooOld' : null } | { 'Expired' : { 'ledger_time' : bigint } } | { 'InsufficientFunds' : { 'balance' : bigint } }; export type BlockIndex = bigint; export interface CanisterSettings { 'freezing_threshold' : [] | [bigint], 'controllers' : [] | [Array], 'reserved_cycles_limit' : [] | [bigint], 'memory_allocation' : [] | [bigint], 'compute_allocation' : [] | [bigint], } export type ChangeIndexId = { 'SetTo' : Principal } | { 'Unset' : null }; export interface CmcCreateCanisterArgs { /** * Optional instructions to select on which subnet the new canister will be created on. */ 'subnet_selection' : [] | [SubnetSelection], /** * Optional canister settings that, if set, are applied to the newly created canister. * If not specified, the caller is the controller of the canister and the other settings are set to default values. */ 'settings' : [] | [CanisterSettings], } export interface CreateCanisterArgs { 'from_subaccount' : [] | [Uint8Array], 'created_at_time' : [] | [bigint], 'amount' : bigint, 'creation_args' : [] | [CmcCreateCanisterArgs], } export type CreateCanisterError = { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'TemporarilyUnavailable' : null } | { 'Duplicate' : { 'duplicate_of' : bigint, /** * If the original transaction created a canister then this field will contain the canister id. */ 'canister_id' : [] | [Principal], } } | { 'CreatedInFuture' : { 'ledger_time' : bigint } } | { 'FailedToCreate' : { 'error' : string, 'refund_block' : [] | [BlockIndex], 'fee_block' : [] | [BlockIndex], } } | { 'TooOld' : null } | { 'InsufficientFunds' : { 'balance' : bigint } }; export interface CreateCanisterFromArgs { 'spender_subaccount' : [] | [Uint8Array], 'from' : Account, 'created_at_time' : [] | [bigint], 'amount' : bigint, 'creation_args' : [] | [CmcCreateCanisterArgs], } export type CreateCanisterFromError = { 'FailedToCreateFrom' : { 'create_from_block' : [] | [BlockIndex], 'rejection_code' : RejectionCode, 'refund_block' : [] | [BlockIndex], 'approval_refund_block' : [] | [BlockIndex], 'rejection_reason' : string, } } | { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'TemporarilyUnavailable' : null } | { 'InsufficientAllowance' : { 'allowance' : bigint } } | { 'Duplicate' : { 'duplicate_of' : bigint, /** * If the original transaction created a canister then this field will contain the canister id. */ 'canister_id' : [] | [Principal], } } | { 'CreatedInFuture' : { 'ledger_time' : bigint } } | { 'TooOld' : null } | { 'InsufficientFunds' : { 'balance' : bigint } }; export interface CreateCanisterSuccess { 'block_id' : BlockIndex, 'canister_id' : Principal, } export interface DataCertificate { /** * See https://internetcomputer.org/docs/current/references/ic-interface-spec#certification */ 'certificate' : Uint8Array, /** * CBOR encoded hash_tree */ 'hash_tree' : Uint8Array, } export interface DepositArgs { 'to' : Account, 'memo' : [] | [Uint8Array] } export interface DepositResult { 'balance' : bigint, 'block_index' : BlockIndex, } export interface GetAllowancesArgs { 'take' : [] | [bigint], 'prev_spender' : [] | [Account], 'from_account' : [] | [Account], } export type GetAllowancesError = { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'AccessDenied' : { 'reason' : string } }; export interface GetArchivesArgs { /** * The last archive seen by the client. * The ledger will return archives coming * after this one if set, otherwise it * will return the first archives. */ 'from' : [] | [Principal], } export type GetArchivesResult = Array< { /** * The last block in the archive */ 'end' : bigint, /** * The id of the archive */ 'canister_id' : Principal, /** * The first block in the archive */ 'start' : bigint, } >; export type GetBlocksArgs = Array<{ 'start' : bigint, 'length' : bigint }>; export interface GetBlocksResult { /** * Total number of blocks in the * block log. */ 'log_length' : bigint, 'blocks' : Array<{ 'id' : bigint, 'block' : Value }>, /** * The archived_blocks vector is always going to be empty * for this ledger because there is no archive node. */ 'archived_blocks' : Array< { 'args' : GetBlocksArgs, 'callback' : [Principal, string] } >, } export type GetIndexPrincipalError = { /** * Any error not covered by the above variants. */ 'GenericError' : { 'description' : string, 'error_code' : bigint } } | { 'IndexPrincipalNotSet' : null }; export type GetIndexPrincipalResult = { 'Ok' : Principal } | { 'Err' : GetIndexPrincipalError }; export interface HttpRequest { 'url' : string, 'method' : string, 'body' : Uint8Array, 'headers' : Array<[string, string]>, } export interface HttpResponse { 'body' : Uint8Array, 'headers' : Array<[string, string]>, 'status_code' : number, } export type ICRC103GetAllowancesResponse = { 'Ok' : Allowances } | { 'Err' : GetAllowancesError }; export interface InitArgs { 'initial_balances' : [] | [Array<[Account, bigint]>], 'index_id' : [] | [Principal], 'max_blocks_per_request' : bigint, } export type LedgerArgs = { 'Upgrade' : [] | [UpgradeArgs] } | { 'Init' : InitArgs }; export type MetadataValue = { 'Int' : bigint } | { 'Nat' : bigint } | { 'Blob' : Uint8Array } | { 'Text' : string }; export type RejectionCode = { 'NoError' : null } | { 'CanisterError' : null } | { 'SysTransient' : null } | { 'DestinationInvalid' : null } | { 'Unknown' : null } | { 'SysFatal' : null } | { 'CanisterReject' : null }; export interface SubnetFilter { 'subnet_type' : [] | [string] } export type SubnetSelection = { /** * Choose a random subnet that satisfies the specified properties. */ 'Filter' : SubnetFilter } | { /** * / Choose a specific subnet */ 'Subnet' : { 'subnet' : Principal } }; export interface SupportedBlockType { 'url' : string, 'block_type' : string } export interface SupportedStandard { 'url' : string, 'name' : string } export interface TransferArgs { 'to' : Account, 'fee' : [] | [bigint], 'memo' : [] | [Uint8Array], 'from_subaccount' : [] | [Uint8Array], 'created_at_time' : [] | [bigint], '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' : bigint } } | { 'TooOld' : null } | { 'InsufficientFunds' : { 'balance' : bigint } }; export interface TransferFromArgs { 'to' : Account, 'fee' : [] | [bigint], 'spender_subaccount' : [] | [Uint8Array], 'from' : Account, 'memo' : [] | [Uint8Array], 'created_at_time' : [] | [bigint], 'amount' : bigint, } export type TransferFromError = { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'TemporarilyUnavailable' : null } | { 'InsufficientAllowance' : { 'allowance' : bigint } } | { 'BadBurn' : { 'min_burn_amount' : bigint } } | { 'Duplicate' : { 'duplicate_of' : bigint } } | { 'BadFee' : { 'expected_fee' : bigint } } | { 'CreatedInFuture' : { 'ledger_time' : bigint } } | { 'TooOld' : null } | { 'InsufficientFunds' : { 'balance' : bigint } }; export interface UpgradeArgs { 'change_index_id' : [] | [ChangeIndexId], 'max_blocks_per_request' : [] | [bigint], } export type Value = { 'Int' : bigint } | { 'Map' : Array<[string, Value]> } | { 'Nat' : bigint } | { 'Nat64' : bigint } | { 'Blob' : Uint8Array } | { 'Text' : string } | { 'Array' : Array }; export interface WithdrawArgs { 'to' : Principal, 'from_subaccount' : [] | [Uint8Array], 'created_at_time' : [] | [bigint], 'amount' : bigint, } export type WithdrawError = { 'FailedToWithdraw' : { 'rejection_code' : RejectionCode, 'fee_block' : [] | [bigint], 'rejection_reason' : string, } } | { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'TemporarilyUnavailable' : null } | { 'Duplicate' : { 'duplicate_of' : bigint } } | { 'BadFee' : { 'expected_fee' : bigint } } | { 'InvalidReceiver' : { 'receiver' : Principal } } | { 'CreatedInFuture' : { 'ledger_time' : bigint } } | { 'TooOld' : null } | { 'InsufficientFunds' : { 'balance' : bigint } }; export interface WithdrawFromArgs { 'to' : Principal, 'spender_subaccount' : [] | [Uint8Array], 'from' : Account, 'created_at_time' : [] | [bigint], 'amount' : bigint, } export type WithdrawFromError = { 'GenericError' : { 'message' : string, 'error_code' : bigint } } | { 'TemporarilyUnavailable' : null } | { 'InsufficientAllowance' : { 'allowance' : bigint } } | { 'Duplicate' : { 'duplicate_of' : BlockIndex } } | { 'InvalidReceiver' : { 'receiver' : Principal } } | { 'CreatedInFuture' : { 'ledger_time' : bigint } } | { 'TooOld' : null } | { 'FailedToWithdrawFrom' : { 'withdraw_from_block' : [] | [bigint], 'rejection_code' : RejectionCode, 'refund_block' : [] | [bigint], 'approval_refund_block' : [] | [bigint], 'rejection_reason' : string, } } | { 'InsufficientFunds' : { 'balance' : bigint } }; export interface _SERVICE { 'create_canister' : ActorMethod< [CreateCanisterArgs], { 'Ok' : CreateCanisterSuccess } | { 'Err' : CreateCanisterError } >, 'create_canister_from' : ActorMethod< [CreateCanisterFromArgs], { 'Ok' : CreateCanisterSuccess } | { 'Err' : CreateCanisterFromError } >, 'deposit' : ActorMethod<[DepositArgs], DepositResult>, 'http_request' : ActorMethod<[HttpRequest], HttpResponse>, 'icrc103_get_allowances' : ActorMethod< [GetAllowancesArgs], ICRC103GetAllowancesResponse >, 'icrc106_get_index_principal' : ActorMethod<[], GetIndexPrincipalResult>, 'icrc1_balance_of' : ActorMethod<[Account], bigint>, 'icrc1_decimals' : ActorMethod<[], number>, 'icrc1_fee' : ActorMethod<[], bigint>, 'icrc1_metadata' : ActorMethod<[], Array<[string, MetadataValue]>>, 'icrc1_minting_account' : ActorMethod<[], [] | [Account]>, 'icrc1_name' : ActorMethod<[], string>, 'icrc1_supported_standards' : ActorMethod<[], Array>, 'icrc1_symbol' : ActorMethod<[], string>, 'icrc1_total_supply' : ActorMethod<[], bigint>, 'icrc1_transfer' : ActorMethod< [TransferArgs], { 'Ok' : BlockIndex } | { 'Err' : TransferError } >, 'icrc2_allowance' : ActorMethod<[AllowanceArgs], Allowance>, 'icrc2_approve' : ActorMethod< [ApproveArgs], { 'Ok' : bigint } | { 'Err' : ApproveError } >, 'icrc2_transfer_from' : ActorMethod< [TransferFromArgs], { 'Ok' : bigint } | { 'Err' : TransferFromError } >, 'icrc3_get_archives' : ActorMethod<[GetArchivesArgs], GetArchivesResult>, 'icrc3_get_blocks' : ActorMethod<[GetBlocksArgs], GetBlocksResult>, 'icrc3_get_tip_certificate' : ActorMethod<[], [] | [DataCertificate]>, 'icrc3_supported_block_types' : ActorMethod<[], Array>, 'withdraw' : ActorMethod< [WithdrawArgs], { 'Ok' : BlockIndex } | { 'Err' : WithdrawError } >, 'withdraw_from' : ActorMethod< [WithdrawFromArgs], { 'Ok' : BlockIndex } | { 'Err' : WithdrawFromError } >, } export declare const idlService: IDL.ServiceClass; export declare const idlInitArgs: IDL.Type[]; export declare const idlFactory: IDL.InterfaceFactory; export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];