UNPKG

@lifi/composer-sdk

Version:

Public Composer SDK for building and submitting flows

48 lines (47 loc) • 1.81 kB
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); // src/generated/materialisers.generated.ts var materialisers_generated_exports = /* @__PURE__ */ require("../_virtual/_rolldown/runtime.cjs").__exportAll({ balanceOf: () => balanceOf, call: () => call, directDeposit: () => directDeposit, experimental: () => experimental }); /** Read the on-chain token balance of an address as the input amount — accepts: resource */ const balanceOf = (config) => ({ kind: "balanceOf", ...config }); /** Deposit tokens into the VM — native via msg.value, ERC-20 via transferFrom — accepts: resource */ const directDeposit = (config) => ({ kind: "directDeposit", ...config }); /** Execute an arbitrary contract call and measure the resulting token balance diff — accepts: resource */ const call = (config) => ({ kind: "call", ...config }); /** * Experimental definitions, grouped like the stable ones. They carry no * compatibility guarantee: any release, a patch included, can change, * rename or remove one, or move it to its stable location. A backend that * does not enable one rejects the flow with `validation_error`; * `sdk.client.getManifest()` lists what a backend accepts. */ const experimental = { /** Borrow tokens from a flashloan provider; the flashloan runtime borrows amount into the proxy before the program runs and settles the loan after it — accepts: resource */ flashloan: (config) => ({ kind: "flashloan", ...config }) }; exports.balanceOf = balanceOf; exports.call = call; exports.directDeposit = directDeposit; exports.experimental = experimental; Object.defineProperty(exports, "materialisers_generated_exports", { enumerable: true, get: function() { return materialisers_generated_exports; } }); //# sourceMappingURL=materialisers.generated.cjs.map