You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -154,23 +154,24 @@ export class WalletAddress extends Address {
154
154
/**
155
155
* Transfers the given amount of the given Asset to the given address. Only same-Network Transfers are supported.
156
156
*
157
-
* @param amount - The amount of the Asset to send.
158
-
* @param assetId - The ID of the Asset to send. For Ether, Coinbase.assets.Eth, Coinbase.assets.Gwei, and Coinbase.assets.Wei supported.
159
-
* @param destination - The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID.
160
-
* @param intervalSeconds - The interval at which to poll the Network for Transfer status, in seconds.
161
-
* @param timeoutSeconds - The maximum amount of time to wait for the Transfer to complete, in seconds.
157
+
* @param options - The options to create the Transfer.
158
+
* @param options.amount - The amount of the Asset to send.
159
+
* @param options.assetId - The ID of the Asset to send. For Ether, Coinbase.assets.Eth, Coinbase.assets.Gwei, and Coinbase.assets.Wei supported.
160
+
* @param options.destination - The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID.
161
+
* @param options.timeoutSeconds - The maximum amount of time to wait for the Transfer to complete, in seconds.
162
+
* @param options.intervalSeconds - The interval at which to poll the Network for Transfer status, in seconds.
162
163
* @returns The transfer object.
163
164
* @throws {APIError} if the API request to create a Transfer fails.
164
165
* @throws {APIError} if the API request to broadcast a Transfer fails.
165
166
* @throws {Error} if the Transfer times out.
166
167
*/
167
-
publicasynccreateTransfer(
168
-
amount: Amount,
169
-
assetId: string,
170
-
destination: Destination,
171
-
intervalSeconds=0.2,
168
+
publicasynccreateTransfer({
169
+
amount,
170
+
assetId,
171
+
destination,
172
172
timeoutSeconds =10,
173
-
): Promise<Transfer>{
173
+
intervalSeconds =0.2,
174
+
}: CreateTransferOptions): Promise<Transfer>{
174
175
if(!Coinbase.useServerSigner&&!this.key){
175
176
thrownewInternalError("Cannot transfer from address without private key loaded");
* Transfers the given amount of the given Asset to the given address. Only same-Network Transfers are supported.
583
583
* Currently only the default_address is used to source the Transfer.
584
584
*
585
-
* @param amount - The amount of the Asset to send.
586
-
* @param assetId - The ID of the Asset to send.
587
-
* @param destination - The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID.
588
-
* @param intervalSeconds - The interval at which to poll the Network for Transfer status, in seconds.
589
-
* @param timeoutSeconds - The maximum amount of time to wait for the Transfer to complete, in seconds.
585
+
* @param options - The options to create the Transfer.
586
+
* @param options.amount - The amount of the Asset to send.
587
+
* @param options.assetId - The ID of the Asset to send.
588
+
* @param options.destination - The destination of the transfer. If a Wallet, sends to the Wallet's default address. If a String, interprets it as the address ID.
589
+
* @param options.timeoutSeconds - The maximum amount of time to wait for the Transfer to complete, in seconds.
590
+
* @param options.intervalSeconds - The interval at which to poll the Network for Transfer status, in seconds.
590
591
* @returns The hash of the Transfer transaction.
591
592
* @throws {APIError} if the API request to create a Transfer fails.
592
593
* @throws {APIError} if the API request to broadcast a Transfer fails.
593
594
* @throws {Error} if the Transfer times out.
594
595
*/
595
-
publicasynccreateTransfer(
596
-
amount: Amount,
597
-
assetId: string,
598
-
destination: Destination,
599
-
intervalSeconds=0.2,
596
+
publicasynccreateTransfer({
597
+
amount,
598
+
assetId,
599
+
destination,
600
600
timeoutSeconds =10,
601
-
): Promise<Transfer>{
601
+
intervalSeconds =0.2,
602
+
}: CreateTransferOptions): Promise<Transfer>{
602
603
if(!this.getDefaultAddress()){
603
604
thrownewInternalError("Default address not found");
0 commit comments