BTFS Soter is a charging service gateway based on the TRON Network and BTFS cluster
A set of utilities to help identify BTFS resources
$ npm install soter-sdk
The code published to npm that gets loaded on require is in fact an ES5 transpiled version with the right shims added. This means that you can require it and use with your favorite bundler without having to adjust asset management process.
var Soter = require('soter-sdk')
Loading this module through a script tag will make the Soter
obj available in the global namespace.
<script src="/dist/Soter.js"></script>
<script src="./tronWeb.js"></script>
const Soter = require('soter-sdk')
const tronWeb = new TronWeb({
fullHost: 'https://api.shasta.trongrid.io',
privateKey: 'your private key'
})
var soter = new Soter(tronWeb)
soter.query.userBalance() // {code: 0, data: {balance: 0}}
The target audience for BTFS Soter are developers familiar with HTTP APIs and network development.
Query examples
await soter.query.userBalance()
await soter.query.userSignBalanceRawData()
await soter.query.userSignBalance()
await soter.query.depositHistory()
await soter.query.signDepositHistoryRawData()
await soter.query.signDepositHistory()
await soter.query.userOrderList()
await soter.query.userSignOrderListRawData()
await soter.query.userSignOrderList()
await soter.query.userUploaded()
await soter.query.userSignUploadedRawData()
await soter.query.userSignUploaded()
Set examples
await soter.set.setAutopay()
await soter.set.setSignAutopayRawData()
await soter.set.setSignAutopay()
Update examples
await soter.update.userInformation(path)
await soter.update.userSignInformationRawData()
await soter.update.userSignInformation()
Addfiles examples
await soter.add.addFile()
await soter.add.signAddFileRawData()
await soter.add.signAddFile()
await soter.addStream.addStreamFile()
MIT