UNPKG

postchain-client

Version:

Client library for accessing a Postchain node through REST.

16 lines 742 B
import { decodeTransactionToGtx } from "../../src/utils/decodeTransactionToGtx"; import { encodeTransaction } from "../../src/utils/encodeTransaction"; describe("decodeTransactionToGtx", () => { it("should not fail if gtx has Bigint value", () => { const gtxData = { blockchainRid: Buffer.from("test", "hex"), // @ts-expect-error Bigint support operations: [{ opName: "operation", args: [42529585n] }], signers: [], }; const serializedGtx = encodeTransaction(gtxData); const decodedGtx = decodeTransactionToGtx(Buffer.from(serializedGtx)); expect(gtxData).toMatchObject(decodedGtx); }); }); //# sourceMappingURL=decodeTransactionToGtx.test.js.map