UNPKG

@hirosystems/clarinet-sdk-browser

Version:

A SDK to interact with Clarity Smart Contracts in the browser

19 lines 794 B
import init, { SDK } from "@hirosystems/clarinet-sdk-wasm-browser"; import { getSessionProxy } from "./sdkProxy.js"; import { defaultVfs } from "./defaultVfs.js"; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json // @ts-ignore BigInt.prototype.toJSON = function () { return this.toString(); }; export { tx, } from "../../common/src/sdkProxyHelpers.js"; export { init, SDK, getSessionProxy }; export { defaultVfs, defaultFileStore } from "./defaultVfs.js"; // @ts-ignore globalThis.vfs = defaultVfs; export const initSimnet = async (virtualFileSystem) => { await init(); const vfs = virtualFileSystem ? virtualFileSystem : defaultVfs; return new Proxy(new SDK(vfs), getSessionProxy()); }; //# sourceMappingURL=index.js.map