-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeposit.did.js
130 lines (130 loc) · 4.31 KB
/
deposit.did.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
export const idlFactory = ({ IDL }) => {
const Account = IDL.Record({
'owner' : IDL.Principal,
'subaccount' : IDL.Opt(IDL.Vec(IDL.Nat8)),
});
const Value = IDL.Variant({
'Int' : IDL.Int,
'Nat' : IDL.Nat,
'Blob' : IDL.Vec(IDL.Nat8),
'Text' : IDL.Text,
});
const SupportedStandard = IDL.Record({ 'url' : IDL.Text, 'name' : IDL.Text });
const AllowanceArgs = IDL.Record({
'account' : Account,
'spender' : Account,
});
const Allowance = IDL.Record({
'allowance' : IDL.Nat,
'expires_at' : IDL.Opt(IDL.Nat64),
});
const _InlineICRCTransferErrorGenericError = IDL.Record({
'message' : IDL.Text,
'error_code' : IDL.Nat,
});
const _InlineICRCTransferErrorBadBurn = IDL.Record({
'min_burn_amount' : IDL.Nat,
});
const _InlineICRCTransferErrorDuplicate = IDL.Record({
'duplicate_of' : IDL.Nat,
});
const _InlineICRCTransferErrorBadFee = IDL.Record({
'expected_fee' : IDL.Nat,
});
const _InlineICRCTransferErrorCreatedInFuture = IDL.Record({
'ledger_time' : IDL.Nat64,
});
const _InlineICRCTransferErrorInsufficientFunds = IDL.Record({
'balance' : IDL.Nat,
});
const ICRCTransferError = IDL.Variant({
'GenericError' : _InlineICRCTransferErrorGenericError,
'TemporarilyUnavailable' : IDL.Null,
'BadBurn' : _InlineICRCTransferErrorBadBurn,
'Duplicate' : _InlineICRCTransferErrorDuplicate,
'BadFee' : _InlineICRCTransferErrorBadFee,
'CreatedInFuture' : _InlineICRCTransferErrorCreatedInFuture,
'TooOld' : IDL.Null,
'InsufficientFunds' : _InlineICRCTransferErrorInsufficientFunds,
});
const ManualReply = IDL.Variant({
'Ok' : IDL.Nat,
'Err' : ICRCTransferError,
});
const _InlineUtxoOutpoint = IDL.Record({
'txid' : IDL.Vec(IDL.Nat8),
'vout' : IDL.Nat32,
});
const Utxo = IDL.Record({
'height' : IDL.Nat32,
'value' : IDL.Nat64,
'outpoint' : _InlineUtxoOutpoint,
});
const _InlineUtxoStatusMinted = IDL.Record({
'minted_amount' : IDL.Nat64,
'block_index' : IDL.Nat64,
'utxo' : Utxo,
});
const UtxoStatus = IDL.Variant({
'ValueTooSmall' : Utxo,
'Tainted' : Utxo,
'Minted' : _InlineUtxoStatusMinted,
'Checked' : Utxo,
});
const _InlineUpdateBalanceErrorGenericError = IDL.Record({
'error_message' : IDL.Text,
'error_code' : IDL.Nat64,
});
const _InlineUpdateBalanceErrorNoNewUtxos = IDL.Record({
'required_confirmations' : IDL.Nat32,
'current_confirmations' : IDL.Opt(IDL.Nat32),
});
const UpdateBalanceError = IDL.Variant({
'GenericError' : _InlineUpdateBalanceErrorGenericError,
'TemporarilyUnavailable' : IDL.Text,
'AlreadyProcessing' : IDL.Null,
'NoNewUtxos' : _InlineUpdateBalanceErrorNoNewUtxos,
});
const ManualReply_1 = IDL.Variant({
'Ok' : IDL.Vec(UtxoStatus),
'Err' : UpdateBalanceError,
});
return IDL.Service({
'getBalance' : IDL.Func([IDL.Principal], [IDL.Nat], []),
'getBtcDepositAddress' : IDL.Func([IDL.Principal], [IDL.Text], []),
'getCaller' : IDL.Func([], [IDL.Principal], ['query']),
'getTime' : IDL.Func([], [IDL.Nat], []),
'getUint8array' : IDL.Func([IDL.Principal], [IDL.Vec(IDL.Nat8)], ['query']),
'icrc1_balance_of' : IDL.Func([Account], [IDL.Nat], ['query']),
'icrc1_decimals' : IDL.Func([], [IDL.Nat8], ['query']),
'icrc1_fee' : IDL.Func([], [IDL.Nat], ['query']),
'icrc1_metadata' : IDL.Func(
[],
[IDL.Vec(IDL.Tuple(IDL.Text, Value))],
['query'],
),
'icrc1_minting_account' : IDL.Func([], [IDL.Opt(Account)], ['query']),
'icrc1_name' : IDL.Func([], [IDL.Text], ['query']),
'icrc1_supported_standards' : IDL.Func(
[],
[IDL.Vec(SupportedStandard)],
['query'],
),
'icrc1_symbol' : IDL.Func([], [IDL.Text], ['query']),
'icrc1_total_supply' : IDL.Func([], [IDL.Nat], ['query']),
'icrc2_allowance' : IDL.Func([AllowanceArgs], [Allowance], ['query']),
'testPadAccount' : IDL.Func(
[IDL.Opt(IDL.Vec(IDL.Nat8))],
[Account],
['query'],
),
'transferToVault' : IDL.Func(
[IDL.Principal, IDL.Nat, IDL.Principal, IDL.Nat],
[ManualReply],
[],
),
'updateBalance' : IDL.Func([IDL.Principal], [ManualReply_1], []),
'updateVaultManagerAddress' : IDL.Func([IDL.Principal], [IDL.Text], []),
});
};
export const init = ({ IDL }) => { return []; };