UNPKG

kucoin-universal-sdk

Version:
84 lines 2.91 kB
"use strict"; // Code generated by Kucoin Universal SDK Generator; DO NOT EDIT. Object.defineProperty(exports, "__esModule", { value: true }); exports.GetDepositAddressV1ReqBuilder = exports.GetDepositAddressV1Req = void 0; const class_transformer_1 = require("class-transformer"); class GetDepositAddressV1Req { /** * Private constructor, please use the corresponding static methods to construct the object. */ constructor() { /** * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ this.chain = 'eth'; } /** * Creates a new instance of the `GetDepositAddressV1Req` class. * The builder pattern allows step-by-step construction of a `GetDepositAddressV1Req` object. */ static builder() { return new GetDepositAddressV1ReqBuilder(new GetDepositAddressV1Req()); } /** * Creates a new instance of the `GetDepositAddressV1Req` class with the given data. */ static create(data) { let obj = new GetDepositAddressV1Req(); obj.currency = data.currency; if (data.chain) { obj.chain = data.chain; } else { obj.chain = 'eth'; } return obj; } /** * Convert the object to a JSON string. */ toJson() { return JSON.stringify((0, class_transformer_1.instanceToPlain)(this)); } /** * Create an object from a JSON string. */ static fromJson(input) { return this.fromObject(JSON.parse(input)); } /** * Create an object from Js Object. */ static fromObject(jsonObject) { return (0, class_transformer_1.plainToClassFromExist)(new GetDepositAddressV1Req(), jsonObject); } } exports.GetDepositAddressV1Req = GetDepositAddressV1Req; class GetDepositAddressV1ReqBuilder { constructor(obj) { this.obj = obj; this.obj = obj; } /** * currency */ setCurrency(value) { this.obj.currency = value; return this; } /** * The chainId of currency, e.g. the available values for USDT are OMNI, ERC20, and TRC20; default is ERC20. The available values for BTC are Native, Segwit, TRC20; the parameters are bech32, btc, trx; default is Native. This only applies to multi-chain currencies; no need for single-chain currencies. */ setChain(value) { this.obj.chain = value; return this; } /** * Get the final object. */ build() { return this.obj; } } exports.GetDepositAddressV1ReqBuilder = GetDepositAddressV1ReqBuilder; //# sourceMappingURL=model_get_deposit_address_v1_req.js.map