PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@bitgo/sdk-coin-hbar/node_modules/@hashgraph/sdk/lib

Просмотр файла: EthereumTransactionData.cjs

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _Cache = _interopRequireDefault(require("./Cache.cjs"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class EthereumTransactionData {
  /**
   * @protected
   * @param {object} props
   * @param {Uint8Array} props.callData
   */
  constructor(props) {
    this.callData = props.callData;
  }

  /**
   * @param {Uint8Array} bytes
   * @returns {EthereumTransactionData}
   */
  static fromBytes(bytes) {
    if (bytes.length === 0) {
      throw new Error("empty bytes");
    }
    if (bytes[0] != 2) {
      return _Cache.default.ethereumTransactionDataLegacyFromBytes(bytes);
    } else {
      return _Cache.default.ethereumTransactionDataEip1559FromBytes(bytes);
    }
  }

  // eslint-disable-next-line jsdoc/require-returns-check
  /**
   * @returns {Uint8Array}
   */
  toBytes() {
    throw new Error("not implemented");
  }

  // eslint-disable-next-line jsdoc/require-returns-check
  /**
   * @returns {string}
   */
  toString() {
    throw new Error("not implemented");
  }

  // eslint-disable-next-line jsdoc/require-returns-check
  /**
   * @returns {{[key: string]: any}}
   */
  toJSON() {
    throw new Error("not implemented");
  }
}
exports.default = EthereumTransactionData;

Выполнить команду


Для локальной разработки. Не используйте в интернете!