0.1.13 • Published 3 years ago
arcexs v0.1.13
npm i arcexs
const acrexs = require("arcexs")
// Takes in a wallet name that will be stored on the db and create BTC mnemonics
acrexs.createBtcHdWallet(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Takes in a wallet name that will be stored on the db and create ETH mnemonics
acrexs.createETHHdWallet(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Takes in a wallet name that will be stored on the db and create BSC mnemonics
acrexs.createBSCHdWallet(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Takes in a wallet name that was stored on the db and generate BTC wallet address.
// returns BTC wallet address, it private key
acrexs.generateBtcAddress(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Takes in a wallet name that was stored on the db and generate ETH wallet address.
// returns BTC wallet address, it private key
acrexs.generateETHAddresses(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Takes in a wallet name that was stored on the db and generate BSC wallet address.
// returns BTC wallet address, it private key
acrexs.generateBSCAddresses(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Get metadata for a particular address
//all data relevant for using this address..
acrexs.getAddressMeta(address).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// transfer currencies
// pipeline : if "ETH" then it will transfer ETHER in Ethereum network
// if "BSC" then it will transfer BNB in Binance smartchain network
// if "BTC" then it will transfer BTC in Bitcoin Network
// sender address
// receiever address
// amount
// // TransferBtc("ETH", "0x4BF815Ef22628bFe3988B16fC5819B0262C3d3A6", "0xC655114468c3a7bdCF7457c91cb5ab541e528Bf8", 15);
acrexs.Transfer(pipeline, senderAddress, recieverAddress, amount).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// transfer USDT in both Ethereum and Binance network
// pipeline : if "ETH" then it will transfer USDT in Ethereum network
// if "BSC" then it will transfer USDT in Binance smartchain network
// sender address
// receiever address
// amount
// // TransferBtc("ETH", "0x4BF815Ef22628bFe3988B16fC5819B0262C3d3A6", "0xC655114468c3a7bdCF7457c91cb5ab541e528Bf8", 15);
acrexs.TransferUSDT(pipeline, senderAddress, recieverAddress, amount).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// transfer BTC in both Ethereum and Binance network
// pipeline : if "ETH" then it will transfer USDT in Ethereum network
// if "BSC" then it will transfer USDT in Binance smartchain network
// sender address
// receiever address
// amount
// // TransferBtc("ETH", "0x4BF815Ef22628bFe3988B16fC5819B0262C3d3A6", "0xC655114468c3a7bdCF7457c91cb5ab541e528Bf8", 15);
acrexs.TransferBTC(pipeline, senderAddress, recieverAddress, amount).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
//11. Get the Balance on a particular address
//pipeline could be:
// - ETH
// - BSC
// - default
//
// if BTC kindly specify that the address is BTC address
acrexs.getBtcAddressBalance(pipeline, address).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Delete address from a wallet
//pipeline could be:
// - ETH
// - BSC
// - BTC
acrexs.deleteAddressFromBtcWallet(pipeline, address).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Delete Wallet_Name completely from the server
// name of wallet to destroy
acrexs.destroyBtcHdWallet(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// return associated details with the wallet name
acrexs.getBtcWalletMeta(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// Convert Btc to others equivalent
// other is the name of the asset to convert into
//
// other should include:
// - ETH || ether
// - BNB
// - USD
acrexs.getBtcToOthersRate(other).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// - check if wallet exist on the db
// - if wallet exist it return true otherwise false
acrexs.checkBtcWalletExists(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
// - get the total balance of all the addresses associated with the wallet_name
// wallet_name must exist on the server.
acrexs.getWalletAddressesBalance(wallet_name).then(
(result) => {
console.log(result)
}
).catch(
(err) => {
console.error(err)
}
)
- bip39: For mnemonic generation
- hdkey: For implementation of BIP 32
- ethereumjs-util
- axios: For making requests to API's
- create-hash
- bs58check
- bitcore-lib
0.1.10
3 years ago
0.1.11
3 years ago
0.1.12
3 years ago
0.1.13
3 years ago
0.1.9
3 years ago
0.1.8
3 years ago
0.1.7
3 years ago
0.1.6
3 years ago
0.1.5
3 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.9.0
3 years ago
0.8.0
3 years ago
0.7.0
3 years ago
0.6.0
3 years ago
0.5.0
3 years ago
0.4.0
3 years ago
0.3.0
3 years ago
0.2.0
3 years ago
0.1.0
3 years ago
1.0.0
3 years ago