Skip to content

Instantly share code, notes, and snippets.

Nattapon Nimakul totiz

Block or report user

Report or block totiz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View libra_service_api_create_wallet.sh
curl --location --request POST "https://libraservice2.kulap.io/createWallet" \
--header "Content-Type: application/json" \
--data "{
\"minting\": true
}"
@totiz
totiz / libra_wallet_transfer.js
Created Jul 28, 2019
Libra Transfer with javascript
View libra_wallet_transfer.js
const { LibraWallet, LibraClient, LibraNetwork } = require('kulap-libra')
const BigNumber = require('bignumber.js')
async function createWallet() {
// Generate/get an account
// const wallet = new LibraWallet()
const wallet = new LibraWallet({mnemonic: 'finish topple cannon hammer eyebrow disorder enter reject long then tragic hammer diagram spy mom weapon amateur cup census sketch review consider galaxy foam'})
const account = wallet.newAccount()
return {
@totiz
totiz / libra_wallet_query_balance.js
Last active Jul 28, 2019
Query Balance in Libra Blockchain with javascript
View libra_wallet_query_balance.js
const { LibraWallet, LibraClient, LibraNetwork } = require('kulap-libra')
const BigNumber = require('bignumber.js')
async function createWallet() {
// Generate an account
const wallet = new LibraWallet()
const account = wallet.newAccount()
return {
address: account.getAddress().toHex(),
View libra_wallet.js
const { LibraWallet, LibraClient, LibraNetwork } = require('kulap-libra')
const axios = require('axios')
const BigNumber = require('bignumber.js')
async function createWallet() {
// Generate an account
// const wallet = new LibraWallet()
const wallet = new LibraWallet({
mnemonic: 'order curtain live pact market tissue rally run dolphin shuffle convince napkin spot main suffer segment excite toilet ceiling cute master six agent narrow'
});
@totiz
totiz / libra_wallet_mint.js
Last active Jul 28, 2019
Libra Wallet Minting
View libra_wallet_mint.js
const { LibraWallet, LibraClient, LibraNetwork } = require('kulap-libra')
const BigNumber = require('bignumber.js')
async function createWallet() {
// Generate an account
const wallet = new LibraWallet()
const account = wallet.newAccount()
return {
address: account.getAddress().toHex(),
@totiz
totiz / libra_create_wallet.js
Last active Jul 28, 2019
Create libra wallet with npm i kulap-libra
View libra_create_wallet.js
async function createWallet() {
const { LibraWallet } = require('kulap-libra')
// Generate an account
const wallet = new LibraWallet() // create new wallet with BIP39
const account = wallet.newAccount() // Derivation paths to "LIBRA WALLET: derived key$0"
return {
address: account.getAddress().toHex(), // Get full address
mnemonic: wallet.config.mnemonic // Your super secret key
View Libra query balance return.json
{
"address": "08c7bdf66f0ac29e154e9c05a8c00cc661f35a63a74d6f63dcc290c0d70e18c3",
"balance": "100"
}
View Libra query balance.json
{
"address": "08c7bdf66f0ac29e154e9c05a8c00cc661f35a63a74d6f63dcc290c0d70e18c3"
}
View Libra transfer return api.json
{
"address": "ed024cffdfc97dfd3cac1b68ea140bffcd27268cbc4fef3864f52e7c38a6613a",
"toAddress": "31c7092554bb804a4e25bd24399859428404c28cbc3b44dea5dc2a9f2314144b",
"balance": "",
"amount": "11"
}
View Libra transfer request api.json
{
"fromAddress": "ed024cffdfc97dfd3cac1b68ea140bffcd27268cbc4fef3864f52e7c38a6613a",
"mnemonic": "shoot success friend what custom card chuckle letter fiber artist suspect runway snack cheese soccer latin pull neither obey afraid accident pupil minor define;1",
"toAddress": "31c7092554bb804a4e25bd24399859428404c28cbc3b44dea5dc2a9f2314144b",
"amount": "11"
}
You can’t perform that action at this time.