@junobuild/functions 0.5.4 → 0.5.5

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 (71) 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/ic-management/ic-management.did.d.ts +2 -0
  11. package/canisters/declarations/ledger-icrc/icrc_icrc-1.did.d.ts +70 -0
  12. package/canisters/declarations/ledger-icrc/icrc_icrc-1.did.idl.d.ts +26 -0
  13. package/canisters/declarations/ledger-icrc/icrc_icrc-10.did.d.ts +21 -0
  14. package/canisters/declarations/ledger-icrc/icrc_icrc-10.did.idl.d.ts +13 -0
  15. package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +69 -17
  16. package/canisters/declarations/ledger-icrc/icrc_index.did.idl.d.ts +21 -4
  17. package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +6 -0
  18. package/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.d.ts +1 -0
  19. package/canisters/declarations/nns/governance.did.d.ts +54 -30
  20. package/canisters/declarations/nns/governance.did.idl.d.ts +6 -3
  21. package/canisters/declarations/nns/governance_test.did.d.ts +54 -30
  22. package/canisters/declarations/nns/governance_test.did.idl.d.ts +6 -3
  23. package/{src/canisters/declarations/sns/sns_root.did.d.ts → canisters/declarations/sns/root.did.d.ts} +12 -0
  24. package/canisters/declarations/sns/{sns_root.did.idl.d.ts → root.did.idl.d.ts} +5 -1
  25. package/canisters/ic-management/index.js +1 -1
  26. package/canisters/ledger/icp/index.js +1 -1
  27. package/canisters/ledger/icrc/index.d.ts +1 -1
  28. package/canisters/ledger/icrc/index.js +1 -1
  29. package/canisters/nns/index.js +1 -1
  30. package/canisters/sns/index.js +1 -1
  31. package/chunk-CAQXR2VB.js +2 -0
  32. package/chunk-CAQXR2VB.js.map +7 -0
  33. package/package.json +1 -1
  34. package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +2 -0
  35. package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +44 -22
  36. package/src/canisters/declarations/ckbtc/minter.did.d.ts +4 -0
  37. package/src/canisters/declarations/ckbtc/minter.did.idl.js +14 -0
  38. package/src/canisters/declarations/ic-management/ic-management.did.d.ts +2 -0
  39. package/src/canisters/declarations/ic-management/ic-management.did.idl.js +6 -2
  40. package/src/canisters/declarations/ledger-icrc/icrc_icrc-1.did.d.ts +70 -0
  41. package/src/canisters/declarations/ledger-icrc/icrc_icrc-1.did.idl.js +116 -0
  42. package/src/canisters/declarations/ledger-icrc/icrc_icrc-10.did.d.ts +21 -0
  43. package/src/canisters/declarations/ledger-icrc/icrc_icrc-10.did.idl.js +34 -0
  44. package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +69 -17
  45. package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +150 -35
  46. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +6 -0
  47. package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +12 -0
  48. package/src/canisters/declarations/nns/governance.did.d.ts +54 -30
  49. package/src/canisters/declarations/nns/governance.did.idl.js +87 -17
  50. package/src/canisters/declarations/nns/governance_test.did.d.ts +54 -30
  51. package/src/canisters/declarations/nns/governance_test.did.idl.js +87 -17
  52. package/{canisters/declarations/sns/sns_root.did.d.ts → src/canisters/declarations/sns/root.did.d.ts} +12 -0
  53. package/src/canisters/declarations/sns/{sns_root.did.idl.js → root.did.idl.js} +38 -8
  54. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +0 -148
  55. package/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.d.ts +0 -44
  56. package/chunk-HANEPD6T.js +0 -2
  57. package/chunk-HANEPD6T.js.map +0 -7
  58. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.d.ts +0 -148
  59. package/src/canisters/declarations/ledger-icrc/icrc_index-ng.did.idl.js +0 -274
  60. /package/canisters/declarations/sns/{sns_governance.did.d.ts → governance.did.d.ts} +0 -0
  61. /package/canisters/declarations/sns/{sns_governance.did.idl.d.ts → governance.did.idl.d.ts} +0 -0
  62. /package/canisters/declarations/sns/{sns_governance_test.did.d.ts → governance_test.did.d.ts} +0 -0
  63. /package/canisters/declarations/sns/{sns_governance_test.did.idl.d.ts → governance_test.did.idl.d.ts} +0 -0
  64. /package/canisters/declarations/sns/{sns_swap.did.d.ts → swap.did.d.ts} +0 -0
  65. /package/canisters/declarations/sns/{sns_swap.did.idl.d.ts → swap.did.idl.d.ts} +0 -0
  66. /package/src/canisters/declarations/sns/{sns_governance.did.d.ts → governance.did.d.ts} +0 -0
  67. /package/src/canisters/declarations/sns/{sns_governance.did.idl.js → governance.did.idl.js} +0 -0
  68. /package/src/canisters/declarations/sns/{sns_governance_test.did.d.ts → governance_test.did.d.ts} +0 -0
  69. /package/src/canisters/declarations/sns/{sns_governance_test.did.idl.js → governance_test.did.idl.js} +0 -0
  70. /package/src/canisters/declarations/sns/{sns_swap.did.d.ts → swap.did.d.ts} +0 -0
  71. /package/src/canisters/declarations/sns/{sns_swap.did.idl.js → swap.did.idl.js} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as i,b as C}from"../../chunk-HANEPD6T.js";import"../../chunk-4C666HHU.js";export{i as CkBTCBitcoinIdl,C as CkBTCMinterIdl};
1
+ import{a as i,b as C}from"../../chunk-CAQXR2VB.js";import"../../chunk-4C666HHU.js";export{i as CkBTCBitcoinIdl,C as CkBTCMinterIdl};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{c as r,d as t}from"../../chunk-HANEPD6T.js";import"../../chunk-4C666HHU.js";export{r as CkETHMinterIdl,t as CkETHOrchestratorIdl};
1
+ import{c as r,d as t}from"../../chunk-CAQXR2VB.js";import"../../chunk-4C666HHU.js";export{r as CkETHMinterIdl,t as CkETHOrchestratorIdl};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"../../chunk-BXZ5PSUW.js";import{a as e}from"../../chunk-5NZMOUKF.js";import{g as i}from"../../chunk-EMQQE34V.js";import{a as p}from"../../chunk-TZVF5LQY.js";import"../../chunk-7B6WU32N.js";import{e as o}from"../../chunk-HANEPD6T.js";import"../../chunk-4C666HHU.js";var r=class extends e{constructor(t={}){p.parse(t),super({canisterId:t?.canisterId??s})}notifyTopUp=async({args:t})=>await i({canisterId:this.canisterId,method:"notify_top_up",args:[[o.NotifyTopUpArg,t]],result:o.NotifyTopUpResult})};export{r as CMCCanister,o as CmcIdl};
1
+ import{a as s}from"../../chunk-BXZ5PSUW.js";import{a as e}from"../../chunk-5NZMOUKF.js";import{g as i}from"../../chunk-EMQQE34V.js";import{a as p}from"../../chunk-TZVF5LQY.js";import"../../chunk-7B6WU32N.js";import{e as o}from"../../chunk-CAQXR2VB.js";import"../../chunk-4C666HHU.js";var r=class extends e{constructor(t={}){p.parse(t),super({canisterId:t?.canisterId??s})}notifyTopUp=async({args:t})=>await i({canisterId:this.canisterId,method:"notify_top_up",args:[[o.NotifyTopUpArg,t]],result:o.NotifyTopUpResult})};export{r as CMCCanister,o as CmcIdl};
2
2
  //# sourceMappingURL=index.js.map
@@ -6,11 +6,11 @@ import * as CmcIdl from './cmc/cmc.did.idl';
6
6
  import * as IcManagementIdl from './ic-management/ic-management.did.idl';
7
7
  import * as IcpIndexIdl from './ledger-icp/index.did.idl';
8
8
  import * as IcpLedgerIdl from './ledger-icp/ledger.did.idl';
9
- import * as IcrcIndexNgIdl from './ledger-icrc/icrc_index-ng.did.idl';
9
+ import * as IcrcIndexIdl from './ledger-icrc/icrc_index.did.idl';
10
10
  import * as IcrcLedgerIdl from './ledger-icrc/icrc_ledger.did.idl';
11
11
  import * as NnsGovernanceIdl from './nns/governance.did.idl';
12
12
  import * as NnsSnsWasmIdl from './nns/sns_wasm.did.idl';
13
- import * as SnsGovernanceIdl from './sns/sns_governance.did.idl';
14
- import * as SnsRootIdl from './sns/sns_root.did.idl';
15
- import * as SnsSwapIdl from './sns/sns_swap.did.idl';
16
- export { CkBTCBitcoinIdl, CkBTCMinterIdl, CkETHMinterIdl, CkETHOrchestratorIdl, CmcIdl, IcManagementIdl, IcpIndexIdl, IcpLedgerIdl, IcrcIndexNgIdl, IcrcLedgerIdl, NnsGovernanceIdl, NnsSnsWasmIdl, SnsGovernanceIdl, SnsRootIdl, SnsSwapIdl };
13
+ import * as SnsGovernanceIdl from './sns/governance.did.idl';
14
+ import * as SnsRootIdl from './sns/root.did.idl';
15
+ import * as SnsSwapIdl from './sns/swap.did.idl';
16
+ export { CkBTCBitcoinIdl, CkBTCMinterIdl, CkETHMinterIdl, CkETHOrchestratorIdl, CmcIdl, IcManagementIdl, IcpIndexIdl, IcpLedgerIdl, IcrcIndexIdl, IcrcLedgerIdl, NnsGovernanceIdl, NnsSnsWasmIdl, SnsGovernanceIdl, SnsRootIdl, SnsSwapIdl };
@@ -6,11 +6,11 @@ import type * as CmcDid from './cmc/cmc.did';
6
6
  import type * as IcManagementDid from './ic-management/ic-management.did';
7
7
  import type * as IcpIndexDid from './ledger-icp/index.did';
8
8
  import type * as IcpLedgerDid from './ledger-icp/ledger.did';
9
- import type * as IcrcIndexNgDid from './ledger-icrc/icrc_index-ng.did';
9
+ import type * as IcrcIndexDid from './ledger-icrc/icrc_index.did';
10
10
  import type * as IcrcLedgerDid from './ledger-icrc/icrc_ledger.did';
11
11
  import type * as NnsGovernanceDid from './nns/governance.did';
12
12
  import type * as NnsSnsWasmDid from './nns/sns_wasm.did';
13
- import type * as SnsGovernanceDid from './sns/sns_governance.did';
14
- import type * as SnsRootDid from './sns/sns_root.did';
15
- import type * as SnsSwapDid from './sns/sns_swap.did';
16
- export type { CkBTCBitcoinDid, CkBTCMinterDid, CkETHMinterDid, CkETHOrchestratorDid, CmcDid, IcManagementDid, IcpIndexDid, IcpLedgerDid, IcrcIndexNgDid, IcrcLedgerDid, NnsGovernanceDid, NnsSnsWasmDid, SnsGovernanceDid, SnsRootDid, SnsSwapDid };
13
+ import type * as SnsGovernanceDid from './sns/governance.did';
14
+ import type * as SnsRootDid from './sns/root.did';
15
+ import type * as SnsSwapDid from './sns/swap.did';
16
+ export type { CkBTCBitcoinDid, CkBTCMinterDid, CkETHMinterDid, CkETHOrchestratorDid, CmcDid, IcManagementDid, IcpIndexDid, IcpLedgerDid, IcrcIndexDid, IcrcLedgerDid, NnsGovernanceDid, NnsSnsWasmDid, SnsGovernanceDid, SnsRootDid, SnsSwapDid };
@@ -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,
@@ -2,6 +2,8 @@ export const flag: IDL.VariantClass;
2
2
  export const fees: IDL.RecordClass;
3
3
  export const network: IDL.VariantClass;
4
4
  export const init_config: IDL.RecordClass;
5
+ export const set_config_request: IDL.RecordClass;
6
+ export const canister_arg: IDL.VariantClass;
5
7
  export const address: IDL.TextClass;
6
8
  export const get_balance_request: IDL.RecordClass;
7
9
  export const satoshi: IDL.FixedNatClass;
@@ -18,7 +20,6 @@ export const utxo: IDL.RecordClass;
18
20
  export const get_utxos_response: IDL.RecordClass;
19
21
  export const send_transaction_request: IDL.RecordClass;
20
22
  export const config: IDL.RecordClass;
21
- export const set_config_request: IDL.RecordClass;
22
23
  export const idlService: IDL.ServiceClass<string, {
23
24
  bitcoin_get_balance: IDL.FuncClass<[IDL.RecordClass], [IDL.FixedNatClass]>;
24
25
  bitcoin_get_balance_query: IDL.FuncClass<[IDL.RecordClass], [IDL.FixedNatClass]>;
@@ -30,7 +31,7 @@ export const idlService: IDL.ServiceClass<string, {
30
31
  get_config: IDL.FuncClass<[], [IDL.RecordClass]>;
31
32
  set_config: IDL.FuncClass<[IDL.RecordClass], []>;
32
33
  }>;
33
- export const idlInitArgs: IDL.RecordClass[];
34
+ export const idlInitArgs: IDL.VariantClass[];
34
35
  export function idlFactory({ IDL }: {
35
36
  IDL: any;
36
37
  }): any;
@@ -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
@@ -5,6 +5,7 @@ export const InitArgs: IDL.RecordClass;
5
5
  export const MinterArg: IDL.VariantClass;
6
6
  export const MemoryMetrics: IDL.RecordClass;
7
7
  export const CanisterStatusType: IDL.VariantClass;
8
+ export const environment_variable: IDL.RecordClass;
8
9
  export const LogVisibility: IDL.VariantClass;
9
10
  export const DefiniteCanisterSettings: IDL.RecordClass;
10
11
  export const QueryStats: IDL.RecordClass;
@@ -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 {
@@ -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,26 @@
1
+ export const Subaccount: IDL.VecClass<number | bigint>;
2
+ export const Account: IDL.RecordClass;
3
+ export const Value: IDL.VariantClass;
4
+ export const Timestamp: IDL.FixedNatClass;
5
+ export const TransferArgs: IDL.RecordClass;
6
+ export const TransferError: IDL.VariantClass;
7
+ export const idlService: IDL.ServiceClass<string, {
8
+ icrc1_balance_of: IDL.FuncClass<[IDL.RecordClass], [IDL.NatClass]>;
9
+ icrc1_decimals: IDL.FuncClass<[], [IDL.FixedNatClass]>;
10
+ icrc1_fee: IDL.FuncClass<[], [IDL.NatClass]>;
11
+ icrc1_metadata: IDL.FuncClass<[], [IDL.VecClass<any[]>]>;
12
+ icrc1_minting_account: IDL.FuncClass<[], [IDL.OptClass<Record<string, any>>]>;
13
+ icrc1_name: IDL.FuncClass<[], [IDL.TextClass]>;
14
+ icrc1_supported_standards: IDL.FuncClass<[], [IDL.VecClass<Record<string, any>>]>;
15
+ icrc1_symbol: IDL.FuncClass<[], [IDL.TextClass]>;
16
+ icrc1_total_supply: IDL.FuncClass<[], [IDL.NatClass]>;
17
+ icrc1_transfer: IDL.FuncClass<[IDL.RecordClass], [IDL.VariantClass]>;
18
+ }>;
19
+ export const idlInitArgs: any[];
20
+ export function idlFactory({ IDL }: {
21
+ IDL: any;
22
+ }): any;
23
+ export function init({ IDL }: {
24
+ IDL: any;
25
+ }): never[];
26
+ import { IDL } from '@icp-sdk/core/candid';
@@ -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,13 @@
1
+ export const SupportedStandard: IDL.RecordClass;
2
+ export const SupportedStandardsResponse: IDL.VecClass<Record<string, any>>;
3
+ export const idlService: IDL.ServiceClass<string, {
4
+ icrc10_supported_standards: IDL.FuncClass<[], [IDL.VecClass<Record<string, any>>]>;
5
+ }>;
6
+ export const idlInitArgs: any[];
7
+ export function idlFactory({ IDL }: {
8
+ IDL: any;
9
+ }): any;
10
+ export function init({ IDL }: {
11
+ IDL: any;
12
+ }): never[];
13
+ import { IDL } from '@icp-sdk/core/candid';
@@ -12,25 +12,36 @@ import type { Principal } from '@icp-sdk/core/principal';
12
12
 
13
13
  export interface Account {
14
14
  'owner' : Principal,
15
- 'subaccount' : [] | [Uint8Array],
15
+ 'subaccount' : [] | [SubAccount],
16
16
  }
17
17
  export interface Approve {
18
- 'fee' : [] | [bigint],
18
+ 'fee' : [] | [Tokens],
19
19
  'from' : Account,
20
20
  'memo' : [] | [Uint8Array],
21
21
  'created_at_time' : [] | [bigint],
22
- 'amount' : bigint,
23
- 'expected_allowance' : [] | [bigint],
22
+ 'amount' : Tokens,
23
+ 'expected_allowance' : [] | [Tokens],
24
24
  'expires_at' : [] | [bigint],
25
25
  'spender' : Account,
26
26
  }
27
+ export type Block = Value;
28
+ export type BlockIndex = bigint;
27
29
  export interface Burn {
30
+ 'fee' : [] | [bigint],
28
31
  'from' : Account,
29
32
  'memo' : [] | [Uint8Array],
30
33
  'created_at_time' : [] | [bigint],
31
- 'amount' : bigint,
34
+ 'amount' : Tokens,
32
35
  'spender' : [] | [Account],
33
36
  }
37
+ export interface FeeCollector {
38
+ 'ts' : [] | [bigint],
39
+ 'fee_collector' : [] | [Account],
40
+ 'caller' : [] | [Principal],
41
+ }
42
+ export interface FeeCollectorRanges {
43
+ 'ranges' : Array<[Account, Array<[BlockIndex, BlockIndex]>]>,
44
+ }
34
45
  export interface GetAccountTransactionsArgs {
35
46
  /**
36
47
  * Maximum number of transactions to fetch.
@@ -39,62 +50,103 @@ export interface GetAccountTransactionsArgs {
39
50
  /**
40
51
  * The txid of the last transaction seen by the client.
41
52
  * If None then the results will start from the most recent
42
- * txid.
53
+ * txid. If set then the results will start from the next
54
+ * most recent txid after start (start won't be included).
43
55
  */
44
- 'start' : [] | [TxId],
56
+ 'start' : [] | [BlockIndex],
45
57
  'account' : Account,
46
58
  }
59
+ export interface GetBlocksRequest { 'start' : bigint, 'length' : bigint }
60
+ export interface GetBlocksResponse {
61
+ 'blocks' : Array<Block>,
62
+ 'chain_length' : bigint,
63
+ }
47
64
  export interface GetTransactions {
65
+ 'balance' : Tokens,
48
66
  'transactions' : Array<TransactionWithId>,
49
67
  /**
50
68
  * The txid of the oldest transaction the account has
51
69
  */
52
- 'oldest_tx_id' : [] | [TxId],
70
+ 'oldest_tx_id' : [] | [BlockIndex],
53
71
  }
54
72
  export interface GetTransactionsErr { 'message' : string }
55
73
  export type GetTransactionsResult = { 'Ok' : GetTransactions } |
56
74
  { 'Err' : GetTransactionsErr };
57
- /**
58
- * The initialization parameters of the Index canister.
59
- */
60
- export interface InitArgs { 'ledger_id' : Principal }
75
+ export type IndexArg = { 'Upgrade' : UpgradeArg } |
76
+ { 'Init' : InitArg };
77
+ export interface InitArg {
78
+ 'ledger_id' : Principal,
79
+ /**
80
+ * The interval in seconds in which to retrieve blocks from the ledger. A lower value makes the index more
81
+ * responsive in showing new blocks, but increases the consumption of cycles of both the index and ledger canisters.
82
+ * A higher values means that it takes longer for new blocks to show up in the index.
83
+ */
84
+ 'retrieve_blocks_from_ledger_interval_seconds' : [] | [bigint],
85
+ }
61
86
  export interface ListSubaccountsArgs {
62
87
  'owner' : Principal,
63
88
  'start' : [] | [SubAccount],
64
89
  }
90
+ export type Map = Array<[string, Value]>;
65
91
  export interface Mint {
66
92
  'to' : Account,
93
+ 'fee' : [] | [bigint],
67
94
  'memo' : [] | [Uint8Array],
68
95
  'created_at_time' : [] | [bigint],
69
- 'amount' : bigint,
96
+ 'amount' : Tokens,
70
97
  }
98
+ export interface Status { 'num_blocks_synced' : BlockIndex }
71
99
  export type SubAccount = Uint8Array;
100
+ export type Tokens = bigint;
72
101
  export interface Transaction {
73
102
  'burn' : [] | [Burn],
74
103
  'kind' : string,
75
104
  'mint' : [] | [Mint],
76
105
  'approve' : [] | [Approve],
106
+ 'fee_collector' : [] | [FeeCollector],
77
107
  'timestamp' : bigint,
78
108
  'transfer' : [] | [Transfer],
79
109
  }
80
- export interface TransactionWithId { 'id' : TxId, 'transaction' : Transaction }
110
+ export interface TransactionWithId {
111
+ 'id' : BlockIndex,
112
+ 'transaction' : Transaction,
113
+ }
81
114
  export interface Transfer {
82
115
  'to' : Account,
83
- 'fee' : [] | [bigint],
116
+ 'fee' : [] | [Tokens],
84
117
  'from' : Account,
85
118
  'memo' : [] | [Uint8Array],
86
119
  'created_at_time' : [] | [bigint],
87
- 'amount' : bigint,
120
+ 'amount' : Tokens,
88
121
  'spender' : [] | [Account],
89
122
  }
90
- export type TxId = bigint;
123
+ export interface UpgradeArg {
124
+ 'ledger_id' : [] | [Principal],
125
+ /**
126
+ * The interval in seconds in which to retrieve blocks from the ledger. A lower value makes the index more
127
+ * responsive in showing new blocks, but increases the consumption of cycles of both the index and ledger canisters.
128
+ * A higher values means that it takes longer for new blocks to show up in the index.
129
+ */
130
+ 'retrieve_blocks_from_ledger_interval_seconds' : [] | [bigint],
131
+ }
132
+ export type Value = { 'Int' : bigint } |
133
+ { 'Map' : Map } |
134
+ { 'Nat' : bigint } |
135
+ { 'Nat64' : bigint } |
136
+ { 'Blob' : Uint8Array } |
137
+ { 'Text' : string } |
138
+ { 'Array' : Array<Value> };
91
139
  export interface _SERVICE {
92
140
  'get_account_transactions' : ActorMethod<
93
141
  [GetAccountTransactionsArgs],
94
142
  GetTransactionsResult
95
143
  >,
144
+ 'get_blocks' : ActorMethod<[GetBlocksRequest], GetBlocksResponse>,
145
+ 'get_fee_collectors_ranges' : ActorMethod<[], FeeCollectorRanges>,
146
+ 'icrc1_balance_of' : ActorMethod<[Account], Tokens>,
96
147
  'ledger_id' : ActorMethod<[], Principal>,
97
148
  'list_subaccounts' : ActorMethod<[ListSubaccountsArgs], Array<SubAccount>>,
149
+ 'status' : ActorMethod<[], Status>,
98
150
  }
99
151
  export declare const idlService: IDL.ServiceClass;
100
152
  export declare const idlInitArgs: IDL.Type[];
@@ -1,24 +1,41 @@
1
- export const InitArgs: IDL.RecordClass;
2
- export const TxId: IDL.NatClass;
1
+ export const Value: IDL.RecClass<any>;
2
+ export const UpgradeArg: IDL.RecordClass;
3
+ export const InitArg: IDL.RecordClass;
4
+ export const IndexArg: IDL.VariantClass;
5
+ export const BlockIndex: IDL.NatClass;
6
+ export const SubAccount: IDL.VecClass<number | bigint>;
3
7
  export const Account: IDL.RecordClass;
4
8
  export const GetAccountTransactionsArgs: IDL.RecordClass;
9
+ export const Tokens: IDL.NatClass;
5
10
  export const Burn: IDL.RecordClass;
6
11
  export const Mint: IDL.RecordClass;
7
12
  export const Approve: IDL.RecordClass;
13
+ export const FeeCollector: IDL.RecordClass;
8
14
  export const Transfer: IDL.RecordClass;
9
15
  export const Transaction: IDL.RecordClass;
10
16
  export const TransactionWithId: IDL.RecordClass;
11
17
  export const GetTransactions: IDL.RecordClass;
12
18
  export const GetTransactionsErr: IDL.RecordClass;
13
19
  export const GetTransactionsResult: IDL.VariantClass;
14
- export const SubAccount: IDL.VecClass<number | bigint>;
20
+ export const GetBlocksRequest: IDL.RecordClass;
21
+ export const Map: IDL.VecClass<any[]>;
22
+ export const Block: IDL.RecClass<any>;
23
+ export const GetBlocksResponse: IDL.RecordClass;
24
+ export const FeeCollectorRanges: IDL.RecordClass;
15
25
  export const ListSubaccountsArgs: IDL.RecordClass;
26
+ export const Status: IDL.RecordClass;
16
27
  export const idlService: IDL.ServiceClass<string, {
17
28
  get_account_transactions: IDL.FuncClass<[IDL.RecordClass], [IDL.VariantClass]>;
29
+ get_blocks: IDL.FuncClass<[IDL.RecordClass], [IDL.RecordClass]>;
30
+ get_fee_collectors_ranges: IDL.FuncClass<[], [IDL.RecordClass]>;
31
+ icrc1_balance_of: IDL.FuncClass<[IDL.RecordClass], [IDL.NatClass]>;
18
32
  ledger_id: IDL.FuncClass<[], [IDL.PrincipalClass]>;
19
33
  list_subaccounts: IDL.FuncClass<[IDL.RecordClass], [IDL.VecClass<(number | bigint)[]>]>;
34
+ status: IDL.FuncClass<[], [IDL.RecordClass]>;
20
35
  }>;
21
- export const idlInitArgs: IDL.RecordClass[];
36
+ export const idlInitArgs: IDL.OptClass<{
37
+ [x: string]: any;
38
+ }>[];
22
39
  export function idlFactory({ IDL }: {
23
40
  IDL: any;
24
41
  }): any;
@@ -120,6 +120,11 @@ export interface DataCertificate {
120
120
  */
121
121
  export type Duration = bigint;
122
122
  export interface FeatureFlags { 'icrc2' : boolean }
123
+ export interface FeeCollector {
124
+ 'ts' : [] | [bigint],
125
+ 'fee_collector' : [] | [Account],
126
+ 'caller' : [] | [Principal],
127
+ }
123
128
  export interface FieldsDisplay {
124
129
  'fields' : Array<[string, Icrc21Value]>,
125
130
  'intent' : string,
@@ -396,6 +401,7 @@ export interface Transaction {
396
401
  'kind' : string,
397
402
  'mint' : [] | [Mint],
398
403
  'approve' : [] | [Approve],
404
+ 'fee_collector' : [] | [FeeCollector],
399
405
  'timestamp' : Timestamp,
400
406
  'transfer' : [] | [Transfer],
401
407
  }
@@ -25,6 +25,7 @@ export const Timestamp: IDL.FixedNatClass;
25
25
  export const Burn: IDL.RecordClass;
26
26
  export const Mint: IDL.RecordClass;
27
27
  export const Approve: IDL.RecordClass;
28
+ export const FeeCollector: IDL.RecordClass;
28
29
  export const Transfer: IDL.RecordClass;
29
30
  export const Transaction: IDL.RecordClass;
30
31
  export const TransactionRange: IDL.RecordClass;