PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/@substrate/txwrapper-core/lib/core/decode

Просмотр файла: decodeUnsignedHexTx.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeUnsignedHexTx = void 0;
const util_1 = require("@polkadot/util");
/**
 * This should be used in conjunction with `encodeUnsignedTransaction` as the expected
 * payload will match the `Extrinsic` type we are generating via polkadot-js.
 *
 * @param encodedUnsignedTx Generated by `encodeUnsignedTransaction`
 * @param options Runtime-specific data used for decoding the transaction.
 */
function decodeUnsignedHexTx(encodedUnsignedTx, options) {
    const decodedTx = options.registry.createType('Extrinsic', (0, util_1.hexToU8a)(encodedUnsignedTx));
    return {
        method: decodedTx.method.toJSON(),
        version: decodedTx.version,
    };
}
exports.decodeUnsignedHexTx = decodeUnsignedHexTx;
//# sourceMappingURL=decodeUnsignedHexTx.js.map

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


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