@junobuild/functions 0.5.3 → 0.5.5-next-2026-01-16

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 (79) hide show
  1. package/canisters/ckbtc/index.js +1 -1
  2. package/canisters/cketh/index.js +1 -1
  3. package/canisters/cmc/index.js +1 -1
  4. package/canisters/declarations/_idl.d.ts +5 -5
  5. package/canisters/declarations/_types.d.ts +5 -5
  6. package/canisters/declarations/ckbtc/bitcoin.did.d.ts +2 -0
  7. package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +3 -2
  8. package/canisters/declarations/ckbtc/minter.did.d.ts +4 -0
  9. package/canisters/declarations/ckbtc/minter.did.idl.d.ts +1 -0
  10. package/canisters/declarations/cmc/cmc.did.idl.d.ts +1 -1
  11. package/canisters/declarations/ic-management/ic-management.did.d.ts +2 -0
  12. package/canisters/declarations/ledger-icrc/icrc_icrc-1.did.d.ts +70 -0
  13. package/canisters/declarations/ledger-icrc/icrc_icrc-1.did.idl.d.ts +26 -0
  14. package/canisters/declarations/ledger-icrc/icrc_icrc-10.did.d.ts +21 -0
  15. package/canisters/declarations/ledger-icrc/icrc_icrc-10.did.idl.d.ts +13 -0
  16. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +69 -17
  17. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +21 -4
  18. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +6 -0
  19. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +1 -0
  20. package/canisters/declarations/nns/governance.did.d.ts +54 -30
  21. package/canisters/declarations/nns/governance.did.idl.d.ts +6 -3
  22. package/canisters/declarations/nns/governance_test.did.d.ts +54 -30
  23. package/canisters/declarations/nns/governance_test.did.idl.d.ts +6 -3
  24. package/{src/canisters/declarations/sns/sns_root.did.d.ts → canisters/declarations/sns/root.did.d.ts} +12 -0
  25. package/canisters/declarations/sns/{sns_root.did.idl.d.ts → root.did.idl.d.ts} +5 -1
  26. package/canisters/ic-management/index.js +1 -1
  27. package/canisters/ledger/icp/index.js +1 -1
  28. package/canisters/ledger/icrc/index.d.ts +1 -1
  29. package/canisters/ledger/icrc/index.js +1 -1
  30. package/canisters/ledger/icrc/schemas.d.ts +1 -1
  31. package/canisters/nns/index.js +1 -1
  32. package/canisters/schemas.d.ts +1 -1
  33. package/canisters/sns/index.js +1 -1
  34. package/chunk-CAQXR2VB.js +2 -0
  35. package/chunk-CAQXR2VB.js.map +7 -0
  36. package/package.json +5 -5
  37. package/schemas/satellite.d.ts +1 -1
  38. package/sdk/schemas/controllers.d.ts +1 -1
  39. package/sdk/schemas/db.d.ts +6 -6
  40. package/sdk/schemas/params.d.ts +1 -1
  41. package/sdk/schemas/storage.d.ts +6 -6
  42. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +2 -0
  43. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +44 -22
  44. package/src/canisters/declarations/ckbtc/minter.did.d.ts +4 -0
  45. package/src/canisters/declarations/ckbtc/minter.did.idl.js +14 -0
  46. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +2 -0
  47. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +6 -2
  48. package/src/canisters/declarations/ledger-icrc/icrc_icrc-1.did.d.ts +70 -0
  49. package/src/canisters/declarations/ledger-icrc/icrc_icrc-1.did.idl.js +116 -0
  50. package/src/canisters/declarations/ledger-icrc/icrc_icrc-10.did.d.ts +21 -0
  51. package/src/canisters/declarations/ledger-icrc/icrc_icrc-10.did.idl.js +34 -0
  52. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +69 -17
  53. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +150 -35
  54. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +6 -0
  55. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +12 -0
  56. package/src/canisters/declarations/nns/governance.did.d.ts +54 -30
  57. package/src/canisters/declarations/nns/governance.did.idl.js +87 -17
  58. package/src/canisters/declarations/nns/governance_test.did.d.ts +54 -30
  59. package/src/canisters/declarations/nns/governance_test.did.idl.js +87 -17
  60. package/{canisters/declarations/sns/sns_root.did.d.ts → src/canisters/declarations/sns/root.did.d.ts} +12 -0
  61. package/src/canisters/declarations/sns/{sns_root.did.idl.js → root.did.idl.js} +38 -8
  62. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +0 -148
  63. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +0 -44
  64. package/chunk-HANEPD6T.js +0 -2
  65. package/chunk-HANEPD6T.js.map +0 -7
  66. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +0 -148
  67. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +0 -274
  68. /package/canisters/declarations/sns/{sns_governance.did.d.ts → governance.did.d.ts} +0 -0
  69. /package/canisters/declarations/sns/{sns_governance.did.idl.d.ts → governance.did.idl.d.ts} +0 -0
  70. /package/canisters/declarations/sns/{sns_governance_test.did.d.ts → governance_test.did.d.ts} +0 -0
  71. /package/canisters/declarations/sns/{sns_governance_test.did.idl.d.ts → governance_test.did.idl.d.ts} +0 -0
  72. /package/canisters/declarations/sns/{sns_swap.did.d.ts → swap.did.d.ts} +0 -0
  73. /package/canisters/declarations/sns/{sns_swap.did.idl.d.ts → swap.did.idl.d.ts} +0 -0
  74. /package/src/canisters/declarations/sns/{sns_governance.did.d.ts → governance.did.d.ts} +0 -0
  75. /package/src/canisters/declarations/sns/{sns_governance.did.idl.js → governance.did.idl.js} +0 -0
  76. /package/src/canisters/declarations/sns/{sns_governance_test.did.d.ts → governance_test.did.d.ts} +0 -0
  77. /package/src/canisters/declarations/sns/{sns_governance_test.did.idl.js → governance_test.did.idl.js} +0 -0
  78. /package/src/canisters/declarations/sns/{sns_swap.did.d.ts → swap.did.d.ts} +0 -0
  79. /package/src/canisters/declarations/sns/{sns_swap.did.idl.js → swap.did.idl.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/functions",
3
- "version": "0.5.3",
3
+ "version": "0.5.5-next-2026-01-16",
4
4
  "description": "JavaScript and TypeScript utilities for Juno Serverless Functions",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -94,8 +94,8 @@
94
94
  ],
95
95
  "homepage": "https://juno.build",
96
96
  "peerDependencies": {
97
- "@dfinity/utils": "4.0.2",
98
- "@icp-sdk/core": "^4.2",
99
- "zod": "^4"
97
+ "@dfinity/utils": "*",
98
+ "@icp-sdk/core": "*",
99
+ "zod": "*"
100
100
  }
101
- }
101
+ }
@@ -32,7 +32,7 @@ export type RawUserId = z.infer<typeof RawUserIdSchema>;
32
32
  /**
33
33
  * @see UserId
34
34
  */
35
- export declare const UserIdSchema: z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>;
35
+ export declare const UserIdSchema: z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>;
36
36
  /**
37
37
  * Represents a user identifier.
38
38
  *
@@ -100,7 +100,7 @@ export type Controllers = z.infer<typeof ControllersSchema>;
100
100
  * @see ControllerCheckParamsSchema
101
101
  */
102
102
  export declare const ControllerCheckParamsSchema: z.ZodObject<{
103
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
103
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
104
104
  controllers: z.ZodArray<z.ZodTuple<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodObject<{
105
105
  metadata: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
106
106
  created_at: z.ZodBigInt;
@@ -6,7 +6,7 @@ import { type CollectionParams, type ListStoreParams } from './params';
6
6
  */
7
7
  export declare const GetDocStoreParamsSchema: import("zod").ZodObject<{
8
8
  collection: import("zod").ZodString;
9
- caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
9
+ caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
10
10
  key: import("zod").ZodString;
11
11
  }, import("zod/v4/core").$strict>;
12
12
  /**
@@ -27,7 +27,7 @@ export type GetDocStoreParams = CollectionParams & {
27
27
  */
28
28
  export declare const SetDocStoreParamsSchema: import("zod").ZodObject<{
29
29
  collection: import("zod").ZodString;
30
- caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
30
+ caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
31
31
  key: import("zod").ZodString;
32
32
  doc: import("zod").ZodObject<{
33
33
  data: import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>;
@@ -52,7 +52,7 @@ export type SetDocStoreParams = GetDocStoreParams & {
52
52
  */
53
53
  export declare const DeleteDocStoreParamsSchema: import("zod").ZodObject<{
54
54
  collection: import("zod").ZodString;
55
- caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
55
+ caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
56
56
  key: import("zod").ZodString;
57
57
  doc: import("zod").ZodObject<{
58
58
  version: import("zod").ZodOptional<import("zod").ZodBigInt>;
@@ -85,7 +85,7 @@ export type CountCollectionDocsStoreParams = CollectionParams;
85
85
  */
86
86
  export declare const CountDocsStoreParamsSchema: import("zod").ZodObject<{
87
87
  collection: import("zod").ZodString;
88
- caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
88
+ caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
89
89
  params: import("zod").ZodObject<{
90
90
  matcher: import("zod").ZodOptional<import("zod").ZodObject<{
91
91
  key: import("zod").ZodOptional<import("zod").ZodString>;
@@ -133,7 +133,7 @@ export type CountDocsStoreParams = ListStoreParams;
133
133
  */
134
134
  export declare const ListDocsStoreParamsSchema: import("zod").ZodObject<{
135
135
  collection: import("zod").ZodString;
136
- caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
136
+ caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
137
137
  params: import("zod").ZodObject<{
138
138
  matcher: import("zod").ZodOptional<import("zod").ZodObject<{
139
139
  key: import("zod").ZodOptional<import("zod").ZodString>;
@@ -191,7 +191,7 @@ export type DeleteDocsStoreParams = CollectionParams;
191
191
  */
192
192
  export declare const DeleteFilteredDocsStoreParamsSchema: import("zod").ZodObject<{
193
193
  collection: import("zod").ZodString;
194
- caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
194
+ caller: import("zod").ZodUnion<[import("zod").ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, import("zod").ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
195
195
  params: import("zod").ZodObject<{
196
196
  matcher: import("zod").ZodOptional<import("zod").ZodObject<{
197
197
  key: import("zod").ZodOptional<import("zod").ZodString>;
@@ -21,7 +21,7 @@ export interface CollectionParams {
21
21
  */
22
22
  export declare const ListStoreParamsSchema: z.ZodObject<{
23
23
  collection: z.ZodString;
24
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
24
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
25
25
  params: z.ZodObject<{
26
26
  matcher: z.ZodOptional<z.ZodObject<{
27
27
  key: z.ZodOptional<z.ZodString>;
@@ -8,7 +8,7 @@ import { type CollectionParams, type ListStoreParams } from './params';
8
8
  */
9
9
  export declare const GetAssetStoreParamsSchema: z.ZodObject<{
10
10
  collection: z.ZodString;
11
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
11
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
12
12
  full_path: z.ZodString;
13
13
  }, z.core.$strict>;
14
14
  /**
@@ -39,7 +39,7 @@ export type CountCollectionAssetsStoreParams = CollectionParams;
39
39
  */
40
40
  export declare const CountAssetsStoreParamsSchema: z.ZodObject<{
41
41
  collection: z.ZodString;
42
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
42
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
43
43
  params: z.ZodObject<{
44
44
  matcher: z.ZodOptional<z.ZodObject<{
45
45
  key: z.ZodOptional<z.ZodString>;
@@ -129,7 +129,7 @@ export type DeleteAssetsStoreParams = CollectionParams;
129
129
  */
130
130
  export declare const DeleteFilteredAssetsStoreParamsSchema: z.ZodObject<{
131
131
  collection: z.ZodString;
132
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
132
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
133
133
  params: z.ZodObject<{
134
134
  matcher: z.ZodOptional<z.ZodObject<{
135
135
  key: z.ZodOptional<z.ZodString>;
@@ -177,7 +177,7 @@ export type DeleteFilteredAssetsStoreParams = ListStoreParams;
177
177
  */
178
178
  export declare const DeleteAssetStoreParamsSchema: z.ZodObject<{
179
179
  collection: z.ZodString;
180
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
180
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
181
181
  full_path: z.ZodString;
182
182
  }, z.core.$strict>;
183
183
  /**
@@ -189,7 +189,7 @@ export type DeleteAssetStoreParams = GetAssetStoreParams;
189
189
  */
190
190
  export declare const SetAssetTokenStoreParamsSchema: z.ZodObject<{
191
191
  collection: z.ZodString;
192
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
192
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
193
193
  full_path: z.ZodString;
194
194
  token: z.ZodOptional<z.ZodString>;
195
195
  }, z.core.$strict>;
@@ -208,7 +208,7 @@ export type SetAssetTokenStoreParams = GetAssetStoreParams & {
208
208
  */
209
209
  export declare const ListAssetsStoreParamsSchema: z.ZodObject<{
210
210
  collection: z.ZodString;
211
- caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@dfinity/principal").Principal, import("@dfinity/principal").Principal>]>;
211
+ caller: z.ZodUnion<[z.ZodCustom<Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>>, z.ZodCustom<import("@icp-sdk/core/principal").Principal, import("@icp-sdk/core/principal").Principal>]>;
212
212
  params: z.ZodObject<{
213
213
  matcher: z.ZodOptional<z.ZodObject<{
214
214
  key: z.ZodOptional<z.ZodString>;
@@ -14,6 +14,8 @@ export type address = string;
14
14
  export type block_hash = Uint8Array;
15
15
  export type block_header = Uint8Array;
16
16
  export type block_height = number;
17
+ export type canister_arg = { 'init' : init_config } |
18
+ { 'upgrade' : [] | [set_config_request] };
17
19
  export interface config {
18
20
  'api_access' : flag,
19
21
  'lazily_evaluate_fee_percentiles' : flag,
@@ -43,6 +43,20 @@ export const init_config = IDL.Record({
43
43
  burn_cycles: IDL.Opt(flag),
44
44
  disable_api_if_not_fully_synced: IDL.Opt(flag)
45
45
  });
46
+ export const set_config_request = IDL.Record({
47
+ api_access: IDL.Opt(flag),
48
+ lazily_evaluate_fee_percentiles: IDL.Opt(flag),
49
+ fees: IDL.Opt(fees),
50
+ watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
51
+ stability_threshold: IDL.Opt(IDL.Nat),
52
+ syncing: IDL.Opt(flag),
53
+ burn_cycles: IDL.Opt(flag),
54
+ disable_api_if_not_fully_synced: IDL.Opt(flag)
55
+ });
56
+ export const canister_arg = IDL.Variant({
57
+ init: init_config,
58
+ upgrade: IDL.Opt(set_config_request)
59
+ });
46
60
  export const address = IDL.Text;
47
61
  export const get_balance_request = IDL.Record({
48
62
  network: network,
@@ -102,16 +116,6 @@ export const config = IDL.Record({
102
116
  burn_cycles: flag,
103
117
  disable_api_if_not_fully_synced: flag
104
118
  });
105
- export const set_config_request = IDL.Record({
106
- api_access: IDL.Opt(flag),
107
- lazily_evaluate_fee_percentiles: IDL.Opt(flag),
108
- fees: IDL.Opt(fees),
109
- watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
110
- stability_threshold: IDL.Opt(IDL.Nat),
111
- syncing: IDL.Opt(flag),
112
- burn_cycles: IDL.Opt(flag),
113
- disable_api_if_not_fully_synced: IDL.Opt(flag)
114
- });
115
119
 
116
120
  export const idlService = IDL.Service({
117
121
  bitcoin_get_balance: IDL.Func([get_balance_request], [satoshi], []),
@@ -133,7 +137,7 @@ export const idlService = IDL.Service({
133
137
  set_config: IDL.Func([set_config_request], [], [])
134
138
  });
135
139
 
136
- export const idlInitArgs = [init_config];
140
+ export const idlInitArgs = [canister_arg];
137
141
 
138
142
  export const idlFactory = ({IDL}) => {
139
143
  const flag = IDL.Variant({disabled: IDL.Null, enabled: IDL.Null});
@@ -168,6 +172,20 @@ export const idlFactory = ({IDL}) => {
168
172
  burn_cycles: IDL.Opt(flag),
169
173
  disable_api_if_not_fully_synced: IDL.Opt(flag)
170
174
  });
175
+ const set_config_request = IDL.Record({
176
+ api_access: IDL.Opt(flag),
177
+ lazily_evaluate_fee_percentiles: IDL.Opt(flag),
178
+ fees: IDL.Opt(fees),
179
+ watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
180
+ stability_threshold: IDL.Opt(IDL.Nat),
181
+ syncing: IDL.Opt(flag),
182
+ burn_cycles: IDL.Opt(flag),
183
+ disable_api_if_not_fully_synced: IDL.Opt(flag)
184
+ });
185
+ const canister_arg = IDL.Variant({
186
+ init: init_config,
187
+ upgrade: IDL.Opt(set_config_request)
188
+ });
171
189
  const address = IDL.Text;
172
190
  const get_balance_request = IDL.Record({
173
191
  network: network,
@@ -232,16 +250,6 @@ export const idlFactory = ({IDL}) => {
232
250
  burn_cycles: flag,
233
251
  disable_api_if_not_fully_synced: flag
234
252
  });
235
- const set_config_request = IDL.Record({
236
- api_access: IDL.Opt(flag),
237
- lazily_evaluate_fee_percentiles: IDL.Opt(flag),
238
- fees: IDL.Opt(fees),
239
- watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
240
- stability_threshold: IDL.Opt(IDL.Nat),
241
- syncing: IDL.Opt(flag),
242
- burn_cycles: IDL.Opt(flag),
243
- disable_api_if_not_fully_synced: IDL.Opt(flag)
244
- });
245
253
 
246
254
  return IDL.Service({
247
255
  bitcoin_get_balance: IDL.Func([get_balance_request], [satoshi], []),
@@ -297,6 +305,20 @@ export const init = ({IDL}) => {
297
305
  burn_cycles: IDL.Opt(flag),
298
306
  disable_api_if_not_fully_synced: IDL.Opt(flag)
299
307
  });
308
+ const set_config_request = IDL.Record({
309
+ api_access: IDL.Opt(flag),
310
+ lazily_evaluate_fee_percentiles: IDL.Opt(flag),
311
+ fees: IDL.Opt(fees),
312
+ watchdog_canister: IDL.Opt(IDL.Opt(IDL.Principal)),
313
+ stability_threshold: IDL.Opt(IDL.Nat),
314
+ syncing: IDL.Opt(flag),
315
+ burn_cycles: IDL.Opt(flag),
316
+ disable_api_if_not_fully_synced: IDL.Opt(flag)
317
+ });
318
+ const canister_arg = IDL.Variant({
319
+ init: init_config,
320
+ upgrade: IDL.Opt(set_config_request)
321
+ });
300
322
 
301
- return [init_config];
323
+ return [canister_arg];
302
324
  };
@@ -44,6 +44,8 @@ export interface CanisterStatusResponse {
44
44
  'memory_metrics' : MemoryMetrics,
45
45
  'status' : CanisterStatusType,
46
46
  'memory_size' : bigint,
47
+ 'ready_for_migration' : boolean,
48
+ 'version' : bigint,
47
49
  'cycles' : bigint,
48
50
  'settings' : DefiniteCanisterSettings,
49
51
  'query_stats' : QueryStats,
@@ -57,6 +59,7 @@ export type CanisterStatusType = { 'stopped' : null } |
57
59
  export interface DefiniteCanisterSettings {
58
60
  'freezing_threshold' : bigint,
59
61
  'wasm_memory_threshold' : bigint,
62
+ 'environment_variables' : Array<environment_variable>,
60
63
  'controllers' : Array<Principal>,
61
64
  'reserved_cycles_limit' : bigint,
62
65
  'log_visibility' : LogVisibility,
@@ -681,6 +684,7 @@ export interface WithdrawalFee { 'minter_fee' : bigint, 'bitcoin_fee' : bigint }
681
684
  export type WithdrawalReimbursementReason = {
682
685
  'invalid_transaction' : InvalidTransactionError
683
686
  };
687
+ export interface environment_variable { 'value' : string, 'name' : string }
684
688
  export interface _SERVICE {
685
689
  /**
686
690
  * / Returns an estimate of the user's fee (in Satoshi) for a
@@ -63,6 +63,10 @@ export const CanisterStatusType = IDL.Variant({
63
63
  stopping: IDL.Null,
64
64
  running: IDL.Null
65
65
  });
66
+ export const environment_variable = IDL.Record({
67
+ value: IDL.Text,
68
+ name: IDL.Text
69
+ });
66
70
  export const LogVisibility = IDL.Variant({
67
71
  controllers: IDL.Null,
68
72
  public: IDL.Null,
@@ -71,6 +75,7 @@ export const LogVisibility = IDL.Variant({
71
75
  export const DefiniteCanisterSettings = IDL.Record({
72
76
  freezing_threshold: IDL.Nat,
73
77
  wasm_memory_threshold: IDL.Nat,
78
+ environment_variables: IDL.Vec(environment_variable),
74
79
  controllers: IDL.Vec(IDL.Principal),
75
80
  reserved_cycles_limit: IDL.Nat,
76
81
  log_visibility: LogVisibility,
@@ -88,6 +93,8 @@ export const CanisterStatusResponse = IDL.Record({
88
93
  memory_metrics: MemoryMetrics,
89
94
  status: CanisterStatusType,
90
95
  memory_size: IDL.Nat,
96
+ ready_for_migration: IDL.Bool,
97
+ version: IDL.Nat64,
91
98
  cycles: IDL.Nat,
92
99
  settings: DefiniteCanisterSettings,
93
100
  query_stats: QueryStats,
@@ -481,6 +488,10 @@ export const idlFactory = ({IDL}) => {
481
488
  stopping: IDL.Null,
482
489
  running: IDL.Null
483
490
  });
491
+ const environment_variable = IDL.Record({
492
+ value: IDL.Text,
493
+ name: IDL.Text
494
+ });
484
495
  const LogVisibility = IDL.Variant({
485
496
  controllers: IDL.Null,
486
497
  public: IDL.Null,
@@ -489,6 +500,7 @@ export const idlFactory = ({IDL}) => {
489
500
  const DefiniteCanisterSettings = IDL.Record({
490
501
  freezing_threshold: IDL.Nat,
491
502
  wasm_memory_threshold: IDL.Nat,
503
+ environment_variables: IDL.Vec(environment_variable),
492
504
  controllers: IDL.Vec(IDL.Principal),
493
505
  reserved_cycles_limit: IDL.Nat,
494
506
  log_visibility: LogVisibility,
@@ -506,6 +518,8 @@ export const idlFactory = ({IDL}) => {
506
518
  memory_metrics: MemoryMetrics,
507
519
  status: CanisterStatusType,
508
520
  memory_size: IDL.Nat,
521
+ ready_for_migration: IDL.Bool,
522
+ version: IDL.Nat64,
509
523
  cycles: IDL.Nat,
510
524
  settings: DefiniteCanisterSettings,
511
525
  query_stats: QueryStats,
@@ -357,6 +357,8 @@ export interface subnet_info_result {
357
357
  export interface take_canister_snapshot_args {
358
358
  'replace_snapshot' : [] | [snapshot_id],
359
359
  'canister_id' : canister_id,
360
+ 'uninstall_code' : [] | [boolean],
361
+ 'sender_canister_version' : [] | [bigint],
360
362
  }
361
363
  export type take_canister_snapshot_result = snapshot;
362
364
  export interface uninstall_code_args {
@@ -417,7 +417,9 @@ export const subnet_info_result = IDL.Record({
417
417
  });
418
418
  export const take_canister_snapshot_args = IDL.Record({
419
419
  replace_snapshot: IDL.Opt(snapshot_id),
420
- canister_id: canister_id
420
+ canister_id: canister_id,
421
+ uninstall_code: IDL.Opt(IDL.Bool),
422
+ sender_canister_version: IDL.Opt(IDL.Nat64)
421
423
  });
422
424
  export const take_canister_snapshot_result = snapshot;
423
425
  export const uninstall_code_args = IDL.Record({
@@ -989,7 +991,9 @@ export const idlFactory = ({IDL}) => {
989
991
  });
990
992
  const take_canister_snapshot_args = IDL.Record({
991
993
  replace_snapshot: IDL.Opt(snapshot_id),
992
- canister_id: canister_id
994
+ canister_id: canister_id,
995
+ uninstall_code: IDL.Opt(IDL.Bool),
996
+ sender_canister_version: IDL.Opt(IDL.Nat64)
993
997
  });
994
998
  const take_canister_snapshot_result = snapshot;
995
999
  const uninstall_code_args = IDL.Record({
@@ -0,0 +1,70 @@
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
+ /**
18
+ * Number of nanoseconds between two [Timestamp]s.
19
+ */
20
+ export type Duration = bigint;
21
+ export type Subaccount = Uint8Array;
22
+ /**
23
+ * Number of nanoseconds since the UNIX epoch in UTC timezone.
24
+ */
25
+ export type Timestamp = bigint;
26
+ export interface TransferArgs {
27
+ 'to' : Account,
28
+ 'fee' : [] | [bigint],
29
+ 'memo' : [] | [Uint8Array],
30
+ 'from_subaccount' : [] | [Subaccount],
31
+ 'created_at_time' : [] | [Timestamp],
32
+ 'amount' : bigint,
33
+ }
34
+ export type TransferError = {
35
+ 'GenericError' : { 'message' : string, 'error_code' : bigint }
36
+ } |
37
+ { 'TemporarilyUnavailable' : null } |
38
+ { 'BadBurn' : { 'min_burn_amount' : bigint } } |
39
+ { 'Duplicate' : { 'duplicate_of' : bigint } } |
40
+ { 'BadFee' : { 'expected_fee' : bigint } } |
41
+ { 'CreatedInFuture' : { 'ledger_time' : Timestamp } } |
42
+ { 'TooOld' : null } |
43
+ { 'InsufficientFunds' : { 'balance' : bigint } };
44
+ export type Value = { 'Int' : bigint } |
45
+ { 'Nat' : bigint } |
46
+ { 'Blob' : Uint8Array } |
47
+ { 'Text' : string };
48
+ export interface _SERVICE {
49
+ 'icrc1_balance_of' : ActorMethod<[Account], bigint>,
50
+ 'icrc1_decimals' : ActorMethod<[], number>,
51
+ 'icrc1_fee' : ActorMethod<[], bigint>,
52
+ 'icrc1_metadata' : ActorMethod<[], Array<[string, Value]>>,
53
+ 'icrc1_minting_account' : ActorMethod<[], [] | [Account]>,
54
+ 'icrc1_name' : ActorMethod<[], string>,
55
+ 'icrc1_supported_standards' : ActorMethod<
56
+ [],
57
+ Array<{ 'url' : string, 'name' : string }>
58
+ >,
59
+ 'icrc1_symbol' : ActorMethod<[], string>,
60
+ 'icrc1_total_supply' : ActorMethod<[], bigint>,
61
+ 'icrc1_transfer' : ActorMethod<
62
+ [TransferArgs],
63
+ { 'Ok' : bigint } |
64
+ { 'Err' : TransferError }
65
+ >,
66
+ }
67
+ export declare const idlService: IDL.ServiceClass;
68
+ export declare const idlInitArgs: IDL.Type[];
69
+ export declare const idlFactory: IDL.InterfaceFactory;
70
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,116 @@
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 Subaccount = IDL.Vec(IDL.Nat8);
12
+ export const Account = IDL.Record({
13
+ owner: IDL.Principal,
14
+ subaccount: IDL.Opt(Subaccount)
15
+ });
16
+ export const Value = IDL.Variant({
17
+ Int: IDL.Int,
18
+ Nat: IDL.Nat,
19
+ Blob: IDL.Vec(IDL.Nat8),
20
+ Text: IDL.Text
21
+ });
22
+ export const Timestamp = IDL.Nat64;
23
+ export const TransferArgs = IDL.Record({
24
+ to: Account,
25
+ fee: IDL.Opt(IDL.Nat),
26
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
27
+ from_subaccount: IDL.Opt(Subaccount),
28
+ created_at_time: IDL.Opt(Timestamp),
29
+ amount: IDL.Nat
30
+ });
31
+ export const TransferError = IDL.Variant({
32
+ GenericError: IDL.Record({message: IDL.Text, error_code: IDL.Nat}),
33
+ TemporarilyUnavailable: IDL.Null,
34
+ BadBurn: IDL.Record({min_burn_amount: IDL.Nat}),
35
+ Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
36
+ BadFee: IDL.Record({expected_fee: IDL.Nat}),
37
+ CreatedInFuture: IDL.Record({ledger_time: Timestamp}),
38
+ TooOld: IDL.Null,
39
+ InsufficientFunds: IDL.Record({balance: IDL.Nat})
40
+ });
41
+
42
+ export const idlService = IDL.Service({
43
+ icrc1_balance_of: IDL.Func([Account], [IDL.Nat], ['query']),
44
+ icrc1_decimals: IDL.Func([], [IDL.Nat8], ['query']),
45
+ icrc1_fee: IDL.Func([], [IDL.Nat], ['query']),
46
+ icrc1_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], ['query']),
47
+ icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], ['query']),
48
+ icrc1_name: IDL.Func([], [IDL.Text], ['query']),
49
+ icrc1_supported_standards: IDL.Func(
50
+ [],
51
+ [IDL.Vec(IDL.Record({url: IDL.Text, name: IDL.Text}))],
52
+ ['query']
53
+ ),
54
+ icrc1_symbol: IDL.Func([], [IDL.Text], ['query']),
55
+ icrc1_total_supply: IDL.Func([], [IDL.Nat], ['query']),
56
+ icrc1_transfer: IDL.Func([TransferArgs], [IDL.Variant({Ok: IDL.Nat, Err: TransferError})], [])
57
+ });
58
+
59
+ export const idlInitArgs = [];
60
+
61
+ export const idlFactory = ({IDL}) => {
62
+ const Subaccount = IDL.Vec(IDL.Nat8);
63
+ const Account = IDL.Record({
64
+ owner: IDL.Principal,
65
+ subaccount: IDL.Opt(Subaccount)
66
+ });
67
+ const Value = IDL.Variant({
68
+ Int: IDL.Int,
69
+ Nat: IDL.Nat,
70
+ Blob: IDL.Vec(IDL.Nat8),
71
+ Text: IDL.Text
72
+ });
73
+ const Timestamp = IDL.Nat64;
74
+ const TransferArgs = IDL.Record({
75
+ to: Account,
76
+ fee: IDL.Opt(IDL.Nat),
77
+ memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
78
+ from_subaccount: IDL.Opt(Subaccount),
79
+ created_at_time: IDL.Opt(Timestamp),
80
+ amount: IDL.Nat
81
+ });
82
+ const TransferError = IDL.Variant({
83
+ GenericError: IDL.Record({
84
+ message: IDL.Text,
85
+ error_code: IDL.Nat
86
+ }),
87
+ TemporarilyUnavailable: IDL.Null,
88
+ BadBurn: IDL.Record({min_burn_amount: IDL.Nat}),
89
+ Duplicate: IDL.Record({duplicate_of: IDL.Nat}),
90
+ BadFee: IDL.Record({expected_fee: IDL.Nat}),
91
+ CreatedInFuture: IDL.Record({ledger_time: Timestamp}),
92
+ TooOld: IDL.Null,
93
+ InsufficientFunds: IDL.Record({balance: IDL.Nat})
94
+ });
95
+
96
+ return IDL.Service({
97
+ icrc1_balance_of: IDL.Func([Account], [IDL.Nat], ['query']),
98
+ icrc1_decimals: IDL.Func([], [IDL.Nat8], ['query']),
99
+ icrc1_fee: IDL.Func([], [IDL.Nat], ['query']),
100
+ icrc1_metadata: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, Value))], ['query']),
101
+ icrc1_minting_account: IDL.Func([], [IDL.Opt(Account)], ['query']),
102
+ icrc1_name: IDL.Func([], [IDL.Text], ['query']),
103
+ icrc1_supported_standards: IDL.Func(
104
+ [],
105
+ [IDL.Vec(IDL.Record({url: IDL.Text, name: IDL.Text}))],
106
+ ['query']
107
+ ),
108
+ icrc1_symbol: IDL.Func([], [IDL.Text], ['query']),
109
+ icrc1_total_supply: IDL.Func([], [IDL.Nat], ['query']),
110
+ icrc1_transfer: IDL.Func([TransferArgs], [IDL.Variant({Ok: IDL.Nat, Err: TransferError})], [])
111
+ });
112
+ };
113
+
114
+ export const init = ({IDL}) => {
115
+ return [];
116
+ };
@@ -0,0 +1,21 @@
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 SupportedStandard { 'url' : string, 'name' : string }
14
+ export type SupportedStandardsResponse = Array<SupportedStandard>;
15
+ export interface _SERVICE {
16
+ 'icrc10_supported_standards' : ActorMethod<[], SupportedStandardsResponse>,
17
+ }
18
+ export declare const idlService: IDL.ServiceClass;
19
+ export declare const idlInitArgs: IDL.Type[];
20
+ export declare const idlFactory: IDL.InterfaceFactory;
21
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -0,0 +1,34 @@
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 SupportedStandard = IDL.Record({
12
+ url: IDL.Text,
13
+ name: IDL.Text
14
+ });
15
+ export const SupportedStandardsResponse = IDL.Vec(SupportedStandard);
16
+
17
+ export const idlService = IDL.Service({
18
+ icrc10_supported_standards: IDL.Func([], [SupportedStandardsResponse], ['query'])
19
+ });
20
+
21
+ export const idlInitArgs = [];
22
+
23
+ export const idlFactory = ({IDL}) => {
24
+ const SupportedStandard = IDL.Record({url: IDL.Text, name: IDL.Text});
25
+ const SupportedStandardsResponse = IDL.Vec(SupportedStandard);
26
+
27
+ return IDL.Service({
28
+ icrc10_supported_standards: IDL.Func([], [SupportedStandardsResponse], ['query'])
29
+ });
30
+ };
31
+
32
+ export const init = ({IDL}) => {
33
+ return [];
34
+ };