@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.
- package/README.md +1 -1
- package/dist/candid/icrc_index-ng.certified.idl.d.ts +1 -1
- package/dist/candid/icrc_index-ng.certified.idl.js +96 -86
- package/dist/candid/icrc_index-ng.d.ts +11 -3
- package/dist/candid/icrc_index-ng.idl.d.ts +1 -1
- package/dist/candid/icrc_index-ng.idl.js +96 -86
- package/dist/candid/icrc_index.certified.idl.d.ts +1 -1
- package/dist/candid/icrc_index.certified.idl.js +68 -58
- package/dist/candid/icrc_index.d.ts +11 -3
- package/dist/candid/icrc_index.idl.d.ts +1 -1
- package/dist/candid/icrc_index.idl.js +68 -58
- package/dist/candid/icrc_ledger.certified.idl.d.ts +1 -1
- package/dist/candid/icrc_ledger.certified.idl.js +369 -367
- package/dist/candid/icrc_ledger.d.ts +11 -3
- package/dist/candid/icrc_ledger.idl.d.ts +1 -1
- package/dist/candid/icrc_ledger.idl.js +389 -383
- package/dist/{types/canister.d.ts → canister.d.ts} +2 -2
- package/dist/{types/converters → converters}/converters.d.ts +1 -1
- package/dist/{types/converters → converters}/index.converters.d.ts +2 -2
- package/dist/{types/converters → converters}/ledger.converters.d.ts +1 -1
- package/dist/{types/errors → errors}/ledger.errors.d.ts +1 -1
- package/dist/{types/index-ng.canister.d.ts → index-ng.canister.d.ts} +3 -3
- package/dist/{types/index.canister.d.ts → index.canister.d.ts} +2 -2
- package/dist/{types/index.d.ts → index.d.ts} +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +7 -0
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +7 -0
- package/dist/{types/ledger.canister.d.ts → ledger.canister.d.ts} +2 -2
- package/dist/types/{types/canister.options.d.ts → canister.options.d.ts} +1 -1
- package/dist/types/{types/index-ng.params.d.ts → index-ng.params.d.ts} +1 -1
- package/dist/types/{types/index-ng.types.d.ts → index-ng.types.d.ts} +1 -1
- package/dist/types/{types/index.params.d.ts → index.params.d.ts} +1 -1
- package/dist/types/{types/index.types.d.ts → index.types.d.ts} +1 -1
- package/dist/types/{types/ledger.params.d.ts → ledger.params.d.ts} +1 -1
- package/dist/types/{types/ledger.responses.d.ts → ledger.responses.d.ts} +2 -2
- package/package.json +22 -11
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/index.cjs.js.map +0 -7
- package/dist/esm/canister.js +0 -2
- package/dist/esm/canister.js.map +0 -7
- package/dist/esm/chunk-BYKVMTGO.js +0 -2
- package/dist/esm/chunk-BYKVMTGO.js.map +0 -7
- package/dist/esm/chunk-F74MWPN7.js +0 -2
- package/dist/esm/chunk-F74MWPN7.js.map +0 -7
- package/dist/esm/chunk-WTMDWX2C.js +0 -2
- package/dist/esm/chunk-WTMDWX2C.js.map +0 -7
- package/dist/esm/chunk-YO5OUZGG.js +0 -2
- package/dist/esm/chunk-YO5OUZGG.js.map +0 -7
- package/dist/esm/chunk-ZMWODXAU.js +0 -2
- package/dist/esm/chunk-ZMWODXAU.js.map +0 -7
- package/dist/esm/index-ng.canister.js +0 -2
- package/dist/esm/index-ng.canister.js.map +0 -7
- package/dist/esm/index.canister.js +0 -2
- package/dist/esm/index.canister.js.map +0 -7
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +0 -7
- package/dist/esm/ledger.canister.js +0 -2
- package/dist/esm/ledger.canister.js.map +0 -7
- package/dist/index.cjs.js +0 -1
- /package/dist/{types/errors → errors}/index.errors.d.ts +0 -0
- /package/dist/{types/utils → utils}/ledger.utils.d.ts +0 -0
- /package/dist/{types/utils → utils}/payment.utils.d.ts +0 -0
|
@@ -1,89 +1,99 @@
|
|
|
1
|
-
/*
|
|
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({
|
|
10
|
+
const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
|
|
4
11
|
const TxId = IDL.Nat;
|
|
5
12
|
const Account = IDL.Record({
|
|
6
|
-
|
|
7
|
-
|
|
13
|
+
owner: IDL.Principal,
|
|
14
|
+
subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
8
15
|
});
|
|
9
16
|
const GetAccountTransactionsArgs = IDL.Record({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
max_results: IDL.Nat,
|
|
18
|
+
start: IDL.Opt(TxId),
|
|
19
|
+
account: Account,
|
|
13
20
|
});
|
|
14
21
|
const Burn = IDL.Record({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
56
|
-
|
|
62
|
+
id: TxId,
|
|
63
|
+
transaction: Transaction,
|
|
57
64
|
});
|
|
58
65
|
const GetTransactions = IDL.Record({
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
transactions: IDL.Vec(TransactionWithId),
|
|
67
|
+
oldest_tx_id: IDL.Opt(TxId),
|
|
61
68
|
});
|
|
62
|
-
const GetTransactionsErr = IDL.Record({
|
|
69
|
+
const GetTransactionsErr = IDL.Record({ message: IDL.Text });
|
|
63
70
|
const GetTransactionsResult = IDL.Variant({
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
Ok: GetTransactions,
|
|
72
|
+
Err: GetTransactionsErr,
|
|
66
73
|
});
|
|
67
74
|
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
68
75
|
const ListSubaccountsArgs = IDL.Record({
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
owner: IDL.Principal,
|
|
77
|
+
start: IDL.Opt(SubAccount),
|
|
71
78
|
});
|
|
79
|
+
|
|
72
80
|
return IDL.Service({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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({
|
|
96
|
+
const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
|
|
97
|
+
|
|
88
98
|
return [InitArgs];
|
|
89
99
|
};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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 "@
|
|
1
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
2
2
|
export const idlFactory: IDL.InterfaceFactory;
|
|
@@ -1,89 +1,99 @@
|
|
|
1
|
-
/*
|
|
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({
|
|
10
|
+
const InitArgs = IDL.Record({ ledger_id: IDL.Principal });
|
|
4
11
|
const TxId = IDL.Nat;
|
|
5
12
|
const Account = IDL.Record({
|
|
6
|
-
|
|
7
|
-
|
|
13
|
+
owner: IDL.Principal,
|
|
14
|
+
subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
8
15
|
});
|
|
9
16
|
const GetAccountTransactionsArgs = IDL.Record({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
max_results: IDL.Nat,
|
|
18
|
+
start: IDL.Opt(TxId),
|
|
19
|
+
account: Account,
|
|
13
20
|
});
|
|
14
21
|
const Burn = IDL.Record({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
56
|
-
|
|
62
|
+
id: TxId,
|
|
63
|
+
transaction: Transaction,
|
|
57
64
|
});
|
|
58
65
|
const GetTransactions = IDL.Record({
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
transactions: IDL.Vec(TransactionWithId),
|
|
67
|
+
oldest_tx_id: IDL.Opt(TxId),
|
|
61
68
|
});
|
|
62
|
-
const GetTransactionsErr = IDL.Record({
|
|
69
|
+
const GetTransactionsErr = IDL.Record({ message: IDL.Text });
|
|
63
70
|
const GetTransactionsResult = IDL.Variant({
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
Ok: GetTransactions,
|
|
72
|
+
Err: GetTransactionsErr,
|
|
66
73
|
});
|
|
67
74
|
const SubAccount = IDL.Vec(IDL.Nat8);
|
|
68
75
|
const ListSubaccountsArgs = IDL.Record({
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
owner: IDL.Principal,
|
|
77
|
+
start: IDL.Opt(SubAccount),
|
|
71
78
|
});
|
|
79
|
+
|
|
72
80
|
return IDL.Service({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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({
|
|
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 "@
|
|
1
|
+
import type { IDL } from "@icp-sdk/core/candid";
|
|
2
2
|
export const idlFactory: IDL.InterfaceFactory;
|