replit-cycles
v0.0.1
Published
Usage:
Downloads
1
Readme
Cycles
Usage:
const cycles = new Cycles(1); // 1 is userid
await cycles.balance(); // balance in cycles
await cycles.send({ to: user, description: 'tip', nanos: 42 });
balance()
returns users balance
send({ to: userID, nanos: number, description: string, metadata: string})
Send nanocycles to a user. You can add arbitrary description and metadata to the transaction.
list()
List all the user's transactions.
listAll()
List the entire ledger.
escrow({ particpants: [{ userID, nanos }] })
Escrows nanocycles for a number of particpants. The total nanos should add up to 0.
closeEscrow({ uuid, success: boolean })
Succeeds or rollbacks the escrow.