@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.
Files changed (62) hide show
  1. package/dist/index.d.ts +18 -18
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +4 -4
  4. package/dist/index.mjs +1 -1
  5. package/dist/index.mjs.map +4 -4
  6. package/package.json +3 -4
  7. package/dist/candid/icrc_icrc-1.certified.idl.d.ts +0 -2
  8. package/dist/candid/icrc_icrc-1.certified.idl.js +0 -68
  9. package/dist/candid/icrc_icrc-1.d.ts +0 -69
  10. package/dist/candid/icrc_icrc-1.did +0 -54
  11. package/dist/candid/icrc_icrc-1.idl.d.ts +0 -2
  12. package/dist/candid/icrc_icrc-1.idl.js +0 -72
  13. package/dist/candid/icrc_icrc-10.certified.idl.d.ts +0 -2
  14. package/dist/candid/icrc_icrc-10.certified.idl.js +0 -20
  15. package/dist/candid/icrc_icrc-10.d.ts +0 -21
  16. package/dist/candid/icrc_icrc-10.did +0 -8
  17. package/dist/candid/icrc_icrc-10.idl.d.ts +0 -2
  18. package/dist/candid/icrc_icrc-10.idl.js +0 -24
  19. package/dist/candid/icrc_index-ng.certified.idl.d.ts +0 -2
  20. package/dist/candid/icrc_index-ng.certified.idl.js +0 -157
  21. package/dist/candid/icrc_index-ng.d.ts +0 -160
  22. package/dist/candid/icrc_index-ng.did +0 -163
  23. package/dist/candid/icrc_index-ng.idl.d.ts +0 -2
  24. package/dist/candid/icrc_index-ng.idl.js +0 -157
  25. package/dist/candid/icrc_index.certified.idl.d.ts +0 -2
  26. package/dist/candid/icrc_index.certified.idl.js +0 -99
  27. package/dist/candid/icrc_index.d.ts +0 -108
  28. package/dist/candid/icrc_index.did +0 -98
  29. package/dist/candid/icrc_index.idl.d.ts +0 -2
  30. package/dist/candid/icrc_index.idl.js +0 -99
  31. package/dist/candid/icrc_ledger.certified.idl.d.ts +0 -2
  32. package/dist/candid/icrc_ledger.certified.idl.js +0 -531
  33. package/dist/candid/icrc_ledger.d.ts +0 -596
  34. package/dist/candid/icrc_ledger.did +0 -586
  35. package/dist/candid/icrc_ledger.idl.d.ts +0 -2
  36. package/dist/candid/icrc_ledger.idl.js +0 -551
  37. package/dist/candid/icrc_nft-ledger.certified.idl.d.ts +0 -2
  38. package/dist/candid/icrc_nft-ledger.certified.idl.js +0 -102
  39. package/dist/candid/icrc_nft-ledger.d.ts +0 -80
  40. package/dist/candid/icrc_nft-ledger.did +0 -67
  41. package/dist/candid/icrc_nft-ledger.idl.d.ts +0 -2
  42. package/dist/candid/icrc_nft-ledger.idl.js +0 -106
  43. package/dist/canister.d.ts +0 -13
  44. package/dist/converters/converters.d.ts +0 -16
  45. package/dist/converters/index.converters.d.ts +0 -6
  46. package/dist/converters/ledger.converters.d.ts +0 -6
  47. package/dist/errors/index.errors.d.ts +0 -2
  48. package/dist/errors/ledger.errors.d.ts +0 -25
  49. package/dist/index-ng.canister.d.ts +0 -43
  50. package/dist/index.canister.d.ts +0 -21
  51. package/dist/ledger.canister.d.ts +0 -121
  52. package/dist/nft-ledger.canister.d.ts +0 -16
  53. package/dist/types/canister.options.d.ts +0 -5
  54. package/dist/types/canister.types.d.ts +0 -2
  55. package/dist/types/index-ng.params.d.ts +0 -12
  56. package/dist/types/index-ng.types.d.ts +0 -1
  57. package/dist/types/index.params.d.ts +0 -7
  58. package/dist/types/index.types.d.ts +0 -1
  59. package/dist/types/ledger.params.d.ts +0 -109
  60. package/dist/types/ledger.responses.d.ts +0 -24
  61. package/dist/utils/ledger.utils.d.ts +0 -31
  62. package/dist/utils/payment.utils.d.ts +0 -28
@@ -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
- ["query"],
131
- ),
132
- get_blocks: IDL.Func([GetBlocksRequest], [GetBlocksResponse], ["query"]),
133
- get_fee_collectors_ranges: IDL.Func([], [FeeCollectorRanges], ["query"]),
134
- icrc1_balance_of: IDL.Func([Account], [Tokens], ["query"]),
135
- ledger_id: IDL.Func([], [IDL.Principal], ["query"]),
136
- list_subaccounts: IDL.Func(
137
- [ListSubaccountsArgs],
138
- [IDL.Vec(SubAccount)],
139
- ["query"],
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,2 +0,0 @@
1
- import type { IDL } from "@icp-sdk/core/candid";
2
- export const idlFactory: IDL.InterfaceFactory;
@@ -1,99 +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 InitArgs = IDL.Record({ ledger_id: IDL.Principal });
11
- const TxId = IDL.Nat;
12
- const Account = IDL.Record({
13
- owner: IDL.Principal,
14
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
15
- });
16
- const GetAccountTransactionsArgs = IDL.Record({
17
- max_results: IDL.Nat,
18
- start: IDL.Opt(TxId),
19
- account: Account,
20
- });
21
- const Burn = IDL.Record({
22
- from: Account,
23
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
24
- created_at_time: IDL.Opt(IDL.Nat64),
25
- amount: IDL.Nat,
26
- spender: IDL.Opt(Account),
27
- });
28
- const Mint = IDL.Record({
29
- to: Account,
30
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
- created_at_time: IDL.Opt(IDL.Nat64),
32
- amount: IDL.Nat,
33
- });
34
- const Approve = IDL.Record({
35
- fee: IDL.Opt(IDL.Nat),
36
- from: Account,
37
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
38
- created_at_time: IDL.Opt(IDL.Nat64),
39
- amount: IDL.Nat,
40
- expected_allowance: IDL.Opt(IDL.Nat),
41
- expires_at: IDL.Opt(IDL.Nat64),
42
- spender: Account,
43
- });
44
- const Transfer = IDL.Record({
45
- to: Account,
46
- fee: IDL.Opt(IDL.Nat),
47
- from: Account,
48
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
49
- created_at_time: IDL.Opt(IDL.Nat64),
50
- amount: IDL.Nat,
51
- spender: IDL.Opt(Account),
52
- });
53
- const Transaction = IDL.Record({
54
- burn: IDL.Opt(Burn),
55
- kind: IDL.Text,
56
- mint: IDL.Opt(Mint),
57
- approve: IDL.Opt(Approve),
58
- timestamp: IDL.Nat64,
59
- transfer: IDL.Opt(Transfer),
60
- });
61
- const TransactionWithId = IDL.Record({
62
- id: TxId,
63
- transaction: Transaction,
64
- });
65
- const GetTransactions = IDL.Record({
66
- transactions: IDL.Vec(TransactionWithId),
67
- oldest_tx_id: IDL.Opt(TxId),
68
- });
69
- const GetTransactionsErr = IDL.Record({ message: IDL.Text });
70
- const GetTransactionsResult = IDL.Variant({
71
- Ok: GetTransactions,
72
- Err: GetTransactionsErr,
73
- });
74
- const SubAccount = IDL.Vec(IDL.Nat8);
75
- const ListSubaccountsArgs = IDL.Record({
76
- owner: IDL.Principal,
77
- start: IDL.Opt(SubAccount),
78
- });
79
-
80
- return IDL.Service({
81
- get_account_transactions: IDL.Func(
82
- [GetAccountTransactionsArgs],
83
- [GetTransactionsResult],
84
- [],
85
- ),
86
- ledger_id: IDL.Func([], [IDL.Principal], []),
87
- list_subaccounts: IDL.Func(
88
- [ListSubaccountsArgs],
89
- [IDL.Vec(SubAccount)],
90
- [],
91
- ),
92
- });
93
- };
94
-
95
- export const init = ({ IDL }) => {
96
- const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
97
-
98
- return [InitArgs];
99
- };
@@ -1,108 +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: [] | [Uint8Array];
16
- }
17
- export interface Approve {
18
- fee: [] | [bigint];
19
- from: Account;
20
- memo: [] | [Uint8Array];
21
- created_at_time: [] | [bigint];
22
- amount: bigint;
23
- expected_allowance: [] | [bigint];
24
- expires_at: [] | [bigint];
25
- spender: Account;
26
- }
27
- export interface Burn {
28
- from: Account;
29
- memo: [] | [Uint8Array];
30
- created_at_time: [] | [bigint];
31
- amount: bigint;
32
- spender: [] | [Account];
33
- }
34
- export interface GetAccountTransactionsArgs {
35
- /**
36
- * Maximum number of transactions to fetch.
37
- */
38
- max_results: bigint;
39
- /**
40
- * The txid of the last transaction seen by the client.
41
- * If None then the results will start from the most recent
42
- * txid.
43
- */
44
- start: [] | [TxId];
45
- account: Account;
46
- }
47
- export interface GetTransactions {
48
- transactions: Array<TransactionWithId>;
49
- /**
50
- * The txid of the oldest transaction the account has
51
- */
52
- oldest_tx_id: [] | [TxId];
53
- }
54
- export interface GetTransactionsErr {
55
- message: string;
56
- }
57
- export type GetTransactionsResult =
58
- | { Ok: GetTransactions }
59
- | { Err: GetTransactionsErr };
60
- /**
61
- * The initialization parameters of the Index canister.
62
- */
63
- export interface InitArgs {
64
- ledger_id: Principal;
65
- }
66
- export interface ListSubaccountsArgs {
67
- owner: Principal;
68
- start: [] | [SubAccount];
69
- }
70
- export interface Mint {
71
- to: Account;
72
- memo: [] | [Uint8Array];
73
- created_at_time: [] | [bigint];
74
- amount: bigint;
75
- }
76
- export type SubAccount = Uint8Array;
77
- export interface Transaction {
78
- burn: [] | [Burn];
79
- kind: string;
80
- mint: [] | [Mint];
81
- approve: [] | [Approve];
82
- timestamp: bigint;
83
- transfer: [] | [Transfer];
84
- }
85
- export interface TransactionWithId {
86
- id: TxId;
87
- transaction: Transaction;
88
- }
89
- export interface Transfer {
90
- to: Account;
91
- fee: [] | [bigint];
92
- from: Account;
93
- memo: [] | [Uint8Array];
94
- created_at_time: [] | [bigint];
95
- amount: bigint;
96
- spender: [] | [Account];
97
- }
98
- export type TxId = bigint;
99
- export interface _SERVICE {
100
- get_account_transactions: ActorMethod<
101
- [GetAccountTransactionsArgs],
102
- GetTransactionsResult
103
- >;
104
- ledger_id: ActorMethod<[], Principal>;
105
- list_subaccounts: ActorMethod<[ListSubaccountsArgs], Array<SubAccount>>;
106
- }
107
- export declare const idlFactory: IDL.InterfaceFactory;
108
- export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -1,98 +0,0 @@
1
- // Generated from IC repo commit d9fe207 (2024-12-06 tags: release-2024-12-06_03-16-base) 'rs/ledger_suite/icrc1/index/index.did' by import-candid
2
-
3
- type TxId = nat;
4
-
5
- type Account = record { owner : principal; subaccount : opt blob };
6
-
7
- type SubAccount = blob;
8
-
9
- type Transaction = record {
10
- burn : opt Burn;
11
- kind : text;
12
- mint : opt Mint;
13
- approve : opt Approve;
14
- timestamp : nat64;
15
- transfer : opt Transfer;
16
- };
17
-
18
- type Approve = record {
19
- fee : opt nat;
20
- from : Account;
21
- memo : opt vec nat8;
22
- created_at_time : opt nat64;
23
- amount : nat;
24
- expected_allowance : opt nat;
25
- expires_at : opt nat64;
26
- spender : Account;
27
- };
28
-
29
- type Burn = record {
30
- from : Account;
31
- memo : opt vec nat8;
32
- created_at_time : opt nat64;
33
- amount : nat;
34
- spender : opt Account;
35
- };
36
-
37
- type Mint = record {
38
- to : Account;
39
- memo : opt vec nat8;
40
- created_at_time : opt nat64;
41
- amount : nat;
42
- };
43
-
44
- type Transfer = record {
45
- to : Account;
46
- fee : opt nat;
47
- from : Account;
48
- memo : opt vec nat8;
49
- created_at_time : opt nat64;
50
- amount : nat;
51
- spender : opt Account;
52
- };
53
-
54
- type GetAccountTransactionsArgs = record {
55
- account : Account;
56
- // The txid of the last transaction seen by the client.
57
- // If None then the results will start from the most recent
58
- // txid.
59
- start : opt TxId;
60
- // Maximum number of transactions to fetch.
61
- max_results : nat;
62
- };
63
-
64
- type TransactionWithId = record {
65
- id : TxId;
66
- transaction : Transaction;
67
- };
68
-
69
- type GetTransactions = record {
70
- transactions : vec TransactionWithId;
71
- // The txid of the oldest transaction the account has
72
- oldest_tx_id : opt TxId;
73
- };
74
-
75
- type GetTransactionsErr = record {
76
- message : text;
77
- };
78
-
79
- type GetTransactionsResult = variant {
80
- Ok : GetTransactions;
81
- Err : GetTransactionsErr;
82
- };
83
-
84
- type ListSubaccountsArgs = record {
85
- owner: principal;
86
- start: opt SubAccount;
87
- };
88
-
89
- // The initialization parameters of the Index canister.
90
- type InitArgs = record {
91
- ledger_id : principal;
92
- };
93
-
94
- service : (InitArgs) -> {
95
- get_account_transactions : (GetAccountTransactionsArgs) -> (GetTransactionsResult);
96
- ledger_id : () -> (principal) query;
97
- list_subaccounts : (ListSubaccountsArgs) -> (vec SubAccount) query;
98
- }
@@ -1,2 +0,0 @@
1
- import type { IDL } from "@icp-sdk/core/candid";
2
- export const idlFactory: IDL.InterfaceFactory;
@@ -1,99 +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 InitArgs = IDL.Record({ ledger_id: IDL.Principal });
11
- const TxId = IDL.Nat;
12
- const Account = IDL.Record({
13
- owner: IDL.Principal,
14
- subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
15
- });
16
- const GetAccountTransactionsArgs = IDL.Record({
17
- max_results: IDL.Nat,
18
- start: IDL.Opt(TxId),
19
- account: Account,
20
- });
21
- const Burn = IDL.Record({
22
- from: Account,
23
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
24
- created_at_time: IDL.Opt(IDL.Nat64),
25
- amount: IDL.Nat,
26
- spender: IDL.Opt(Account),
27
- });
28
- const Mint = IDL.Record({
29
- to: Account,
30
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
- created_at_time: IDL.Opt(IDL.Nat64),
32
- amount: IDL.Nat,
33
- });
34
- const Approve = IDL.Record({
35
- fee: IDL.Opt(IDL.Nat),
36
- from: Account,
37
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
38
- created_at_time: IDL.Opt(IDL.Nat64),
39
- amount: IDL.Nat,
40
- expected_allowance: IDL.Opt(IDL.Nat),
41
- expires_at: IDL.Opt(IDL.Nat64),
42
- spender: Account,
43
- });
44
- const Transfer = IDL.Record({
45
- to: Account,
46
- fee: IDL.Opt(IDL.Nat),
47
- from: Account,
48
- memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
49
- created_at_time: IDL.Opt(IDL.Nat64),
50
- amount: IDL.Nat,
51
- spender: IDL.Opt(Account),
52
- });
53
- const Transaction = IDL.Record({
54
- burn: IDL.Opt(Burn),
55
- kind: IDL.Text,
56
- mint: IDL.Opt(Mint),
57
- approve: IDL.Opt(Approve),
58
- timestamp: IDL.Nat64,
59
- transfer: IDL.Opt(Transfer),
60
- });
61
- const TransactionWithId = IDL.Record({
62
- id: TxId,
63
- transaction: Transaction,
64
- });
65
- const GetTransactions = IDL.Record({
66
- transactions: IDL.Vec(TransactionWithId),
67
- oldest_tx_id: IDL.Opt(TxId),
68
- });
69
- const GetTransactionsErr = IDL.Record({ message: IDL.Text });
70
- const GetTransactionsResult = IDL.Variant({
71
- Ok: GetTransactions,
72
- Err: GetTransactionsErr,
73
- });
74
- const SubAccount = IDL.Vec(IDL.Nat8);
75
- const ListSubaccountsArgs = IDL.Record({
76
- owner: IDL.Principal,
77
- start: IDL.Opt(SubAccount),
78
- });
79
-
80
- return IDL.Service({
81
- get_account_transactions: IDL.Func(
82
- [GetAccountTransactionsArgs],
83
- [GetTransactionsResult],
84
- [],
85
- ),
86
- ledger_id: IDL.Func([], [IDL.Principal], ["query"]),
87
- list_subaccounts: IDL.Func(
88
- [ListSubaccountsArgs],
89
- [IDL.Vec(SubAccount)],
90
- ["query"],
91
- ),
92
- });
93
- };
94
-
95
- export const init = ({ IDL }) => {
96
- const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
97
-
98
- return [InitArgs];
99
- };
@@ -1,2 +0,0 @@
1
- import type { IDL } from "@icp-sdk/core/candid";
2
- export const idlFactory: IDL.InterfaceFactory;