astra-exchange
v1.1.3
Published
Astra Exchange API tools
Downloads
3
Maintainers
Readme
Astra Exchange API Documentation
View on npm
Download
npm i astra-exchange
Usage
JavaScript:
const exchange = require('astra-exchange')
TypeScript:
import * as exchange from 'astra-exchange'
Includes type definitions
Example
exchange.transact('1234', 'e95Y6tKOvIS7CBlEdBn2UknzxMQ2', 'GwZX5OnFzGUl0UlXH97EGIeW70p1', 20, 'Take my money').then(record => {
console.log(`Successful transaction. Here's the record: ${record}`)
}).catch(error => {
console.log(`${error.status} error: ${error.message}`)
})