@dfinity/ledger-icrc 4.1.2 → 5.0.0-next-2025-10-20

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 (63) hide show
  1. package/README.md +1 -1
  2. package/dist/candid/icrc_index-ng.certified.idl.d.ts +1 -1
  3. package/dist/candid/icrc_index-ng.certified.idl.js +96 -86
  4. package/dist/candid/icrc_index-ng.d.ts +11 -3
  5. package/dist/candid/icrc_index-ng.idl.d.ts +1 -1
  6. package/dist/candid/icrc_index-ng.idl.js +96 -86
  7. package/dist/candid/icrc_index.certified.idl.d.ts +1 -1
  8. package/dist/candid/icrc_index.certified.idl.js +68 -58
  9. package/dist/candid/icrc_index.d.ts +11 -3
  10. package/dist/candid/icrc_index.idl.d.ts +1 -1
  11. package/dist/candid/icrc_index.idl.js +68 -58
  12. package/dist/candid/icrc_ledger.certified.idl.d.ts +1 -1
  13. package/dist/candid/icrc_ledger.certified.idl.js +369 -367
  14. package/dist/candid/icrc_ledger.d.ts +11 -3
  15. package/dist/candid/icrc_ledger.idl.d.ts +1 -1
  16. package/dist/candid/icrc_ledger.idl.js +389 -383
  17. package/dist/{types/canister.d.ts → canister.d.ts} +2 -2
  18. package/dist/{types/converters → converters}/converters.d.ts +1 -1
  19. package/dist/{types/converters → converters}/index.converters.d.ts +2 -2
  20. package/dist/{types/converters → converters}/ledger.converters.d.ts +1 -1
  21. package/dist/{types/errors → errors}/ledger.errors.d.ts +1 -1
  22. package/dist/{types/index-ng.canister.d.ts → index-ng.canister.d.ts} +3 -3
  23. package/dist/{types/index.canister.d.ts → index.canister.d.ts} +2 -2
  24. package/dist/{types/index.d.ts → index.d.ts} +1 -1
  25. package/dist/index.js +2 -1
  26. package/dist/index.js.map +7 -0
  27. package/dist/index.mjs +4 -0
  28. package/dist/index.mjs.map +7 -0
  29. package/dist/{types/ledger.canister.d.ts → ledger.canister.d.ts} +2 -2
  30. package/dist/types/{types/canister.options.d.ts → canister.options.d.ts} +1 -1
  31. package/dist/types/{types/index-ng.params.d.ts → index-ng.params.d.ts} +1 -1
  32. package/dist/types/{types/index-ng.types.d.ts → index-ng.types.d.ts} +1 -1
  33. package/dist/types/{types/index.params.d.ts → index.params.d.ts} +1 -1
  34. package/dist/types/{types/index.types.d.ts → index.types.d.ts} +1 -1
  35. package/dist/types/{types/ledger.params.d.ts → ledger.params.d.ts} +1 -1
  36. package/dist/types/{types/ledger.responses.d.ts → ledger.responses.d.ts} +2 -2
  37. package/package.json +22 -11
  38. package/dist/cjs/index.cjs.js +0 -2
  39. package/dist/cjs/index.cjs.js.map +0 -7
  40. package/dist/esm/canister.js +0 -2
  41. package/dist/esm/canister.js.map +0 -7
  42. package/dist/esm/chunk-BYKVMTGO.js +0 -2
  43. package/dist/esm/chunk-BYKVMTGO.js.map +0 -7
  44. package/dist/esm/chunk-F74MWPN7.js +0 -2
  45. package/dist/esm/chunk-F74MWPN7.js.map +0 -7
  46. package/dist/esm/chunk-WTMDWX2C.js +0 -2
  47. package/dist/esm/chunk-WTMDWX2C.js.map +0 -7
  48. package/dist/esm/chunk-YO5OUZGG.js +0 -2
  49. package/dist/esm/chunk-YO5OUZGG.js.map +0 -7
  50. package/dist/esm/chunk-ZMWODXAU.js +0 -2
  51. package/dist/esm/chunk-ZMWODXAU.js.map +0 -7
  52. package/dist/esm/index-ng.canister.js +0 -2
  53. package/dist/esm/index-ng.canister.js.map +0 -7
  54. package/dist/esm/index.canister.js +0 -2
  55. package/dist/esm/index.canister.js.map +0 -7
  56. package/dist/esm/index.js +0 -2
  57. package/dist/esm/index.js.map +0 -7
  58. package/dist/esm/ledger.canister.js +0 -2
  59. package/dist/esm/ledger.canister.js.map +0 -7
  60. package/dist/index.cjs.js +0 -1
  61. /package/dist/{types/errors → errors}/index.errors.d.ts +0 -0
  62. /package/dist/{types/utils → utils}/ledger.utils.d.ts +0 -0
  63. /package/dist/{types/utils → utils}/payment.utils.d.ts +0 -0
@@ -1,89 +1,99 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/ledger-icrc/candid/icrc_index.did */
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
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
+
2
9
  export const idlFactory = ({ IDL }) => {
3
- const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
10
+ const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
4
11
  const TxId = IDL.Nat;
5
12
  const Account = IDL.Record({
6
- 'owner' : IDL.Principal,
7
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
13
+ owner: IDL.Principal,
14
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
8
15
  });
9
16
  const GetAccountTransactionsArgs = IDL.Record({
10
- 'max_results' : IDL.Nat,
11
- 'start' : IDL.Opt(TxId),
12
- 'account' : Account,
17
+ max_results: IDL.Nat,
18
+ start: IDL.Opt(TxId),
19
+ account: Account,
13
20
  });
14
21
  const Burn = IDL.Record({
15
- 'from' : Account,
16
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
17
- 'created_at_time' : IDL.Opt(IDL.Nat64),
18
- 'amount' : IDL.Nat,
19
- 'spender' : IDL.Opt(Account),
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),
20
27
  });
21
28
  const Mint = IDL.Record({
22
- 'to' : Account,
23
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
24
- 'created_at_time' : IDL.Opt(IDL.Nat64),
25
- 'amount' : IDL.Nat,
29
+ to: Account,
30
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
+ created_at_time: IDL.Opt(IDL.Nat64),
32
+ amount: IDL.Nat,
26
33
  });
27
34
  const Approve = IDL.Record({
28
- 'fee' : IDL.Opt(IDL.Nat),
29
- 'from' : Account,
30
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
31
- 'created_at_time' : IDL.Opt(IDL.Nat64),
32
- 'amount' : IDL.Nat,
33
- 'expected_allowance' : IDL.Opt(IDL.Nat),
34
- 'expires_at' : IDL.Opt(IDL.Nat64),
35
- 'spender' : Account,
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,
36
43
  });
37
44
  const Transfer = IDL.Record({
38
- 'to' : Account,
39
- 'fee' : IDL.Opt(IDL.Nat),
40
- 'from' : Account,
41
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
42
- 'created_at_time' : IDL.Opt(IDL.Nat64),
43
- 'amount' : IDL.Nat,
44
- 'spender' : IDL.Opt(Account),
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),
45
52
  });
46
53
  const Transaction = IDL.Record({
47
- 'burn' : IDL.Opt(Burn),
48
- 'kind' : IDL.Text,
49
- 'mint' : IDL.Opt(Mint),
50
- 'approve' : IDL.Opt(Approve),
51
- 'timestamp' : IDL.Nat64,
52
- 'transfer' : IDL.Opt(Transfer),
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),
53
60
  });
54
61
  const TransactionWithId = IDL.Record({
55
- 'id' : TxId,
56
- 'transaction' : Transaction,
62
+ id: TxId,
63
+ transaction: Transaction,
57
64
  });
58
65
  const GetTransactions = IDL.Record({
59
- 'transactions' : IDL.Vec(TransactionWithId),
60
- 'oldest_tx_id' : IDL.Opt(TxId),
66
+ transactions: IDL.Vec(TransactionWithId),
67
+ oldest_tx_id: IDL.Opt(TxId),
61
68
  });
62
- const GetTransactionsErr = IDL.Record({ 'message' : IDL.Text });
69
+ const GetTransactionsErr = IDL.Record({ message: IDL.Text });
63
70
  const GetTransactionsResult = IDL.Variant({
64
- 'Ok' : GetTransactions,
65
- 'Err' : GetTransactionsErr,
71
+ Ok: GetTransactions,
72
+ Err: GetTransactionsErr,
66
73
  });
67
74
  const SubAccount = IDL.Vec(IDL.Nat8);
68
75
  const ListSubaccountsArgs = IDL.Record({
69
- 'owner' : IDL.Principal,
70
- 'start' : IDL.Opt(SubAccount),
76
+ owner: IDL.Principal,
77
+ start: IDL.Opt(SubAccount),
71
78
  });
79
+
72
80
  return IDL.Service({
73
- 'get_account_transactions' : IDL.Func(
74
- [GetAccountTransactionsArgs],
75
- [GetTransactionsResult],
76
- [],
77
- ),
78
- 'ledger_id' : IDL.Func([], [IDL.Principal], []),
79
- 'list_subaccounts' : IDL.Func(
80
- [ListSubaccountsArgs],
81
- [IDL.Vec(SubAccount)],
82
- [],
83
- ),
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
+ ),
84
92
  });
85
93
  };
94
+
86
95
  export const init = ({ IDL }) => {
87
- const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
96
+ const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
97
+
88
98
  return [InitArgs];
89
99
  };
@@ -1,6 +1,14 @@
1
- import type { ActorMethod } from "@dfinity/agent";
2
- import type { IDL } from "@dfinity/candid";
3
- import type { Principal } from "@dfinity/principal";
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
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";
4
12
 
5
13
  export interface Account {
6
14
  owner: Principal;
@@ -1,2 +1,2 @@
1
- import type { IDL } from "@dfinity/candid";
1
+ import type { IDL } from "@icp-sdk/core/candid";
2
2
  export const idlFactory: IDL.InterfaceFactory;
@@ -1,89 +1,99 @@
1
- /* Do not edit. Compiled with ./scripts/compile-idl-js from packages/ledger-icrc/candid/icrc_index.did */
1
+ /* eslint-disable */
2
+
3
+ // @ts-nocheck
4
+
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
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
+
2
9
  export const idlFactory = ({ IDL }) => {
3
- const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
10
+ const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
4
11
  const TxId = IDL.Nat;
5
12
  const Account = IDL.Record({
6
- 'owner' : IDL.Principal,
7
- 'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
13
+ owner: IDL.Principal,
14
+ subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
8
15
  });
9
16
  const GetAccountTransactionsArgs = IDL.Record({
10
- 'max_results' : IDL.Nat,
11
- 'start' : IDL.Opt(TxId),
12
- 'account' : Account,
17
+ max_results: IDL.Nat,
18
+ start: IDL.Opt(TxId),
19
+ account: Account,
13
20
  });
14
21
  const Burn = IDL.Record({
15
- 'from' : Account,
16
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
17
- 'created_at_time' : IDL.Opt(IDL.Nat64),
18
- 'amount' : IDL.Nat,
19
- 'spender' : IDL.Opt(Account),
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),
20
27
  });
21
28
  const Mint = IDL.Record({
22
- 'to' : Account,
23
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
24
- 'created_at_time' : IDL.Opt(IDL.Nat64),
25
- 'amount' : IDL.Nat,
29
+ to: Account,
30
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
+ created_at_time: IDL.Opt(IDL.Nat64),
32
+ amount: IDL.Nat,
26
33
  });
27
34
  const Approve = IDL.Record({
28
- 'fee' : IDL.Opt(IDL.Nat),
29
- 'from' : Account,
30
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
31
- 'created_at_time' : IDL.Opt(IDL.Nat64),
32
- 'amount' : IDL.Nat,
33
- 'expected_allowance' : IDL.Opt(IDL.Nat),
34
- 'expires_at' : IDL.Opt(IDL.Nat64),
35
- 'spender' : Account,
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,
36
43
  });
37
44
  const Transfer = IDL.Record({
38
- 'to' : Account,
39
- 'fee' : IDL.Opt(IDL.Nat),
40
- 'from' : Account,
41
- 'memo' : IDL.Opt(IDL.Vec(IDL.Nat8)),
42
- 'created_at_time' : IDL.Opt(IDL.Nat64),
43
- 'amount' : IDL.Nat,
44
- 'spender' : IDL.Opt(Account),
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),
45
52
  });
46
53
  const Transaction = IDL.Record({
47
- 'burn' : IDL.Opt(Burn),
48
- 'kind' : IDL.Text,
49
- 'mint' : IDL.Opt(Mint),
50
- 'approve' : IDL.Opt(Approve),
51
- 'timestamp' : IDL.Nat64,
52
- 'transfer' : IDL.Opt(Transfer),
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),
53
60
  });
54
61
  const TransactionWithId = IDL.Record({
55
- 'id' : TxId,
56
- 'transaction' : Transaction,
62
+ id: TxId,
63
+ transaction: Transaction,
57
64
  });
58
65
  const GetTransactions = IDL.Record({
59
- 'transactions' : IDL.Vec(TransactionWithId),
60
- 'oldest_tx_id' : IDL.Opt(TxId),
66
+ transactions: IDL.Vec(TransactionWithId),
67
+ oldest_tx_id: IDL.Opt(TxId),
61
68
  });
62
- const GetTransactionsErr = IDL.Record({ 'message' : IDL.Text });
69
+ const GetTransactionsErr = IDL.Record({ message: IDL.Text });
63
70
  const GetTransactionsResult = IDL.Variant({
64
- 'Ok' : GetTransactions,
65
- 'Err' : GetTransactionsErr,
71
+ Ok: GetTransactions,
72
+ Err: GetTransactionsErr,
66
73
  });
67
74
  const SubAccount = IDL.Vec(IDL.Nat8);
68
75
  const ListSubaccountsArgs = IDL.Record({
69
- 'owner' : IDL.Principal,
70
- 'start' : IDL.Opt(SubAccount),
76
+ owner: IDL.Principal,
77
+ start: IDL.Opt(SubAccount),
71
78
  });
79
+
72
80
  return IDL.Service({
73
- 'get_account_transactions' : IDL.Func(
74
- [GetAccountTransactionsArgs],
75
- [GetTransactionsResult],
76
- [],
77
- ),
78
- 'ledger_id' : IDL.Func([], [IDL.Principal], ['query']),
79
- 'list_subaccounts' : IDL.Func(
80
- [ListSubaccountsArgs],
81
- [IDL.Vec(SubAccount)],
82
- ['query'],
83
- ),
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
+ ),
84
92
  });
85
93
  };
94
+
86
95
  export const init = ({ IDL }) => {
87
- const InitArgs = IDL.Record({ 'ledger_id' : IDL.Principal });
96
+ const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
97
+
88
98
  return [InitArgs];
89
99
  };
@@ -1,2 +1,2 @@
1
- import type { IDL } from "@dfinity/candid";
1
+ import type { IDL } from "@icp-sdk/core/candid";
2
2
  export const idlFactory: IDL.InterfaceFactory;