Socket
Book a DemoInstallSign in
Socket

@stellar/anchor-transfer-utils

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stellar/anchor-transfer-utils

Utilities for anchors and wallets implementing SEP6 transfer protocol

latest
npmnpm
Version
1.2.0
Version published
Maintainers
3
Created
Source

anchor-transfer-utils

Utility functions for implementing the interactive SEP6 flow. This helps implement the postMessage message handling involved in showing the interactive webapp.

Installation

Using NPM

npm install --save @stellar/anchor-transfer-utils

Standalone

<script src="https://unpkg.com/@stellar/anchor-transfer-utils@1.1.0/lib/index.js" />

Usage for Anchors

Withdrawal

For anchors using the interactive web flow, use the finalizeTransaction helper to communicate back to the wallet when a withdraw is ready for payment.

const AnchorTransferUtils = require("@stellar/anchor-transfer-utils")
AnchorTransferUtils.finalizeWithdrawal({
  amount_in: "80.12",
  withdraw_anchour_account: "<Stellar public account id>",
  withdraw_memo: "<Some unique identifier>",
  withdraw_memo_type: "text" | "hash" | "id"
})

FAQs

Package last updated on 28 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts