@dfinity/ledger-icrc 6.0.1 → 7.0.0-beta-2025-12-11
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 +23 -17
- 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 +4 -5
- package/dist/candid/icrc_index-ng.certified.idl.d.ts +0 -2
- package/dist/candid/icrc_index-ng.certified.idl.js +0 -151
- package/dist/candid/icrc_index-ng.d.ts +0 -154
- package/dist/candid/icrc_index-ng.did +0 -156
- package/dist/candid/icrc_index-ng.idl.d.ts +0 -2
- package/dist/candid/icrc_index-ng.idl.js +0 -151
- 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 -525
- package/dist/candid/icrc_ledger.d.ts +0 -590
- package/dist/candid/icrc_ledger.did +0 -579
- package/dist/candid/icrc_ledger.idl.d.ts +0 -2
- package/dist/candid/icrc_ledger.idl.js +0 -545
- 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 -127
- package/dist/types/canister.options.d.ts +0 -5
- 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,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,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
|
-
};
|