MCPcopy Create free account
hub / github.com/ccxt/ccxt / parseDepositAddress

Method parseDepositAddress

ts/src/htx.ts:6423–6448  ·  view source on GitHub ↗
(depositAddress, currency: Currency = undefined)

Source from the content-addressed store, hash-verified

6421 }
6422
6423 parseDepositAddress (depositAddress, currency: Currency = undefined) {
6424 //
6425 // {
6426 // "currency": "usdt",
6427 // "address": "0xf7292eb9ba7bc50358e27f0e025a4d225a64127b",
6428 // "addressTag": "",
6429 // "chain": "usdterc20", // trc20usdt, hrc20usdt, usdt, algousdt
6430 // }
6431 //
6432 const address = this.safeString (depositAddress, 'address');
6433 const tag = this.safeString (depositAddress, 'addressTag');
6434 const currencyId = this.safeString (depositAddress, 'currency');
6435 currency = this.safeCurrency (currencyId, currency);
6436 const code = this.safeCurrencyCode (currencyId, currency);
6437 const note = this.safeString (depositAddress, 'note');
6438 const networkId = this.safeString (depositAddress, 'chain');
6439 this.checkAddress (address);
6440 return {
6441 'currency': code,
6442 'address': address,
6443 'tag': tag,
6444 'network': this.networkIdToCode (networkId, code),
6445 'note': note,
6446 'info': depositAddress,
6447 };
6448 }
6449
6450 /**
6451 * @method

Callers

nothing calls this directly

Calls 5

networkIdToCodeMethod · 0.95
safeStringMethod · 0.45
safeCurrencyMethod · 0.45
safeCurrencyCodeMethod · 0.45
checkAddressMethod · 0.45

Tested by

no test coverage detected