UNPKG

@goplus/sdk-node

Version:
126 lines (117 loc) 4.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ParseAbiDataRequest = void 0; var _ApiClient = require("../ApiClient"); /* * GoPlus Security API Document * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 1.0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 3.0.45 * * Do not edit the class manually. * */ /** * The ParseAbiDataRequest model module. * @module model/ParseAbiDataRequest * @version 1.0 */ class ParseAbiDataRequest { /** * Constructs a new <code>ParseAbiDataRequest</code>. * @alias module:model/ParseAbiDataRequest * @class * @param chain_id {String} Chain id, (ETH: 1, Cronos:25, BSC: 56, Heco: 128, Polygon: 137, Fantom:250, KCC: 321, Arbitrum: 42161, Avalanche: 43114) * @param data {String} Transaction input */ constructor(chain_id, data) { this.chain_id = chain_id; this.data = data; } /** * Constructs a <code>ParseAbiDataRequest</code> from a plain JavaScript object, optionally creating a new instance. * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not. * @param {Object} data The plain JavaScript object bearing properties of interest. * @param {module:model/ParseAbiDataRequest} obj Optional instance to populate. * @return {module:model/ParseAbiDataRequest} The populated <code>ParseAbiDataRequest</code> instance. */ static constructFromObject(data, obj) { if (data) { obj = obj || new ParseAbiDataRequest(); if (data.hasOwnProperty('chain_id')) obj.chain_id = _ApiClient.ApiClient.convertToType(data['chain_id'], 'String'); if (data.hasOwnProperty('contract_address')) obj.contract_address = _ApiClient.ApiClient.convertToType(data['contract_address'], 'String'); if (data.hasOwnProperty('data')) obj.data = _ApiClient.ApiClient.convertToType(data['data'], 'String'); if (data.hasOwnProperty('input')) obj.input = _ApiClient.ApiClient.convertToType(data['input'], { 'String': Object }); if (data.hasOwnProperty('signer')) obj.signer = _ApiClient.ApiClient.convertToType(data['signer'], 'String'); if (data.hasOwnProperty('transcation_type')) obj.transcation_type = _ApiClient.ApiClient.convertToType(data['transcation_type'], 'String'); } return obj; } } /** * Chain id, (ETH: 1, Cronos:25, BSC: 56, Heco: 128, Polygon: 137, Fantom:250, KCC: 321, Arbitrum: 42161, Avalanche: 43114) * @member {String} chain_id */ exports.ParseAbiDataRequest = ParseAbiDataRequest; ParseAbiDataRequest.prototype.chain_id = undefined; /** * Carrying the signer and contract address will help to decode more information. * @member {String} contract_address */ ParseAbiDataRequest.prototype.contract_address = undefined; /** * Transaction input * @member {String} data */ ParseAbiDataRequest.prototype.data = undefined; /** * input info * @member {Object.<String, Object>} input */ ParseAbiDataRequest.prototype.input = undefined; /** * Carrying the signer and contract address will help to decode more information. * @member {String} signer */ ParseAbiDataRequest.prototype.signer = undefined; /** * Allowed values for the <code>transcation_type</code> property. * @enum {String} * @readonly */ ParseAbiDataRequest.TranscationTypeEnum = { /** * value: "common" * @const */ common: "common", /** * value: "eth_signTypedData_v4" * @const */ eth_signTypedData_v4: "eth_signTypedData_v4", /** * value: "personal_sign" * @const */ personal_sign: "personal_sign", /** * value: "eth_sign" * @const */ eth_sign: "eth_sign" }; /** * Transaction type * @member {module:model/ParseAbiDataRequest.TranscationTypeEnum} transcation_type */ ParseAbiDataRequest.prototype.transcation_type = undefined;