@junobuild/functions 0.4.0 → 0.4.1-next-2025-11-24

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 (36) hide show
  1. package/canisters/_canister.d.ts +17 -0
  2. package/canisters/_constants.d.ts +3 -0
  3. package/canisters/cmc/cmc.canister.d.ts +28 -0
  4. package/canisters/cmc/index.d.ts +2 -0
  5. package/canisters/declarations/_idl.d.ts +4 -0
  6. package/canisters/declarations/_types.d.ts +4 -0
  7. package/canisters/declarations/cmc/cmc.did.idl.d.ts +53 -0
  8. package/canisters/declarations/index.d.ts +2 -0
  9. package/canisters/declarations/ledger-icp/index.did.idl.d.ts +35 -0
  10. package/canisters/declarations/ledger-icp/ledger.did.idl.d.ts +106 -0
  11. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +44 -0
  12. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +28 -0
  13. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +100 -0
  14. package/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.d.ts +39 -0
  15. package/canisters/index.d.ts +1 -0
  16. package/canisters/ledger/icp/index.d.ts +2 -0
  17. package/canisters/ledger/icp/ledger.canister.d.ts +24 -0
  18. package/canisters/ledger/icrc/index.d.ts +3 -0
  19. package/canisters/ledger/icrc/ledger.canister.d.ts +45 -0
  20. package/canisters/ledger/icrc/schemas.d.ts +11 -0
  21. package/canisters/schemas.d.ts +11 -0
  22. package/package.json +21 -5
  23. package/src/canisters/declarations/cmc/cmc.did.d.ts +344 -0
  24. package/src/canisters/declarations/cmc/cmc.did.idl.js +338 -0
  25. package/src/canisters/declarations/ledger-icp/index.did.d.ts +119 -0
  26. package/src/canisters/declarations/ledger-icp/index.did.idl.js +225 -0
  27. package/src/canisters/declarations/ledger-icp/ledger.did.d.ts +606 -0
  28. package/src/canisters/declarations/ledger-icp/ledger.did.idl.js +813 -0
  29. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +148 -0
  30. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +274 -0
  31. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +102 -0
  32. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +171 -0
  33. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +579 -0
  34. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +923 -0
  35. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.d.ts +81 -0
  36. package/src/canisters/declarations/ledger-icrc/icrc_nft-ledger.did.idl.js +163 -0
@@ -0,0 +1,81 @@
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
+ 'GenericError' : { 'message' : string, 'error_code' : bigint }
27
+ } |
28
+ { 'Duplicate' : { 'duplicate_of' : bigint } } |
29
+ { 'NonExistingTokenId' : null } |
30
+ { 'Unauthorized' : null } |
31
+ { 'CreatedInFuture' : { 'ledger_time' : bigint } } |
32
+ { 'InvalidRecipient' : null } |
33
+ { 'GenericBatchError' : { 'message' : string, 'error_code' : bigint } } |
34
+ { 'TooOld' : null };
35
+ export type TransferResult = { 'Ok' : bigint } |
36
+ { 'Err' : TransferError };
37
+ /**
38
+ * Generic value in accordance with ICRC-3
39
+ */
40
+ export type Value = { 'Int' : bigint } |
41
+ { 'Map' : Array<[string, Value]> } |
42
+ { 'Nat' : bigint } |
43
+ { 'Blob' : Uint8Array } |
44
+ { 'Text' : string } |
45
+ { 'Array' : Array<Value> };
46
+ export interface _SERVICE {
47
+ 'icrc7_atomic_batch_transfers' : ActorMethod<[], [] | [boolean]>,
48
+ 'icrc7_balance_of' : ActorMethod<[Array<Account>], Array<bigint>>,
49
+ 'icrc7_collection_metadata' : ActorMethod<[], Array<[string, Value]>>,
50
+ 'icrc7_default_take_value' : ActorMethod<[], [] | [bigint]>,
51
+ 'icrc7_description' : ActorMethod<[], [] | [string]>,
52
+ 'icrc7_logo' : ActorMethod<[], [] | [string]>,
53
+ 'icrc7_max_memo_size' : ActorMethod<[], [] | [bigint]>,
54
+ 'icrc7_max_query_batch_size' : ActorMethod<[], [] | [bigint]>,
55
+ 'icrc7_max_take_value' : ActorMethod<[], [] | [bigint]>,
56
+ 'icrc7_max_update_batch_size' : ActorMethod<[], [] | [bigint]>,
57
+ 'icrc7_name' : ActorMethod<[], string>,
58
+ 'icrc7_owner_of' : ActorMethod<[Array<bigint>], Array<[] | [Account]>>,
59
+ 'icrc7_permitted_drift' : ActorMethod<[], [] | [bigint]>,
60
+ 'icrc7_supply_cap' : ActorMethod<[], [] | [bigint]>,
61
+ 'icrc7_symbol' : ActorMethod<[], string>,
62
+ 'icrc7_token_metadata' : ActorMethod<
63
+ [Array<bigint>],
64
+ Array<[] | [Array<[string, Value]>]>
65
+ >,
66
+ 'icrc7_tokens' : ActorMethod<[[] | [bigint], [] | [bigint]], Array<bigint>>,
67
+ 'icrc7_tokens_of' : ActorMethod<
68
+ [Account, [] | [bigint], [] | [bigint]],
69
+ Array<bigint>
70
+ >,
71
+ 'icrc7_total_supply' : ActorMethod<[], bigint>,
72
+ 'icrc7_transfer' : ActorMethod<
73
+ [Array<TransferArg>],
74
+ Array<[] | [TransferResult]>
75
+ >,
76
+ 'icrc7_tx_window' : ActorMethod<[], [] | [bigint]>,
77
+ }
78
+ export declare const idlService: IDL.ServiceClass;
79
+ export declare const idlInitArgs: IDL.Type[];
80
+ export declare const idlFactory: IDL.InterfaceFactory;
81
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,163 @@
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 {IDL} from '@icp-sdk/core/candid';
10
+
11
+ export const Value = IDL.Rec();
12
+ export const Subaccount = IDL.Vec(IDL.Nat8);
13
+ export const Account = IDL.Record({
14
+ owner: IDL.Principal,
15
+ subaccount: IDL.Opt(Subaccount)
16
+ });
17
+ Value.fill(
18
+ IDL.Variant({
19
+ Int: IDL.Int,
20
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, Value)),
21
+ Nat: IDL.Nat,
22
+ Blob: IDL.Vec(IDL.Nat8),
23
+ Text: IDL.Text,
24
+ Array: IDL.Vec(Value)
25
+ })
26
+ );
27
+ export const TransferArg = IDL.Record({
28
+ to: Account,
29
+ token_id: IDL.Nat,
30
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
31
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
32
+ created_at_time: IDL.Opt(IDL.Nat64)
33
+ });
34
+ export const TransferError = IDL.Variant({
35
+ GenericError: IDL.Record({message: IDL.Text, error_code: IDL.Nat}),
36
+ Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
37
+ NonExistingTokenId: IDL.Null,
38
+ Unauthorized: IDL.Null,
39
+ CreatedInFuture: IDL.Record({ledger_time: IDL.Nat64}),
40
+ InvalidRecipient: IDL.Null,
41
+ GenericBatchError: IDL.Record({
42
+ message: IDL.Text,
43
+ error_code: IDL.Nat
44
+ }),
45
+ TooOld: IDL.Null
46
+ });
47
+ export const TransferResult = IDL.Variant({
48
+ Ok: IDL.Nat,
49
+ Err: TransferError
50
+ });
51
+
52
+ export const idlService = IDL.Service({
53
+ icrc7_atomic_batch_transfers: IDL.Func([], [IDL.Opt(IDL.Bool)], ['query']),
54
+ icrc7_balance_of: IDL.Func([IDL.Vec(Account)], [IDL.Vec(IDL.Nat)], ['query']),
55
+ icrc7_collection_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], ['query']),
56
+ icrc7_default_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
57
+ icrc7_description: IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
58
+ icrc7_logo: IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
59
+ icrc7_max_memo_size: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
60
+ icrc7_max_query_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
61
+ icrc7_max_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
62
+ icrc7_max_update_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
63
+ icrc7_name: IDL.Func([], [IDL.Text], ['query']),
64
+ icrc7_owner_of: IDL.Func([IDL.Vec(IDL.Nat)], [IDL.Vec(IDL.Opt(Account))], ['query']),
65
+ icrc7_permitted_drift: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
66
+ icrc7_supply_cap: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
67
+ icrc7_symbol: IDL.Func([], [IDL.Text], ['query']),
68
+ icrc7_token_metadata: IDL.Func(
69
+ [IDL.Vec(IDL.Nat)],
70
+ [IDL.Vec(IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, Value))))],
71
+ ['query']
72
+ ),
73
+ icrc7_tokens: IDL.Func([IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)], [IDL.Vec(IDL.Nat)], ['query']),
74
+ icrc7_tokens_of: IDL.Func(
75
+ [Account, IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
76
+ [IDL.Vec(IDL.Nat)],
77
+ ['query']
78
+ ),
79
+ icrc7_total_supply: IDL.Func([], [IDL.Nat], ['query']),
80
+ icrc7_transfer: IDL.Func([IDL.Vec(TransferArg)], [IDL.Vec(IDL.Opt(TransferResult))], []),
81
+ icrc7_tx_window: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query'])
82
+ });
83
+
84
+ export const idlInitArgs = [];
85
+
86
+ export const idlFactory = ({IDL}) => {
87
+ const Value = IDL.Rec();
88
+ const Subaccount = IDL.Vec(IDL.Nat8);
89
+ const Account = IDL.Record({
90
+ owner: IDL.Principal,
91
+ subaccount: IDL.Opt(Subaccount)
92
+ });
93
+ Value.fill(
94
+ IDL.Variant({
95
+ Int: IDL.Int,
96
+ Map: IDL.Vec(IDL.Tuple(IDL.Text, Value)),
97
+ Nat: IDL.Nat,
98
+ Blob: IDL.Vec(IDL.Nat8),
99
+ Text: IDL.Text,
100
+ Array: IDL.Vec(Value)
101
+ })
102
+ );
103
+ const TransferArg = IDL.Record({
104
+ to: Account,
105
+ token_id: IDL.Nat,
106
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
107
+ from_subaccount: IDL.Opt(IDL.Vec(IDL.Nat8)),
108
+ created_at_time: IDL.Opt(IDL.Nat64)
109
+ });
110
+ const TransferError = IDL.Variant({
111
+ GenericError: IDL.Record({
112
+ message: IDL.Text,
113
+ error_code: IDL.Nat
114
+ }),
115
+ Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
116
+ NonExistingTokenId: IDL.Null,
117
+ Unauthorized: IDL.Null,
118
+ CreatedInFuture: IDL.Record({ledger_time: IDL.Nat64}),
119
+ InvalidRecipient: IDL.Null,
120
+ GenericBatchError: IDL.Record({
121
+ message: IDL.Text,
122
+ error_code: IDL.Nat
123
+ }),
124
+ TooOld: IDL.Null
125
+ });
126
+ const TransferResult = IDL.Variant({Ok: IDL.Nat, Err: TransferError});
127
+
128
+ return IDL.Service({
129
+ icrc7_atomic_batch_transfers: IDL.Func([], [IDL.Opt(IDL.Bool)], ['query']),
130
+ icrc7_balance_of: IDL.Func([IDL.Vec(Account)], [IDL.Vec(IDL.Nat)], ['query']),
131
+ icrc7_collection_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], ['query']),
132
+ icrc7_default_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
133
+ icrc7_description: IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
134
+ icrc7_logo: IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
135
+ icrc7_max_memo_size: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
136
+ icrc7_max_query_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
137
+ icrc7_max_take_value: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
138
+ icrc7_max_update_batch_size: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
139
+ icrc7_name: IDL.Func([], [IDL.Text], ['query']),
140
+ icrc7_owner_of: IDL.Func([IDL.Vec(IDL.Nat)], [IDL.Vec(IDL.Opt(Account))], ['query']),
141
+ icrc7_permitted_drift: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
142
+ icrc7_supply_cap: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query']),
143
+ icrc7_symbol: IDL.Func([], [IDL.Text], ['query']),
144
+ icrc7_token_metadata: IDL.Func(
145
+ [IDL.Vec(IDL.Nat)],
146
+ [IDL.Vec(IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, Value))))],
147
+ ['query']
148
+ ),
149
+ icrc7_tokens: IDL.Func([IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)], [IDL.Vec(IDL.Nat)], ['query']),
150
+ icrc7_tokens_of: IDL.Func(
151
+ [Account, IDL.Opt(IDL.Nat), IDL.Opt(IDL.Nat)],
152
+ [IDL.Vec(IDL.Nat)],
153
+ ['query']
154
+ ),
155
+ icrc7_total_supply: IDL.Func([], [IDL.Nat], ['query']),
156
+ icrc7_transfer: IDL.Func([IDL.Vec(TransferArg)], [IDL.Vec(IDL.Opt(TransferResult))], []),
157
+ icrc7_tx_window: IDL.Func([], [IDL.Opt(IDL.Nat)], ['query'])
158
+ });
159
+ };
160
+
161
+ export const init = ({IDL}) => {
162
+ return [];
163
+ };