Dotwork
Developers

SDK

One ES module with no dependencies, served by this site. It builds the transactions; your wallet or key signs them.

curl -fsSLO https://<site>/sdk/dotwork.mjs
import { createDotwork } from "./dotwork.mjs";
const dw = createDotwork({ baseUrl: "https://<site>" });

const config = { name: "Arcade", slug: "arcade", gasToken: "USDG",
                 blockTimeSec: 2, creatorShareBps: 7000 };
const tx = dw.buildLaunchTx(config, 1);   // { chainId: 4663, to: USDG, data, value: "0" }
// sign and send tx with viem, ethers or any wallet, then:
const layer = await dw.submitLaunch(config, txHash);

dw.rpcUrl("arcade");                       // https://<site>/rpc/arcade
const dep = dw.buildDepositTx("arcade", "10000000"); // 10 USDG
await dw.submitDeposit(depositHash);
const ws = await dw.withdrawals(myAddress);
const claim = dw.buildClaimTx(ws[0]);      // submit on Robinhood Chain

Functions

config(), stats(), layers(), layer(slug), chainParams(slug), rpcUrl(slug), configHash(config), buildLaunchTx(config, periods), submitLaunch(config, txHash), buildRenewTx(slug, periods), submitRenew(slug, txHash), buildDepositTx(slug, amount), submitDeposit(txHash), withdrawals(address), buildClaimTx(withdrawal), batches(slug).

NextMCP ›