@dfinity/ledger-icrc 5.0.1 → 6.0.0-next-2025-11-18

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -17,7 +17,7 @@ export interface Account {
17
17
  export interface Approve {
18
18
  fee: [] | [Tokens];
19
19
  from: Account;
20
- memo: [] | [Uint8Array | number[]];
20
+ memo: [] | [Uint8Array];
21
21
  created_at_time: [] | [bigint];
22
22
  amount: Tokens;
23
23
  expected_allowance: [] | [Tokens];
@@ -29,7 +29,7 @@ export type BlockIndex = bigint;
29
29
  export interface Burn {
30
30
  fee: [] | [bigint];
31
31
  from: Account;
32
- memo: [] | [Uint8Array | number[]];
32
+ memo: [] | [Uint8Array];
33
33
  created_at_time: [] | [bigint];
34
34
  amount: Tokens;
35
35
  spender: [] | [Account];
@@ -91,14 +91,14 @@ export type Map = Array<[string, Value]>;
91
91
  export interface Mint {
92
92
  to: Account;
93
93
  fee: [] | [bigint];
94
- memo: [] | [Uint8Array | number[]];
94
+ memo: [] | [Uint8Array];
95
95
  created_at_time: [] | [bigint];
96
96
  amount: Tokens;
97
97
  }
98
98
  export interface Status {
99
99
  num_blocks_synced: BlockIndex;
100
100
  }
101
- export type SubAccount = Uint8Array | number[];
101
+ export type SubAccount = Uint8Array;
102
102
  export type Tokens = bigint;
103
103
  export interface Transaction {
104
104
  burn: [] | [Burn];
@@ -116,7 +116,7 @@ export interface Transfer {
116
116
  to: Account;
117
117
  fee: [] | [Tokens];
118
118
  from: Account;
119
- memo: [] | [Uint8Array | number[]];
119
+ memo: [] | [Uint8Array];
120
120
  created_at_time: [] | [bigint];
121
121
  amount: Tokens;
122
122
  spender: [] | [Account];
@@ -135,7 +135,7 @@ export type Value =
135
135
  | { Map: Map }
136
136
  | { Nat: bigint }
137
137
  | { Nat64: bigint }
138
- | { Blob: Uint8Array | number[] }
138
+ | { Blob: Uint8Array }
139
139
  | { Text: string }
140
140
  | { Array: Array<Value> };
141
141
  export interface _SERVICE {
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 199fb79 (2025-10-29 tags: release-2025-10-30_03-22-base) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid
1
+ // Generated from IC repo commit fa06b0e (2025-11-12 tags: release-2025-11-13_03-24-base) 'rs/ledger_suite/icrc1/index-ng/index-ng.did' by import-candid
2
2
 
3
3
  type Tokens = nat;
4
4
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -12,12 +12,12 @@ import type { Principal } from "@icp-sdk/core/principal";
12
12
 
13
13
  export interface Account {
14
14
  owner: Principal;
15
- subaccount: [] | [Uint8Array | number[]];
15
+ subaccount: [] | [Uint8Array];
16
16
  }
17
17
  export interface Approve {
18
18
  fee: [] | [bigint];
19
19
  from: Account;
20
- memo: [] | [Uint8Array | number[]];
20
+ memo: [] | [Uint8Array];
21
21
  created_at_time: [] | [bigint];
22
22
  amount: bigint;
23
23
  expected_allowance: [] | [bigint];
@@ -26,7 +26,7 @@ export interface Approve {
26
26
  }
27
27
  export interface Burn {
28
28
  from: Account;
29
- memo: [] | [Uint8Array | number[]];
29
+ memo: [] | [Uint8Array];
30
30
  created_at_time: [] | [bigint];
31
31
  amount: bigint;
32
32
  spender: [] | [Account];
@@ -69,11 +69,11 @@ export interface ListSubaccountsArgs {
69
69
  }
70
70
  export interface Mint {
71
71
  to: Account;
72
- memo: [] | [Uint8Array | number[]];
72
+ memo: [] | [Uint8Array];
73
73
  created_at_time: [] | [bigint];
74
74
  amount: bigint;
75
75
  }
76
- export type SubAccount = Uint8Array | number[];
76
+ export type SubAccount = Uint8Array;
77
77
  export interface Transaction {
78
78
  burn: [] | [Burn];
79
79
  kind: string;
@@ -90,7 +90,7 @@ export interface Transfer {
90
90
  to: Account;
91
91
  fee: [] | [bigint];
92
92
  from: Account;
93
- memo: [] | [Uint8Array | number[]];
93
+ memo: [] | [Uint8Array];
94
94
  created_at_time: [] | [bigint];
95
95
  amount: bigint;
96
96
  spender: [] | [Account];
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -31,7 +31,7 @@ export interface AllowanceArgs {
31
31
  export interface Approve {
32
32
  fee: [] | [bigint];
33
33
  from: Account;
34
- memo: [] | [Uint8Array | number[]];
34
+ memo: [] | [Uint8Array];
35
35
  created_at_time: [] | [Timestamp];
36
36
  amount: bigint;
37
37
  expected_allowance: [] | [bigint];
@@ -40,8 +40,8 @@ export interface Approve {
40
40
  }
41
41
  export interface ApproveArgs {
42
42
  fee: [] | [bigint];
43
- memo: [] | [Uint8Array | number[]];
44
- from_subaccount: [] | [Uint8Array | number[]];
43
+ memo: [] | [Uint8Array];
44
+ from_subaccount: [] | [Uint8Array];
45
45
  created_at_time: [] | [Timestamp];
46
46
  amount: bigint;
47
47
  expected_allowance: [] | [bigint];
@@ -94,7 +94,7 @@ export interface BlockRange {
94
94
  export interface Burn {
95
95
  fee: [] | [bigint];
96
96
  from: Account;
97
- memo: [] | [Uint8Array | number[]];
97
+ memo: [] | [Uint8Array];
98
98
  created_at_time: [] | [Timestamp];
99
99
  amount: bigint;
100
100
  spender: [] | [Account];
@@ -114,8 +114,8 @@ export type ChangeFeeCollector = { SetTo: Account } | { Unset: null };
114
114
  * Certificate for the block at `block_index`.
115
115
  */
116
116
  export interface DataCertificate {
117
- certificate: [] | [Uint8Array | number[]];
118
- hash_tree: Uint8Array | number[];
117
+ certificate: [] | [Uint8Array];
118
+ hash_tree: Uint8Array;
119
119
  }
120
120
  /**
121
121
  * Number of nanoseconds between two [Timestamp]s.
@@ -179,7 +179,7 @@ export interface GetBlocksResponse {
179
179
  * System certificate for the hash of the latest block in the chain.
180
180
  * Only present if `get_blocks` is called in a non-replicated query context.
181
181
  */
182
- certificate: [] | [Uint8Array | number[]];
182
+ certificate: [] | [Uint8Array];
183
183
  /**
184
184
  * The index of the first block in "blocks".
185
185
  * If the blocks vector is empty, the exact value of this field is not specified.
@@ -298,11 +298,11 @@ export interface GetTransactionsResponse {
298
298
  export interface HttpRequest {
299
299
  url: string;
300
300
  method: string;
301
- body: Uint8Array | number[];
301
+ body: Uint8Array;
302
302
  headers: Array<[string, string]>;
303
303
  }
304
304
  export interface HttpResponse {
305
- body: Uint8Array | number[];
305
+ body: Uint8Array;
306
306
  headers: Array<[string, string]>;
307
307
  status_code: number;
308
308
  }
@@ -310,17 +310,17 @@ export interface ICRC3DataCertificate {
310
310
  /**
311
311
  * See https://internetcomputer.org/docs/current/references/ic-interface-spec#certification
312
312
  */
313
- certificate: Uint8Array | number[];
313
+ certificate: Uint8Array;
314
314
  /**
315
315
  * CBOR encoded hash_tree
316
316
  */
317
- hash_tree: Uint8Array | number[];
317
+ hash_tree: Uint8Array;
318
318
  }
319
319
  export type ICRC3Value =
320
320
  | { Int: bigint }
321
321
  | { Map: Array<[string, ICRC3Value]> }
322
322
  | { Nat: bigint }
323
- | { Blob: Uint8Array | number[] }
323
+ | { Blob: Uint8Array }
324
324
  | { Text: string }
325
325
  | { Array: Array<ICRC3Value> };
326
326
  export type Icrc21Value =
@@ -368,12 +368,12 @@ export type Map = Array<[string, Value]>;
368
368
  export type MetadataValue =
369
369
  | { Int: bigint }
370
370
  | { Nat: bigint }
371
- | { Blob: Uint8Array | number[] }
371
+ | { Blob: Uint8Array }
372
372
  | { Text: string };
373
373
  export interface Mint {
374
374
  to: Account;
375
375
  fee: [] | [bigint];
376
- memo: [] | [Uint8Array | number[]];
376
+ memo: [] | [Uint8Array];
377
377
  created_at_time: [] | [Timestamp];
378
378
  amount: bigint;
379
379
  }
@@ -392,7 +392,7 @@ export interface StandardRecord {
392
392
  url: string;
393
393
  name: string;
394
394
  }
395
- export type Subaccount = Uint8Array | number[];
395
+ export type Subaccount = Uint8Array;
396
396
  /**
397
397
  * Number of nanoseconds since the UNIX epoch in UTC timezone.
398
398
  */
@@ -433,7 +433,7 @@ export interface Transfer {
433
433
  to: Account;
434
434
  fee: [] | [bigint];
435
435
  from: Account;
436
- memo: [] | [Uint8Array | number[]];
436
+ memo: [] | [Uint8Array];
437
437
  created_at_time: [] | [Timestamp];
438
438
  amount: bigint;
439
439
  spender: [] | [Account];
@@ -441,7 +441,7 @@ export interface Transfer {
441
441
  export interface TransferArg {
442
442
  to: Account;
443
443
  fee: [] | [Tokens];
444
- memo: [] | [Uint8Array | number[]];
444
+ memo: [] | [Uint8Array];
445
445
  from_subaccount: [] | [Subaccount];
446
446
  created_at_time: [] | [Timestamp];
447
447
  amount: Tokens;
@@ -462,7 +462,7 @@ export interface TransferFromArgs {
462
462
  fee: [] | [Tokens];
463
463
  spender_subaccount: [] | [Subaccount];
464
464
  from: Account;
465
- memo: [] | [Uint8Array | number[]];
465
+ memo: [] | [Uint8Array];
466
466
  created_at_time: [] | [Timestamp];
467
467
  amount: Tokens;
468
468
  }
@@ -499,7 +499,7 @@ export type Value =
499
499
  | { Map: Map }
500
500
  | { Nat: bigint }
501
501
  | { Nat64: bigint }
502
- | { Blob: Uint8Array | number[] }
502
+ | { Blob: Uint8Array }
503
503
  | { Text: string }
504
504
  | { Array: Array<Value> };
505
505
  export type icrc103_get_allowances_response =
@@ -519,7 +519,7 @@ export interface icrc21_consent_message_metadata {
519
519
  language: string;
520
520
  }
521
521
  export interface icrc21_consent_message_request {
522
- arg: Uint8Array | number[];
522
+ arg: Uint8Array;
523
523
  method: string;
524
524
  user_preferences: icrc21_consent_message_spec;
525
525
  }
@@ -1,4 +1,4 @@
1
- // Generated from IC repo commit 199fb79 (2025-10-29 tags: release-2025-10-30_03-22-base) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid
1
+ // Generated from IC repo commit fa06b0e (2025-11-12 tags: release-2025-11-13_03-24-base) 'rs/ledger_suite/icrc1/ledger/ledger.did' by import-candid
2
2
 
3
3
  type BlockIndex = nat;
4
4
  type Subaccount = blob;
@@ -2,7 +2,7 @@
2
2
 
3
3
  // @ts-nocheck
4
4
 
5
- // This file was automatically generated by @icp-sdk/bindgen@0.2.0-patch-typed-arrays.
5
+ // This file was automatically generated by @icp-sdk/bindgen@0.2.0.
6
6
  // You should NOT make any changes in this file as it will be overwritten.
7
7
  // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
8
8
 
@@ -0,0 +1,2 @@
1
+ import type { IDL } from "@icp-sdk/core/candid";
2
+ export const idlFactory: IDL.InterfaceFactory;
@@ -0,0 +1,102 @@
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 Subaccount = IDL.Vec(IDL.Nat8);
12
+ const Account = IDL.Record({
13
+ owner: IDL.Principal,
14
+ subaccount: IDL.Opt(Subaccount),
15
+ });
16
+ Value.fill(
17
+ IDL.Variant({
18
+ Int: IDL.Int,
19
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, Value)),
20
+ Nat: IDL.Nat,
21
+ Blob: IDL.Vec(IDL.Nat8),
22
+ Text: IDL.Text,
23
+ Array: IDL.Vec(Value),
24
+ }),
25
+ );
26
+ const TransferArg = IDL.Record({
27
+ to: Account,
28
+ token_id: IDL.Nat,
29
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
30
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
+ created_at_time: IDL.Opt(IDL.Nat64),
32
+ });
33
+ const TransferError = IDL.Variant({
34
+ GenericError: IDL.Record({
35
+ message: IDL.Text,
36
+ error_code: IDL.Nat,
37
+ }),
38
+ Duplicate: IDL.Record({ duplicate_of: IDL.Nat }),
39
+ NonExistingTokenId: IDL.Null,
40
+ Unauthorized: IDL.Null,
41
+ CreatedInFuture: IDL.Record({ ledger_time: IDL.Nat64 }),
42
+ InvalidRecipient: IDL.Null,
43
+ GenericBatchError: IDL.Record({
44
+ message: IDL.Text,
45
+ error_code: IDL.Nat,
46
+ }),
47
+ TooOld: IDL.Null,
48
+ });
49
+ const TransferResult = IDL.Variant({ Ok: IDL.Nat, Err: TransferError });
50
+
51
+ return IDL.Service({
52
+ icrc7_atomic_batch_transfers: IDL.Func([], [IDL.Opt(IDL.Bool)], []),
53
+ icrc7_balance_of: IDL.Func([IDL.Vec(Account)], [IDL.Vec(IDL.Nat)], []),
54
+ icrc7_collection_metadata: IDL.Func(
55
+ [],
56
+ [IDL.Vec(IDL.Tuple(IDL.Text, Value))],
57
+ [],
58
+ ),
59
+ icrc7_default_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
60
+ icrc7_description: IDL.Func([], [IDL.Opt(IDL.Text)], []),
61
+ icrc7_logo: IDL.Func([], [IDL.Opt(IDL.Text)], []),
62
+ icrc7_max_memo_size: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
63
+ icrc7_max_query_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
64
+ icrc7_max_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
65
+ icrc7_max_update_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
66
+ icrc7_name: IDL.Func([], [IDL.Text], []),
67
+ icrc7_owner_of: IDL.Func(
68
+ [IDL.Vec(IDL.Nat)],
69
+ [IDL.Vec(IDL.Opt(Account))],
70
+ [],
71
+ ),
72
+ icrc7_permitted_drift: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
73
+ icrc7_supply_cap: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
74
+ icrc7_symbol: IDL.Func([], [IDL.Text], []),
75
+ icrc7_token_metadata: IDL.Func(
76
+ [IDL.Vec(IDL.Nat)],
77
+ [IDL.Vec(IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, Value))))],
78
+ [],
79
+ ),
80
+ icrc7_tokens: IDL.Func(
81
+ [IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
82
+ [IDL.Vec(IDL.Nat)],
83
+ [],
84
+ ),
85
+ icrc7_tokens_of: IDL.Func(
86
+ [Account, IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
87
+ [IDL.Vec(IDL.Nat)],
88
+ [],
89
+ ),
90
+ icrc7_total_supply: IDL.Func([], [IDL.Nat], []),
91
+ icrc7_transfer: IDL.Func(
92
+ [IDL.Vec(TransferArg)],
93
+ [IDL.Vec(IDL.Opt(TransferResult))],
94
+ [],
95
+ ),
96
+ icrc7_tx_window: IDL.Func([], [IDL.Opt(IDL.Nat)], []),
97
+ });
98
+ };
99
+
100
+ export const init = ({ IDL }) => {
101
+ return [];
102
+ };
@@ -0,0 +1,80 @@
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 type Subaccount = Uint8Array;
18
+ export interface TransferArg {
19
+ to: Account;
20
+ token_id: bigint;
21
+ memo: [] | [Uint8Array];
22
+ from_subaccount: [] | [Uint8Array];
23
+ created_at_time: [] | [bigint];
24
+ }
25
+ export type TransferError =
26
+ | {
27
+ GenericError: { message: string; error_code: bigint };
28
+ }
29
+ | { Duplicate: { duplicate_of: bigint } }
30
+ | { NonExistingTokenId: null }
31
+ | { Unauthorized: null }
32
+ | { CreatedInFuture: { ledger_time: bigint } }
33
+ | { InvalidRecipient: null }
34
+ | { GenericBatchError: { message: string; error_code: bigint } }
35
+ | { TooOld: null };
36
+ export type TransferResult = { Ok: bigint } | { Err: TransferError };
37
+ /**
38
+ * Generic value in accordance with ICRC-3
39
+ */
40
+ export type Value =
41
+ | { Int: bigint }
42
+ | { Map: Array<[string, Value]> }
43
+ | { Nat: bigint }
44
+ | { Blob: Uint8Array }
45
+ | { Text: string }
46
+ | { Array: Array<Value> };
47
+ export interface _SERVICE {
48
+ icrc7_atomic_batch_transfers: ActorMethod<[], [] | [boolean]>;
49
+ icrc7_balance_of: ActorMethod<[Array<Account>], Array<bigint>>;
50
+ icrc7_collection_metadata: ActorMethod<[], Array<[string, Value]>>;
51
+ icrc7_default_take_value: ActorMethod<[], [] | [bigint]>;
52
+ icrc7_description: ActorMethod<[], [] | [string]>;
53
+ icrc7_logo: ActorMethod<[], [] | [string]>;
54
+ icrc7_max_memo_size: ActorMethod<[], [] | [bigint]>;
55
+ icrc7_max_query_batch_size: ActorMethod<[], [] | [bigint]>;
56
+ icrc7_max_take_value: ActorMethod<[], [] | [bigint]>;
57
+ icrc7_max_update_batch_size: ActorMethod<[], [] | [bigint]>;
58
+ icrc7_name: ActorMethod<[], string>;
59
+ icrc7_owner_of: ActorMethod<[Array<bigint>], Array<[] | [Account]>>;
60
+ icrc7_permitted_drift: ActorMethod<[], [] | [bigint]>;
61
+ icrc7_supply_cap: ActorMethod<[], [] | [bigint]>;
62
+ icrc7_symbol: ActorMethod<[], string>;
63
+ icrc7_token_metadata: ActorMethod<
64
+ [Array<bigint>],
65
+ Array<[] | [Array<[string, Value]>]>
66
+ >;
67
+ icrc7_tokens: ActorMethod<[[] | [bigint], [] | [bigint]], Array<bigint>>;
68
+ icrc7_tokens_of: ActorMethod<
69
+ [Account, [] | [bigint], [] | [bigint]],
70
+ Array<bigint>
71
+ >;
72
+ icrc7_total_supply: ActorMethod<[], bigint>;
73
+ icrc7_transfer: ActorMethod<
74
+ [Array<TransferArg>],
75
+ Array<[] | [TransferResult]>
76
+ >;
77
+ icrc7_tx_window: ActorMethod<[], [] | [bigint]>;
78
+ }
79
+ export declare const idlFactory: IDL.InterfaceFactory;
80
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,67 @@
1
+ // Generated from dfinity/ICRC commit 07e56ecedb51b7f58b7d06ec82ebf7114db42c6b for file 'ICRCs/ICRC-7/ICRC-7.did'
2
+
3
+ type Subaccount = blob;
4
+
5
+ type Account = record { owner : principal; subaccount : opt Subaccount };
6
+
7
+ // Generic value in accordance with ICRC-3
8
+ type Value = variant {
9
+ Blob : blob;
10
+ Text : text;
11
+ Nat : nat;
12
+ Int : int;
13
+ Array : vec Value;
14
+ Map : vec record { text; Value };
15
+ };
16
+
17
+ type TransferArg = record {
18
+ from_subaccount: opt blob; // The subaccount to transfer the token from
19
+ to : Account;
20
+ token_id : nat;
21
+ memo : opt blob;
22
+ created_at_time : opt nat64;
23
+ };
24
+
25
+ type TransferResult = variant {
26
+ Ok : nat; // Transaction index for successful transfer
27
+ Err : TransferError;
28
+ };
29
+
30
+ type TransferError = variant {
31
+ NonExistingTokenId;
32
+ InvalidRecipient;
33
+ Unauthorized;
34
+ TooOld;
35
+ CreatedInFuture : record { ledger_time: nat64 };
36
+ Duplicate : record { duplicate_of : nat };
37
+ GenericError : record { error_code : nat; message : text };
38
+ GenericBatchError : record { error_code : nat; message : text };
39
+ };
40
+
41
+ service : {
42
+ icrc7_collection_metadata : () -> (vec record { text; Value } ) query;
43
+ icrc7_symbol : () -> (text) query;
44
+ icrc7_name : () -> (text) query;
45
+ icrc7_description : () -> (opt text) query;
46
+ icrc7_logo : () -> (opt text) query;
47
+ icrc7_total_supply : () -> (nat) query;
48
+ icrc7_supply_cap : () -> (opt nat) query;
49
+ icrc7_max_query_batch_size : () -> (opt nat) query;
50
+ icrc7_max_update_batch_size : () -> (opt nat) query;
51
+ icrc7_default_take_value : () -> (opt nat) query;
52
+ icrc7_max_take_value : () -> (opt nat) query;
53
+ icrc7_max_memo_size : () -> (opt nat) query;
54
+ icrc7_atomic_batch_transfers : () -> (opt bool) query;
55
+ icrc7_tx_window : () -> (opt nat) query;
56
+ icrc7_permitted_drift : () -> (opt nat) query;
57
+ icrc7_token_metadata : (token_ids : vec nat)
58
+ -> (vec opt vec record { text; Value }) query;
59
+ icrc7_owner_of : (token_ids : vec nat)
60
+ -> (vec opt Account) query;
61
+ icrc7_balance_of : (vec Account) -> (vec nat) query;
62
+ icrc7_tokens : (prev : opt nat, take : opt nat)
63
+ -> (vec nat) query;
64
+ icrc7_tokens_of : (account : Account, prev : opt nat, take : opt nat)
65
+ -> (vec nat) query;
66
+ icrc7_transfer : (vec TransferArg) -> (vec opt TransferResult);
67
+ }
@@ -0,0 +1,2 @@
1
+ import type { IDL } from "@icp-sdk/core/candid";
2
+ export const idlFactory: IDL.InterfaceFactory;