@lifi/composer-sdk
Version:
Public Composer SDK for building and submitting flows
39 lines (38 loc) • 1.56 kB
JavaScript
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
// src/generated/materialisers.generated.ts
var materialisers_generated_exports = /* @__PURE__ */ __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
}) };
export { balanceOf, call, directDeposit, experimental, materialisers_generated_exports };
//# sourceMappingURL=materialisers.generated.js.map