@junobuild/functions 0.8.4 → 0.9.0-next-2026-04-20
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.
- package/canisters/ckbtc/index.js +1 -1
- package/canisters/cketh/index.js +1 -1
- package/canisters/cmc/cmc.canister.d.ts +6 -6
- package/canisters/cmc/index.d.ts +1 -0
- package/canisters/cmc/index.js +1 -1
- package/canisters/cmc/index.js.map +4 -4
- package/canisters/cmc/schema.d.ts +92 -0
- package/canisters/declarations/_idl.d.ts +2 -1
- package/canisters/declarations/_types.d.ts +2 -1
- package/canisters/declarations/ckbtc/bitcoin.did.d.ts +8 -0
- package/canisters/declarations/ckbtc/bitcoin.did.idl.d.ts +2 -0
- package/canisters/declarations/ckbtc/minter.did.d.ts +190 -0
- package/canisters/declarations/ckbtc/minter.did.idl.d.ts +9 -0
- package/canisters/declarations/cketh/minter.did.d.ts +140 -0
- package/canisters/declarations/cketh/minter.did.idl.d.ts +8 -0
- package/canisters/declarations/cycles-ledger/cycles-ledger.did.d.ts +413 -0
- package/canisters/declarations/cycles-ledger/cycles-ledger.did.idl.d.ts +82 -0
- package/canisters/declarations/ic-management/ic-management.did.d.ts +18 -4
- package/canisters/declarations/ledger-icp/index.did.d.ts +20 -1
- package/canisters/declarations/ledger-icp/index.did.idl.d.ts +5 -1
- package/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -0
- package/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -0
- package/canisters/declarations/nns/governance.did.d.ts +100 -0
- package/canisters/declarations/nns/governance.did.idl.d.ts +11 -0
- package/canisters/declarations/nns/governance_test.did.d.ts +100 -0
- package/canisters/declarations/nns/governance_test.did.idl.d.ts +11 -0
- package/canisters/declarations/nns/sns_wasm.did.d.ts +4 -0
- package/canisters/declarations/nns/sns_wasm.did.idl.d.ts +1 -0
- package/canisters/declarations/sns/governance.did.d.ts +4 -0
- package/canisters/declarations/sns/governance.did.idl.d.ts +1 -0
- package/canisters/declarations/sns/governance_test.did.d.ts +4 -0
- package/canisters/declarations/sns/governance_test.did.idl.d.ts +1 -0
- package/canisters/ic-management/index.js +1 -1
- package/canisters/index.d.ts +1 -1
- package/canisters/index.js +1 -1
- package/canisters/ledger/cycles/index.d.ts +1 -0
- package/canisters/ledger/cycles/index.js +2 -0
- package/canisters/ledger/cycles/index.js.map +7 -0
- package/canisters/ledger/icp/index.d.ts +1 -0
- package/canisters/ledger/icp/index.js +1 -1
- package/canisters/ledger/icp/index.js.map +4 -4
- package/canisters/ledger/icp/ledger.canister.d.ts +6 -6
- package/canisters/ledger/icp/schema.d.ts +152 -0
- package/canisters/ledger/icrc/index.d.ts +1 -1
- package/canisters/ledger/icrc/index.js +1 -1
- package/canisters/ledger/icrc/index.js.map +4 -4
- package/canisters/ledger/icrc/ledger.canister.d.ts +22 -14
- package/canisters/ledger/icrc/schema.d.ts +507 -0
- package/canisters/nns/index.js +1 -1
- package/canisters/sns/index.js +1 -1
- package/chunk-I3WMKZTG.js +2 -0
- package/chunk-I3WMKZTG.js.map +7 -0
- package/{chunk-X3EF7OU6.js → chunk-JI3RCRR6.js} +1 -1
- package/{chunk-X3EF7OU6.js.map → chunk-JI3RCRR6.js.map} +1 -1
- package/package.json +10 -6
- package/src/canisters/declarations/ckbtc/bitcoin.did.d.ts +8 -0
- package/src/canisters/declarations/ckbtc/bitcoin.did.idl.js +16 -0
- package/src/canisters/declarations/ckbtc/minter.did.d.ts +190 -0
- package/src/canisters/declarations/ckbtc/minter.did.idl.js +118 -0
- package/src/canisters/declarations/cketh/minter.did.d.ts +140 -0
- package/src/canisters/declarations/cketh/minter.did.idl.js +78 -0
- package/src/canisters/declarations/cycles-ledger/cycles-ledger.did.d.ts +413 -0
- package/src/canisters/declarations/cycles-ledger/cycles-ledger.did.idl.js +806 -0
- package/src/canisters/declarations/ic-management/ic-management.did.d.ts +18 -4
- package/src/canisters/declarations/ic-management/ic-management.did.idl.js +32 -8
- package/src/canisters/declarations/ledger-icp/index.did.d.ts +20 -1
- package/src/canisters/declarations/ledger-icp/index.did.idl.js +32 -5
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.d.ts +1 -0
- package/src/canisters/declarations/ledger-icrc/icrc_index.did.idl.js +2 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.d.ts +1 -0
- package/src/canisters/declarations/ledger-icrc/icrc_ledger.did.idl.js +2 -0
- package/src/canisters/declarations/nns/governance.did.d.ts +100 -0
- package/src/canisters/declarations/nns/governance.did.idl.js +132 -0
- package/src/canisters/declarations/nns/governance_test.did.d.ts +100 -0
- package/src/canisters/declarations/nns/governance_test.did.idl.js +132 -0
- package/src/canisters/declarations/nns/sns_wasm.did.d.ts +4 -0
- package/src/canisters/declarations/nns/sns_wasm.did.idl.js +8 -0
- package/src/canisters/declarations/sns/governance.did.d.ts +4 -0
- package/src/canisters/declarations/sns/governance.did.idl.js +12 -0
- package/src/canisters/declarations/sns/governance_test.did.d.ts +4 -0
- package/src/canisters/declarations/sns/governance_test.did.idl.js +12 -0
- package/canisters/ledger/icrc/schemas.d.ts +0 -11
- package/chunk-I4MVAQHI.js +0 -2
- package/chunk-I4MVAQHI.js.map +0 -7
- /package/canisters/{schemas.d.ts → schema.d.ts} +0 -0
|
@@ -53,6 +53,52 @@ export type BlockTag = {
|
|
|
53
53
|
*/
|
|
54
54
|
'Latest' : null
|
|
55
55
|
};
|
|
56
|
+
export type BurnMemo = {
|
|
57
|
+
/**
|
|
58
|
+
* The minter processed a ckERC20 withdrawal request.
|
|
59
|
+
*/
|
|
60
|
+
'Erc20Convert' : {
|
|
61
|
+
/**
|
|
62
|
+
* ckETH ledger burn index identifying the burn to pay for the transaction fee.
|
|
63
|
+
*/
|
|
64
|
+
'ckerc20_withdrawal_id' : bigint,
|
|
65
|
+
/**
|
|
66
|
+
* The destination of the withdrawal request.
|
|
67
|
+
*/
|
|
68
|
+
'to_address' : string,
|
|
69
|
+
}
|
|
70
|
+
} |
|
|
71
|
+
{
|
|
72
|
+
/**
|
|
73
|
+
* The minter processed a ckERC20 withdrawal request
|
|
74
|
+
* and that burn pays the transaction fee.
|
|
75
|
+
*/
|
|
76
|
+
'Erc20GasFee' : {
|
|
77
|
+
/**
|
|
78
|
+
* The destination of the withdrawal request.
|
|
79
|
+
*/
|
|
80
|
+
'to_address' : string,
|
|
81
|
+
/**
|
|
82
|
+
* The amount of the ckERC20 withdrawal request.
|
|
83
|
+
*/
|
|
84
|
+
'ckerc20_withdrawal_amount' : bigint,
|
|
85
|
+
/**
|
|
86
|
+
* ckERC20 token symbol of the withdrawal request.
|
|
87
|
+
*/
|
|
88
|
+
'ckerc20_token_symbol' : string,
|
|
89
|
+
}
|
|
90
|
+
} |
|
|
91
|
+
{
|
|
92
|
+
/**
|
|
93
|
+
* The minter processed a withdrawal request.
|
|
94
|
+
*/
|
|
95
|
+
'Convert' : {
|
|
96
|
+
/**
|
|
97
|
+
* The destination of the withdrawal request.
|
|
98
|
+
*/
|
|
99
|
+
'to_address' : string,
|
|
100
|
+
}
|
|
101
|
+
};
|
|
56
102
|
export interface CanisterStatusResponse {
|
|
57
103
|
'status' : CanisterStatusType,
|
|
58
104
|
'memory_size' : bigint,
|
|
@@ -71,6 +117,48 @@ export interface CkErc20Token {
|
|
|
71
117
|
'ledger_canister_id' : Principal,
|
|
72
118
|
'ckerc20_token_symbol' : string,
|
|
73
119
|
}
|
|
120
|
+
export interface DecodeLedgerMemoArgs {
|
|
121
|
+
/**
|
|
122
|
+
* The encoded memo type
|
|
123
|
+
*/
|
|
124
|
+
'memo_type' : MemoType,
|
|
125
|
+
/**
|
|
126
|
+
* The encoded memo from a minter transaction on the ledger
|
|
127
|
+
*/
|
|
128
|
+
'encoded_memo' : Uint8Array,
|
|
129
|
+
}
|
|
130
|
+
export type DecodeLedgerMemoError = {
|
|
131
|
+
/**
|
|
132
|
+
* The provided memo could not be decoded.
|
|
133
|
+
*/
|
|
134
|
+
'InvalidMemo' : string
|
|
135
|
+
};
|
|
136
|
+
export type DecodeLedgerMemoResult = {
|
|
137
|
+
/**
|
|
138
|
+
* The decoded memo, if the minter was able to decode it. This field is `opt`, so that other memo types can be
|
|
139
|
+
* added in the future.
|
|
140
|
+
*/
|
|
141
|
+
'Ok' : [] | [DecodedMemo]
|
|
142
|
+
} |
|
|
143
|
+
{
|
|
144
|
+
/**
|
|
145
|
+
* An error in case the minter was not able to decode the provided memo. This field is `opt`, so that other error
|
|
146
|
+
* types can be added in the future.
|
|
147
|
+
*/
|
|
148
|
+
'Err' : [] | [DecodeLedgerMemoError]
|
|
149
|
+
};
|
|
150
|
+
export type DecodedMemo = {
|
|
151
|
+
/**
|
|
152
|
+
* The decoded BurnMemo - `opt` since other variants of `BurnMemo` could be added in the future.
|
|
153
|
+
*/
|
|
154
|
+
'Burn' : [] | [BurnMemo]
|
|
155
|
+
} |
|
|
156
|
+
{
|
|
157
|
+
/**
|
|
158
|
+
* The decoded MintMemo - `opt` since other variants of `MintMemo` could be added in the future.
|
|
159
|
+
*/
|
|
160
|
+
'Mint' : [] | [MintMemo]
|
|
161
|
+
};
|
|
74
162
|
export interface DefiniteCanisterSettings {
|
|
75
163
|
'freezing_threshold' : bigint,
|
|
76
164
|
'controllers' : Array<Principal>,
|
|
@@ -382,6 +470,51 @@ export type LedgerError = {
|
|
|
382
470
|
export type LogVisibility = { 'controllers' : null } |
|
|
383
471
|
{ 'public' : null } |
|
|
384
472
|
{ 'allowed_viewers' : Array<Principal> };
|
|
473
|
+
export type MemoType = { 'Burn' : null } |
|
|
474
|
+
{ 'Mint' : null };
|
|
475
|
+
export type MintMemo = {
|
|
476
|
+
/**
|
|
477
|
+
* The minter failed to process a withdrawal request,
|
|
478
|
+
* so no transaction was issued, but some reimbursement was made.
|
|
479
|
+
*/
|
|
480
|
+
'ReimburseWithdrawal' : {
|
|
481
|
+
/**
|
|
482
|
+
* The id corresponding to the withdrawal request.
|
|
483
|
+
*/
|
|
484
|
+
'withdrawal_id' : bigint,
|
|
485
|
+
}
|
|
486
|
+
} |
|
|
487
|
+
{
|
|
488
|
+
'ReimburseTransaction' : {
|
|
489
|
+
/**
|
|
490
|
+
* The id corresponding to the withdrawal request.
|
|
491
|
+
*/
|
|
492
|
+
'withdrawal_id' : bigint,
|
|
493
|
+
/**
|
|
494
|
+
* Hash of the failed transaction.
|
|
495
|
+
*/
|
|
496
|
+
'tx_hash' : string,
|
|
497
|
+
}
|
|
498
|
+
} |
|
|
499
|
+
{
|
|
500
|
+
/**
|
|
501
|
+
* The minter received some ETH or ERC20 token.
|
|
502
|
+
*/
|
|
503
|
+
'Convert' : {
|
|
504
|
+
/**
|
|
505
|
+
* Integer of the log index position in the block.
|
|
506
|
+
*/
|
|
507
|
+
'log_index' : bigint,
|
|
508
|
+
/**
|
|
509
|
+
* The sender of the ETH or ERC20 token.
|
|
510
|
+
*/
|
|
511
|
+
'from_address' : string,
|
|
512
|
+
/**
|
|
513
|
+
* Hash of the transaction.
|
|
514
|
+
*/
|
|
515
|
+
'tx_hash' : string,
|
|
516
|
+
}
|
|
517
|
+
};
|
|
385
518
|
export type MinterArg = { 'UpgradeArg' : UpgradeArg } |
|
|
386
519
|
{ 'InitArg' : InitArg };
|
|
387
520
|
export interface MinterInfo {
|
|
@@ -813,6 +946,13 @@ export interface _SERVICE {
|
|
|
813
946
|
* This call is restricted to the orchestrator ID.
|
|
814
947
|
*/
|
|
815
948
|
'add_ckerc20_token' : ActorMethod<[AddCkErc20Token], undefined>,
|
|
949
|
+
/**
|
|
950
|
+
* Decode ledger memos produced by the minter when minting (deposits) or burning (withdrawals).
|
|
951
|
+
*/
|
|
952
|
+
'decode_ledger_memo' : ActorMethod<
|
|
953
|
+
[DecodeLedgerMemoArgs],
|
|
954
|
+
DecodeLedgerMemoResult
|
|
955
|
+
>,
|
|
816
956
|
/**
|
|
817
957
|
* Estimate the price of a transaction issued by the minter when converting ckETH to ETH.
|
|
818
958
|
*/
|
|
@@ -50,6 +50,44 @@ export const AddCkErc20Token = IDL.Record({
|
|
|
50
50
|
address: IDL.Text,
|
|
51
51
|
ckerc20_token_symbol: IDL.Text
|
|
52
52
|
});
|
|
53
|
+
export const MemoType = IDL.Variant({Burn: IDL.Null, Mint: IDL.Null});
|
|
54
|
+
export const DecodeLedgerMemoArgs = IDL.Record({
|
|
55
|
+
memo_type: MemoType,
|
|
56
|
+
encoded_memo: IDL.Vec(IDL.Nat8)
|
|
57
|
+
});
|
|
58
|
+
export const BurnMemo = IDL.Variant({
|
|
59
|
+
Erc20Convert: IDL.Record({
|
|
60
|
+
ckerc20_withdrawal_id: IDL.Nat64,
|
|
61
|
+
to_address: IDL.Text
|
|
62
|
+
}),
|
|
63
|
+
Erc20GasFee: IDL.Record({
|
|
64
|
+
to_address: IDL.Text,
|
|
65
|
+
ckerc20_withdrawal_amount: IDL.Nat,
|
|
66
|
+
ckerc20_token_symbol: IDL.Text
|
|
67
|
+
}),
|
|
68
|
+
Convert: IDL.Record({to_address: IDL.Text})
|
|
69
|
+
});
|
|
70
|
+
export const MintMemo = IDL.Variant({
|
|
71
|
+
ReimburseWithdrawal: IDL.Record({withdrawal_id: IDL.Nat64}),
|
|
72
|
+
ReimburseTransaction: IDL.Record({
|
|
73
|
+
withdrawal_id: IDL.Nat64,
|
|
74
|
+
tx_hash: IDL.Text
|
|
75
|
+
}),
|
|
76
|
+
Convert: IDL.Record({
|
|
77
|
+
log_index: IDL.Nat,
|
|
78
|
+
from_address: IDL.Text,
|
|
79
|
+
tx_hash: IDL.Text
|
|
80
|
+
})
|
|
81
|
+
});
|
|
82
|
+
export const DecodedMemo = IDL.Variant({
|
|
83
|
+
Burn: IDL.Opt(BurnMemo),
|
|
84
|
+
Mint: IDL.Opt(MintMemo)
|
|
85
|
+
});
|
|
86
|
+
export const DecodeLedgerMemoError = IDL.Variant({InvalidMemo: IDL.Text});
|
|
87
|
+
export const DecodeLedgerMemoResult = IDL.Variant({
|
|
88
|
+
Ok: IDL.Opt(DecodedMemo),
|
|
89
|
+
Err: IDL.Opt(DecodeLedgerMemoError)
|
|
90
|
+
});
|
|
53
91
|
export const Eip1559TransactionPriceArg = IDL.Record({
|
|
54
92
|
ckerc20_ledger_id: IDL.Principal
|
|
55
93
|
});
|
|
@@ -381,6 +419,7 @@ export const WithdrawalDetail = IDL.Record({
|
|
|
381
419
|
|
|
382
420
|
export const idlService = IDL.Service({
|
|
383
421
|
add_ckerc20_token: IDL.Func([AddCkErc20Token], [], []),
|
|
422
|
+
decode_ledger_memo: IDL.Func([DecodeLedgerMemoArgs], [DecodeLedgerMemoResult], ['query']),
|
|
384
423
|
eip_1559_transaction_price: IDL.Func(
|
|
385
424
|
[IDL.Opt(Eip1559TransactionPriceArg)],
|
|
386
425
|
[Eip1559TransactionPrice],
|
|
@@ -465,6 +504,44 @@ export const idlFactory = ({IDL}) => {
|
|
|
465
504
|
address: IDL.Text,
|
|
466
505
|
ckerc20_token_symbol: IDL.Text
|
|
467
506
|
});
|
|
507
|
+
const MemoType = IDL.Variant({Burn: IDL.Null, Mint: IDL.Null});
|
|
508
|
+
const DecodeLedgerMemoArgs = IDL.Record({
|
|
509
|
+
memo_type: MemoType,
|
|
510
|
+
encoded_memo: IDL.Vec(IDL.Nat8)
|
|
511
|
+
});
|
|
512
|
+
const BurnMemo = IDL.Variant({
|
|
513
|
+
Erc20Convert: IDL.Record({
|
|
514
|
+
ckerc20_withdrawal_id: IDL.Nat64,
|
|
515
|
+
to_address: IDL.Text
|
|
516
|
+
}),
|
|
517
|
+
Erc20GasFee: IDL.Record({
|
|
518
|
+
to_address: IDL.Text,
|
|
519
|
+
ckerc20_withdrawal_amount: IDL.Nat,
|
|
520
|
+
ckerc20_token_symbol: IDL.Text
|
|
521
|
+
}),
|
|
522
|
+
Convert: IDL.Record({to_address: IDL.Text})
|
|
523
|
+
});
|
|
524
|
+
const MintMemo = IDL.Variant({
|
|
525
|
+
ReimburseWithdrawal: IDL.Record({withdrawal_id: IDL.Nat64}),
|
|
526
|
+
ReimburseTransaction: IDL.Record({
|
|
527
|
+
withdrawal_id: IDL.Nat64,
|
|
528
|
+
tx_hash: IDL.Text
|
|
529
|
+
}),
|
|
530
|
+
Convert: IDL.Record({
|
|
531
|
+
log_index: IDL.Nat,
|
|
532
|
+
from_address: IDL.Text,
|
|
533
|
+
tx_hash: IDL.Text
|
|
534
|
+
})
|
|
535
|
+
});
|
|
536
|
+
const DecodedMemo = IDL.Variant({
|
|
537
|
+
Burn: IDL.Opt(BurnMemo),
|
|
538
|
+
Mint: IDL.Opt(MintMemo)
|
|
539
|
+
});
|
|
540
|
+
const DecodeLedgerMemoError = IDL.Variant({InvalidMemo: IDL.Text});
|
|
541
|
+
const DecodeLedgerMemoResult = IDL.Variant({
|
|
542
|
+
Ok: IDL.Opt(DecodedMemo),
|
|
543
|
+
Err: IDL.Opt(DecodeLedgerMemoError)
|
|
544
|
+
});
|
|
468
545
|
const Eip1559TransactionPriceArg = IDL.Record({
|
|
469
546
|
ckerc20_ledger_id: IDL.Principal
|
|
470
547
|
});
|
|
@@ -796,6 +873,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
796
873
|
|
|
797
874
|
return IDL.Service({
|
|
798
875
|
add_ckerc20_token: IDL.Func([AddCkErc20Token], [], []),
|
|
876
|
+
decode_ledger_memo: IDL.Func([DecodeLedgerMemoArgs], [DecodeLedgerMemoResult], ['query']),
|
|
799
877
|
eip_1559_transaction_price: IDL.Func(
|
|
800
878
|
[IDL.Opt(Eip1559TransactionPriceArg)],
|
|
801
879
|
[Eip1559TransactionPrice],
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
|
|
3
|
+
// @ts-nocheck
|
|
4
|
+
|
|
5
|
+
// This file was automatically generated by @icp-sdk/bindgen@0.3.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' : [] | [Uint8Array],
|
|
16
|
+
}
|
|
17
|
+
export interface Allowance {
|
|
18
|
+
'allowance' : bigint,
|
|
19
|
+
'expires_at' : [] | [bigint],
|
|
20
|
+
}
|
|
21
|
+
export interface AllowanceArgs { 'account' : Account, 'spender' : Account }
|
|
22
|
+
export type Allowances = Array<
|
|
23
|
+
{
|
|
24
|
+
'from_account' : Account,
|
|
25
|
+
'to_spender' : Account,
|
|
26
|
+
'allowance' : bigint,
|
|
27
|
+
'expires_at' : [] | [bigint],
|
|
28
|
+
}
|
|
29
|
+
>;
|
|
30
|
+
export interface ApproveArgs {
|
|
31
|
+
'fee' : [] | [bigint],
|
|
32
|
+
'memo' : [] | [Uint8Array],
|
|
33
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
34
|
+
'created_at_time' : [] | [bigint],
|
|
35
|
+
'amount' : bigint,
|
|
36
|
+
'expected_allowance' : [] | [bigint],
|
|
37
|
+
'expires_at' : [] | [bigint],
|
|
38
|
+
'spender' : Account,
|
|
39
|
+
}
|
|
40
|
+
export type ApproveError = {
|
|
41
|
+
'GenericError' : { 'message' : string, 'error_code' : bigint }
|
|
42
|
+
} |
|
|
43
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
44
|
+
{ 'Duplicate' : { 'duplicate_of' : bigint } } |
|
|
45
|
+
{ 'BadFee' : { 'expected_fee' : bigint } } |
|
|
46
|
+
{ 'AllowanceChanged' : { 'current_allowance' : bigint } } |
|
|
47
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
48
|
+
{ 'TooOld' : null } |
|
|
49
|
+
{ 'Expired' : { 'ledger_time' : bigint } } |
|
|
50
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
51
|
+
export type BlockIndex = bigint;
|
|
52
|
+
export interface CanisterSettings {
|
|
53
|
+
'freezing_threshold' : [] | [bigint],
|
|
54
|
+
'controllers' : [] | [Array<Principal>],
|
|
55
|
+
'reserved_cycles_limit' : [] | [bigint],
|
|
56
|
+
'memory_allocation' : [] | [bigint],
|
|
57
|
+
'compute_allocation' : [] | [bigint],
|
|
58
|
+
}
|
|
59
|
+
export type ChangeIndexId = { 'SetTo' : Principal } |
|
|
60
|
+
{ 'Unset' : null };
|
|
61
|
+
export interface CmcCreateCanisterArgs {
|
|
62
|
+
/**
|
|
63
|
+
* Optional instructions to select on which subnet the new canister will be created on.
|
|
64
|
+
*/
|
|
65
|
+
'subnet_selection' : [] | [SubnetSelection],
|
|
66
|
+
/**
|
|
67
|
+
* Optional canister settings that, if set, are applied to the newly created canister.
|
|
68
|
+
* If not specified, the caller is the controller of the canister and the other settings are set to default values.
|
|
69
|
+
*/
|
|
70
|
+
'settings' : [] | [CanisterSettings],
|
|
71
|
+
}
|
|
72
|
+
export interface CreateCanisterArgs {
|
|
73
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
74
|
+
'created_at_time' : [] | [bigint],
|
|
75
|
+
'amount' : bigint,
|
|
76
|
+
'creation_args' : [] | [CmcCreateCanisterArgs],
|
|
77
|
+
}
|
|
78
|
+
export type CreateCanisterError = {
|
|
79
|
+
'GenericError' : { 'message' : string, 'error_code' : bigint }
|
|
80
|
+
} |
|
|
81
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
82
|
+
{
|
|
83
|
+
'Duplicate' : {
|
|
84
|
+
'duplicate_of' : bigint,
|
|
85
|
+
/**
|
|
86
|
+
* If the original transaction created a canister then this field will contain the canister id.
|
|
87
|
+
*/
|
|
88
|
+
'canister_id' : [] | [Principal],
|
|
89
|
+
}
|
|
90
|
+
} |
|
|
91
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
92
|
+
{
|
|
93
|
+
'FailedToCreate' : {
|
|
94
|
+
'error' : string,
|
|
95
|
+
'refund_block' : [] | [BlockIndex],
|
|
96
|
+
'fee_block' : [] | [BlockIndex],
|
|
97
|
+
}
|
|
98
|
+
} |
|
|
99
|
+
{ 'TooOld' : null } |
|
|
100
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
101
|
+
export interface CreateCanisterFromArgs {
|
|
102
|
+
'spender_subaccount' : [] | [Uint8Array],
|
|
103
|
+
'from' : Account,
|
|
104
|
+
'created_at_time' : [] | [bigint],
|
|
105
|
+
'amount' : bigint,
|
|
106
|
+
'creation_args' : [] | [CmcCreateCanisterArgs],
|
|
107
|
+
}
|
|
108
|
+
export type CreateCanisterFromError = {
|
|
109
|
+
'FailedToCreateFrom' : {
|
|
110
|
+
'create_from_block' : [] | [BlockIndex],
|
|
111
|
+
'rejection_code' : RejectionCode,
|
|
112
|
+
'refund_block' : [] | [BlockIndex],
|
|
113
|
+
'approval_refund_block' : [] | [BlockIndex],
|
|
114
|
+
'rejection_reason' : string,
|
|
115
|
+
}
|
|
116
|
+
} |
|
|
117
|
+
{ 'GenericError' : { 'message' : string, 'error_code' : bigint } } |
|
|
118
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
119
|
+
{ 'InsufficientAllowance' : { 'allowance' : bigint } } |
|
|
120
|
+
{
|
|
121
|
+
'Duplicate' : {
|
|
122
|
+
'duplicate_of' : bigint,
|
|
123
|
+
/**
|
|
124
|
+
* If the original transaction created a canister then this field will contain the canister id.
|
|
125
|
+
*/
|
|
126
|
+
'canister_id' : [] | [Principal],
|
|
127
|
+
}
|
|
128
|
+
} |
|
|
129
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
130
|
+
{ 'TooOld' : null } |
|
|
131
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
132
|
+
export interface CreateCanisterSuccess {
|
|
133
|
+
'block_id' : BlockIndex,
|
|
134
|
+
'canister_id' : Principal,
|
|
135
|
+
}
|
|
136
|
+
export interface DataCertificate {
|
|
137
|
+
/**
|
|
138
|
+
* See https://internetcomputer.org/docs/current/references/ic-interface-spec#certification
|
|
139
|
+
*/
|
|
140
|
+
'certificate' : Uint8Array,
|
|
141
|
+
/**
|
|
142
|
+
* CBOR encoded hash_tree
|
|
143
|
+
*/
|
|
144
|
+
'hash_tree' : Uint8Array,
|
|
145
|
+
}
|
|
146
|
+
export interface DepositArgs { 'to' : Account, 'memo' : [] | [Uint8Array] }
|
|
147
|
+
export interface DepositResult {
|
|
148
|
+
'balance' : bigint,
|
|
149
|
+
'block_index' : BlockIndex,
|
|
150
|
+
}
|
|
151
|
+
export interface GetAllowancesArgs {
|
|
152
|
+
'take' : [] | [bigint],
|
|
153
|
+
'prev_spender' : [] | [Account],
|
|
154
|
+
'from_account' : [] | [Account],
|
|
155
|
+
}
|
|
156
|
+
export type GetAllowancesError = {
|
|
157
|
+
'GenericError' : { 'message' : string, 'error_code' : bigint }
|
|
158
|
+
} |
|
|
159
|
+
{ 'AccessDenied' : { 'reason' : string } };
|
|
160
|
+
export interface GetArchivesArgs {
|
|
161
|
+
/**
|
|
162
|
+
* The last archive seen by the client.
|
|
163
|
+
* The ledger will return archives coming
|
|
164
|
+
* after this one if set, otherwise it
|
|
165
|
+
* will return the first archives.
|
|
166
|
+
*/
|
|
167
|
+
'from' : [] | [Principal],
|
|
168
|
+
}
|
|
169
|
+
export type GetArchivesResult = Array<
|
|
170
|
+
{
|
|
171
|
+
/**
|
|
172
|
+
* The last block in the archive
|
|
173
|
+
*/
|
|
174
|
+
'end' : bigint,
|
|
175
|
+
/**
|
|
176
|
+
* The id of the archive
|
|
177
|
+
*/
|
|
178
|
+
'canister_id' : Principal,
|
|
179
|
+
/**
|
|
180
|
+
* The first block in the archive
|
|
181
|
+
*/
|
|
182
|
+
'start' : bigint,
|
|
183
|
+
}
|
|
184
|
+
>;
|
|
185
|
+
export type GetBlocksArgs = Array<{ 'start' : bigint, 'length' : bigint }>;
|
|
186
|
+
export interface GetBlocksResult {
|
|
187
|
+
/**
|
|
188
|
+
* Total number of blocks in the
|
|
189
|
+
* block log.
|
|
190
|
+
*/
|
|
191
|
+
'log_length' : bigint,
|
|
192
|
+
'blocks' : Array<{ 'id' : bigint, 'block' : Value }>,
|
|
193
|
+
/**
|
|
194
|
+
* The archived_blocks vector is always going to be empty
|
|
195
|
+
* for this ledger because there is no archive node.
|
|
196
|
+
*/
|
|
197
|
+
'archived_blocks' : Array<
|
|
198
|
+
{ 'args' : GetBlocksArgs, 'callback' : [Principal, string] }
|
|
199
|
+
>,
|
|
200
|
+
}
|
|
201
|
+
export type GetIndexPrincipalError = {
|
|
202
|
+
/**
|
|
203
|
+
* Any error not covered by the above variants.
|
|
204
|
+
*/
|
|
205
|
+
'GenericError' : { 'description' : string, 'error_code' : bigint }
|
|
206
|
+
} |
|
|
207
|
+
{ 'IndexPrincipalNotSet' : null };
|
|
208
|
+
export type GetIndexPrincipalResult = { 'Ok' : Principal } |
|
|
209
|
+
{ 'Err' : GetIndexPrincipalError };
|
|
210
|
+
export interface HttpRequest {
|
|
211
|
+
'url' : string,
|
|
212
|
+
'method' : string,
|
|
213
|
+
'body' : Uint8Array,
|
|
214
|
+
'headers' : Array<[string, string]>,
|
|
215
|
+
}
|
|
216
|
+
export interface HttpResponse {
|
|
217
|
+
'body' : Uint8Array,
|
|
218
|
+
'headers' : Array<[string, string]>,
|
|
219
|
+
'status_code' : number,
|
|
220
|
+
}
|
|
221
|
+
export type ICRC103GetAllowancesResponse = { 'Ok' : Allowances } |
|
|
222
|
+
{ 'Err' : GetAllowancesError };
|
|
223
|
+
export interface InitArgs {
|
|
224
|
+
'initial_balances' : [] | [Array<[Account, bigint]>],
|
|
225
|
+
'index_id' : [] | [Principal],
|
|
226
|
+
'max_blocks_per_request' : bigint,
|
|
227
|
+
}
|
|
228
|
+
export type LedgerArgs = { 'Upgrade' : [] | [UpgradeArgs] } |
|
|
229
|
+
{ 'Init' : InitArgs };
|
|
230
|
+
export type MetadataValue = { 'Int' : bigint } |
|
|
231
|
+
{ 'Nat' : bigint } |
|
|
232
|
+
{ 'Blob' : Uint8Array } |
|
|
233
|
+
{ 'Text' : string };
|
|
234
|
+
export type RejectionCode = { 'NoError' : null } |
|
|
235
|
+
{ 'CanisterError' : null } |
|
|
236
|
+
{ 'SysTransient' : null } |
|
|
237
|
+
{ 'DestinationInvalid' : null } |
|
|
238
|
+
{ 'Unknown' : null } |
|
|
239
|
+
{ 'SysFatal' : null } |
|
|
240
|
+
{ 'CanisterReject' : null };
|
|
241
|
+
export interface SubnetFilter { 'subnet_type' : [] | [string] }
|
|
242
|
+
export type SubnetSelection = {
|
|
243
|
+
/**
|
|
244
|
+
* Choose a random subnet that satisfies the specified properties.
|
|
245
|
+
*/
|
|
246
|
+
'Filter' : SubnetFilter
|
|
247
|
+
} |
|
|
248
|
+
{
|
|
249
|
+
/**
|
|
250
|
+
* / Choose a specific subnet
|
|
251
|
+
*/
|
|
252
|
+
'Subnet' : { 'subnet' : Principal }
|
|
253
|
+
};
|
|
254
|
+
export interface SupportedBlockType { 'url' : string, 'block_type' : string }
|
|
255
|
+
export interface SupportedStandard { 'url' : string, 'name' : string }
|
|
256
|
+
export interface TransferArgs {
|
|
257
|
+
'to' : Account,
|
|
258
|
+
'fee' : [] | [bigint],
|
|
259
|
+
'memo' : [] | [Uint8Array],
|
|
260
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
261
|
+
'created_at_time' : [] | [bigint],
|
|
262
|
+
'amount' : bigint,
|
|
263
|
+
}
|
|
264
|
+
export type TransferError = {
|
|
265
|
+
'GenericError' : { 'message' : string, 'error_code' : bigint }
|
|
266
|
+
} |
|
|
267
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
268
|
+
{ 'BadBurn' : { 'min_burn_amount' : bigint } } |
|
|
269
|
+
{ 'Duplicate' : { 'duplicate_of' : bigint } } |
|
|
270
|
+
{ 'BadFee' : { 'expected_fee' : bigint } } |
|
|
271
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
272
|
+
{ 'TooOld' : null } |
|
|
273
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
274
|
+
export interface TransferFromArgs {
|
|
275
|
+
'to' : Account,
|
|
276
|
+
'fee' : [] | [bigint],
|
|
277
|
+
'spender_subaccount' : [] | [Uint8Array],
|
|
278
|
+
'from' : Account,
|
|
279
|
+
'memo' : [] | [Uint8Array],
|
|
280
|
+
'created_at_time' : [] | [bigint],
|
|
281
|
+
'amount' : bigint,
|
|
282
|
+
}
|
|
283
|
+
export type TransferFromError = {
|
|
284
|
+
'GenericError' : { 'message' : string, 'error_code' : bigint }
|
|
285
|
+
} |
|
|
286
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
287
|
+
{ 'InsufficientAllowance' : { 'allowance' : bigint } } |
|
|
288
|
+
{ 'BadBurn' : { 'min_burn_amount' : bigint } } |
|
|
289
|
+
{ 'Duplicate' : { 'duplicate_of' : bigint } } |
|
|
290
|
+
{ 'BadFee' : { 'expected_fee' : bigint } } |
|
|
291
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
292
|
+
{ 'TooOld' : null } |
|
|
293
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
294
|
+
export interface UpgradeArgs {
|
|
295
|
+
'change_index_id' : [] | [ChangeIndexId],
|
|
296
|
+
'max_blocks_per_request' : [] | [bigint],
|
|
297
|
+
}
|
|
298
|
+
export type Value = { 'Int' : bigint } |
|
|
299
|
+
{ 'Map' : Array<[string, Value]> } |
|
|
300
|
+
{ 'Nat' : bigint } |
|
|
301
|
+
{ 'Nat64' : bigint } |
|
|
302
|
+
{ 'Blob' : Uint8Array } |
|
|
303
|
+
{ 'Text' : string } |
|
|
304
|
+
{ 'Array' : Array<Value> };
|
|
305
|
+
export interface WithdrawArgs {
|
|
306
|
+
'to' : Principal,
|
|
307
|
+
'from_subaccount' : [] | [Uint8Array],
|
|
308
|
+
'created_at_time' : [] | [bigint],
|
|
309
|
+
'amount' : bigint,
|
|
310
|
+
}
|
|
311
|
+
export type WithdrawError = {
|
|
312
|
+
'FailedToWithdraw' : {
|
|
313
|
+
'rejection_code' : RejectionCode,
|
|
314
|
+
'fee_block' : [] | [bigint],
|
|
315
|
+
'rejection_reason' : string,
|
|
316
|
+
}
|
|
317
|
+
} |
|
|
318
|
+
{ 'GenericError' : { 'message' : string, 'error_code' : bigint } } |
|
|
319
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
320
|
+
{ 'Duplicate' : { 'duplicate_of' : bigint } } |
|
|
321
|
+
{ 'BadFee' : { 'expected_fee' : bigint } } |
|
|
322
|
+
{ 'InvalidReceiver' : { 'receiver' : Principal } } |
|
|
323
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
324
|
+
{ 'TooOld' : null } |
|
|
325
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
326
|
+
export interface WithdrawFromArgs {
|
|
327
|
+
'to' : Principal,
|
|
328
|
+
'spender_subaccount' : [] | [Uint8Array],
|
|
329
|
+
'from' : Account,
|
|
330
|
+
'created_at_time' : [] | [bigint],
|
|
331
|
+
'amount' : bigint,
|
|
332
|
+
}
|
|
333
|
+
export type WithdrawFromError = {
|
|
334
|
+
'GenericError' : { 'message' : string, 'error_code' : bigint }
|
|
335
|
+
} |
|
|
336
|
+
{ 'TemporarilyUnavailable' : null } |
|
|
337
|
+
{ 'InsufficientAllowance' : { 'allowance' : bigint } } |
|
|
338
|
+
{ 'Duplicate' : { 'duplicate_of' : BlockIndex } } |
|
|
339
|
+
{ 'InvalidReceiver' : { 'receiver' : Principal } } |
|
|
340
|
+
{ 'CreatedInFuture' : { 'ledger_time' : bigint } } |
|
|
341
|
+
{ 'TooOld' : null } |
|
|
342
|
+
{
|
|
343
|
+
'FailedToWithdrawFrom' : {
|
|
344
|
+
'withdraw_from_block' : [] | [bigint],
|
|
345
|
+
'rejection_code' : RejectionCode,
|
|
346
|
+
'refund_block' : [] | [bigint],
|
|
347
|
+
'approval_refund_block' : [] | [bigint],
|
|
348
|
+
'rejection_reason' : string,
|
|
349
|
+
}
|
|
350
|
+
} |
|
|
351
|
+
{ 'InsufficientFunds' : { 'balance' : bigint } };
|
|
352
|
+
export interface _SERVICE {
|
|
353
|
+
'create_canister' : ActorMethod<
|
|
354
|
+
[CreateCanisterArgs],
|
|
355
|
+
{ 'Ok' : CreateCanisterSuccess } |
|
|
356
|
+
{ 'Err' : CreateCanisterError }
|
|
357
|
+
>,
|
|
358
|
+
'create_canister_from' : ActorMethod<
|
|
359
|
+
[CreateCanisterFromArgs],
|
|
360
|
+
{ 'Ok' : CreateCanisterSuccess } |
|
|
361
|
+
{ 'Err' : CreateCanisterFromError }
|
|
362
|
+
>,
|
|
363
|
+
'deposit' : ActorMethod<[DepositArgs], DepositResult>,
|
|
364
|
+
'http_request' : ActorMethod<[HttpRequest], HttpResponse>,
|
|
365
|
+
'icrc103_get_allowances' : ActorMethod<
|
|
366
|
+
[GetAllowancesArgs],
|
|
367
|
+
ICRC103GetAllowancesResponse
|
|
368
|
+
>,
|
|
369
|
+
'icrc106_get_index_principal' : ActorMethod<[], GetIndexPrincipalResult>,
|
|
370
|
+
'icrc1_balance_of' : ActorMethod<[Account], bigint>,
|
|
371
|
+
'icrc1_decimals' : ActorMethod<[], number>,
|
|
372
|
+
'icrc1_fee' : ActorMethod<[], bigint>,
|
|
373
|
+
'icrc1_metadata' : ActorMethod<[], Array<[string, MetadataValue]>>,
|
|
374
|
+
'icrc1_minting_account' : ActorMethod<[], [] | [Account]>,
|
|
375
|
+
'icrc1_name' : ActorMethod<[], string>,
|
|
376
|
+
'icrc1_supported_standards' : ActorMethod<[], Array<SupportedStandard>>,
|
|
377
|
+
'icrc1_symbol' : ActorMethod<[], string>,
|
|
378
|
+
'icrc1_total_supply' : ActorMethod<[], bigint>,
|
|
379
|
+
'icrc1_transfer' : ActorMethod<
|
|
380
|
+
[TransferArgs],
|
|
381
|
+
{ 'Ok' : BlockIndex } |
|
|
382
|
+
{ 'Err' : TransferError }
|
|
383
|
+
>,
|
|
384
|
+
'icrc2_allowance' : ActorMethod<[AllowanceArgs], Allowance>,
|
|
385
|
+
'icrc2_approve' : ActorMethod<
|
|
386
|
+
[ApproveArgs],
|
|
387
|
+
{ 'Ok' : bigint } |
|
|
388
|
+
{ 'Err' : ApproveError }
|
|
389
|
+
>,
|
|
390
|
+
'icrc2_transfer_from' : ActorMethod<
|
|
391
|
+
[TransferFromArgs],
|
|
392
|
+
{ 'Ok' : bigint } |
|
|
393
|
+
{ 'Err' : TransferFromError }
|
|
394
|
+
>,
|
|
395
|
+
'icrc3_get_archives' : ActorMethod<[GetArchivesArgs], GetArchivesResult>,
|
|
396
|
+
'icrc3_get_blocks' : ActorMethod<[GetBlocksArgs], GetBlocksResult>,
|
|
397
|
+
'icrc3_get_tip_certificate' : ActorMethod<[], [] | [DataCertificate]>,
|
|
398
|
+
'icrc3_supported_block_types' : ActorMethod<[], Array<SupportedBlockType>>,
|
|
399
|
+
'withdraw' : ActorMethod<
|
|
400
|
+
[WithdrawArgs],
|
|
401
|
+
{ 'Ok' : BlockIndex } |
|
|
402
|
+
{ 'Err' : WithdrawError }
|
|
403
|
+
>,
|
|
404
|
+
'withdraw_from' : ActorMethod<
|
|
405
|
+
[WithdrawFromArgs],
|
|
406
|
+
{ 'Ok' : BlockIndex } |
|
|
407
|
+
{ 'Err' : WithdrawFromError }
|
|
408
|
+
>,
|
|
409
|
+
}
|
|
410
|
+
export declare const idlService: IDL.ServiceClass;
|
|
411
|
+
export declare const idlInitArgs: IDL.Type[];
|
|
412
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
413
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|