UNPKG

fuels

Version:

Fuel TS SDK

2,155 lines • 1.01 MB
var ww = Object.defineProperty; var Ju = (r) => { throw TypeError(r); }; var mw = (r, t, e) => t in r ? ww(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e; var Q = (r, t, e) => mw(r, typeof t != "symbol" ? t + "" : t, e), mc = (r, t, e) => t.has(r) || Ju("Cannot " + e); var ht = (r, t, e) => (mc(r, t, "read from private field"), e ? e.call(r) : t.get(r)), Ce = (r, t, e) => t.has(r) ? Ju("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), Gt = (r, t, e, n) => (mc(r, t, "write to private field"), n ? n.call(r, e) : t.set(r, e), e), un = (r, t, e) => (mc(r, t, "access private method"), e); function yw(r, t) { for (var e = 0; e < t.length; e++) { const n = t[e]; if (typeof n != "string" && !Array.isArray(n)) { for (const s in n) if (s !== "default" && !(s in r)) { const i = Object.getOwnPropertyDescriptor(n, s); i && Object.defineProperty(r, s, i.get ? i : { enumerable: !0, get: () => n[s] }); } } } return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" })); } let c; const pp = typeof TextDecoder < "u" ? new TextDecoder("utf-8", { ignoreBOM: !0, fatal: !0 }) : { decode: () => { throw Error("TextDecoder not available"); } }; typeof TextDecoder < "u" && pp.decode(); let Vi = null; function _p() { return (Vi === null || Vi.byteLength === 0) && (Vi = new Uint8Array(c.memory.buffer)), Vi; } function bw(r, t) { return r = r >>> 0, pp.decode(_p().subarray(r, r + t)); } function w(r, t) { if (!(r instanceof t)) throw new Error(`expected instance of ${t.name}`); } function Iw(r, t) { const e = c.gm_args(r, t); return V.__wrap(e); } function Cw(r, t, e) { const n = c.gtf_args(r, t, e); return V.__wrap(n); } function Ew(r, t, e, n) { w(n, sn); var s = n.__destroy_into_raw(); const i = c.wdcm_args(r, t, e, s); return V.__wrap(i); } function Bw(r, t, e, n) { w(n, sn); var s = n.__destroy_into_raw(); const i = c.wqcm_args(r, t, e, s); return V.__wrap(i); } function vw(r, t, e, n) { w(n, ha); var s = n.__destroy_into_raw(); const i = c.wdop_args(r, t, e, s); return V.__wrap(i); } function xw(r, t, e, n) { w(n, ha); var s = n.__destroy_into_raw(); const i = c.wqop_args(r, t, e, s); return V.__wrap(i); } function Rw(r, t, e, n) { w(n, Aa); var s = n.__destroy_into_raw(); const i = c.wdml_args(r, t, e, s); return V.__wrap(i); } function Sw(r, t, e, n) { w(n, Aa); var s = n.__destroy_into_raw(); const i = c.wqml_args(r, t, e, s); return V.__wrap(i); } function Tw(r, t, e, n) { w(n, la); var s = n.__destroy_into_raw(); const i = c.wddv_args(r, t, e, s); return V.__wrap(i); } function Nw(r, t, e, n) { w(n, la); var s = n.__destroy_into_raw(); const i = c.wqdv_args(r, t, e, s); return V.__wrap(i); } function Dw(r, t, e) { const n = c.add(r, t, e); return V.__wrap(n); } function Fw(r, t, e) { const n = c.and(r, t, e); return V.__wrap(n); } function Qw(r, t, e) { const n = c.div(r, t, e); return V.__wrap(n); } function Ow(r, t, e) { const n = c.eq(r, t, e); return V.__wrap(n); } function Mw(r, t, e) { const n = c.exp(r, t, e); return V.__wrap(n); } function Pw(r, t, e) { const n = c.gt(r, t, e); return V.__wrap(n); } function Lw(r, t, e) { const n = c.lt(r, t, e); return V.__wrap(n); } function kw(r, t, e) { const n = c.mlog(r, t, e); return V.__wrap(n); } function Uw(r, t, e) { const n = c.mroo(r, t, e); return V.__wrap(n); } function Gw(r, t, e) { const n = c.mod_(r, t, e); return V.__wrap(n); } function gn(r, t) { const e = c.move_(r, t); return V.__wrap(e); } function zw(r, t, e) { const n = c.mul(r, t, e); return V.__wrap(n); } function Xw(r, t) { const e = c.not(r, t); return V.__wrap(e); } function Hw(r, t, e) { const n = c.or(r, t, e); return V.__wrap(n); } function Vw(r, t, e) { const n = c.sll(r, t, e); return V.__wrap(n); } function Ww(r, t, e) { const n = c.srl(r, t, e); return V.__wrap(n); } function Va(r, t, e) { const n = c.sub(r, t, e); return V.__wrap(n); } function Yw(r, t, e) { const n = c.xor(r, t, e); return V.__wrap(n); } function jw(r, t, e, n) { const s = c.mldv(r, t, e, n); return V.__wrap(s); } function Fd(r) { const t = c.ret(r); return V.__wrap(t); } function Zw(r, t) { const e = c.retd(r, t); return V.__wrap(e); } function Jw(r) { const t = c.aloc(r); return V.__wrap(t); } function qw(r, t) { const e = c.mcl(r, t); return V.__wrap(e); } function $w(r, t, e) { const n = c.mcp(r, t, e); return V.__wrap(n); } function Kw(r, t, e, n) { const s = c.meq(r, t, e, n); return V.__wrap(s); } function t0(r, t) { const e = c.bhsh(r, t); return V.__wrap(e); } function e0(r) { const t = c.bhei(r); return V.__wrap(t); } function r0(r, t) { const e = c.burn(r, t); return V.__wrap(e); } function Zc(r, t, e, n) { const s = c.call(r, t, e, n); return V.__wrap(s); } function n0(r, t, e, n) { const s = c.ccp(r, t, e, n); return V.__wrap(s); } function s0(r, t) { const e = c.croo(r, t); return V.__wrap(e); } function i0(r, t) { const e = c.csiz(r, t); return V.__wrap(e); } function a0(r) { const t = c.cb(r); return V.__wrap(t); } function Ji(r, t, e, n) { const s = c.ldc(r, t, e, n); return V.__wrap(s); } function o0(r, t, e, n) { const s = c.log(r, t, e, n); return V.__wrap(s); } function c0(r, t, e, n) { const s = c.logd(r, t, e, n); return V.__wrap(s); } function d0(r, t) { const e = c.mint(r, t); return V.__wrap(e); } function u0(r) { const t = c.rvrt(r); return V.__wrap(t); } function l0(r, t, e) { const n = c.scwq(r, t, e); return V.__wrap(n); } function h0(r, t, e) { const n = c.srw(r, t, e); return V.__wrap(n); } function A0(r, t, e, n) { const s = c.srwq(r, t, e, n); return V.__wrap(s); } function p0(r, t, e) { const n = c.sww(r, t, e); return V.__wrap(n); } function _0(r, t, e, n) { const s = c.swwq(r, t, e, n); return V.__wrap(s); } function fp(r, t, e) { const n = c.tr(r, t, e); return V.__wrap(n); } function f0(r, t, e, n) { const s = c.tro(r, t, e, n); return V.__wrap(s); } function g0(r, t, e) { const n = c.eck1(r, t, e); return V.__wrap(n); } function w0(r, t, e) { const n = c.ecr1(r, t, e); return V.__wrap(n); } function m0(r, t, e, n) { const s = c.ed19(r, t, e, n); return V.__wrap(s); } function y0(r, t, e) { const n = c.k256(r, t, e); return V.__wrap(n); } function b0(r, t, e) { const n = c.s256(r, t, e); return V.__wrap(n); } function I0(r, t) { const e = c.time(r, t); return V.__wrap(e); } function C0() { const r = c.noop(); return V.__wrap(r); } function E0(r) { const t = c.flag(r); return V.__wrap(t); } function B0(r, t, e) { const n = c.bal(r, t, e); return V.__wrap(n); } function Wa(r) { const t = c.jmp(r); return V.__wrap(t); } function v0(r, t, e) { const n = c.jne(r, t, e); return V.__wrap(n); } function x0(r, t, e, n) { const s = c.smo(r, t, e, n); return V.__wrap(s); } function Cr(r, t, e) { const n = c.addi(r, t, e); return V.__wrap(n); } function R0(r, t, e) { const n = c.andi(r, t, e); return V.__wrap(n); } function Ya(r, t, e) { const n = c.divi(r, t, e); return V.__wrap(n); } function S0(r, t, e) { const n = c.expi(r, t, e); return V.__wrap(n); } function T0(r, t, e) { const n = c.modi(r, t, e); return V.__wrap(n); } function N0(r, t, e) { const n = c.muli(r, t, e); return V.__wrap(n); } function D0(r, t, e) { const n = c.ori(r, t, e); return V.__wrap(n); } function F0(r, t, e) { const n = c.slli(r, t, e); return V.__wrap(n); } function Q0(r, t, e) { const n = c.srli(r, t, e); return V.__wrap(n); } function gp(r, t, e) { const n = c.subi(r, t, e); return V.__wrap(n); } function O0(r, t, e) { const n = c.xori(r, t, e); return V.__wrap(n); } function M0(r, t, e) { const n = c.jnei(r, t, e); return V.__wrap(n); } function P0(r, t, e) { const n = c.lb(r, t, e); return V.__wrap(n); } function ta(r, t, e) { const n = c.lw(r, t, e); return V.__wrap(n); } function L0(r, t, e) { const n = c.sb(r, t, e); return V.__wrap(n); } function k0(r, t, e) { const n = c.sw(r, t, e); return V.__wrap(n); } function U0(r, t, e) { const n = c.mcpi(r, t, e); return V.__wrap(n); } function wp(r, t, e) { const n = c.gtf(r, t, e); return V.__wrap(n); } function G0(r, t) { const e = c.mcli(r, t); return V.__wrap(e); } function z0(r, t) { const e = c.gm(r, t); return V.__wrap(e); } function rs(r, t) { const e = c.movi(r, t); return V.__wrap(e); } function X0(r, t) { const e = c.jnzi(r, t); return V.__wrap(e); } function H0(r, t) { const e = c.jmpf(r, t); return V.__wrap(e); } function V0(r, t) { const e = c.jmpb(r, t); return V.__wrap(e); } function W0(r, t, e) { const n = c.jnzf(r, t, e); return V.__wrap(n); } function mp(r, t, e) { const n = c.jnzb(r, t, e); return V.__wrap(n); } function Y0(r, t, e, n) { const s = c.jnef(r, t, e, n); return V.__wrap(s); } function j0(r, t, e, n) { const s = c.jneb(r, t, e, n); return V.__wrap(s); } function Z0(r) { const t = c.ji(r); return V.__wrap(t); } function J0(r) { const t = c.cfei(r); return V.__wrap(t); } function q0(r) { const t = c.cfsi(r); return V.__wrap(t); } function $0(r) { const t = c.cfe(r); return V.__wrap(t); } function K0(r) { const t = c.cfs(r); return V.__wrap(t); } function tm(r) { const t = c.pshl(r); return V.__wrap(t); } function em(r) { const t = c.pshh(r); return V.__wrap(t); } function rm(r) { const t = c.popl(r); return V.__wrap(t); } function nm(r) { const t = c.poph(r); return V.__wrap(t); } function sm(r, t, e, n) { const s = c.wdcm(r, t, e, n); return V.__wrap(s); } function im(r, t, e, n) { const s = c.wqcm(r, t, e, n); return V.__wrap(s); } function am(r, t, e, n) { const s = c.wdop(r, t, e, n); return V.__wrap(s); } function om(r, t, e, n) { const s = c.wqop(r, t, e, n); return V.__wrap(s); } function cm(r, t, e, n) { const s = c.wdml(r, t, e, n); return V.__wrap(s); } function dm(r, t, e, n) { const s = c.wqml(r, t, e, n); return V.__wrap(s); } function um(r, t, e, n) { const s = c.wddv(r, t, e, n); return V.__wrap(s); } function lm(r, t, e, n) { const s = c.wqdv(r, t, e, n); return V.__wrap(s); } function hm(r, t, e, n) { const s = c.wdmd(r, t, e, n); return V.__wrap(s); } function Am(r, t, e, n) { const s = c.wqmd(r, t, e, n); return V.__wrap(s); } function pm(r, t, e, n) { const s = c.wdam(r, t, e, n); return V.__wrap(s); } function _m(r, t, e, n) { const s = c.wqam(r, t, e, n); return V.__wrap(s); } function fm(r, t, e, n) { const s = c.wdmm(r, t, e, n); return V.__wrap(s); } function gm(r, t, e, n) { const s = c.wqmm(r, t, e, n); return V.__wrap(s); } function wm(r, t, e, n) { const s = c.ecal(r, t, e, n); return V.__wrap(s); } function ja(r, t) { const e = c.bsiz(r, t); return V.__wrap(e); } function mm(r, t, e, n) { const s = c.bldd(r, t, e, n); return V.__wrap(s); } function ym(r, t, e, n) { const s = c.ecop(r, t, e, n); return V.__wrap(s); } function bm(r, t, e, n) { const s = c.epar(r, t, e, n); return V.__wrap(s); } let hn = null; function qu() { return (hn === null || hn.buffer.detached === !0 || hn.buffer.detached === void 0 && hn.buffer !== c.memory.buffer) && (hn = new DataView(c.memory.buffer)), hn; } function Im(r, t) { return r = r >>> 0, _p().subarray(r / 1, r / 1 + t); } const Cm = Object.freeze({ /** * Equality (`==`) */ EQ: 0, 0: "EQ", /** * Inequality (`!=`) */ NE: 1, 1: "NE", /** * Less than (`<`) */ LT: 2, 2: "LT", /** * Greater than (`>`) */ GT: 3, 3: "GT", /** * Less than or equals (`>=`) */ LTE: 4, 4: "LTE", /** * Greater than or equals (`>=`) */ GTE: 5, 5: "GTE", /** * Number of leading zeroes in lhs (`lzcnt`) (discards rhs) */ LZC: 6, 6: "LZC" }), Em = Object.freeze({ /** * r" Get if caller is external. */ IsCallerExternal: 1, 1: "IsCallerExternal", /** * r" Get caller's contract ID. */ GetCaller: 2, 2: "GetCaller", /** * r" Get index of current predicate. */ GetVerifyingPredicate: 3, 3: "GetVerifyingPredicate", /** * r" Get the Chain ID this VM is operating within */ GetChainId: 4, 4: "GetChainId", /** * r" Get memory address where the transaction is located */ TxStart: 5, 5: "TxStart", /** * r" Get memory address of base asset ID */ BaseAssetId: 6, 6: "BaseAssetId", /** * r" Get gas price for block */ GetGasPrice: 7, 7: "GetGasPrice" }), yp = Object.freeze({ /** * r" Set `$rA` to `tx.type` */ Type: 1, 1: "Type", /** * r" Set `$rA` to `tx.scriptGasLimit` */ ScriptGasLimit: 2, 2: "ScriptGasLimit", /** * r" Set `$rA` to `tx.scriptLength` */ ScriptLength: 3, 3: "ScriptLength", /** * r" Set `$rA` to `tx.scriptDataLength` */ ScriptDataLength: 4, 4: "ScriptDataLength", /** * r" Set `$rA` to `tx.inputsCount` */ ScriptInputsCount: 5, 5: "ScriptInputsCount", /** * r" Set `$rA` to `tx.outputsCount` */ ScriptOutputsCount: 6, 6: "ScriptOutputsCount", /** * r" Set `$rA` to `tx.witnessesCount` */ ScriptWitnessesCount: 7, 7: "ScriptWitnessesCount", /** * r" Set `$rA` to `Memory address of tx.script` */ Script: 9, 9: "Script", /** * r" Set `$rA` to `Memory address of tx.scriptData` */ ScriptData: 10, 10: "ScriptData", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB]` */ ScriptInputAtIndex: 11, 11: "ScriptInputAtIndex", /** * r" Set `$rA` to `Memory address of t.outputs[$rB]` */ ScriptOutputAtIndex: 12, 12: "ScriptOutputAtIndex", /** * r" Set `$rA` to `Memory address of tx.witnesses[$rB]` */ ScriptWitnessAtIndex: 13, 13: "ScriptWitnessAtIndex", /** * r" Set `$rA` to size of the transaction in memory, in bytes */ TxLength: 14, 14: "TxLength", /** * r" Set `$rA` to `tx.bytecodeWitnessIndex` */ CreateBytecodeWitnessIndex: 257, 257: "CreateBytecodeWitnessIndex", /** * r" Set `$rA` to `tx.storageSlotsCount` */ CreateStorageSlotsCount: 258, 258: "CreateStorageSlotsCount", /** * r" Set `$rA` to `tx.inputsCount` */ CreateInputsCount: 259, 259: "CreateInputsCount", /** * r" Set `$rA` to `tx.outputsCount` */ CreateOutputsCount: 260, 260: "CreateOutputsCount", /** * r" Set `$rA` to `tx.witnessesCount` */ CreateWitnessesCount: 261, 261: "CreateWitnessesCount", /** * r" Set `$rA` to `Memory address of tx.salt` */ CreateSalt: 262, 262: "CreateSalt", /** * r" Set `$rA` to `Memory address of tx.storageSlots[$rB]` */ CreateStorageSlotAtIndex: 263, 263: "CreateStorageSlotAtIndex", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB]` */ CreateInputAtIndex: 264, 264: "CreateInputAtIndex", /** * r" Set `$rA` to `Memory address of t.outputs[$rB]` */ CreateOutputAtIndex: 265, 265: "CreateOutputAtIndex", /** * r" Set `$rA` to `Memory address of tx.witnesses[$rB]` */ CreateWitnessAtIndex: 266, 266: "CreateWitnessAtIndex", /** * r" Set `$rA` to `tx.inputs[$rB].type` */ InputType: 512, 512: "InputType", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].txID` */ InputCoinTxId: 513, 513: "InputCoinTxId", /** * r" Set `$rA` to `tx.inputs[$rB].outputIndex` */ InputCoinOutputIndex: 514, 514: "InputCoinOutputIndex", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].owner` */ InputCoinOwner: 515, 515: "InputCoinOwner", /** * r" Set `$rA` to `tx.inputs[$rB].amount` */ InputCoinAmount: 516, 516: "InputCoinAmount", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].asset_id` */ InputCoinAssetId: 517, 517: "InputCoinAssetId", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].txPointer` */ InputCoinTxPointer: 518, 518: "InputCoinTxPointer", /** * r" Set `$rA` to `tx.inputs[$rB].witnessIndex` */ InputCoinWitnessIndex: 519, 519: "InputCoinWitnessIndex", /** * r" Set `$rA` to `tx.inputs[$rB].predicateLength` */ InputCoinPredicateLength: 521, 521: "InputCoinPredicateLength", /** * r" Set `$rA` to `tx.inputs[$rB].predicateDataLength` */ InputCoinPredicateDataLength: 522, 522: "InputCoinPredicateDataLength", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].predicate` */ InputCoinPredicate: 523, 523: "InputCoinPredicate", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].predicateData` */ InputCoinPredicateData: 524, 524: "InputCoinPredicateData", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].predicateGasUsed` */ InputCoinPredicateGasUsed: 525, 525: "InputCoinPredicateGasUsed", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].txID` */ InputContractTxId: 544, 544: "InputContractTxId", /** * r" Set `$rA` to `tx.inputs[$rB].outputIndex` */ InputContractOutputIndex: 545, 545: "InputContractOutputIndex", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].contractID` */ InputContractId: 549, 549: "InputContractId", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].sender` */ InputMessageSender: 576, 576: "InputMessageSender", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].recipient` */ InputMessageRecipient: 577, 577: "InputMessageRecipient", /** * r" Set `$rA` to `tx.inputs[$rB].amount` */ InputMessageAmount: 578, 578: "InputMessageAmount", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].nonce` */ InputMessageNonce: 579, 579: "InputMessageNonce", /** * r" Set `$rA` to `tx.inputs[$rB].witnessIndex` */ InputMessageWitnessIndex: 580, 580: "InputMessageWitnessIndex", /** * r" Set `$rA` to `tx.inputs[$rB].dataLength` */ InputMessageDataLength: 581, 581: "InputMessageDataLength", /** * r" Set `$rA` to `tx.inputs[$rB].predicateLength` */ InputMessagePredicateLength: 582, 582: "InputMessagePredicateLength", /** * r" Set `$rA` to `tx.inputs[$rB].predicateDataLength` */ InputMessagePredicateDataLength: 583, 583: "InputMessagePredicateDataLength", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].data` */ InputMessageData: 584, 584: "InputMessageData", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].predicate` */ InputMessagePredicate: 585, 585: "InputMessagePredicate", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].predicateData` */ InputMessagePredicateData: 586, 586: "InputMessagePredicateData", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB].predicateGasUsed` */ InputMessagePredicateGasUsed: 587, 587: "InputMessagePredicateGasUsed", /** * r" Set `$rA` to `tx.outputs[$rB].type` */ OutputType: 768, 768: "OutputType", /** * r" Set `$rA` to `Memory address of tx.outputs[$rB].to` */ OutputCoinTo: 769, 769: "OutputCoinTo", /** * r" Set `$rA` to `tx.outputs[$rB].amount` */ OutputCoinAmount: 770, 770: "OutputCoinAmount", /** * r" Set `$rA` to `Memory address of tx.outputs[$rB].asset_id` */ OutputCoinAssetId: 771, 771: "OutputCoinAssetId", /** * r" Set `$rA` to `tx.outputs[$rB].inputIndex` */ OutputContractInputIndex: 772, 772: "OutputContractInputIndex", /** * r" Set `$rA` to `Memory address of tx.outputs[$rB].contractID` */ OutputContractCreatedContractId: 775, 775: "OutputContractCreatedContractId", /** * r" Set `$rA` to `Memory address of tx.outputs[$rB].stateRoot` */ OutputContractCreatedStateRoot: 776, 776: "OutputContractCreatedStateRoot", /** * r" Set `$rA` to `tx.witnesses[$rB].dataLength` */ WitnessDataLength: 1024, 1024: "WitnessDataLength", /** * r" Set `$rA` to `Memory address of tx.witnesses[$rB].data` */ WitnessData: 1025, 1025: "WitnessData", /** * r" Set `$rA` to `tx.policyTypes` */ PolicyTypes: 1280, 1280: "PolicyTypes", /** * r" Set `$rA` to `tx.policies[0x00].gasPrice` */ PolicyTip: 1281, 1281: "PolicyTip", /** * r" Set `$rA` to `tx.policies[count_ones(0b11 & tx.policyTypes) - 1].witnessLimit` */ PolicyWitnessLimit: 1282, 1282: "PolicyWitnessLimit", /** * r" Set `$rA` to `tx.policies[count_ones(0b111 & tx.policyTypes) - 1].maturity` */ PolicyMaturity: 1283, 1283: "PolicyMaturity", /** * r" Set `$rA` to `tx.policies[count_ones(0b1111 & tx.policyTypes) - 1].maxFee` */ PolicyMaxFee: 1284, 1284: "PolicyMaxFee", /** * r" Set `$rA` to `tx.policies[count_ones(0b11111 & tx.policyTypes) - 1].expiration` */ PolicyExpiration: 1285, 1285: "PolicyExpiration", /** * r" Set `$rA` to `Memory address of tx.root` */ UploadRoot: 1536, 1536: "UploadRoot", /** * r" Set `$rA` to `tx.witnessIndex` */ UploadWitnessIndex: 1537, 1537: "UploadWitnessIndex", /** * r" Set `$rA` to `tx.subsectionIndex` */ UploadSubsectionIndex: 1538, 1538: "UploadSubsectionIndex", /** * r" Set `$rA` to `tx.subsectionsNumber` */ UploadSubsectionsCount: 1539, 1539: "UploadSubsectionsCount", /** * r" Set `$rA` to `tx.proofSetCount` */ UploadProofSetCount: 1540, 1540: "UploadProofSetCount", /** * r" Set `$rA` to `Memory address of tx.proofSet[$rB]` */ UploadProofSetAtIndex: 1541, 1541: "UploadProofSetAtIndex", /** * r" Set `$rA` to `Memory address of tx.id` */ BlobId: 1792, 1792: "BlobId", /** * r" Set `$rA` to `tx.witnessIndex` */ BlobWitnessIndex: 1793, 1793: "BlobWitnessIndex", /** * r" Set `$rA` to `Memory address of tx.purpose` */ UpgradePurpose: 2048, 2048: "UpgradePurpose", /** * r" Set `$rA` to `tx.inputsCount` */ TxInputsCount: 2304, 2304: "TxInputsCount", /** * r" Set `$rA` to `tx.outputsCount` */ TxOutputsCount: 2305, 2305: "TxOutputsCount", /** * r" Set `$rA` to `tx.witnessesCount` */ TxWitnessesCount: 2306, 2306: "TxWitnessesCount", /** * r" Set `$rA` to `Memory address of tx.inputs[$rB]` */ TxInputAtIndex: 2307, 2307: "TxInputAtIndex", /** * r" Set `$rA` to `Memory address of t.outputs[$rB]` */ TxOutputAtIndex: 2308, 2308: "TxOutputAtIndex", /** * r" Set `$rA` to `Memory address of tx.witnesses[$rB]` */ TxWitnessAtIndex: 2309, 2309: "TxWitnessAtIndex" }), Bm = Object.freeze({ /** * Add */ ADD: 0, 0: "ADD", /** * Subtract */ SUB: 1, 1: "SUB", /** * Invert bits (discards rhs) */ NOT: 2, 2: "NOT", /** * Bitwise or */ OR: 3, 3: "OR", /** * Bitwise exclusive or */ XOR: 4, 4: "XOR", /** * Bitwise and */ AND: 5, 5: "AND", /** * Shift left */ SHL: 6, 6: "SHL", /** * Shift right */ SHR: 7, 7: "SHR" }), vm = Object.freeze({ /** * r" The byte can't be mapped to any known `PanicReason`. */ UnknownPanicReason: 0, 0: "UnknownPanicReason", /** * r" Found `RVRT` instruction. */ Revert: 1, 1: "Revert", /** * r" Execution ran out of gas. */ OutOfGas: 2, 2: "OutOfGas", /** * r" The transaction validity is violated. */ TransactionValidity: 3, 3: "TransactionValidity", /** * r" Attempt to write outside interpreter memory boundaries. */ MemoryOverflow: 4, 4: "MemoryOverflow", /** * r" Overflow while executing arithmetic operation. * r" These errors are ignored using the WRAPPING flag. */ ArithmeticOverflow: 5, 5: "ArithmeticOverflow", /** * r" Designed contract was not found in the storage. */ ContractNotFound: 6, 6: "ContractNotFound", /** * r" Memory ownership rules are violated. */ MemoryOwnership: 7, 7: "MemoryOwnership", /** * r" The asset ID balance isn't enough for the instruction. */ NotEnoughBalance: 8, 8: "NotEnoughBalance", /** * r" The interpreter is expected to be in internal context. */ ExpectedInternalContext: 9, 9: "ExpectedInternalContext", /** * r" The queried asset ID was not found in the state. */ AssetIdNotFound: 10, 10: "AssetIdNotFound", /** * r" The provided input is not found in the transaction. */ InputNotFound: 11, 11: "InputNotFound", /** * r" The provided output is not found in the transaction. */ OutputNotFound: 12, 12: "OutputNotFound", /** * r" The provided witness is not found in the transaction. */ WitnessNotFound: 13, 13: "WitnessNotFound", /** * r" The transaction maturity is not valid for this request. */ TransactionMaturity: 14, 14: "TransactionMaturity", /** * r" The metadata identifier is invalid. */ InvalidMetadataIdentifier: 15, 15: "InvalidMetadataIdentifier", /** * r" The call structure is not valid. */ MalformedCallStructure: 16, 16: "MalformedCallStructure", /** * r" The provided register does not allow write operations. */ ReservedRegisterNotWritable: 17, 17: "ReservedRegisterNotWritable", /** * r" The execution resulted in an erroneous state of the interpreter. */ InvalidFlags: 18, 18: "InvalidFlags", /** * r" The provided immediate value is not valid for this instruction. */ InvalidImmediateValue: 19, 19: "InvalidImmediateValue", /** * r" The provided transaction input is not of type `Coin`. */ ExpectedCoinInput: 20, 20: "ExpectedCoinInput", /** * r" `ECAL` instruction failed. */ EcalError: 21, 21: "EcalError", /** * r" Two segments of the interpreter memory should not intersect for write operations. */ MemoryWriteOverlap: 22, 22: "MemoryWriteOverlap", /** * r" The requested contract is not listed in the transaction inputs. */ ContractNotInInputs: 23, 23: "ContractNotInInputs", /** * r" The internal asset ID balance overflowed with the provided instruction. */ InternalBalanceOverflow: 24, 24: "InternalBalanceOverflow", /** * r" The maximum allowed contract size is violated. */ ContractMaxSize: 25, 25: "ContractMaxSize", /** * r" This instruction expects the stack area to be unallocated for this call. */ ExpectedUnallocatedStack: 26, 26: "ExpectedUnallocatedStack", /** * r" The maximum allowed number of static contracts was reached for this transaction. */ MaxStaticContractsReached: 27, 27: "MaxStaticContractsReached", /** * r" The requested transfer amount cannot be zero. */ TransferAmountCannotBeZero: 28, 28: "TransferAmountCannotBeZero", /** * r" The provided transaction output should be of type `Variable`. */ ExpectedOutputVariable: 29, 29: "ExpectedOutputVariable", /** * r" The expected context of the stack parent is internal. */ ExpectedParentInternalContext: 30, 30: "ExpectedParentInternalContext", /** * r" The predicate returned non `1`. The `1` means successful verification * r" of the predicate, all other values means unsuccessful. */ PredicateReturnedNonOne: 31, 31: "PredicateReturnedNonOne", /** * r" The contract ID is already deployed and can't be overwritten. */ ContractIdAlreadyDeployed: 32, 32: "ContractIdAlreadyDeployed", /** * r" The loaded contract mismatch expectations. */ ContractMismatch: 33, 33: "ContractMismatch", /** * r" Attempting to send message data longer than `MAX_MESSAGE_DATA_LENGTH` */ MessageDataTooLong: 34, 34: "MessageDataTooLong", /** * r" Mathematically invalid arguments where given to an arithmetic instruction. * r" For instance, division by zero produces this. * r" These errors are ignored using the UNSAFEMATH flag. */ ArithmeticError: 35, 35: "ArithmeticError", /** * r" The contract instruction is not allowed in predicates. */ ContractInstructionNotAllowed: 36, 36: "ContractInstructionNotAllowed", /** * r" Transfer of zero coins is not allowed. */ TransferZeroCoins: 37, 37: "TransferZeroCoins", /** * r" Attempted to execute an invalid instruction */ InvalidInstruction: 38, 38: "InvalidInstruction", /** * r" Memory outside $is..$ssp range is not executable */ MemoryNotExecutable: 39, 39: "MemoryNotExecutable", /** * r" The policy is not set. */ PolicyIsNotSet: 40, 40: "PolicyIsNotSet", /** * r" The policy is not found across policies. */ PolicyNotFound: 41, 41: "PolicyNotFound", /** * r" Receipt context is full */ TooManyReceipts: 42, 42: "TooManyReceipts", /** * r" Balance of a contract overflowed */ BalanceOverflow: 43, 43: "BalanceOverflow", /** * r" Block height value is invalid, typically because it is too large */ InvalidBlockHeight: 44, 44: "InvalidBlockHeight", /** * r" Attempt to use sequential memory instructions with too large slot count, * r" typically because it cannot fit into usize */ TooManySlots: 45, 45: "TooManySlots", /** * r" Caller of this internal context is also expected to be internal, * r" i.e. $fp->$fp must be non-zero. */ ExpectedNestedCaller: 46, 46: "ExpectedNestedCaller", /** * r" During memory growth, the stack overlapped with the heap */ MemoryGrowthOverlap: 47, 47: "MemoryGrowthOverlap", /** * r" Attempting to read or write uninitialized memory. * r" Also occurs when boundary crosses from stack to heap. */ UninitalizedMemoryAccess: 48, 48: "UninitalizedMemoryAccess", /** * r" Overriding consensus parameters is not allowed. */ OverridingConsensusParameters: 49, 49: "OverridingConsensusParameters", /** * r" The storage doesn't know about the hash of the state transition bytecode. */ UnknownStateTransactionBytecodeRoot: 50, 50: "UnknownStateTransactionBytecodeRoot", /** * r" Overriding the state transition bytecode is not allowed. */ OverridingStateTransactionBytecode: 51, 51: "OverridingStateTransactionBytecode", /** * r" The bytecode is already uploaded and cannot be uploaded again. */ BytecodeAlreadyUploaded: 52, 52: "BytecodeAlreadyUploaded", /** * r" The part of the bytecode is not sequentially connected to the previous parts. */ ThePartIsNotSequentiallyConnected: 53, 53: "ThePartIsNotSequentiallyConnected", /** * r" The requested blob is not found. */ BlobNotFound: 54, 54: "BlobNotFound", /** * r" The blob was already */ BlobIdAlreadyUploaded: 55, 55: "BlobIdAlreadyUploaded", /** * r" Active gas costs do not define the cost for this instruction. */ GasCostNotDefined: 56, 56: "GasCostNotDefined", /** * r" The curve id is not supported. */ UnsupportedCurveId: 57, 57: "UnsupportedCurveId", /** * r" The operation type is not supported. */ UnsupportedOperationType: 58, 58: "UnsupportedOperationType", /** * r" Read alt_bn_128 curve point is invalid. */ InvalidEllipticCurvePoint: 59, 59: "InvalidEllipticCurvePoint", /** * r" Given input contract does not exist. */ InputContractDoesNotExist: 60, 60: "InputContractDoesNotExist", /** * r" Storage slot in Create not found */ StorageSlotsNotFound: 61, 61: "StorageSlotsNotFound", /** * r" Proof in Upload not found */ ProofInUploadNotFound: 62, 62: "ProofInUploadNotFound", /** * r" Invalid purpose type in Upgrade */ InvalidUpgradePurposeType: 63, 63: "InvalidUpgradePurposeType", /** * r" Cannot get gas price in predicate */ CanNotGetGasPriceInPredicate: 64, 64: "CanNotGetGasPriceInPredicate" }), $u = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_add_free(r >>> 0, 1)); class xm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, $u.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_add_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} lhs * @param {RegId} rhs */ constructor(t, e, n) { w(t, A); var s = t.__destroy_into_raw(); w(e, A); var i = e.__destroy_into_raw(); w(n, A); var a = n.__destroy_into_raw(); const o = c.add_new_typescript(s, i, a); return this.__wbg_ptr = o >>> 0, $u.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register C. * @returns {RegId} */ rc() { const t = c.add_rc(this.__wbg_ptr); return A.__wrap(t); } } const Ku = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_addi_free(r >>> 0, 1)); class Rm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, Ku.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_addi_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} lhs * @param {Imm12} rhs */ constructor(t, e, n) { w(t, A); var s = t.__destroy_into_raw(); w(e, A); var i = e.__destroy_into_raw(); w(n, pt); var a = n.__destroy_into_raw(); const o = c.addi_new_typescript(s, i, a); return this.__wbg_ptr = o >>> 0, Ku.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the 12-bit immediate value. * @returns {Imm12} */ imm12() { const t = c.addi_imm12(this.__wbg_ptr); return pt.__wrap(t); } } const tl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_aloc_free(r >>> 0, 1)); class Sm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, tl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_aloc_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} bytes */ constructor(t) { w(t, A); var e = t.__destroy_into_raw(); const n = c.aloc_new_typescript(e); return this.__wbg_ptr = n >>> 0, tl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.aloc_ra(this.__wbg_ptr); return A.__wrap(t); } } const el = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_and_free(r >>> 0, 1)); class Tm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, el.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_and_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} lhs * @param {RegId} rhs */ constructor(t, e, n) { w(t, A); var s = t.__destroy_into_raw(); w(e, A); var i = e.__destroy_into_raw(); w(n, A); var a = n.__destroy_into_raw(); const o = c.add_new_typescript(s, i, a); return this.__wbg_ptr = o >>> 0, el.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register C. * @returns {RegId} */ rc() { const t = c.add_rc(this.__wbg_ptr); return A.__wrap(t); } } const rl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_andi_free(r >>> 0, 1)); class Nm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, rl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_andi_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} lhs * @param {Imm12} rhs */ constructor(t, e, n) { w(t, A); var s = t.__destroy_into_raw(); w(e, A); var i = e.__destroy_into_raw(); w(n, pt); var a = n.__destroy_into_raw(); const o = c.addi_new_typescript(s, i, a); return this.__wbg_ptr = o >>> 0, rl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the 12-bit immediate value. * @returns {Imm12} */ imm12() { const t = c.addi_imm12(this.__wbg_ptr); return pt.__wrap(t); } } const nl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_bal_free(r >>> 0, 1)); class Dm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, nl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_bal_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} asset_id_addr * @param {RegId} contract_id_addr */ constructor(t, e, n) { w(t, A); var s = t.__destroy_into_raw(); w(e, A); var i = e.__destroy_into_raw(); w(n, A); var a = n.__destroy_into_raw(); const o = c.add_new_typescript(s, i, a); return this.__wbg_ptr = o >>> 0, nl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register C. * @returns {RegId} */ rc() { const t = c.add_rc(this.__wbg_ptr); return A.__wrap(t); } } const sl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_bhei_free(r >>> 0, 1)); class Fm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, sl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_bhei_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst */ constructor(t) { w(t, A); var e = t.__destroy_into_raw(); const n = c.aloc_new_typescript(e); return this.__wbg_ptr = n >>> 0, sl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.aloc_ra(this.__wbg_ptr); return A.__wrap(t); } } const il = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_bhsh_free(r >>> 0, 1)); class Qm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, il.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_bhsh_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} heigth */ constructor(t, e) { w(t, A); var n = t.__destroy_into_raw(); w(e, A); var s = e.__destroy_into_raw(); const i = c.bhsh_new_typescript(n, s); return this.__wbg_ptr = i >>> 0, il.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } } const al = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_bldd_free(r >>> 0, 1)); class Om { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, al.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_bldd_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst_ptr * @param {RegId} blob_id_ptr * @param {RegId} offset * @param {RegId} len */ constructor(t, e, n, s) { w(t, A); var i = t.__destroy_into_raw(); w(e, A); var a = e.__destroy_into_raw(); w(n, A); var o = n.__destroy_into_raw(); w(s, A); var d = s.__destroy_into_raw(); const l = c.bldd_new_typescript(i, a, o, d); return this.__wbg_ptr = l >>> 0, al.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register C. * @returns {RegId} */ rc() { const t = c.add_rc(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register D. * @returns {RegId} */ rd() { const t = c.bldd_rd(this.__wbg_ptr); return A.__wrap(t); } } const ol = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_bsiz_free(r >>> 0, 1)); class Mm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, ol.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_bsiz_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst * @param {RegId} blob_id_ptr */ constructor(t, e) { w(t, A); var n = t.__destroy_into_raw(); w(e, A); var s = e.__destroy_into_raw(); const i = c.bhsh_new_typescript(n, s); return this.__wbg_ptr = i >>> 0, ol.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } } const cl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_burn_free(r >>> 0, 1)); class Pm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, cl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_burn_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} amount * @param {RegId} sub_id_addr */ constructor(t, e) { w(t, A); var n = t.__destroy_into_raw(); w(e, A); var s = e.__destroy_into_raw(); const i = c.bhsh_new_typescript(n, s); return this.__wbg_ptr = i >>> 0, cl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } } const dl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_call_free(r >>> 0, 1)); class Lm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, dl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_call_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} target_struct * @param {RegId} fwd_coins * @param {RegId} asset_id_addr * @param {RegId} fwd_gas */ constructor(t, e, n, s) { w(t, A); var i = t.__destroy_into_raw(); w(e, A); var a = e.__destroy_into_raw(); w(n, A); var o = n.__destroy_into_raw(); w(s, A); var d = s.__destroy_into_raw(); const l = c.bldd_new_typescript(i, a, o, d); return this.__wbg_ptr = l >>> 0, dl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register C. * @returns {RegId} */ rc() { const t = c.add_rc(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register D. * @returns {RegId} */ rd() { const t = c.bldd_rd(this.__wbg_ptr); return A.__wrap(t); } } const ul = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_cb_free(r >>> 0, 1)); class km { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, ul.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_cb_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst */ constructor(t) { w(t, A); var e = t.__destroy_into_raw(); const n = c.aloc_new_typescript(e); return this.__wbg_ptr = n >>> 0, ul.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.aloc_ra(this.__wbg_ptr); return A.__wrap(t); } } const ll = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_ccp_free(r >>> 0, 1)); class Um { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, ll.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_ccp_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} dst_addr * @param {RegId} contract_id_addr * @param {RegId} offset * @param {RegId} len */ constructor(t, e, n, s) { w(t, A); var i = t.__destroy_into_raw(); w(e, A); var a = e.__destroy_into_raw(); w(n, A); var o = n.__destroy_into_raw(); w(s, A); var d = s.__destroy_into_raw(); const l = c.bldd_new_typescript(i, a, o, d); return this.__wbg_ptr = l >>> 0, ll.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.add_ra(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register B. * @returns {RegId} */ rb() { const t = c.add_rb(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register C. * @returns {RegId} */ rc() { const t = c.add_rc(this.__wbg_ptr); return A.__wrap(t); } /** * Access the ID for register D. * @returns {RegId} */ rd() { const t = c.bldd_rd(this.__wbg_ptr); return A.__wrap(t); } } const hl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_cfe_free(r >>> 0, 1)); class Gm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, hl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_cfe_free(t, 0); } /** * Construct the instruction from its parts. * @param {RegId} amount */ constructor(t) { w(t, A); var e = t.__destroy_into_raw(); const n = c.aloc_new_typescript(e); return this.__wbg_ptr = n >>> 0, hl.register(this, this.__wbg_ptr, this), this; } /** * Access the ID for register A. * @returns {RegId} */ ra() { const t = c.aloc_ra(this.__wbg_ptr); return A.__wrap(t); } } const Al = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_cfei_free(r >>> 0, 1)); class zm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, Al.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_cfei_free(t, 0); } /** * Construct the instruction from its parts. * @param {Imm24} amount */ constructor(t) { w(t, Ne); var e = t.__destroy_into_raw(); const n = c.cfei_new_typescript(e); return this.__wbg_ptr = n >>> 0, Al.register(this, this.__wbg_ptr, this), this; } /** * Access the 24-bit immediate value. * @returns {Imm24} */ imm24() { const t = c.cfei_imm24(this.__wbg_ptr); return Ne.__wrap(t); } } const pl = typeof FinalizationRegistry > "u" ? { register: () => { }, unregister: () => { } } : new FinalizationRegistry((r) => c.__wbg_cfs_free(r >>> 0, 1)); class Xm { __destroy_into_raw() { const t = this.__wbg_ptr; return this.__wbg_ptr = 0, pl.unregister(this), t; } free() { const t = this.__destroy_into_raw(); c.__wbg_cfs_free(t, 0)