UNPKG

@slide-computer/signer-agent

Version:

Initiate transactions with signers on the Internet Computer

14 lines 723 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.decodeCallRequest = void 0; const agent_1 = require("@dfinity/agent"); const principal_1 = require("@dfinity/principal"); const decodeCallRequest = (contentMap) => { const decoded = agent_1.Cbor.decode(contentMap); const expiry = new agent_1.Expiry(0); // @ts-ignore Expiry class currently has no method to create instance from value expiry._value = BigInt(decoded.ingress_expiry.toString(10)); return Object.assign(Object.assign({}, decoded), { canister_id: principal_1.Principal.from(decoded.canister_id), ingress_expiry: expiry }); }; exports.decodeCallRequest = decodeCallRequest; //# sourceMappingURL=utils.js.map