Skip to content

shivam0110/Blockchain-Transaction-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ETH-api

Table of Contents

next

catch 404 and forward to error handler

message

Error handler, set locals, only providing error in development and render the error page

db

Sets up connection to database

Coin

/coin endpoint to check balance of a particular coin

Parameters

  • WalletAddress string Address of the wallet to check balance of
  • networkID int Id of network according to database

Returns number value - Amount in wallet address or error

/coin/trans endpoint to transfer funds from a address to one or more address

Parameters

  • from String Wallet address to transfer funds from
  • value Int Amount of funds to be transfered
  • PrivateKey String Private key of from address
  • networkID int Id of network according to database

Returns Object Result - JSON object of transaction summary

/coin/trans endpoint to transfer funds from a address to one or more address

Parameters

  • from String Wallet address to transfer funds from
  • value Int Amount of funds to be transfered
  • PrivateKey String Private key of from address
  • networkID int Id of network according to database

Returns Object Result - JSON object of transaction summary

Token

/token endpoint to check token balance of a wallet address

Parameters

  • Symbol String token symbol to get other data from DB
  • WalletAddress String Address to check balaance from
  • networkID Int Id of network according to database

Returns Int Result - Token balance

/token endpoint to transfer token balance

Parameters

  • Symbol String token symbol to get other data from DB
  • to String Wallet address to trasfer funds to
  • from String Wallet address to transfer funds from
  • WalletAddress String Address to check balaance from
  • value Int Amount of funds to be transfered
  • gas Int Gas limit to be used
  • networkID Int Id of network according to database

Returns Object Result - JSON object of transaction summary

Create-Address

/crtAdd endpoint to create a new address

Parameters

  • user_name String Name of user to store with the new account generated
  • networkID Int Id of network according to database

Returns Object Result - JSON object containing new account information

Contract

/Contract endpoint to a new token contract on a network

Parameters

  • account String Account address from which contract needs to be deployed
  • abi Object ABI code for the contract
  • bytecode String bytecode for the contract
  • PrivateKey String Private key of from address
  • networkID Int Id of network according to database
  • gas Int Value of gas limit
  • gasPrice Int Price of gas

Returns Object Result - JSON object of new contract instance

Transaction

/transaction/past endpoint to get past transaction count

Parameters

  • WalletAddress String Address to count transaction
  • networkID Int Id of network according to database

Returns Int Result - Number of transaction

/transaction/pending endpoint to get pending transaction

Parameters

  • networkID Int Id of network according to database

Returns Object Result - total pending transaction

/transaction/hstry endpoint to get transaction history

Parameters

  • networkID Int Id of network according to database

Returns Object Result - total pending transaction

/transaction/hstry endpoint to get incoming transaction history

Parameters

  • networkID Int Id of network according to database

Returns Object Result - total pending transaction

/XRP/crtAdd endpoint to create a new address

Parameters

  • user_name String Name of user to store with the new account generated
  • networkID Int Id of XRP network according to database

Returns Object Result - JSON object containing new account information

/XRP/trans endpoint to transafer crypto from one address to another for a XRP coin

Parameters

  • sender string Address to transfer amount from
  • reciever string Address to transfer amount to
  • secret string Private key of address to tranfer crypto from
  • amount int Amount to be transferred
  • networkID Int Id of XRP network according to database

Returns Object Result - JSON object of transaction hash

/XRP/getTrans endpoint to get transaction details of a address

Parameters

  • address String Address to get transaction details of
  • networkID Int Id of XRP network according to database

Returns Object Result - JSON object containing transaction details of a address

/XRP/accInfo endpoint to to get info about a xrp's coin address

Parameters

  • networkID Int Id of XRP network according to database
  • address string Address to get information of

Returns Object Result - JSON object of containing info of coin's address

Balance_USDT

/USDTbal endpoint to get balance of USDT token or any other ERC20 token(acc to Contract address)

Parameters

  • BLOCK_PARAMETER string an integer block number, or the string "latest", "earliest" or "pending"
  • ADDRESS string Address to get balance of
  • ContractAddress string Contract address of ERC20 token of address to get balance of

Returns Object Result - JSON object of address's balance of given ERC2 token

Doge-Dash-Bitcoin-Litecoin

/ddbl/crtAdd endpoint to create a new address and private key for a DDBL coin

Parameters

  • coin string Specify coin (Doge, Dash, Bitcoin or Litecoin) to create address for
  • user_name string User_name to corresponding address

Returns Object Result - JSON object of pair of Address and its private key

/ddbl/trans endpoint to transafer crypto from one address to another for a DDBL coin

Parameters

  • coin string Specify coin (Doge, Dash, Bitcoin or Litecoin) to transfer from
  • from string Address to transfer amount from
  • to string Address to transfer amount to
  • PrivateKey string Private key of address to tranfer crypto from
  • value int Amount to be transferred

Returns Object Result - JSON object of transaction hash

/ddbl/accinfo endpoint to get info about a DDBL's address

Parameters

  • coin string Specify coin (Doge, Dash, Bitcoin or Litecoin)
  • address string Address to get information of

Returns Object Result - JSON object of containing info of coin's address

BNB_History

/bnbhist endpoint to get transaction history for a given BNB coin address

Parameters

  • address int Address of BNB coin to get past transactions list of

Returns Object Result - JSON object of list of transactions of a BNB address

Addresses

/address endpoint to take addresses from transaction and store them with corresponding network_id(given) in addresses table

Parameters

  • networkID int Id of network according to database

Returns Object Result - JSON object of addresses to be stored in addresses table

/address/bal endpoint to get balance for all stored array in addresses table according to network_id(given)

Parameters

  • networkID int Id of network according to database

Returns Object Result - JSON object of addresses and their balance

About

Implemented Blockchain transaction app using web3.js, etc.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages