depositAddress method
Fetch deposit address with network.
Implementation
Future<Either<String, DepositAddress>> depositAddress({
required String coin,
String? network,
int? recvWindow,
}) {
Map<String, String> params = {
'coin': coin,
};
if (network != null) params['network'] = network;
if (recvWindow != null) params['recvWindow'] = recvWindow.toString();
return sendRequest(
path: 'sapi/v1/capital/deposit/address',
type: RequestType.GET,
params: params,
keyRequired: true,
signatureRequired: true,
timestampRequired: true,
).then((r) =>
r.isLeft ? Left(r.left) : Right(DepositAddress.fromMap(r.right)));
}