β˜„οΈStreaming Payment SDK

Moveflow Streaming Payment SDK is a TypeScript SDK for interacting related to streaming payment contract on aptos. It provides a set of functions to create, manage, and retrieve streaming ops

Getting Started

Create a project using this example:

npm install --save  @moveflow/sdk-aptos

or

yarn add  @moveflow/sdk-aptos

Use SDK

Deploy a copy of your application to IPFS using the following command:

const rpc = https://testnet.aptoslabs.com
const sdk = new SDK(rpc, NetworkType.Testnet)

Submit Tx

  1. create a stream

const payload = sdk.stream.create({

  recipientAddr: '0x20f0cbe21cb340fe56500e0889cad03f8a9e54a33e3c4acfc24ce2bdfabc4180',
  depositAmount: 1,
  startTime: start_time,
  stopTime: stop_time,
  // coinType: AptosCoin,
  interval: 1000,
  // name: '1',
  // remark: '1',
  // canPause: true,
  // closeable: true,
  // recipientModifiable: true

})

const txid = await SignAndSubmitTransaction(payload)
  1. pause a stream

  1. resume a stream

  1. close a stream

  1. extend a stream

Query Streams

  1. query incoming streams

  1. query outgoing streams

https://github.com/Move-Flow/sdk.js/tree/lyb/aptos-sdkarrow-up-right

Last updated