MPay SDK
Installation
yarn add @msafe/mpay-sdk-suiUse SDK
Initialize mpay client
import {MPayClient} from "@msafe/mpay-sdk-sui";
// Env.prod refer to mainnet environment
// Env.dev refer to testnet environment
const client = new MPayClient(Env.prod)Connect a wallet
client.connectSingleWallet(window.wallet);Create a stream or a stream group
const txb = await client.createStreams(info);
const res = await wallet.signAndExecuteTransactionBlock(txb);
const streamIds = client.helper.getStreamIdsFromCreateStreamResponse(res);
if (streamIds === 1) {
const streams = Stream.new(client.globals, streamIds[0]);
} else {
const streamGroup = StreamGroup.new(client.globals, streamIds);
const streams = streamGroup.streams;
}View stream detail
Stream operation
Get stream list as recipient
Get stream list as sender
Deployed contracts and objects
Mainnet
Field
ID
Testnet
Field
ID
Last updated