@junobuild/core 0.0.20 → 0.0.22

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 (73) hide show
  1. package/declarations/cmc/index.js +6 -1
  2. package/declarations/console/console.did.d.ts +5 -4
  3. package/declarations/console/console.factory.did.js +3 -2
  4. package/declarations/console/console.factory.did.mjs +3 -2
  5. package/declarations/console/index.js +6 -1
  6. package/declarations/ic/ic.did +131 -18
  7. package/declarations/ic/ic.did.d.ts +184 -53
  8. package/declarations/ic/ic.factory.did.js +167 -24
  9. package/declarations/mission_control/index.js +7 -1
  10. package/declarations/mission_control/mission_control.did.d.ts +1 -0
  11. package/declarations/mission_control/mission_control.factory.did.js +5 -0
  12. package/declarations/observatory/index.js +7 -1
  13. package/declarations/satellite/index.js +6 -1
  14. package/declarations/satellite/satellite.did.d.ts +1 -0
  15. package/declarations/satellite/satellite.factory.did.js +1 -0
  16. package/declarations/satellite/satellite.factory.did.mjs +1 -0
  17. package/dist/browser/index.js +8 -8
  18. package/dist/browser/index.js.map +4 -4
  19. package/dist/declarations/cmc/index.js +6 -1
  20. package/dist/declarations/console/console.did.d.ts +5 -4
  21. package/dist/declarations/console/console.factory.did.js +3 -2
  22. package/dist/declarations/console/console.factory.did.mjs +3 -2
  23. package/dist/declarations/console/index.js +6 -1
  24. package/dist/declarations/ic/ic.did +131 -18
  25. package/dist/declarations/ic/ic.did.d.ts +184 -53
  26. package/dist/declarations/ic/ic.factory.did.js +167 -24
  27. package/dist/declarations/mission_control/index.js +7 -1
  28. package/dist/declarations/mission_control/mission_control.did.d.ts +1 -0
  29. package/dist/declarations/mission_control/mission_control.factory.did.js +5 -0
  30. package/dist/declarations/observatory/index.js +7 -1
  31. package/dist/declarations/satellite/index.js +6 -1
  32. package/dist/declarations/satellite/satellite.did.d.ts +1 -0
  33. package/dist/declarations/satellite/satellite.factory.did.js +1 -0
  34. package/dist/declarations/satellite/satellite.factory.did.mjs +1 -0
  35. package/dist/node/index.mjs +15 -15
  36. package/dist/node/index.mjs.map +4 -4
  37. package/dist/types/api/doc.api.d.ts +1 -1
  38. package/dist/types/api/storage.api.d.ts +3 -4
  39. package/dist/types/services/doc.services.d.ts +1 -1
  40. package/dist/types/services/storage.services.d.ts +3 -4
  41. package/package.json +3 -2
  42. package/declarations/frontend/frontend.did +0 -188
  43. package/declarations/frontend/frontend.did.d.ts +0 -172
  44. package/declarations/frontend/frontend.factory.did.js +0 -210
  45. package/declarations/frontend/index.d.ts +0 -45
  46. package/declarations/frontend/index.js +0 -32
  47. package/declarations/internet_identity/index.d.ts +0 -45
  48. package/declarations/internet_identity/index.js +0 -32
  49. package/declarations/internet_identity/internet_identity.did +0 -378
  50. package/declarations/internet_identity/internet_identity.did.d.ts +0 -231
  51. package/declarations/internet_identity/internet_identity.factory.did.js +0 -277
  52. package/declarations/ledger/index.d.ts +0 -45
  53. package/declarations/ledger/index.js +0 -32
  54. package/declarations/ledger/ledger.did +0 -266
  55. package/declarations/ledger/ledger.did.d.ts +0 -117
  56. package/declarations/ledger/ledger.factory.did.js +0 -115
  57. package/dist/declarations/frontend/frontend.did +0 -188
  58. package/dist/declarations/frontend/frontend.did.d.ts +0 -172
  59. package/dist/declarations/frontend/frontend.factory.did.js +0 -210
  60. package/dist/declarations/frontend/index.d.ts +0 -45
  61. package/dist/declarations/frontend/index.js +0 -32
  62. package/dist/declarations/internet_identity/index.d.ts +0 -45
  63. package/dist/declarations/internet_identity/index.js +0 -32
  64. package/dist/declarations/internet_identity/internet_identity.did +0 -378
  65. package/dist/declarations/internet_identity/internet_identity.did.d.ts +0 -231
  66. package/dist/declarations/internet_identity/internet_identity.factory.did.js +0 -277
  67. package/dist/declarations/ledger/index.d.ts +0 -45
  68. package/dist/declarations/ledger/index.js +0 -32
  69. package/dist/declarations/ledger/ledger.did +0 -266
  70. package/dist/declarations/ledger/ledger.did.d.ts +0 -117
  71. package/dist/declarations/ledger/ledger.factory.did.js +0 -115
  72. package/dist/types/utils/did.utils.d.ts +0 -4
  73. package/dist/types/utils/utils.d.ts +0 -7
@@ -1,117 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
3
-
4
- export interface AccountBalanceArgs {
5
- account: AccountIdentifier;
6
- }
7
- export type AccountIdentifier = Uint8Array | number[];
8
- export interface Archive {
9
- canister_id: Principal;
10
- }
11
- export interface Archives {
12
- archives: Array<Archive>;
13
- }
14
- export interface Block {
15
- transaction: Transaction;
16
- timestamp: TimeStamp;
17
- parent_hash: [] | [Uint8Array | number[]];
18
- }
19
- export type BlockIndex = bigint;
20
- export interface BlockRange {
21
- blocks: Array<Block>;
22
- }
23
- export interface GetBlocksArgs {
24
- start: BlockIndex;
25
- length: bigint;
26
- }
27
- export type Memo = bigint;
28
- export type Operation =
29
- | {
30
- Approve: {
31
- fee: Tokens;
32
- from: AccountIdentifier;
33
- allowance_e8s: bigint;
34
- expires_at: [] | [TimeStamp];
35
- spender: AccountIdentifier;
36
- };
37
- }
38
- | {Burn: {from: AccountIdentifier; amount: Tokens}}
39
- | {Mint: {to: AccountIdentifier; amount: Tokens}}
40
- | {
41
- Transfer: {
42
- to: AccountIdentifier;
43
- fee: Tokens;
44
- from: AccountIdentifier;
45
- amount: Tokens;
46
- };
47
- }
48
- | {
49
- TransferFrom: {
50
- to: AccountIdentifier;
51
- fee: Tokens;
52
- from: AccountIdentifier;
53
- amount: Tokens;
54
- spender: AccountIdentifier;
55
- };
56
- };
57
- export type QueryArchiveError =
58
- | {
59
- BadFirstBlockIndex: {
60
- requested_index: BlockIndex;
61
- first_valid_index: BlockIndex;
62
- };
63
- }
64
- | {Other: {error_message: string; error_code: bigint}};
65
- export type QueryArchiveFn = ActorMethod<[GetBlocksArgs], QueryArchiveResult>;
66
- export type QueryArchiveResult = {Ok: BlockRange} | {Err: QueryArchiveError};
67
- export interface QueryBlocksResponse {
68
- certificate: [] | [Uint8Array | number[]];
69
- blocks: Array<Block>;
70
- chain_length: bigint;
71
- first_block_index: BlockIndex;
72
- archived_blocks: Array<{callback: QueryArchiveFn; start: BlockIndex; length: bigint}>;
73
- }
74
- export type SubAccount = Uint8Array | number[];
75
- export interface TimeStamp {
76
- timestamp_nanos: bigint;
77
- }
78
- export interface Tokens {
79
- e8s: bigint;
80
- }
81
- export interface Transaction {
82
- memo: Memo;
83
- icrc1_memo: [] | [Uint8Array | number[]];
84
- operation: [] | [Operation];
85
- created_at_time: TimeStamp;
86
- }
87
- export interface TransferArgs {
88
- to: AccountIdentifier;
89
- fee: Tokens;
90
- memo: Memo;
91
- from_subaccount: [] | [SubAccount];
92
- created_at_time: [] | [TimeStamp];
93
- amount: Tokens;
94
- }
95
- export type TransferError =
96
- | {
97
- TxTooOld: {allowed_window_nanos: bigint};
98
- }
99
- | {BadFee: {expected_fee: Tokens}}
100
- | {TxDuplicate: {duplicate_of: BlockIndex}}
101
- | {TxCreatedInFuture: null}
102
- | {InsufficientFunds: {balance: Tokens}};
103
- export interface TransferFee {
104
- transfer_fee: Tokens;
105
- }
106
- export type TransferFeeArg = {};
107
- export type TransferResult = {Ok: BlockIndex} | {Err: TransferError};
108
- export interface _SERVICE {
109
- account_balance: ActorMethod<[AccountBalanceArgs], Tokens>;
110
- archives: ActorMethod<[], Archives>;
111
- decimals: ActorMethod<[], {decimals: number}>;
112
- name: ActorMethod<[], {name: string}>;
113
- query_blocks: ActorMethod<[GetBlocksArgs], QueryBlocksResponse>;
114
- symbol: ActorMethod<[], {symbol: string}>;
115
- transfer: ActorMethod<[TransferArgs], TransferResult>;
116
- transfer_fee: ActorMethod<[TransferFeeArg], TransferFee>;
117
- }
@@ -1,115 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const AccountIdentifier = IDL.Vec(IDL.Nat8);
4
- const AccountBalanceArgs = IDL.Record({account: AccountIdentifier});
5
- const Tokens = IDL.Record({e8s: IDL.Nat64});
6
- const Archive = IDL.Record({canister_id: IDL.Principal});
7
- const Archives = IDL.Record({archives: IDL.Vec(Archive)});
8
- const BlockIndex = IDL.Nat64;
9
- const GetBlocksArgs = IDL.Record({
10
- start: BlockIndex,
11
- length: IDL.Nat64
12
- });
13
- const Memo = IDL.Nat64;
14
- const TimeStamp = IDL.Record({timestamp_nanos: IDL.Nat64});
15
- const Operation = IDL.Variant({
16
- Approve: IDL.Record({
17
- fee: Tokens,
18
- from: AccountIdentifier,
19
- allowance_e8s: IDL.Int,
20
- expires_at: IDL.Opt(TimeStamp),
21
- spender: AccountIdentifier
22
- }),
23
- Burn: IDL.Record({from: AccountIdentifier, amount: Tokens}),
24
- Mint: IDL.Record({to: AccountIdentifier, amount: Tokens}),
25
- Transfer: IDL.Record({
26
- to: AccountIdentifier,
27
- fee: Tokens,
28
- from: AccountIdentifier,
29
- amount: Tokens
30
- }),
31
- TransferFrom: IDL.Record({
32
- to: AccountIdentifier,
33
- fee: Tokens,
34
- from: AccountIdentifier,
35
- amount: Tokens,
36
- spender: AccountIdentifier
37
- })
38
- });
39
- const Transaction = IDL.Record({
40
- memo: Memo,
41
- icrc1_memo: IDL.Opt(IDL.Vec(IDL.Nat8)),
42
- operation: IDL.Opt(Operation),
43
- created_at_time: TimeStamp
44
- });
45
- const Block = IDL.Record({
46
- transaction: Transaction,
47
- timestamp: TimeStamp,
48
- parent_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
49
- });
50
- const BlockRange = IDL.Record({blocks: IDL.Vec(Block)});
51
- const QueryArchiveError = IDL.Variant({
52
- BadFirstBlockIndex: IDL.Record({
53
- requested_index: BlockIndex,
54
- first_valid_index: BlockIndex
55
- }),
56
- Other: IDL.Record({
57
- error_message: IDL.Text,
58
- error_code: IDL.Nat64
59
- })
60
- });
61
- const QueryArchiveResult = IDL.Variant({
62
- Ok: BlockRange,
63
- Err: QueryArchiveError
64
- });
65
- const QueryArchiveFn = IDL.Func([GetBlocksArgs], [QueryArchiveResult], ['query']);
66
- const QueryBlocksResponse = IDL.Record({
67
- certificate: IDL.Opt(IDL.Vec(IDL.Nat8)),
68
- blocks: IDL.Vec(Block),
69
- chain_length: IDL.Nat64,
70
- first_block_index: BlockIndex,
71
- archived_blocks: IDL.Vec(
72
- IDL.Record({
73
- callback: QueryArchiveFn,
74
- start: BlockIndex,
75
- length: IDL.Nat64
76
- })
77
- )
78
- });
79
- const SubAccount = IDL.Vec(IDL.Nat8);
80
- const TransferArgs = IDL.Record({
81
- to: AccountIdentifier,
82
- fee: Tokens,
83
- memo: Memo,
84
- from_subaccount: IDL.Opt(SubAccount),
85
- created_at_time: IDL.Opt(TimeStamp),
86
- amount: Tokens
87
- });
88
- const TransferError = IDL.Variant({
89
- TxTooOld: IDL.Record({allowed_window_nanos: IDL.Nat64}),
90
- BadFee: IDL.Record({expected_fee: Tokens}),
91
- TxDuplicate: IDL.Record({duplicate_of: BlockIndex}),
92
- TxCreatedInFuture: IDL.Null,
93
- InsufficientFunds: IDL.Record({balance: Tokens})
94
- });
95
- const TransferResult = IDL.Variant({
96
- Ok: BlockIndex,
97
- Err: TransferError
98
- });
99
- const TransferFeeArg = IDL.Record({});
100
- const TransferFee = IDL.Record({transfer_fee: Tokens});
101
- return IDL.Service({
102
- account_balance: IDL.Func([AccountBalanceArgs], [Tokens], ['query']),
103
- archives: IDL.Func([], [Archives], ['query']),
104
- decimals: IDL.Func([], [IDL.Record({decimals: IDL.Nat32})], ['query']),
105
- name: IDL.Func([], [IDL.Record({name: IDL.Text})], ['query']),
106
- query_blocks: IDL.Func([GetBlocksArgs], [QueryBlocksResponse], ['query']),
107
- symbol: IDL.Func([], [IDL.Record({symbol: IDL.Text})], ['query']),
108
- transfer: IDL.Func([TransferArgs], [TransferResult], []),
109
- transfer_fee: IDL.Func([TransferFeeArg], [TransferFee], ['query'])
110
- });
111
- };
112
- // @ts-ignore
113
- export const init = ({IDL}) => {
114
- return [];
115
- };
@@ -1,4 +0,0 @@
1
- export declare const toNullable: <T>(value?: T | undefined) => [] | [T];
2
- export declare const fromNullable: <T>(value: [] | [T]) => T | undefined;
3
- export declare const toArray: <T>(data: T) => Promise<Uint8Array>;
4
- export declare const fromArray: <T>(data: Uint8Array | number[]) => Promise<T>;
@@ -1,7 +0,0 @@
1
- /** Is null or undefined */
2
- export declare const isNullish: <T>(argument: T | null | undefined) => argument is null | undefined;
3
- /** Not null and not undefined */
4
- export declare const nonNullish: <T>(argument: T | null | undefined) => argument is NonNullable<T>;
5
- export declare class NullishError extends Error {
6
- }
7
- export declare const assertNonNullish: <T>(value: T, message?: string) => asserts value is NonNullable<T>;