Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stellarburrito/stellarburritojs
StellarBurrito
https://github.com/stellarburrito/stellarburritojs
Last synced: 2 months ago
JSON representation
StellarBurrito
- Host: GitHub
- URL: https://github.com/stellarburrito/stellarburritojs
- Owner: stellarburrito
- Created: 2019-03-08T13:51:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-27T12:24:57.000Z (almost 6 years ago)
- Last Synced: 2024-08-04T02:08:02.777Z (6 months ago)
- Language: JavaScript
- Size: 18.1 MB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-stellar - StellarBurrito - An open-source wrapper for the JavaScript Stellar SDK. (Developer Resources)
- awesome-stellar-cn - StellarBurrito - JavaScript Stellar SDK 的开源包装器。 (开发者资源)
README
# StellarBurrito
StellarBurrito is an opensource wrapper for js stellar-sdk
![Mymage](https://i.ibb.co/dDRV0Rm/logo.png)### Getting Started
##### Create a testnet account
This will create a new account on **testnet** with 10 000 XLM
```javascript
let Account=require('stellarburrito').Account
let Alice= new Account()
await Alice.createTestAccount()
```
##### Pay
Let's pay 10 XLM From Alice to Bob
```javascript
let Account=require('stellarburrito').Account
let Alice= new Account('SDIMQ463MVOETWAOBXLSUSSZNKMA7GOCZBS4QKVYJJC53IPUAOW2QRTR')
let Bob = new Account('GBQWXG6TVJ52GGW77WM6ZJKZKWG5O5Q6T4KKTMPXTW6NNH66J4ZOBNYJ')
await Alice.Pay({destination:Bob,amount:'10'})
```
##### Account Info
Read infos of Alice's account
```javascript
let Alice= new Account('SDIMQ463MVOETWAOBXLSUSSZNKMA7GOCZBS4QKVYJJC53IPUAOW2QRTR')
await Alice.Load()
console.log(Alice.balances)
console.log(Alice.data)
console.log(Alice.trustlines)
console.log(Alice.flags)
console.log(Alice.offers)
...
```
##### Set Account's Options
```javascript
let Alice= new Account('SDIMQ463MVOETWAOBXLSUSSZNKMA7GOCZBS4QKVYJJC53IPUAOW2QRTR')
await Alice.setHomeDomain('stellarburrito.com')
await Alice.manageData('data','example')
...
```