@tetherto/wdk-wallet 1.0.0-beta.16 → 1.0.0-beta.17
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/index.js +11 -12
- package/package.json +1 -1
- package/src/errors.js +280 -19
- package/src/multisig/errors.js +54 -0
- package/src/multisig/index.js +15 -3
- package/src/multisig/multisig-message-signing-read-only.js +63 -0
- package/src/multisig/multisig-message-signing.js +64 -0
- package/src/multisig/multisig-owner-management.js +22 -5
- package/src/multisig/wallet-account-multisig.js +28 -39
- package/src/multisig/wallet-account-read-only-multisig.js +20 -34
- package/src/protocols/bridge-protocol.js +35 -1
- package/src/protocols/errors.js +510 -0
- package/src/protocols/fiat-protocol.js +104 -4
- package/src/protocols/index.js +13 -0
- package/src/protocols/lending-protocol.js +114 -2
- package/src/protocols/sda-protocol.js +103 -16
- package/src/protocols/swap-protocol.js +35 -1
- package/src/protocols/swidge-protocol.js +166 -55
- package/src/signer.js +8 -4
- package/src/wallet-account-read-only-simple.js +86 -1
- package/src/wallet-account-read-only.js +175 -6
- package/src/wallet-account.js +25 -1
- package/src/wallet-manager.js +38 -22
- package/types/index.d.ts +9 -2
- package/types/src/errors.d.ts +198 -14
- package/types/src/multisig/errors.d.ts +33 -0
- package/types/src/multisig/index.d.ts +7 -3
- package/types/src/multisig/multisig-message-signing-read-only.d.ts +53 -0
- package/types/src/multisig/multisig-message-signing.d.ts +40 -0
- package/types/src/multisig/multisig-owner-management.d.ts +20 -4
- package/types/src/multisig/wallet-account-multisig.d.ts +29 -35
- package/types/src/multisig/wallet-account-read-only-multisig.d.ts +20 -40
- package/types/src/protocols/bridge-protocol.d.ts +39 -3
- package/types/src/protocols/errors.d.ts +366 -0
- package/types/src/protocols/fiat-protocol.d.ts +103 -9
- package/types/src/protocols/index.d.ts +11 -0
- package/types/src/protocols/lending-protocol.d.ts +118 -4
- package/types/src/protocols/sda-protocol.d.ts +120 -23
- package/types/src/protocols/swap-protocol.d.ts +40 -4
- package/types/src/protocols/swidge-protocol.d.ts +106 -38
- package/types/src/signer.d.ts +6 -4
- package/types/src/wallet-account-read-only-simple.d.ts +99 -1
- package/types/src/wallet-account-read-only.d.ts +95 -3
- package/types/src/wallet-account.d.ts +27 -3
- package/types/src/wallet-manager.d.ts +37 -35
|
@@ -62,9 +62,20 @@ export type SdaRecoverById = import("./sda-protocol.js").SdaRecoverById;
|
|
|
62
62
|
export type SdaRecoverByAddress = import("./sda-protocol.js").SdaRecoverByAddress;
|
|
63
63
|
export type SdaRecoveryOptions = import("./sda-protocol.js").SdaRecoveryOptions;
|
|
64
64
|
export type SdaRecoveryResult = import("./sda-protocol.js").SdaRecoveryResult;
|
|
65
|
+
export type SwapErrorOptions = import("./errors.js").SwapErrorOptions;
|
|
66
|
+
export type BridgeErrorOptions = import("./errors.js").BridgeErrorOptions;
|
|
67
|
+
export type SupplyErrorOptions = import("./errors.js").SupplyErrorOptions;
|
|
68
|
+
export type WithdrawErrorOptions = import("./errors.js").WithdrawErrorOptions;
|
|
69
|
+
export type BorrowErrorOptions = import("./errors.js").BorrowErrorOptions;
|
|
70
|
+
export type RepayErrorOptions = import("./errors.js").RepayErrorOptions;
|
|
71
|
+
export type BuyErrorOptions = import("./errors.js").BuyErrorOptions;
|
|
72
|
+
export type SellErrorOptions = import("./errors.js").SellErrorOptions;
|
|
73
|
+
export type SwidgeErrorOptions = import("./errors.js").SwidgeErrorOptions;
|
|
74
|
+
export type SdaErrorOptions = import("./errors.js").SdaErrorOptions;
|
|
65
75
|
export { default as SwapProtocol, ISwapProtocol } from "./swap-protocol.js";
|
|
66
76
|
export { default as BridgeProtocol, IBridgeProtocol } from "./bridge-protocol.js";
|
|
67
77
|
export { default as LendingProtocol, ILendingProtocol } from "./lending-protocol.js";
|
|
68
78
|
export { default as FiatProtocol, IFiatProtocol } from "./fiat-protocol.js";
|
|
69
79
|
export { default as SwidgeProtocol, ISwidgeProtocol } from "./swidge-protocol.js";
|
|
70
80
|
export { default as SdaProtocol, ISdaProtocol } from "./sda-protocol.js";
|
|
81
|
+
export { AccountRequiredError, BorrowError, BorrowErrorReason, BridgeError, BridgeErrorReason, BuyError, BuyErrorReason, InvalidTokenError, MaximumFeeExceededError, NoSuchElementError, NotImplementedError, ProviderError, ProviderRequiredError, ReadOnlyAccountRequiredError, RepayError, RepayErrorReason, SdaError, SdaErrorReason, SellError, SellErrorReason, SupplyError, SupplyErrorReason, SwapError, SwapErrorReason, SwidgeError, SwidgeErrorReason, UnsupportedOperationError, ValueError, WdkError, WithdrawError, WithdrawErrorReason } from "./errors.js";
|
|
@@ -5,6 +5,13 @@ export interface ILendingProtocol {
|
|
|
5
5
|
*
|
|
6
6
|
* @param {SupplyOptions} options - The supply's options.
|
|
7
7
|
* @returns {Promise<SupplyResult>} The supply's result.
|
|
8
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a supply.
|
|
9
|
+
* @throws {ValueError} If the supply options are not valid.
|
|
10
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
11
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
12
|
+
* @throws {ProviderError} If the provider fails to perform the supply.
|
|
13
|
+
* @throws {SupplyError} If the supply fails with an error.
|
|
14
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the supply max. fee option.
|
|
8
15
|
*/
|
|
9
16
|
supply(options: SupplyOptions): Promise<SupplyResult>;
|
|
10
17
|
/**
|
|
@@ -12,6 +19,12 @@ export interface ILendingProtocol {
|
|
|
12
19
|
*
|
|
13
20
|
* @param {SupplyOptions} options - The supply's options.
|
|
14
21
|
* @returns {Promise<Omit<SupplyResult, 'hash'>>} The supply's costs.
|
|
22
|
+
* @throws {ReadOnlyAccountRequiredError} If the protocol requires a read-only or full account to quote the costs of a supply.
|
|
23
|
+
* @throws {ValueError} If the supply options are not valid.
|
|
24
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
25
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
26
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the supply.
|
|
27
|
+
* @throws {SupplyError} If the supply fails with an error.
|
|
15
28
|
*/
|
|
16
29
|
quoteSupply(options: SupplyOptions): Promise<Omit<SupplyResult, "hash">>;
|
|
17
30
|
/**
|
|
@@ -19,6 +32,13 @@ export interface ILendingProtocol {
|
|
|
19
32
|
*
|
|
20
33
|
* @param {WithdrawOptions} options - The withdraw's options.
|
|
21
34
|
* @returns {Promise<WithdrawResult>} The withdraw's result.
|
|
35
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a withdraw.
|
|
36
|
+
* @throws {ValueError} If the withdraw options are not valid.
|
|
37
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
38
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
39
|
+
* @throws {ProviderError} If the provider fails to perform the withdraw.
|
|
40
|
+
* @throws {WithdrawError} If the withdraw fails with an error.
|
|
41
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the withdraw max. fee option.
|
|
22
42
|
*/
|
|
23
43
|
withdraw(options: WithdrawOptions): Promise<WithdrawResult>;
|
|
24
44
|
/**
|
|
@@ -26,6 +46,12 @@ export interface ILendingProtocol {
|
|
|
26
46
|
*
|
|
27
47
|
* @param {WithdrawOptions} options - The withdraw's options.
|
|
28
48
|
* @returns {Promise<Omit<WithdrawResult, 'hash'>>} The withdraw's costs.
|
|
49
|
+
* @throws {ReadOnlyAccountRequiredError} If the protocol requires a read-only or full account to quote the costs of a supply.
|
|
50
|
+
* @throws {ValueError} If the withdraw options are not valid.
|
|
51
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
52
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
53
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the withdraw.
|
|
54
|
+
* @throws {WithdrawError} If the withdraw fails with an error.
|
|
29
55
|
*/
|
|
30
56
|
quoteWithdraw(options: WithdrawOptions): Promise<Omit<WithdrawResult, "hash">>;
|
|
31
57
|
/**
|
|
@@ -33,6 +59,13 @@ export interface ILendingProtocol {
|
|
|
33
59
|
*
|
|
34
60
|
* @param {BorrowOptions} options - The borrow's options.
|
|
35
61
|
* @returns {Promise<BorrowResult>} The borrow's result.
|
|
62
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a borrow.
|
|
63
|
+
* @throws {ValueError} If the borrow options are not valid.
|
|
64
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
65
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
66
|
+
* @throws {ProviderError} If the provider fails to perform the borrow.
|
|
67
|
+
* @throws {BorrowError} If the borrow fails with an error.
|
|
68
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the borrow max. fee option.
|
|
36
69
|
*/
|
|
37
70
|
borrow(options: BorrowOptions): Promise<BorrowResult>;
|
|
38
71
|
/**
|
|
@@ -40,13 +73,26 @@ export interface ILendingProtocol {
|
|
|
40
73
|
*
|
|
41
74
|
* @param {BorrowOptions} options - The borrow's options.
|
|
42
75
|
* @returns {Promise<Omit<BorrowResult, 'hash'>>} The borrow's costs.
|
|
76
|
+
* @throws {ReadOnlyAccountRequiredError} If the protocol requires a read-only or full account to quote the costs of a borrow.
|
|
77
|
+
* @throws {ValueError} If the borrow options are not valid.
|
|
78
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
79
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
80
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the borrow.
|
|
81
|
+
* @throws {BorrowError} If the borrow fails with an error.
|
|
43
82
|
*/
|
|
44
83
|
quoteBorrow(options: BorrowOptions): Promise<Omit<BorrowResult, "hash">>;
|
|
45
84
|
/**
|
|
46
85
|
* Repays a specific token amount.
|
|
47
86
|
*
|
|
48
|
-
* @param {RepayOptions} options - The
|
|
87
|
+
* @param {RepayOptions} options - The repay's options.
|
|
49
88
|
* @returns {Promise<RepayResult>} The repay's result.
|
|
89
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a repay.
|
|
90
|
+
* @throws {ValueError} If the repay options are not valid.
|
|
91
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
92
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
93
|
+
* @throws {ProviderError} If the provider fails to perform the repay.
|
|
94
|
+
* @throws {RepayError} If the repay fails with an error.
|
|
95
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the repay max. fee option.
|
|
50
96
|
*/
|
|
51
97
|
repay(options: RepayOptions): Promise<RepayResult>;
|
|
52
98
|
/**
|
|
@@ -54,10 +100,19 @@ export interface ILendingProtocol {
|
|
|
54
100
|
*
|
|
55
101
|
* @param {RepayOptions} options - The repay's options.
|
|
56
102
|
* @returns {Promise<Omit<RepayResult, 'hash'>>} The repay's costs.
|
|
103
|
+
* @throws {ReadOnlyAccountRequiredError} If the protocol requires a read-only or full account to quote the costs of a repay.
|
|
104
|
+
* @throws {ValueError} If the repay options are not valid.
|
|
105
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
106
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
107
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the repay.
|
|
108
|
+
* @throws {RepayError} If the repay fails with an error.
|
|
57
109
|
*/
|
|
58
110
|
quoteRepay(options: RepayOptions): Promise<Omit<RepayResult, "hash">>;
|
|
59
111
|
}
|
|
60
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* @abstract
|
|
114
|
+
* @implements {ILendingProtocol}
|
|
115
|
+
*/
|
|
61
116
|
export default abstract class LendingProtocol implements ILendingProtocol {
|
|
62
117
|
/**
|
|
63
118
|
* Creates a new read-only lending protocol.
|
|
@@ -77,15 +132,22 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
77
132
|
* The wallet account to use to interact with the protocol.
|
|
78
133
|
*
|
|
79
134
|
* @protected
|
|
80
|
-
* @type {IWalletAccount}
|
|
135
|
+
* @type {IWalletAccountReadOnly | IWalletAccount}
|
|
81
136
|
*/
|
|
82
|
-
protected _account: IWalletAccount;
|
|
137
|
+
protected _account: IWalletAccountReadOnly | IWalletAccount;
|
|
83
138
|
/**
|
|
84
139
|
* Supplies a specific token amount to the lending pool.
|
|
85
140
|
*
|
|
86
141
|
* @abstract
|
|
87
142
|
* @param {SupplyOptions} options - The supply's options.
|
|
88
143
|
* @returns {Promise<SupplyResult>} The supply's result.
|
|
144
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a supply.
|
|
145
|
+
* @throws {ValueError} If the supply options are not valid.
|
|
146
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
147
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
148
|
+
* @throws {ProviderError} If the provider fails to perform the supply.
|
|
149
|
+
* @throws {SupplyError} If the supply fails with an error.
|
|
150
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the supply max. fee option.
|
|
89
151
|
*/
|
|
90
152
|
abstract supply(options: SupplyOptions): Promise<SupplyResult>;
|
|
91
153
|
/**
|
|
@@ -94,6 +156,11 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
94
156
|
* @abstract
|
|
95
157
|
* @param {SupplyOptions} options - The supply's options.
|
|
96
158
|
* @returns {Promise<Omit<SupplyResult, 'hash'>>} The supply's costs.
|
|
159
|
+
* @throws {ValueError} If the supply options are not valid.
|
|
160
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
161
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
162
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the supply.
|
|
163
|
+
* @throws {SupplyError} If the supply fails with an error.
|
|
97
164
|
*/
|
|
98
165
|
abstract quoteSupply(options: SupplyOptions): Promise<Omit<SupplyResult, "hash">>;
|
|
99
166
|
/**
|
|
@@ -102,6 +169,13 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
102
169
|
* @abstract
|
|
103
170
|
* @param {WithdrawOptions} options - The withdraw's options.
|
|
104
171
|
* @returns {Promise<WithdrawResult>} The withdraw's result.
|
|
172
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a withdraw.
|
|
173
|
+
* @throws {ValueError} If the withdraw options are not valid.
|
|
174
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
175
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
176
|
+
* @throws {ProviderError} If the provider fails to perform the withdraw.
|
|
177
|
+
* @throws {WithdrawError} If the withdraw fails with an error.
|
|
178
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the withdraw max. fee option.
|
|
105
179
|
*/
|
|
106
180
|
abstract withdraw(options: WithdrawOptions): Promise<WithdrawResult>;
|
|
107
181
|
/**
|
|
@@ -110,6 +184,11 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
110
184
|
* @abstract
|
|
111
185
|
* @param {WithdrawOptions} options - The withdraw's options.
|
|
112
186
|
* @returns {Promise<Omit<WithdrawResult, 'hash'>>} The withdraw's costs.
|
|
187
|
+
* @throws {ValueError} If the withdraw options are not valid.
|
|
188
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
189
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
190
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the withdraw.
|
|
191
|
+
* @throws {WithdrawError} If the withdraw fails with an error.
|
|
113
192
|
*/
|
|
114
193
|
abstract quoteWithdraw(options: WithdrawOptions): Promise<Omit<WithdrawResult, "hash">>;
|
|
115
194
|
/**
|
|
@@ -118,6 +197,13 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
118
197
|
* @abstract
|
|
119
198
|
* @param {BorrowOptions} options - The borrow's options.
|
|
120
199
|
* @returns {Promise<BorrowResult>} The borrow's result.
|
|
200
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a borrow.
|
|
201
|
+
* @throws {ValueError} If the borrow options are not valid.
|
|
202
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
203
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
204
|
+
* @throws {ProviderError} If the provider fails to perform the borrow.
|
|
205
|
+
* @throws {BorrowError} If the borrow fails with an error.
|
|
206
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the borrow max. fee option.
|
|
121
207
|
*/
|
|
122
208
|
abstract borrow(options: BorrowOptions): Promise<BorrowResult>;
|
|
123
209
|
/**
|
|
@@ -126,6 +212,11 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
126
212
|
* @abstract
|
|
127
213
|
* @param {BorrowOptions} options - The borrow's options.
|
|
128
214
|
* @returns {Promise<Omit<BorrowResult, 'hash'>>} The borrow's costs.
|
|
215
|
+
* @throws {ValueError} If the borrow options are not valid.
|
|
216
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
217
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
218
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the borrow.
|
|
219
|
+
* @throws {BorrowError} If the borrow fails with an error.
|
|
129
220
|
*/
|
|
130
221
|
abstract quoteBorrow(options: BorrowOptions): Promise<Omit<BorrowResult, "hash">>;
|
|
131
222
|
/**
|
|
@@ -134,6 +225,13 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
134
225
|
* @abstract
|
|
135
226
|
* @param {RepayOptions} options - The borrow's options.
|
|
136
227
|
* @returns {Promise<RepayResult>} The repay's result.
|
|
228
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to perform a repay.
|
|
229
|
+
* @throws {ValueError} If the repay options are not valid.
|
|
230
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
231
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
232
|
+
* @throws {ProviderError} If the provider fails to perform the repay.
|
|
233
|
+
* @throws {RepayError} If the repay fails with an error.
|
|
234
|
+
* @throws {MaximumFeeExceededError} If the the costs of the transaction exceeds the repay max. fee option.
|
|
137
235
|
*/
|
|
138
236
|
abstract repay(options: RepayOptions): Promise<RepayResult>;
|
|
139
237
|
/**
|
|
@@ -142,11 +240,27 @@ export default abstract class LendingProtocol implements ILendingProtocol {
|
|
|
142
240
|
* @abstract
|
|
143
241
|
* @param {RepayOptions} options - The repay's options.
|
|
144
242
|
* @returns {Promise<Omit<RepayResult, 'hash'>>} The repay's costs.
|
|
243
|
+
* @throws {ValueError} If the repay options are not valid.
|
|
244
|
+
* @throws {InvalidTokenError} If the token is not a valid ERC 20 token's address.
|
|
245
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
246
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the repay.
|
|
247
|
+
* @throws {RepayError} If the repay fails with an error.
|
|
145
248
|
*/
|
|
146
249
|
abstract quoteRepay(options: RepayOptions): Promise<Omit<RepayResult, "hash">>;
|
|
147
250
|
}
|
|
148
251
|
export type IWalletAccountReadOnly = import("../wallet-account-read-only.js").IWalletAccountReadOnly;
|
|
149
252
|
export type IWalletAccount = import("../wallet-account.js").IWalletAccount;
|
|
253
|
+
export type AccountRequiredError = import("./errors.js").AccountRequiredError;
|
|
254
|
+
export type BorrowError = import("./errors.js").BorrowError;
|
|
255
|
+
export type InvalidTokenError = import("./errors.js").InvalidTokenError;
|
|
256
|
+
export type MaximumFeeExceededError = import("./errors.js").MaximumFeeExceededError;
|
|
257
|
+
export type ReadOnlyAccountRequiredError = import("./errors.js").ReadOnlyAccountRequiredError;
|
|
258
|
+
export type ProviderError = import("./errors.js").ProviderError;
|
|
259
|
+
export type ProviderRequiredError = import("./errors.js").ProviderRequiredError;
|
|
260
|
+
export type RepayError = import("./errors.js").RepayError;
|
|
261
|
+
export type SupplyError = import("./errors.js").SupplyError;
|
|
262
|
+
export type ValueError = import("./errors.js").ValueError;
|
|
263
|
+
export type WithdrawError = import("./errors.js").WithdrawError;
|
|
150
264
|
export type SupplyOptions = {
|
|
151
265
|
/**
|
|
152
266
|
* - The address of the token to supply.
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Interface for "Smart Deposit Address" (SDA) protocols: services that issue a deposit address, accept a
|
|
3
|
+
* stablecoin (or native token) from a supported source chain, convert it, and deliver a chosen asset (e.g., USDT)
|
|
4
|
+
* to a chosen destination chain and address.
|
|
5
|
+
*
|
|
6
|
+
* The required core every protocol implements is route discovery and address creation; every other operation is
|
|
7
|
+
* optional.
|
|
8
|
+
*
|
|
9
|
+
* @interface
|
|
10
|
+
*/
|
|
2
11
|
export interface ISdaProtocol {
|
|
3
12
|
/**
|
|
4
13
|
* Lists the conversion routes the protocol supports: source chains, accepted input tokens, output assets and
|
|
@@ -9,6 +18,8 @@ export interface ISdaProtocol {
|
|
|
9
18
|
* @returns {Promise<SdaRoute[]>} The supported routes.
|
|
10
19
|
* @throws {ValueError} If the protocol discovers routes by blockchain pairs and the source or destination blockchain
|
|
11
20
|
* is not set.
|
|
21
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
22
|
+
* @throws {ProviderError} If the provider fails to fetch the available routes.
|
|
12
23
|
*/
|
|
13
24
|
getSupportedRoutes(options?: SdaRoutesOptions): Promise<SdaRoute[]>;
|
|
14
25
|
/**
|
|
@@ -17,7 +28,11 @@ export interface ISdaProtocol {
|
|
|
17
28
|
* @param {SdaDepositOptions} options - The quote options.
|
|
18
29
|
* @returns {Promise<SdaDepositQuote>} The quoted deposit details.
|
|
19
30
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
20
|
-
* @throws {
|
|
31
|
+
* @throws {ReadOnlyAccountRequiredError} If the protocol requires a read-only or full account to quote the costs of a deposit.
|
|
32
|
+
* @throws {ValueError} If the deposit options are not valid.
|
|
33
|
+
* @throws {InvalidTokenError} If the input token is not a valid ERC 20 token's address.
|
|
34
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
35
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the deposit.
|
|
21
36
|
*/
|
|
22
37
|
quoteDeposit(options: SdaDepositOptions): Promise<SdaDepositQuote>;
|
|
23
38
|
/**
|
|
@@ -28,8 +43,11 @@ export interface ISdaProtocol {
|
|
|
28
43
|
*
|
|
29
44
|
* @param {SdaCreateDepositAddressOptions} options - The address creation options.
|
|
30
45
|
* @returns {Promise<SdaDepositAddress[]>} The created deposit addresses, one per distinct address.
|
|
31
|
-
* @throws {
|
|
32
|
-
* @throws {ValueError} If the
|
|
46
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to create a new deposit address.
|
|
47
|
+
* @throws {ValueError} If the create deposit address options are not valid.
|
|
48
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
49
|
+
* @throws {ProviderError} If the provider fails to create a new deposit address.
|
|
50
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
33
51
|
*/
|
|
34
52
|
createDepositAddress(options: SdaCreateDepositAddressOptions): Promise<SdaDepositAddress[]>;
|
|
35
53
|
/**
|
|
@@ -41,7 +59,11 @@ export interface ISdaProtocol {
|
|
|
41
59
|
* options type (which extends `SdaCreateDepositAddressOptions`).
|
|
42
60
|
* @returns {Promise<string>} The derived deposit address.
|
|
43
61
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
44
|
-
* @throws {
|
|
62
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to derive a deposit address.
|
|
63
|
+
* @throws {ValueError} If the create deposit address options are not valid.
|
|
64
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
65
|
+
* @throws {ProviderError} If the provider fails to derive the deposit address.
|
|
66
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
45
67
|
*/
|
|
46
68
|
deriveDepositAddress(options: SdaCreateDepositAddressOptions): Promise<string>;
|
|
47
69
|
/**
|
|
@@ -52,7 +74,10 @@ export interface ISdaProtocol {
|
|
|
52
74
|
* context the protocol needs).
|
|
53
75
|
* @returns {Promise<SdaDepositAddress>} The deposit address descriptor.
|
|
54
76
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
55
|
-
* @throws {
|
|
77
|
+
* @throws {ValueError} If the id is not valid.
|
|
78
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id.
|
|
79
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
80
|
+
* @throws {ProviderError} If the provider fails to fetch the deposit's address.
|
|
56
81
|
*/
|
|
57
82
|
getDepositAddress(id: string): Promise<SdaDepositAddress>;
|
|
58
83
|
/**
|
|
@@ -61,6 +86,12 @@ export interface ISdaProtocol {
|
|
|
61
86
|
* @param {string} id - The deposit-address identifier returned in `SdaDepositAddress.id`.
|
|
62
87
|
* @returns {Promise<SdaDepositAddress>} The refreshed deposit address descriptor (with the new `expiry`).
|
|
63
88
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
89
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to renew a deposit address.
|
|
90
|
+
* @throws {ValueError} If the id is not valid.
|
|
91
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id.
|
|
92
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
93
|
+
* @throws {ProviderError} If the provider fails to renew the deposit address.
|
|
94
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
64
95
|
*/
|
|
65
96
|
renewDepositAddress(id: string): Promise<SdaDepositAddress>;
|
|
66
97
|
/**
|
|
@@ -71,6 +102,8 @@ export interface ISdaProtocol {
|
|
|
71
102
|
* addresses by (address, chain).
|
|
72
103
|
* @returns {Promise<SdaTransfer[]>} The transfers for the address.
|
|
73
104
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
105
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
106
|
+
* @throws {ProviderError} If the provider fails to fetch transfers.
|
|
74
107
|
*/
|
|
75
108
|
getTransfers(address: string, options?: SdaTransfersOptions): Promise<SdaTransfer[]>;
|
|
76
109
|
/**
|
|
@@ -82,6 +115,8 @@ export interface ISdaProtocol {
|
|
|
82
115
|
* @param {SdaTransfersOptions} [options] - Optional pagination/filtering.
|
|
83
116
|
* @returns {Promise<SdaTransfer[]>} The transfers routed to the recipient.
|
|
84
117
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
118
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
119
|
+
* @throws {ProviderError} If the provider fails to fetch transfers.
|
|
85
120
|
*/
|
|
86
121
|
getTransfersByRecipient(destinationChain: Blockchain, recipient: string, options?: SdaTransfersOptions): Promise<SdaTransfer[]>;
|
|
87
122
|
/**
|
|
@@ -90,7 +125,10 @@ export interface ISdaProtocol {
|
|
|
90
125
|
* @param {string} id - The transfer identifier.
|
|
91
126
|
* @returns {Promise<SdaTransfer>} The transfer's current status.
|
|
92
127
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
93
|
-
* @throws {
|
|
128
|
+
* @throws {ValueError} If the id is not valid.
|
|
129
|
+
* @throws {NoSuchElementError} If no transfer exists for the given id.
|
|
130
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
131
|
+
* @throws {ProviderError} If the provider fails to fetch the transfer.
|
|
94
132
|
*/
|
|
95
133
|
getTransfer(id: string): Promise<SdaTransfer>;
|
|
96
134
|
/**
|
|
@@ -99,6 +137,12 @@ export interface ISdaProtocol {
|
|
|
99
137
|
* @param {SdaRecoveryOptions} options - The recovery options.
|
|
100
138
|
* @returns {Promise<SdaRecoveryResult>} The recovery outcome.
|
|
101
139
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
140
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to recover a deposit address.
|
|
141
|
+
* @throws {ValueError} If the id is not valid.
|
|
142
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id or address.
|
|
143
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
144
|
+
* @throws {ProviderError} If the provider fails to recover the deposit address.
|
|
145
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
102
146
|
*/
|
|
103
147
|
recoverDepositAddress(options: SdaRecoveryOptions): Promise<SdaRecoveryResult>;
|
|
104
148
|
/**
|
|
@@ -108,6 +152,12 @@ export interface ISdaProtocol {
|
|
|
108
152
|
* context the protocol needs).
|
|
109
153
|
* @returns {Promise<void>} Resolves once the address has been disabled.
|
|
110
154
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
155
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to disable a deposit address.
|
|
156
|
+
* @throws {ValueError} If the id is not valid.
|
|
157
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id.
|
|
158
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
159
|
+
* @throws {ProviderError} If the provider fails to disable the deposit address.
|
|
160
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
111
161
|
*/
|
|
112
162
|
disableDepositAddress(id: string): Promise<void>;
|
|
113
163
|
}
|
|
@@ -157,15 +207,21 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
157
207
|
* @returns {Promise<SdaRoute[]>} The supported routes.
|
|
158
208
|
* @throws {ValueError} If the protocol discovers routes by blockchain pairs and the source or destination blockchain
|
|
159
209
|
* is not set.
|
|
210
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
211
|
+
* @throws {ProviderError} If the provider fails to fetch the available routes.
|
|
160
212
|
*/
|
|
161
|
-
getSupportedRoutes(options?: SdaRoutesOptions): Promise<SdaRoute[]>;
|
|
213
|
+
abstract getSupportedRoutes(options?: SdaRoutesOptions): Promise<SdaRoute[]>;
|
|
162
214
|
/**
|
|
163
215
|
* Fetches a non-binding quote (estimate) for a deposit — what a given deposit would deliver.
|
|
164
216
|
*
|
|
165
217
|
* @param {SdaDepositOptions} options - The quote options.
|
|
166
218
|
* @returns {Promise<SdaDepositQuote>} The quoted deposit details.
|
|
167
219
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
168
|
-
* @throws {
|
|
220
|
+
* @throws {ReadOnlyAccountRequiredError} If the protocol requires a read-only or full account to quote the costs of a deposit.
|
|
221
|
+
* @throws {ValueError} If the deposit options are not valid.
|
|
222
|
+
* @throws {InvalidTokenError} If the input token is not a valid ERC 20 token's address.
|
|
223
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
224
|
+
* @throws {ProviderError} If the provider fails to estimate the costs of the deposit.
|
|
169
225
|
*/
|
|
170
226
|
quoteDeposit(options: SdaDepositOptions): Promise<SdaDepositQuote>;
|
|
171
227
|
/**
|
|
@@ -177,10 +233,13 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
177
233
|
* @abstract
|
|
178
234
|
* @param {SdaCreateDepositAddressOptions} options - The address creation options.
|
|
179
235
|
* @returns {Promise<SdaDepositAddress[]>} The created deposit addresses, one per distinct address.
|
|
180
|
-
* @throws {
|
|
181
|
-
* @throws {ValueError} If the
|
|
236
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to create a new deposit address.
|
|
237
|
+
* @throws {ValueError} If the create deposit address options are not valid.
|
|
238
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
239
|
+
* @throws {ProviderError} If the provider fails to create a new deposit address.
|
|
240
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
182
241
|
*/
|
|
183
|
-
createDepositAddress(options: SdaCreateDepositAddressOptions): Promise<SdaDepositAddress[]>;
|
|
242
|
+
abstract createDepositAddress(options: SdaCreateDepositAddressOptions): Promise<SdaDepositAddress[]>;
|
|
184
243
|
/**
|
|
185
244
|
* Derives a deposit address client-side, without any protocol call and without activating or monitoring it —
|
|
186
245
|
* used to verify (derive + compare) or recover an address for a self-custodial protocol.
|
|
@@ -190,7 +249,11 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
190
249
|
* options type (which extends `SdaCreateDepositAddressOptions`).
|
|
191
250
|
* @returns {Promise<string>} The derived deposit address.
|
|
192
251
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
193
|
-
* @throws {
|
|
252
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to derive a deposit address.
|
|
253
|
+
* @throws {ValueError} If the create deposit address options are not valid.
|
|
254
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
255
|
+
* @throws {ProviderError} If the provider fails to derive the deposit address.
|
|
256
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
194
257
|
*/
|
|
195
258
|
deriveDepositAddress(options: SdaCreateDepositAddressOptions): Promise<string>;
|
|
196
259
|
/**
|
|
@@ -201,7 +264,10 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
201
264
|
* context the protocol needs).
|
|
202
265
|
* @returns {Promise<SdaDepositAddress>} The deposit address descriptor.
|
|
203
266
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
204
|
-
* @throws {
|
|
267
|
+
* @throws {ValueError} If the id is not valid.
|
|
268
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id.
|
|
269
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
270
|
+
* @throws {ProviderError} If the provider fails to fetch the deposit's address.
|
|
205
271
|
*/
|
|
206
272
|
getDepositAddress(id: string): Promise<SdaDepositAddress>;
|
|
207
273
|
/**
|
|
@@ -210,6 +276,12 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
210
276
|
* @param {string} id - The deposit-address identifier returned in `SdaDepositAddress.id`.
|
|
211
277
|
* @returns {Promise<SdaDepositAddress>} The refreshed deposit address descriptor (with the new `expiry`).
|
|
212
278
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
279
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to renew a deposit address.
|
|
280
|
+
* @throws {ValueError} If the id is not valid.
|
|
281
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id.
|
|
282
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
283
|
+
* @throws {ProviderError} If the provider fails to renew the deposit address.
|
|
284
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
213
285
|
*/
|
|
214
286
|
renewDepositAddress(id: string): Promise<SdaDepositAddress>;
|
|
215
287
|
/**
|
|
@@ -220,6 +292,8 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
220
292
|
* addresses by (address, chain).
|
|
221
293
|
* @returns {Promise<SdaTransfer[]>} The transfers for the address.
|
|
222
294
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
295
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
296
|
+
* @throws {ProviderError} If the provider fails to fetch transfers.
|
|
223
297
|
*/
|
|
224
298
|
getTransfers(address: string, options?: SdaTransfersOptions): Promise<SdaTransfer[]>;
|
|
225
299
|
/**
|
|
@@ -231,6 +305,8 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
231
305
|
* @param {SdaTransfersOptions} [options] - Optional pagination/filtering.
|
|
232
306
|
* @returns {Promise<SdaTransfer[]>} The transfers routed to the recipient.
|
|
233
307
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
308
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
309
|
+
* @throws {ProviderError} If the provider fails to fetch transfers.
|
|
234
310
|
*/
|
|
235
311
|
getTransfersByRecipient(destinationChain: Blockchain, recipient: string, options?: SdaTransfersOptions): Promise<SdaTransfer[]>;
|
|
236
312
|
/**
|
|
@@ -239,7 +315,10 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
239
315
|
* @param {string} id - The transfer identifier.
|
|
240
316
|
* @returns {Promise<SdaTransfer>} The transfer's current status.
|
|
241
317
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
242
|
-
* @throws {
|
|
318
|
+
* @throws {ValueError} If the id is not valid.
|
|
319
|
+
* @throws {NoSuchElementError} If no transfer exists for the given id.
|
|
320
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
321
|
+
* @throws {ProviderError} If the provider fails to fetch the transfer.
|
|
243
322
|
*/
|
|
244
323
|
getTransfer(id: string): Promise<SdaTransfer>;
|
|
245
324
|
/**
|
|
@@ -248,6 +327,12 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
248
327
|
* @param {SdaRecoveryOptions} options - The recovery options.
|
|
249
328
|
* @returns {Promise<SdaRecoveryResult>} The recovery outcome.
|
|
250
329
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
330
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to recover a deposit address.
|
|
331
|
+
* @throws {ValueError} If the id is not valid.
|
|
332
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id or address.
|
|
333
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
334
|
+
* @throws {ProviderError} If the provider fails to recover the deposit address.
|
|
335
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
251
336
|
*/
|
|
252
337
|
recoverDepositAddress(options: SdaRecoveryOptions): Promise<SdaRecoveryResult>;
|
|
253
338
|
/**
|
|
@@ -257,13 +342,25 @@ export default abstract class SdaProtocol implements ISdaProtocol {
|
|
|
257
342
|
* context the protocol needs).
|
|
258
343
|
* @returns {Promise<void>} Resolves once the address has been disabled.
|
|
259
344
|
* @throws {UnsupportedOperationError} If the protocol does not support this operation.
|
|
345
|
+
* @throws {AccountRequiredError} If the protocol requires a full account to disable a deposit address.
|
|
346
|
+
* @throws {ValueError} If the id is not valid.
|
|
347
|
+
* @throws {NoSuchElementError} If no deposit address exists for the given id.
|
|
348
|
+
* @throws {ProviderRequiredError} If the method requires a provider.
|
|
349
|
+
* @throws {ProviderError} If the provider fails to disable the deposit address.
|
|
350
|
+
* @throws {SdaError} If the operation fails with an error.
|
|
260
351
|
*/
|
|
261
352
|
disableDepositAddress(id: string): Promise<void>;
|
|
262
353
|
}
|
|
263
354
|
export type IWalletAccountReadOnly = import("../wallet-account-read-only.js").IWalletAccountReadOnly;
|
|
264
355
|
export type IWalletAccount = import("../wallet-account.js").IWalletAccount;
|
|
265
|
-
export type
|
|
266
|
-
export type
|
|
356
|
+
export type AccountRequiredError = import("./errors.js").AccountRequiredError;
|
|
357
|
+
export type InvalidTokenError = import("./errors.js").InvalidTokenError;
|
|
358
|
+
export type NoSuchElementError = import("./errors.js").NoSuchElementError;
|
|
359
|
+
export type ReadOnlyAccountRequiredError = import("./errors.js").ReadOnlyAccountRequiredError;
|
|
360
|
+
export type ProviderError = import("./errors.js").ProviderError;
|
|
361
|
+
export type ProviderRequiredError = import("./errors.js").ProviderRequiredError;
|
|
362
|
+
export type SdaError = import("./errors.js").SdaError;
|
|
363
|
+
export type ValueError = import("./errors.js").ValueError;
|
|
267
364
|
/**
|
|
268
365
|
* A blockchain identifier: a numeric chain id (e.g. `1`) or a protocol-specific chain name (e.g. `'ethereum'`).
|
|
269
366
|
*/
|
|
@@ -387,8 +484,8 @@ export type SdaDepositOptions = {
|
|
|
387
484
|
*/
|
|
388
485
|
destinationChain: Blockchain;
|
|
389
486
|
/**
|
|
390
|
-
* - The protocol identifier of the asset to deliver. Omit for protocols that deliver
|
|
391
|
-
* own equivalent.
|
|
487
|
+
* - The protocol identifier of the asset to deliver. Omit for protocols that deliver
|
|
488
|
+
* each input token as its own equivalent.
|
|
392
489
|
*/
|
|
393
490
|
outputAsset?: string;
|
|
394
491
|
/**
|
|
@@ -488,8 +585,8 @@ export type SdaCreateDepositAddressOptions = {
|
|
|
488
585
|
*/
|
|
489
586
|
destinationChain: Blockchain;
|
|
490
587
|
/**
|
|
491
|
-
* - The protocol identifier of the asset to deliver (e.g., USDT). Omit for protocols
|
|
492
|
-
* token as its own equivalent.
|
|
588
|
+
* - The protocol identifier of the asset to deliver (e.g., USDT). Omit for protocols
|
|
589
|
+
* that deliver each input token as its own equivalent.
|
|
493
590
|
*/
|
|
494
591
|
outputAsset?: string;
|
|
495
592
|
/**
|
|
@@ -524,8 +621,8 @@ export type SdaDepositAddress = {
|
|
|
524
621
|
*/
|
|
525
622
|
destinationChain: Blockchain;
|
|
526
623
|
/**
|
|
527
|
-
* - The asset delivered to the destination. If unset, the address delivers each
|
|
528
|
-
* equivalent on the destination chain.
|
|
624
|
+
* - The asset delivered to the destination. If unset, the address delivers each
|
|
625
|
+
* input token as its own equivalent on the destination chain.
|
|
529
626
|
*/
|
|
530
627
|
outputAsset?: SdaToken;
|
|
531
628
|
/**
|