Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 681 Bytes

File metadata and controls

23 lines (17 loc) · 681 Bytes

@sluice/sdk

Typed TypeScript client for the Sluice per-second money-streaming protocol on Robinhood Chain.

npm i @sluice/sdk ethers
import { Sluice, ratePerSecondFromMonthly } from "@sluice/sdk";
import { parseEther } from "ethers";

const sluice = new Sluice(CONTRACT_ADDRESS, signer);
await sluice.deposit("1.5");
await sluice.openStream(recipient, ratePerSecondFromMonthly(parseEther("5000")));
const bal = await sluice.realtimeBalanceOf(recipient); // climbs every second
await sluice.withdraw(bal);

Contract source and mechanics: Sluice-xyz/sluice-protocol.

License

MIT