1.2.0 • Published 6 years ago

bumo-exchange-sdk v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

bumo-exchange-sdk

bumo-exchange-sdk Installation

npm install bumo-exchange-sdk --save

bumo-exchange-sdk Test

npm test

bumo-exchange-sdk Usage

'use strict';

const BumoSDK = require('bumo-exchange-sdk');

const bumo = new BumoSDK({
  ips: [ 'seed1.bumotest.io:26002' ],
});


bumo.account.create().then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.account.getBalance('buQXz2qbTb3yx2cRyCz92EnaUKHrwZognnDw').then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.account.getInfo('buQXz2qbTb3yx2cRyCz92EnaUKHrwZognnDw').then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.account.checkAddress('buQgE36mydaWh7k4UVdLy5cfBLiPDSVhUoPq').then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.getTransaction('e27d287913dcbe5452d38a567b10f6b73a2a22a2f3c393180ab930286eb8ffd9').then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.getBlock(100).then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.checkBlockStatus().then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


bumo.getBlockNumber().then(data => {
  console.log(data);
}).catch(err => {
  console.log(err.message);
});


const options = {
  senderPrivateKey: 'privbsMCSqvv8kJ1A3Zt9RWjDHyG3jRdGpj9Jrgfxw7tdz3jZzhqA55v',
  receiverAddress: 'buQgE36mydaWh7k4UVdLy5cfBLiPDSVhUoPq',
  amount: '10000000',
  nonce: '121',
}
 bumo.sendBu(options).then(data => {
   console.log(data);
 }).catch(err => {
   console.log(err.message);
 });

License

MIT

1.2.0

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago