@dfinity/ledger-icrc 6.0.1-next-2025-12-08.1 → 6.0.1-next-2025-12-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +4 -4
- package/package.json +3 -4
- package/dist/candid/icrc_icrc-1.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-1.certified.idl.js +0 -68
- package/dist/candid/icrc_icrc-1.d.ts +0 -69
- package/dist/candid/icrc_icrc-1.did +0 -54
- package/dist/candid/icrc_icrc-1.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-1.idl.js +0 -72
- package/dist/candid/icrc_icrc-10.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-10.certified.idl.js +0 -20
- package/dist/candid/icrc_icrc-10.d.ts +0 -21
- package/dist/candid/icrc_icrc-10.did +0 -8
- package/dist/candid/icrc_icrc-10.idl.d.ts +0 -2
- package/dist/candid/icrc_icrc-10.idl.js +0 -24
- package/dist/candid/icrc_index-ng.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_index-ng.certified.idl.js +0 -157
- package/dist/candid/icrc_index-ng.d.ts +0 -160
- package/dist/candid/icrc_index-ng.did +0 -163
- package/dist/candid/icrc_index-ng.idl.d.ts +0 -2
- package/dist/candid/icrc_index-ng.idl.js +0 -157
- package/dist/candid/icrc_index.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_index.certified.idl.js +0 -99
- package/dist/candid/icrc_index.d.ts +0 -108
- package/dist/candid/icrc_index.did +0 -98
- package/dist/candid/icrc_index.idl.d.ts +0 -2
- package/dist/candid/icrc_index.idl.js +0 -99
- package/dist/candid/icrc_ledger.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_ledger.certified.idl.js +0 -531
- package/dist/candid/icrc_ledger.d.ts +0 -596
- package/dist/candid/icrc_ledger.did +0 -586
- package/dist/candid/icrc_ledger.idl.d.ts +0 -2
- package/dist/candid/icrc_ledger.idl.js +0 -551
- package/dist/candid/icrc_nft-ledger.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_nft-ledger.certified.idl.js +0 -102
- package/dist/candid/icrc_nft-ledger.d.ts +0 -80
- package/dist/candid/icrc_nft-ledger.did +0 -67
- package/dist/candid/icrc_nft-ledger.idl.d.ts +0 -2
- package/dist/candid/icrc_nft-ledger.idl.js +0 -106
- package/dist/canister.d.ts +0 -13
- package/dist/converters/converters.d.ts +0 -16
- package/dist/converters/index.converters.d.ts +0 -6
- package/dist/converters/ledger.converters.d.ts +0 -6
- package/dist/errors/index.errors.d.ts +0 -2
- package/dist/errors/ledger.errors.d.ts +0 -25
- package/dist/index-ng.canister.d.ts +0 -43
- package/dist/index.canister.d.ts +0 -21
- package/dist/ledger.canister.d.ts +0 -121
- package/dist/nft-ledger.canister.d.ts +0 -16
- package/dist/types/canister.options.d.ts +0 -5
- package/dist/types/canister.types.d.ts +0 -2
- package/dist/types/index-ng.params.d.ts +0 -12
- package/dist/types/index-ng.types.d.ts +0 -1
- package/dist/types/index.params.d.ts +0 -7
- package/dist/types/index.types.d.ts +0 -1
- package/dist/types/ledger.params.d.ts +0 -109
- package/dist/types/ledger.responses.d.ts +0 -24
- package/dist/utils/ledger.utils.d.ts +0 -31
- package/dist/utils/payment.utils.d.ts +0 -28
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const Subaccount = IDL.Vec(IDL.Nat8);
|
|
11
|
-
const Account = IDL.Record({
|
|
12
|
-
owner: IDL.Principal,
|
|
13
|
-
subaccount: IDL.Opt(Subaccount),
|
|
14
|
-
});
|
|
15
|
-
const Value = IDL.Variant({
|
|
16
|
-
Int: IDL.Int,
|
|
17
|
-
Nat: IDL.Nat,
|
|
18
|
-
Blob: IDL.Vec(IDL.Nat8),
|
|
19
|
-
Text: IDL.Text,
|
|
20
|
-
});
|
|
21
|
-
const Timestamp = IDL.Nat64;
|
|
22
|
-
const TransferArgs = IDL.Record({
|
|
23
|
-
to: Account,
|
|
24
|
-
fee: IDL.Opt(IDL.Nat),
|
|
25
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
26
|
-
from_subaccount: IDL.Opt(Subaccount),
|
|
27
|
-
created_at_time: IDL.Opt(Timestamp),
|
|
28
|
-
amount: IDL.Nat,
|
|
29
|
-
});
|
|
30
|
-
const TransferError = IDL.Variant({
|
|
31
|
-
GenericError: IDL.Record({
|
|
32
|
-
message: IDL.Text,
|
|
33
|
-
error_code: IDL.Nat,
|
|
34
|
-
}),
|
|
35
|
-
TemporarilyUnavailable: IDL.Null,
|
|
36
|
-
BadBurn: IDL.Record({ min_burn_amount: IDL.Nat }),
|
|
37
|
-
Duplicate: IDL.Record({ duplicate_of: IDL.Nat }),
|
|
38
|
-
BadFee: IDL.Record({ expected_fee: IDL.Nat }),
|
|
39
|
-
CreatedInFuture: IDL.Record({ ledger_time: Timestamp }),
|
|
40
|
-
TooOld: IDL.Null,
|
|
41
|
-
InsufficientFunds: IDL.Record({ balance: IDL.Nat }),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return IDL.Service({
|
|
45
|
-
icrc1_balance_of: IDL.Func([Account], [IDL.Nat], ["query"]),
|
|
46
|
-
icrc1_decimals: IDL.Func([], [IDL.Nat8], ["query"]),
|
|
47
|
-
icrc1_fee: IDL.Func([], [IDL.Nat], ["query"]),
|
|
48
|
-
icrc1_metadata: IDL.Func(
|
|
49
|
-
[],
|
|
50
|
-
[IDL.Vec(IDL.Tuple(IDL.Text, Value))],
|
|
51
|
-
["query"],
|
|
52
|
-
),
|
|
53
|
-
icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], ["query"]),
|
|
54
|
-
icrc1_name: IDL.Func([], [IDL.Text], ["query"]),
|
|
55
|
-
icrc1_supported_standards: IDL.Func(
|
|
56
|
-
[],
|
|
57
|
-
[IDL.Vec(IDL.Record({ url: IDL.Text, name: IDL.Text }))],
|
|
58
|
-
["query"],
|
|
59
|
-
),
|
|
60
|
-
icrc1_symbol: IDL.Func([], [IDL.Text], ["query"]),
|
|
61
|
-
icrc1_total_supply: IDL.Func([], [IDL.Nat], ["query"]),
|
|
62
|
-
icrc1_transfer: IDL.Func(
|
|
63
|
-
[TransferArgs],
|
|
64
|
-
[IDL.Variant({ Ok: IDL.Nat, Err: TransferError })],
|
|
65
|
-
[],
|
|
66
|
-
),
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const init = ({ IDL }) => {
|
|
71
|
-
return [];
|
|
72
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const SupportedStandard = IDL.Record({ url: IDL.Text, name: IDL.Text });
|
|
11
|
-
const SupportedStandardsResponse = IDL.Vec(SupportedStandard);
|
|
12
|
-
|
|
13
|
-
return IDL.Service({
|
|
14
|
-
icrc10_supported_standards: IDL.Func([], [SupportedStandardsResponse], []),
|
|
15
|
-
});
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const init = ({ IDL }) => {
|
|
19
|
-
return [];
|
|
20
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
10
|
-
import type { IDL } from "@icp-sdk/core/candid";
|
|
11
|
-
|
|
12
|
-
export interface SupportedStandard {
|
|
13
|
-
url: string;
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
export type SupportedStandardsResponse = Array<SupportedStandard>;
|
|
17
|
-
export interface _SERVICE {
|
|
18
|
-
icrc10_supported_standards: ActorMethod<[], SupportedStandardsResponse>;
|
|
19
|
-
}
|
|
20
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
21
|
-
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Generated from dfinity/ICRC commit 1df0c6af6ecca4f4eb1956c67b29c0d13279f1cd for file 'ICRCs/ICRC-10/ICRC-10.did'
|
|
2
|
-
|
|
3
|
-
type SupportedStandard = record { name : text; url : text; };
|
|
4
|
-
type SupportedStandardsResponse = vec SupportedStandard;
|
|
5
|
-
|
|
6
|
-
service : {
|
|
7
|
-
icrc10_supported_standards : () -> (SupportedStandardsResponse) query;
|
|
8
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const SupportedStandard = IDL.Record({ url: IDL.Text, name: IDL.Text });
|
|
11
|
-
const SupportedStandardsResponse = IDL.Vec(SupportedStandard);
|
|
12
|
-
|
|
13
|
-
return IDL.Service({
|
|
14
|
-
icrc10_supported_standards: IDL.Func(
|
|
15
|
-
[],
|
|
16
|
-
[SupportedStandardsResponse],
|
|
17
|
-
["query"],
|
|
18
|
-
),
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const init = ({ IDL }) => {
|
|
23
|
-
return [];
|
|
24
|
-
};
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
export const idlFactory = ({ IDL }) => {
|
|
10
|
-
const Value = IDL.Rec();
|
|
11
|
-
const UpgradeArg = IDL.Record({
|
|
12
|
-
ledger_id: IDL.Opt(IDL.Principal),
|
|
13
|
-
retrieve_blocks_from_ledger_interval_seconds: IDL.Opt(IDL.Nat64),
|
|
14
|
-
});
|
|
15
|
-
const InitArg = IDL.Record({
|
|
16
|
-
ledger_id: IDL.Principal,
|
|
17
|
-
retrieve_blocks_from_ledger_interval_seconds: IDL.Opt(IDL.Nat64),
|
|
18
|
-
});
|
|
19
|
-
const IndexArg = IDL.Variant({ Upgrade: UpgradeArg, Init: InitArg });
|
|
20
|
-
const BlockIndex = IDL.Nat;
|
|
21
|
-
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
22
|
-
const Account = IDL.Record({
|
|
23
|
-
owner: IDL.Principal,
|
|
24
|
-
subaccount: IDL.Opt(SubAccount),
|
|
25
|
-
});
|
|
26
|
-
const GetAccountTransactionsArgs = IDL.Record({
|
|
27
|
-
max_results: IDL.Nat,
|
|
28
|
-
start: IDL.Opt(BlockIndex),
|
|
29
|
-
account: Account,
|
|
30
|
-
});
|
|
31
|
-
const Tokens = IDL.Nat;
|
|
32
|
-
const Burn = IDL.Record({
|
|
33
|
-
fee: IDL.Opt(IDL.Nat),
|
|
34
|
-
from: Account,
|
|
35
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
36
|
-
created_at_time: IDL.Opt(IDL.Nat64),
|
|
37
|
-
amount: Tokens,
|
|
38
|
-
spender: IDL.Opt(Account),
|
|
39
|
-
});
|
|
40
|
-
const Mint = IDL.Record({
|
|
41
|
-
to: Account,
|
|
42
|
-
fee: IDL.Opt(IDL.Nat),
|
|
43
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
44
|
-
created_at_time: IDL.Opt(IDL.Nat64),
|
|
45
|
-
amount: Tokens,
|
|
46
|
-
});
|
|
47
|
-
const Approve = IDL.Record({
|
|
48
|
-
fee: IDL.Opt(Tokens),
|
|
49
|
-
from: Account,
|
|
50
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
51
|
-
created_at_time: IDL.Opt(IDL.Nat64),
|
|
52
|
-
amount: Tokens,
|
|
53
|
-
expected_allowance: IDL.Opt(Tokens),
|
|
54
|
-
expires_at: IDL.Opt(IDL.Nat64),
|
|
55
|
-
spender: Account,
|
|
56
|
-
});
|
|
57
|
-
const FeeCollector = IDL.Record({
|
|
58
|
-
ts: IDL.Opt(IDL.Nat64),
|
|
59
|
-
fee_collector: IDL.Opt(Account),
|
|
60
|
-
caller: IDL.Opt(IDL.Principal),
|
|
61
|
-
});
|
|
62
|
-
const Transfer = IDL.Record({
|
|
63
|
-
to: Account,
|
|
64
|
-
fee: IDL.Opt(Tokens),
|
|
65
|
-
from: Account,
|
|
66
|
-
memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
67
|
-
created_at_time: IDL.Opt(IDL.Nat64),
|
|
68
|
-
amount: Tokens,
|
|
69
|
-
spender: IDL.Opt(Account),
|
|
70
|
-
});
|
|
71
|
-
const Transaction = IDL.Record({
|
|
72
|
-
burn: IDL.Opt(Burn),
|
|
73
|
-
kind: IDL.Text,
|
|
74
|
-
mint: IDL.Opt(Mint),
|
|
75
|
-
approve: IDL.Opt(Approve),
|
|
76
|
-
fee_collector: IDL.Opt(FeeCollector),
|
|
77
|
-
timestamp: IDL.Nat64,
|
|
78
|
-
transfer: IDL.Opt(Transfer),
|
|
79
|
-
});
|
|
80
|
-
const TransactionWithId = IDL.Record({
|
|
81
|
-
id: BlockIndex,
|
|
82
|
-
transaction: Transaction,
|
|
83
|
-
});
|
|
84
|
-
const GetTransactions = IDL.Record({
|
|
85
|
-
balance: Tokens,
|
|
86
|
-
transactions: IDL.Vec(TransactionWithId),
|
|
87
|
-
oldest_tx_id: IDL.Opt(BlockIndex),
|
|
88
|
-
});
|
|
89
|
-
const GetTransactionsErr = IDL.Record({ message: IDL.Text });
|
|
90
|
-
const GetTransactionsResult = IDL.Variant({
|
|
91
|
-
Ok: GetTransactions,
|
|
92
|
-
Err: GetTransactionsErr,
|
|
93
|
-
});
|
|
94
|
-
const GetBlocksRequest = IDL.Record({
|
|
95
|
-
start: IDL.Nat,
|
|
96
|
-
length: IDL.Nat,
|
|
97
|
-
});
|
|
98
|
-
const Map = IDL.Vec(IDL.Tuple(IDL.Text, Value));
|
|
99
|
-
Value.fill(
|
|
100
|
-
IDL.Variant({
|
|
101
|
-
Int: IDL.Int,
|
|
102
|
-
Map: Map,
|
|
103
|
-
Nat: IDL.Nat,
|
|
104
|
-
Nat64: IDL.Nat64,
|
|
105
|
-
Blob: IDL.Vec(IDL.Nat8),
|
|
106
|
-
Text: IDL.Text,
|
|
107
|
-
Array: IDL.Vec(Value),
|
|
108
|
-
}),
|
|
109
|
-
);
|
|
110
|
-
const Block = Value;
|
|
111
|
-
const GetBlocksResponse = IDL.Record({
|
|
112
|
-
blocks: IDL.Vec(Block),
|
|
113
|
-
chain_length: IDL.Nat64,
|
|
114
|
-
});
|
|
115
|
-
const FeeCollectorRanges = IDL.Record({
|
|
116
|
-
ranges: IDL.Vec(
|
|
117
|
-
IDL.Tuple(Account, IDL.Vec(IDL.Tuple(BlockIndex, BlockIndex))),
|
|
118
|
-
),
|
|
119
|
-
});
|
|
120
|
-
const ListSubaccountsArgs = IDL.Record({
|
|
121
|
-
owner: IDL.Principal,
|
|
122
|
-
start: IDL.Opt(SubAccount),
|
|
123
|
-
});
|
|
124
|
-
const Status = IDL.Record({ num_blocks_synced: BlockIndex });
|
|
125
|
-
|
|
126
|
-
return IDL.Service({
|
|
127
|
-
get_account_transactions: IDL.Func(
|
|
128
|
-
[GetAccountTransactionsArgs],
|
|
129
|
-
[GetTransactionsResult],
|
|
130
|
-
[],
|
|
131
|
-
),
|
|
132
|
-
get_blocks: IDL.Func([GetBlocksRequest], [GetBlocksResponse], []),
|
|
133
|
-
get_fee_collectors_ranges: IDL.Func([], [FeeCollectorRanges], []),
|
|
134
|
-
icrc1_balance_of: IDL.Func([Account], [Tokens], []),
|
|
135
|
-
ledger_id: IDL.Func([], [IDL.Principal], []),
|
|
136
|
-
list_subaccounts: IDL.Func(
|
|
137
|
-
[ListSubaccountsArgs],
|
|
138
|
-
[IDL.Vec(SubAccount)],
|
|
139
|
-
[],
|
|
140
|
-
),
|
|
141
|
-
status: IDL.Func([], [Status], ["query"]),
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export const init = ({ IDL }) => {
|
|
146
|
-
const UpgradeArg = IDL.Record({
|
|
147
|
-
ledger_id: IDL.Opt(IDL.Principal),
|
|
148
|
-
retrieve_blocks_from_ledger_interval_seconds: IDL.Opt(IDL.Nat64),
|
|
149
|
-
});
|
|
150
|
-
const InitArg = IDL.Record({
|
|
151
|
-
ledger_id: IDL.Principal,
|
|
152
|
-
retrieve_blocks_from_ledger_interval_seconds: IDL.Opt(IDL.Nat64),
|
|
153
|
-
});
|
|
154
|
-
const IndexArg = IDL.Variant({ Upgrade: UpgradeArg, Init: InitArg });
|
|
155
|
-
|
|
156
|
-
return [IDL.Opt(IndexArg)];
|
|
157
|
-
};
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
|
|
5
|
-
// This file was automatically generated by @icp-sdk/bindgen@0.2.0.
|
|
6
|
-
// You should NOT make any changes in this file as it will be overwritten.
|
|
7
|
-
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
|
8
|
-
|
|
9
|
-
import type { ActorMethod } from "@icp-sdk/core/agent";
|
|
10
|
-
import type { IDL } from "@icp-sdk/core/candid";
|
|
11
|
-
import type { Principal } from "@icp-sdk/core/principal";
|
|
12
|
-
|
|
13
|
-
export interface Account {
|
|
14
|
-
owner: Principal;
|
|
15
|
-
subaccount: [] | [SubAccount];
|
|
16
|
-
}
|
|
17
|
-
export interface Approve {
|
|
18
|
-
fee: [] | [Tokens];
|
|
19
|
-
from: Account;
|
|
20
|
-
memo: [] | [Uint8Array];
|
|
21
|
-
created_at_time: [] | [bigint];
|
|
22
|
-
amount: Tokens;
|
|
23
|
-
expected_allowance: [] | [Tokens];
|
|
24
|
-
expires_at: [] | [bigint];
|
|
25
|
-
spender: Account;
|
|
26
|
-
}
|
|
27
|
-
export type Block = Value;
|
|
28
|
-
export type BlockIndex = bigint;
|
|
29
|
-
export interface Burn {
|
|
30
|
-
fee: [] | [bigint];
|
|
31
|
-
from: Account;
|
|
32
|
-
memo: [] | [Uint8Array];
|
|
33
|
-
created_at_time: [] | [bigint];
|
|
34
|
-
amount: Tokens;
|
|
35
|
-
spender: [] | [Account];
|
|
36
|
-
}
|
|
37
|
-
export interface FeeCollector {
|
|
38
|
-
ts: [] | [bigint];
|
|
39
|
-
fee_collector: [] | [Account];
|
|
40
|
-
caller: [] | [Principal];
|
|
41
|
-
}
|
|
42
|
-
export interface FeeCollectorRanges {
|
|
43
|
-
ranges: Array<[Account, Array<[BlockIndex, BlockIndex]>]>;
|
|
44
|
-
}
|
|
45
|
-
export interface GetAccountTransactionsArgs {
|
|
46
|
-
/**
|
|
47
|
-
* Maximum number of transactions to fetch.
|
|
48
|
-
*/
|
|
49
|
-
max_results: bigint;
|
|
50
|
-
/**
|
|
51
|
-
* The txid of the last transaction seen by the client.
|
|
52
|
-
* If None then the results will start from the most recent
|
|
53
|
-
* txid. If set then the results will start from the next
|
|
54
|
-
* most recent txid after start (start won't be included).
|
|
55
|
-
*/
|
|
56
|
-
start: [] | [BlockIndex];
|
|
57
|
-
account: Account;
|
|
58
|
-
}
|
|
59
|
-
export interface GetBlocksRequest {
|
|
60
|
-
start: bigint;
|
|
61
|
-
length: bigint;
|
|
62
|
-
}
|
|
63
|
-
export interface GetBlocksResponse {
|
|
64
|
-
blocks: Array<Block>;
|
|
65
|
-
chain_length: bigint;
|
|
66
|
-
}
|
|
67
|
-
export interface GetTransactions {
|
|
68
|
-
balance: Tokens;
|
|
69
|
-
transactions: Array<TransactionWithId>;
|
|
70
|
-
/**
|
|
71
|
-
* The txid of the oldest transaction the account has
|
|
72
|
-
*/
|
|
73
|
-
oldest_tx_id: [] | [BlockIndex];
|
|
74
|
-
}
|
|
75
|
-
export interface GetTransactionsErr {
|
|
76
|
-
message: string;
|
|
77
|
-
}
|
|
78
|
-
export type GetTransactionsResult =
|
|
79
|
-
| { Ok: GetTransactions }
|
|
80
|
-
| { Err: GetTransactionsErr };
|
|
81
|
-
export type IndexArg = { Upgrade: UpgradeArg } | { Init: InitArg };
|
|
82
|
-
export interface InitArg {
|
|
83
|
-
ledger_id: Principal;
|
|
84
|
-
/**
|
|
85
|
-
* The interval in seconds in which to retrieve blocks from the ledger. A lower value makes the index more
|
|
86
|
-
* responsive in showing new blocks, but increases the consumption of cycles of both the index and ledger canisters.
|
|
87
|
-
* A higher values means that it takes longer for new blocks to show up in the index.
|
|
88
|
-
*/
|
|
89
|
-
retrieve_blocks_from_ledger_interval_seconds: [] | [bigint];
|
|
90
|
-
}
|
|
91
|
-
export interface ListSubaccountsArgs {
|
|
92
|
-
owner: Principal;
|
|
93
|
-
start: [] | [SubAccount];
|
|
94
|
-
}
|
|
95
|
-
export type Map = Array<[string, Value]>;
|
|
96
|
-
export interface Mint {
|
|
97
|
-
to: Account;
|
|
98
|
-
fee: [] | [bigint];
|
|
99
|
-
memo: [] | [Uint8Array];
|
|
100
|
-
created_at_time: [] | [bigint];
|
|
101
|
-
amount: Tokens;
|
|
102
|
-
}
|
|
103
|
-
export interface Status {
|
|
104
|
-
num_blocks_synced: BlockIndex;
|
|
105
|
-
}
|
|
106
|
-
export type SubAccount = Uint8Array;
|
|
107
|
-
export type Tokens = bigint;
|
|
108
|
-
export interface Transaction {
|
|
109
|
-
burn: [] | [Burn];
|
|
110
|
-
kind: string;
|
|
111
|
-
mint: [] | [Mint];
|
|
112
|
-
approve: [] | [Approve];
|
|
113
|
-
fee_collector: [] | [FeeCollector];
|
|
114
|
-
timestamp: bigint;
|
|
115
|
-
transfer: [] | [Transfer];
|
|
116
|
-
}
|
|
117
|
-
export interface TransactionWithId {
|
|
118
|
-
id: BlockIndex;
|
|
119
|
-
transaction: Transaction;
|
|
120
|
-
}
|
|
121
|
-
export interface Transfer {
|
|
122
|
-
to: Account;
|
|
123
|
-
fee: [] | [Tokens];
|
|
124
|
-
from: Account;
|
|
125
|
-
memo: [] | [Uint8Array];
|
|
126
|
-
created_at_time: [] | [bigint];
|
|
127
|
-
amount: Tokens;
|
|
128
|
-
spender: [] | [Account];
|
|
129
|
-
}
|
|
130
|
-
export interface UpgradeArg {
|
|
131
|
-
ledger_id: [] | [Principal];
|
|
132
|
-
/**
|
|
133
|
-
* The interval in seconds in which to retrieve blocks from the ledger. A lower value makes the index more
|
|
134
|
-
* responsive in showing new blocks, but increases the consumption of cycles of both the index and ledger canisters.
|
|
135
|
-
* A higher values means that it takes longer for new blocks to show up in the index.
|
|
136
|
-
*/
|
|
137
|
-
retrieve_blocks_from_ledger_interval_seconds: [] | [bigint];
|
|
138
|
-
}
|
|
139
|
-
export type Value =
|
|
140
|
-
| { Int: bigint }
|
|
141
|
-
| { Map: Map }
|
|
142
|
-
| { Nat: bigint }
|
|
143
|
-
| { Nat64: bigint }
|
|
144
|
-
| { Blob: Uint8Array }
|
|
145
|
-
| { Text: string }
|
|
146
|
-
| { Array: Array<Value> };
|
|
147
|
-
export interface _SERVICE {
|
|
148
|
-
get_account_transactions: ActorMethod<
|
|
149
|
-
[GetAccountTransactionsArgs],
|
|
150
|
-
GetTransactionsResult
|
|
151
|
-
>;
|
|
152
|
-
get_blocks: ActorMethod<[GetBlocksRequest], GetBlocksResponse>;
|
|
153
|
-
get_fee_collectors_ranges: ActorMethod<[], FeeCollectorRanges>;
|
|
154
|
-
icrc1_balance_of: ActorMethod<[Account], Tokens>;
|
|
155
|
-
ledger_id: ActorMethod<[], Principal>;
|
|
156
|
-
list_subaccounts: ActorMethod<[ListSubaccountsArgs], Array<SubAccount>>;
|
|
157
|
-
status: ActorMethod<[], Status>;
|
|
158
|
-
}
|
|
159
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
160
|
-
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
// Generated from IC repo commit 724ae41 (2025-11-27 tags: release-2025-11-28_03-22-base) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid
|
|
2
|
-
|
|
3
|
-
type Tokens = nat;
|
|
4
|
-
|
|
5
|
-
type InitArg = record {
|
|
6
|
-
ledger_id : principal;
|
|
7
|
-
// The interval in seconds in which to retrieve blocks from the ledger. A lower value makes the index more
|
|
8
|
-
// responsive in showing new blocks, but increases the consumption of cycles of both the index and ledger canisters.
|
|
9
|
-
// A higher values means that it takes longer for new blocks to show up in the index.
|
|
10
|
-
retrieve_blocks_from_ledger_interval_seconds : opt nat64
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type UpgradeArg = record {
|
|
14
|
-
ledger_id : opt principal;
|
|
15
|
-
// The interval in seconds in which to retrieve blocks from the ledger. A lower value makes the index more
|
|
16
|
-
// responsive in showing new blocks, but increases the consumption of cycles of both the index and ledger canisters.
|
|
17
|
-
// A higher values means that it takes longer for new blocks to show up in the index.
|
|
18
|
-
retrieve_blocks_from_ledger_interval_seconds : opt nat64
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
type IndexArg = variant {
|
|
22
|
-
Init : InitArg;
|
|
23
|
-
Upgrade : UpgradeArg
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
type GetBlocksRequest = record {
|
|
27
|
-
start : nat;
|
|
28
|
-
length : nat
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
type Value = variant {
|
|
32
|
-
Blob : blob;
|
|
33
|
-
Text : text;
|
|
34
|
-
Nat : nat;
|
|
35
|
-
Nat64 : nat64;
|
|
36
|
-
Int : int;
|
|
37
|
-
Array : vec Value;
|
|
38
|
-
Map : Map
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
type Map = vec record { text; Value };
|
|
42
|
-
|
|
43
|
-
type Block = Value;
|
|
44
|
-
|
|
45
|
-
type GetBlocksResponse = record {
|
|
46
|
-
chain_length : nat64;
|
|
47
|
-
blocks : vec Block
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
type BlockIndex = nat;
|
|
51
|
-
|
|
52
|
-
type SubAccount = blob;
|
|
53
|
-
|
|
54
|
-
type Account = record { owner : principal; subaccount : opt SubAccount };
|
|
55
|
-
|
|
56
|
-
type Transaction = record {
|
|
57
|
-
burn : opt Burn;
|
|
58
|
-
kind : text;
|
|
59
|
-
mint : opt Mint;
|
|
60
|
-
approve : opt Approve;
|
|
61
|
-
fee_collector : opt FeeCollector;
|
|
62
|
-
timestamp : nat64;
|
|
63
|
-
transfer : opt Transfer
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
type FeeCollector = record {
|
|
67
|
-
caller : opt principal;
|
|
68
|
-
fee_collector : opt Account;
|
|
69
|
-
ts : opt nat64
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
type Approve = record {
|
|
73
|
-
fee : opt Tokens;
|
|
74
|
-
from : Account;
|
|
75
|
-
memo : opt vec nat8;
|
|
76
|
-
created_at_time : opt nat64;
|
|
77
|
-
amount : Tokens;
|
|
78
|
-
expected_allowance : opt Tokens;
|
|
79
|
-
expires_at : opt nat64;
|
|
80
|
-
spender : Account
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
type Burn = record {
|
|
84
|
-
from : Account;
|
|
85
|
-
memo : opt vec nat8;
|
|
86
|
-
created_at_time : opt nat64;
|
|
87
|
-
amount : Tokens;
|
|
88
|
-
spender : opt Account;
|
|
89
|
-
fee : opt nat
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
type Mint = record {
|
|
93
|
-
to : Account;
|
|
94
|
-
memo : opt vec nat8;
|
|
95
|
-
created_at_time : opt nat64;
|
|
96
|
-
amount : Tokens;
|
|
97
|
-
fee : opt nat
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
type Transfer = record {
|
|
101
|
-
to : Account;
|
|
102
|
-
fee : opt Tokens;
|
|
103
|
-
from : Account;
|
|
104
|
-
memo : opt vec nat8;
|
|
105
|
-
created_at_time : opt nat64;
|
|
106
|
-
amount : Tokens;
|
|
107
|
-
spender : opt Account
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
type GetAccountTransactionsArgs = record {
|
|
111
|
-
account : Account;
|
|
112
|
-
// The txid of the last transaction seen by the client.
|
|
113
|
-
// If None then the results will start from the most recent
|
|
114
|
-
// txid. If set then the results will start from the next
|
|
115
|
-
// most recent txid after start (start won't be included).
|
|
116
|
-
start : opt BlockIndex;
|
|
117
|
-
// Maximum number of transactions to fetch.
|
|
118
|
-
max_results : nat
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
type TransactionWithId = record {
|
|
122
|
-
id : BlockIndex;
|
|
123
|
-
transaction : Transaction
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
type GetTransactions = record {
|
|
127
|
-
balance : Tokens;
|
|
128
|
-
transactions : vec TransactionWithId;
|
|
129
|
-
// The txid of the oldest transaction the account has
|
|
130
|
-
oldest_tx_id : opt BlockIndex
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
type GetTransactionsErr = record {
|
|
134
|
-
message : text
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
type GetTransactionsResult = variant {
|
|
138
|
-
Ok : GetTransactions;
|
|
139
|
-
Err : GetTransactionsErr
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
type ListSubaccountsArgs = record {
|
|
143
|
-
owner : principal;
|
|
144
|
-
start : opt SubAccount
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
type Status = record {
|
|
148
|
-
num_blocks_synced : BlockIndex
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
type FeeCollectorRanges = record {
|
|
152
|
-
ranges : vec record { Account; vec record { BlockIndex; BlockIndex } }
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
service : (index_arg : opt IndexArg) -> {
|
|
156
|
-
get_account_transactions : (GetAccountTransactionsArgs) -> (GetTransactionsResult) query;
|
|
157
|
-
get_blocks : (GetBlocksRequest) -> (GetBlocksResponse) query;
|
|
158
|
-
get_fee_collectors_ranges : () -> (FeeCollectorRanges) query;
|
|
159
|
-
icrc1_balance_of : (Account) -> (Tokens) query;
|
|
160
|
-
ledger_id : () -> (principal) query;
|
|
161
|
-
list_subaccounts : (ListSubaccountsArgs) -> (vec SubAccount) query;
|
|
162
|
-
status : () -> (Status) query
|
|
163
|
-
}
|