Example repo for MPay SDK.
yarn
Set up private key for test. Currently it's base64 encoding of the private key along
with the signing schema flag. Only ED25519 is supported. Please modify file makeKeyPairFromPrivateKey
function as needed.
export SUI_PRIVATE_KEY=${YOUR_PRIVATE_KEY}
This will create a single stream and claim the stream.
File location: src/single.ts
yarn demo:single-stream
Create a stream group and claim the stream.
File location: src/group.ts
yarn demo:stream-group
Create a stream, cancel the stream, and claim the unclaimed amount.
File location: src/cancel.ts
yarn demo:cancel-stream
Create a stream, set auto claim to be true, and claim the stream by any signer.
File location: auto-claim.ts
yarn demo:auto-claim
- Build with programmable transaction block to enable composability (E.g. create and set auto claim in one transaction).
- Discuss and design more mechanism for indexing and auto-claim feature.