Aptos SDK

TypeScript SDK for the protocol

Full Documentation

https://aptos.sdk.moveflow.xyz/

Install SDK

pnpm install @moveflow/aptos-sdk

Usage Example

Init SDK

Init Stream Object with Ed25516 Private key, this kind of stream object can execute transaction directly.

import { Stream, aptos } from "@moveflow/aptos-sdk";
const pair = new aptos.Ed25519PrivateKey(test_private_key);
const account = aptos.Account.fromPrivateKey({
  privateKey: pair,
});
const stream = new Stream(account, Network.TESTNET);

Init Stream Object with simple address, this kind of stream object can only return the prepared transaction.

const stream = new Stream(sender_address, Network.TESTNET);

Create a Stream

If you create based common coin , you should pass with params:

is_fa:false and coin_type:"0x1::aptos_coin::AptosCoin"

And if you want to build with fa-coin should pass : is_fa:true and asset_type:"0x355efcd852a0757eb4289f25b4627f368e72bae178d719ad6f7b435c7f201e59".

Param stream_type can be used split payment stream or stream stream.

Pause a Stream

Resume a Stream

Close a Stream

Extend a Stream

Withdraw a Stream

Batch Create Streams

You can build as many as 200 streams in one transaction. One import tips you should know: You must set enough gas with one transaction.

Batch Withdraw Streams

Fetch Stream Info

Get Registered Coin Configs

Last updated