Documentation

Overview

Package go-incognito-sdk is a tutorial that integrate with Incognito Chain.

Notice that this doc is written in godoc itself as package documentation. The defined types are just for making the table of contents at the head of the page; they have no meanings as types.

If you have any suggestion or comment, please feel free to open an issue on this tutorial's GitHub page!

By Incognito.

Installation

To download the specific tagged release, run:

go get github.com/incognitochain/go-incognito-sdk@V0.0.1

It requires Go 1.13 or later due to usage of Go Modules.

Usage

Initialize object Blockchain and play rock

Example:

package main

import (
	"fmt"
	"github.com/incognitochain/go-incognito-sdk/incognitoclient"
	"github.com/incognitochain/go-incognito-sdk/incognitoclient/entity"
	"net/http"
)

func main() {
	client := &http.Client{}

	bc := incognitoclient.NewBlockchain(
		client,
		"https://testnet.incognito.org/fullnode",
		"",
		"",
		"",
		"0000000000000000000000000000000000000000000000000000000000000004",
	)

	listPaymentAddresses := entity.WalletSend{
		Type: 0,
		PaymentAddresses: map[string]uint64{
			"12Rsf3wFnThr3T8dMafmaw4b3CzUatNao61dkj8KyoHfH5VWr4ravL32sunA2z9UhbNnyijzWFaVDvacJPSRFAq66HU7YBWjwfWR7Ff": 500000000000,
		},
	}

	tx, err := bc.CreateAndSendConstantTransaction(
		"112t8roafGgHL1rhAP9632Yef3sx5k8xgp8cwK4MCJsCL1UWcxXvpzg97N4dwvcD735iKf31Q2ZgrAvKfVjeSUEvnzKJyyJD3GqqSZdxN4or",
		listPaymentAddresses,
	)

	if err != nil {
		fmt.Println(err.Error())
		return
	}

	fmt.Println(tx)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blockchain

type Blockchain struct {
	// contains filtered or unexported fields
}

func NewBlockchain

func NewBlockchain(c *http.Client, endpointUrl string, username string, password string, syncChainUrl string, constantId string) *Blockchain

    NewBlockchain returns a Blockchain consisting of the given SdkWarpper.

    func (Blockchain) CreateAndSendBurningForDepositToSCRequest

    func (b Blockchain) CreateAndSendBurningForDepositToSCRequest(incPrivateKey string, amount *big.Int, remoteAddrStr string, incTokenId string) (*entity.BurningForDepositToSCRes, error)

      Burning pToken for deposit to smart contract

      Example:

      bc := NewBlockchain(client, ....
      
      addStr := "0x15B9419e738393Dbc8448272b18CdE970a07864D"
      
      tx, err := bc.CreateAndSendBurningForDepositToSCRequest(
      	"112t8sKMwEGHTXyZpf6PGTtjibgRF2kkWNb75zVHabSAXQV2UKc4RDnAG3CNu8KmWHVBFskZBK5oNVe3qmGiUe8YM74krY8kYfvhaZJYc4uK",
      	big.NewInt(1000000),
      	addStr[2:],
      	"ffd8d42dc40a8d166ea4848baf8b5f6e9fe0e9c30d60062eb7d44a8df9e00854",
      )
      

      func (Blockchain) CreateAndSendConstantPrivacyTransaction

      func (b Blockchain) CreateAndSendConstantPrivacyTransaction(privateKey string, req entity.WalletSend) (string, error)

        Send PRV privacy to those address

        Example:

        bc := NewBlockchain(....
        
        listPaymentAddresses := entity.WalletSend{
        	Type: 0,
        	PaymentAddresses: map[string]uint64{
        		"12Rsf3wFnThr3T8dMafmaw4b3CzUatNao61dkj8KyoHfH5VWr4ravL32sunA2z9UhbNnyijzWFaVDvacJPSRFAq66HU7YBWjwfWR7Ff": 500000000000,
        	},
        }
        
        tx, err := bc.CreateAndSendConstantPrivacyTransaction("112t8roafGgHL1rhAP9632Yef3sx5k8xgp8cwK4MCJsCL1UWcxXvpzg97N4dwvcD735iKf31Q2ZgrAvKfVjeSUEvnzKJyyJD3GqqSZdxN4or",
        	listPaymentAddresses,
        )
        

        func (Blockchain) CreateAndSendConstantTransaction

        func (b Blockchain) CreateAndSendConstantTransaction(privateKey string, req entity.WalletSend) (string, error)

          Send PRV non-privacy to those address

          Example:

          bc := NewBlockchain(....
          
          listPaymentAddresses := entity.WalletSend{
          	Type: 0,
          	PaymentAddresses: map[string]uint64{
          		"12Rsf3wFnThr3T8dMafmaw4b3CzUatNao61dkj8KyoHfH5VWr4ravL32sunA2z9UhbNnyijzWFaVDvacJPSRFAq66HU7YBWjwfWR7Ff": 500000000000,
          	},
          }
          
          tx, err := bc.CreateAndSendConstantTransaction("112t8roafGgHL1rhAP9632Yef3sx5k8xgp8cwK4MCJsCL1UWcxXvpzg97N4dwvcD735iKf31Q2ZgrAvKfVjeSUEvnzKJyyJD3GqqSZdxN4or",
          	listPaymentAddresses,
          )
          

          func (Blockchain) CreateAndSendContractingRequestForPrivacyToken

          func (b Blockchain) CreateAndSendContractingRequestForPrivacyToken(privateKey string, autoChargePRVFee int, metadata map[string]interface{}) (string, error)

            Create burn token for the token

            Example:

            bc := NewBlockchain(....
            
            masterPrivKey := "112t8roafGgHL1rhAP9632Yef3sx5k8xgp8cwK4MCJsCL1UWcxXvpzg97N4dwvcD735iKf31Q2ZgrAvKfVjeSUEvnzKJyyJD3GqqSZdxN4or"
            
            //1: charge pToken fees, 0: charge PRV fees
            autoChargePRVFee := 1
            
            txID, err := bc.CreateAndSendContractingRequestForPrivacyToken(
            	masterPrivKey,
            	autoChargePRVFee,
            	map[string]interface{}{
            		"TokenID":     "ffd8d42dc40a8d166ea4848baf8b5f6e9fe0e9c30d60062eb7d44a8df9e00854,
            		"Privacy":     true,
            		"TokenTxType": 1,
            		"TokenName":   "ETH",
            		"TokenSymbol": "pETH,
            		"TokenAmount": 1000000000,
            		"TokenReceivers": map[string]uint64{
            			burningAddress: 1000000000,
            		},
            		"TokenFee": 100,
            })
            

            func (Blockchain) CreateAndSendIssuingRequest

            func (b Blockchain) CreateAndSendIssuingRequest(privateKey, cstDCBIssueAddress, receiveAddress string, depositedAmount *big.Int, ConstantAssetType string, ConstantCurrencyType string) (string, error)

              Issuing pToken Centralize non-privacy

              func (Blockchain) CreateAndSendIssuingRequestForPrivacyToken

              func (b Blockchain) CreateAndSendIssuingRequestForPrivacyToken(privateKey string, metadata map[string]interface{}) (string, error)

                Issuing pToken Centralize privacy

                Example:

                bc := NewBlockchain(....
                
                masterPrivKey := "112t8roafGgHL1rhAP9632Yef3sx5k8xgp8cwK4MCJsCL1UWcxXvpzg97N4dwvcD735iKf31Q2ZgrAvKfVjeSUEvnzKJyyJD3GqqSZdxN4or"
                
                txID, err := bc.CreateAndSendIssuingRequestForPrivacyToken(masterPrivKey, map[string]interface{}{
                	"ReceiveAddress":  address.UserPaymentAddress,
                	"DepositedAmount": 1000000000,
                	"TokenID":         "ffd8d42dc40a8d166ea4848baf8b5f6e9fe0e9c30d60062eb7d44a8df9e00854,
                	"TokenName":       "Ethereum",
                	"TokenSymbol":     "pETH",
                })
                

                func (Blockchain) CreateAndSendStakingTransaction

                func (b Blockchain) CreateAndSendStakingTransaction(receiveRewardAddress, privateKey, userPaymentAddress, userValidatorKey, burnTokenAddress string) (string, error)

                  Staking a node

                  func (Blockchain) CreateAndSendTxWithIssuingEth

                  func (b Blockchain) CreateAndSendTxWithIssuingEth(privateKey, burnerAddress string, metadata map[string]interface{}) (string, []byte, error)

                    Issue Eth

                    Example:

                    bc := NewBlockchain(....
                    
                    //research on smart contract
                    //blockHash, txIndex, proof, ....
                    
                    masterPrivKey := "112t8roafGgHL1rhAP9632Yef3sx5k8xgp8cwK4MCJsCL1UWcxXvpzg97N4dwvcD735iKf31Q2ZgrAvKfVjeSUEvnzKJyyJD3GqqSZdxN4or"
                    
                    burningAddress, _ := bc.GetBurningAddressFromChain()
                    
                    txID, body, err := bc.CreateAndSendTxWithIssuingEth(
                    	masterPrivKey,
                    	burningAddress,
                    	map[string]interface{}{
                    		"BlockHash":  blockHash.String(),
                    		"IncTokenID": log.PrivacyTokenAddress,
                    		"ProofStrs":  proof,
                    		"TxIndex":    txIndex,
                    	})
                    

                    func (Blockchain) CreateAndSendUnStakingTransaction

                    func (b Blockchain) CreateAndSendUnStakingTransaction(privateKey, userPaymentAddress, userValidatorKey, burnTokenAddress string) (string, error)

                      Unstaking a node

                      func (Blockchain) CreateNodeWalletAddress

                      func (b Blockchain) CreateNodeWalletAddress(byShardId int) (paymentAddress, pubkey, readonlyKey, privateKey, validatorKey string, shardId int, err error)

                        Create wallet with validator key

                        func (Blockchain) CreateWalletAddress

                        func (b Blockchain) CreateWalletAddress() (paymentAddress, pubkey, readonlyKey, privateKey string, err error)

                          Create wallet

                          func (Blockchain) CreateWalletAddressByShardId

                          func (b Blockchain) CreateWalletAddressByShardId(byShardId int) (paymentAddress, pubkey, readonlyKey, privateKey string, shardId int, err error)

                            Create wallet by shard id

                            func (Blockchain) CreateWithDrawReward

                            func (b Blockchain) CreateWithDrawReward(privateKey, paymentAddress, tokenId string) (string, error)

                              Withdraw reward of node

                              func (Blockchain) DefragmentationPToken

                              func (b Blockchain) DefragmentationPToken(privateKey string, tokenId string) (string, error)

                                Defragmentation PToken token

                                func (Blockchain) DefragmentationPrv

                                func (b Blockchain) DefragmentationPrv(privateKey string, maxValue int64) (string, error)

                                  Defragmentation PRV token

                                  func (Blockchain) EncryptData

                                  func (b Blockchain) EncryptData(pubKey string, params interface{}) (string, error)

                                  func (Blockchain) GenerateTokenID

                                  func (b Blockchain) GenerateTokenID(symbol, pSymbol string) (string, error)

                                    Generate new pToken

                                    func (Blockchain) GetAccount

                                    func (b Blockchain) GetAccount(params interface{}) (interface{}, error)

                                    func (Blockchain) GetAmountByHashFromReceiveAddressAndToAddress

                                    func (b Blockchain) GetAmountByHashFromReceiveAddressAndToAddress(txHash, fromAddress, toAddress string) (*big.Int, error)

                                    func (Blockchain) GetAmountByMemo

                                    func (b Blockchain) GetAmountByMemo(listTrans []entity.ReceivedTransaction, memo, tokenID string) (string, uint64)

                                      Get amount by memo

                                      func (Blockchain) GetAmountVoteToken

                                      func (b Blockchain) GetAmountVoteToken(paymentAddress string) (*entity.ListCustomTokenBalance, error)

                                      func (Blockchain) GetBalance

                                      func (b Blockchain) GetBalance(privateKey string, tokenId string) (uint64, error)

                                        Get balance by pToken

                                        func (Blockchain) GetBalanceByPaymentAddress

                                        func (b Blockchain) GetBalanceByPaymentAddress(paymentAddress string) (uint64, error)

                                          Get balance wallet (PRV) by payment address

                                          func (Blockchain) GetBalanceByPrivateKey

                                          func (b Blockchain) GetBalanceByPrivateKey(privateKey string) (uint64, error)

                                            Get balance wallet

                                            func (Blockchain) GetBeaconBestStateDetail

                                            func (b Blockchain) GetBeaconBestStateDetail() (res *entity.BeaconBestStateResp, err error)

                                              Get beacon best state detail

                                              func (Blockchain) GetBeaconHeight

                                              func (b Blockchain) GetBeaconHeight() (int32, error)

                                                Get beacon height

                                                func (Blockchain) GetBestBlockHeight

                                                func (b Blockchain) GetBestBlockHeight(shardID int) (uint64, error)

                                                  Get block height

                                                  func (Blockchain) GetBlockChainInfo

                                                  func (b Blockchain) GetBlockChainInfo() (*entity.GetBlockChainInfoResult, error)

                                                    Get chain info

                                                    func (Blockchain) GetBlockInfo

                                                    func (b Blockchain) GetBlockInfo(blockHeight int32, shardID int) (*entity.GetBlockInfo, error)

                                                      Get block info

                                                      func (Blockchain) GetBridgeReqWithStatus

                                                      func (b Blockchain) GetBridgeReqWithStatus(TxReqID string) (int, error)

                                                        Get bridge request by tx

                                                        func (Blockchain) GetBurningAddress

                                                        func (b Blockchain) GetBurningAddress() (string, error)

                                                          Get burning address of chain

                                                          func (Blockchain) GetBurningAddressFromChain

                                                          func (b Blockchain) GetBurningAddressFromChain() (string, error)

                                                            Get burn address

                                                            func (Blockchain) GetContractingStatus

                                                            func (b Blockchain) GetContractingStatus(txHash string) (string, *big.Int, error)

                                                            func (Blockchain) GetDecryptOutputCoinByKeyOfTrans

                                                            func (b Blockchain) GetDecryptOutputCoinByKeyOfTrans(txHash, paymentAddress, readonlyKey string) (map[string]interface{}, error)

                                                            func (Blockchain) GetDecryptOutputCoinByKeyOfTransaction

                                                            func (b Blockchain) GetDecryptOutputCoinByKeyOfTransaction(txHash, paymentAddress, readonlyKey string) (*entity.DecrypTransactionPRV, error)

                                                            func (Blockchain) GetEncryptionFlag

                                                            func (b Blockchain) GetEncryptionFlag() (int, int, error)

                                                            func (Blockchain) GetIssuingStatus

                                                            func (b Blockchain) GetIssuingStatus(txHash string) (string, uint64, error)

                                                            func (Blockchain) GetListCustomTokenBalance

                                                            func (b Blockchain) GetListCustomTokenBalance(paymentAddress string) (*entity.ListCustomTokenBalance, error)

                                                              Get balance wallet (all pToken) by payment address

                                                              func (Blockchain) GetListPrivacyCustomTokenBalanceByID

                                                              func (b Blockchain) GetListPrivacyCustomTokenBalanceByID(privateKey, tokenID string) (*big.Int, error)

                                                              func (Blockchain) GetNodeAvailable

                                                              func (b Blockchain) GetNodeAvailable(validatorKey string) (float64, error)

                                                                Get node available

                                                                func (Blockchain) GetPDexTradeStatus

                                                                func (b Blockchain) GetPDexTradeStatus(txId string) (constant.PDexTradeStatus, error)

                                                                  Get pDex trade status

                                                                  func (Blockchain) GetPdeState

                                                                  func (b Blockchain) GetPdeState(beacon int32) (map[string]interface{}, error)

                                                                    Get report pDex State

                                                                    func (Blockchain) GetPublickeyFromPaymentAddress

                                                                    func (b Blockchain) GetPublickeyFromPaymentAddress(paymentAddress string) (string, error)

                                                                      Get public key from payment address

                                                                      func (Blockchain) GetReportPdex

                                                                      func (b Blockchain) GetReportPdex(pdexRange, tokens string) (*entity.ResponsePdex, error)

                                                                        Get report pDex

                                                                        func (Blockchain) GetRewardAmount

                                                                        func (b Blockchain) GetRewardAmount(paymentAddress string) ([]entity.RewardItems, error)

                                                                          Get reward amount balance

                                                                          func (Blockchain) GetShardFromPaymentAddress

                                                                          func (b Blockchain) GetShardFromPaymentAddress(paymentAddress string) (int, error)

                                                                            Get shard id from payment address

                                                                            func (Blockchain) GetSwapProof

                                                                            func (b Blockchain) GetSwapProof(blockHeight uint64, rpcFuncName string) (*ethereum.GetInstructionProof, error)

                                                                            func (Blockchain) GetTotalStaker

                                                                            func (b Blockchain) GetTotalStaker() (float64, error)

                                                                              Get total staker

                                                                              func (Blockchain) GetTransactionAmount

                                                                              func (b Blockchain) GetTransactionAmount(txId string, walletAddress string, readOnlyKey string) (uint64, error)

                                                                                Get transaction amount

                                                                                func (Blockchain) GetTransactionByReceivers

                                                                                func (b Blockchain) GetTransactionByReceivers(paymentAddress, readonlyKey string) (res *entity.ReceivedTransactions, err error)

                                                                                  Get tx by receivers

                                                                                  func (Blockchain) GetTxByHash

                                                                                  func (b Blockchain) GetTxByHash(txHash string) (*entity.TransactionDetail, error)

                                                                                    Get tx detail by hash

                                                                                    func (Blockchain) GetUTXO

                                                                                    func (b Blockchain) GetUTXO(privateKey string, tokenId string) ([]*entity.Utxo, error)

                                                                                      Get all unspent output coins except spending of wallet

                                                                                      func (Blockchain) ListAccounts

                                                                                      func (b Blockchain) ListAccounts(params interface{}) (interface{}, error)

                                                                                      func (Blockchain) ListPrivacyCustomToken

                                                                                      func (b Blockchain) ListPrivacyCustomToken() ([]entity.PCustomToken, error)

                                                                                        Get list pToken

                                                                                        func (Blockchain) ListRewardAmountAll

                                                                                        func (b Blockchain) ListRewardAmountAll() ([]entity.RewardData, error)

                                                                                          Reward balance (all pToken) of node

                                                                                          func (Blockchain) ListRewardAmounts

                                                                                          func (b Blockchain) ListRewardAmounts() ([]entity.RewardAmount, error)

                                                                                            Reward balance (PRV) of node

                                                                                            func (Blockchain) ListUnstake

                                                                                            func (b Blockchain) ListUnstake() ([]entity.Unstake, error)

                                                                                              Get node unstake

                                                                                              func (Blockchain) SellPRV

                                                                                              func (b Blockchain) SellPRV(privateKey string, buyTokenId string, tradingFee uint64, sellTokenAmount uint64, minimumAmount uint64, traderAddress string) (string, error)

                                                                                                Sell PRV

                                                                                                func (Blockchain) SellPToken

                                                                                                func (b Blockchain) SellPToken(privateKey string, buyTokenId string, tradingFee uint64, sellTokenId string, sellTokenAmount uint64, minimumAmount uint64, traderAddress string, networkFeeTokenID string, networkFee uint64) (string, error)

                                                                                                  Sell pToken

                                                                                                  func (Blockchain) SendPrivacyCustomTokenTransaction

                                                                                                  func (b Blockchain) SendPrivacyCustomTokenTransaction(privateKey string, req entity.WalletSend) (map[string]interface{}, error)

                                                                                                    Send custom pToken to those address

                                                                                                    Example:

                                                                                                    bc := NewBlockchain(....
                                                                                                    
                                                                                                    var receivers = make(map[string]uint64)
                                                                                                    receivers["12Rsf3wFnThr3T8dMafmaw4b3CzUatNao61dkj8KyoHfH5VWr4ravL32sunA2z9UhbNnyijzWFaVDvacJPSRFAq66HU7YBWjwfWR7Ff] = 1000000000
                                                                                                    
                                                                                                    param := entity.WalletSend{
                                                                                                    	TokenID:          "ffd8d42dc40a8d166ea4848baf8b5f6e9fe0e9c30d60062eb7d44a8df9e00854",
                                                                                                    	Type:             1,
                                                                                                    	TokenName:        "",
                                                                                                    	TokenSymbol:      "",
                                                                                                    	PaymentAddresses: receivers,
                                                                                                    }
                                                                                                    
                                                                                                    tx, err := bc.SendPrivacyCustomTokenTransaction(privateKey, param)
                                                                                                    

                                                                                                    func (Blockchain) SendToken

                                                                                                    func (b Blockchain) SendToken(privateKey string, receiverAddress string, tokenId string, amount uint64, fee uint64, feeTokenId string) (string, error)

                                                                                                      Send token to those address

                                                                                                      type BlockchainInterface

                                                                                                      type BlockchainInterface interface {
                                                                                                      	//acount
                                                                                                      	GetAccount(params interface{}) (interface{}, error)
                                                                                                      	ListAccounts(params interface{}) (interface{}, error)
                                                                                                      	GetUTXO(privateKey string, tokenId string) ([]*entity.Utxo, error)
                                                                                                      
                                                                                                      	//block
                                                                                                      	GetBlockInfo(blockHeight int32, shardID int) (*entity.GetBlockInfo, error)
                                                                                                      	GetBlockChainInfo() (*entity.GetBlockChainInfoResult, error)
                                                                                                      	GetBestBlockHeight(shardID int) (uint64, error)
                                                                                                      	GetSwapProof(
                                                                                                      		blockHeight uint64,
                                                                                                      		rpcFuncName string,
                                                                                                      	) (*ethereum.GetInstructionProof, error)
                                                                                                      	GetBeaconHeight() (int32, error)
                                                                                                      	GetBeaconBestStateDetail() (res *entity.BeaconBestStateResp, err error)
                                                                                                      	GetBurningAddress() (string, error)
                                                                                                      
                                                                                                      	//encrypt
                                                                                                      	GetEncryptionFlag() (int, int, error)
                                                                                                      	EncryptData(pubKey string, params interface{}) (string, error)
                                                                                                      
                                                                                                      	//pdex
                                                                                                      	GetPdeState(beacon int32) (map[string]interface{}, error)
                                                                                                      	GetReportPdex(pdexRange, tokens string) (*entity.ResponsePdex, error)
                                                                                                      	TradePDex(privateKey string, buyTokenId string, tradingFee uint64, sellTokenId string, sellTokenAmount uint64, minimumAmount uint64, traderAddress string, networkFeeTokenID string, networkFee uint64) (string, error)
                                                                                                      	GetPDexTradeStatus(txId string) (constant.PDexTradeStatus, error)
                                                                                                      
                                                                                                      	//stake
                                                                                                      	ListUnstake() ([]entity.Unstake, error)
                                                                                                      	CreateAndSendStakingTransaction(receiveRewardAddress, privateKey, userPaymentAddress, userValidatorKey, burnTokenAddress string) (string, error)
                                                                                                      	CreateAndSendUnStakingTransaction(privateKey, userPaymentAddress, userValidatorKey, burnTokenAddress string) (string, error)
                                                                                                      	CreateWithDrawReward(privateKey, paymentAddress, tokenId string) (string, error)
                                                                                                      	GetRewardAmount(paymentAddress string) ([]entity.RewardItems, error)
                                                                                                      	GetNodeAvailable(validatorKey string) (float64, error)
                                                                                                      	//wallet
                                                                                                      	CreateWalletAddress() (paymentAddress, pubkey, readonlyKey, privateKey string, err error)
                                                                                                      	CreateNodeWalletAddress(byShardId int) (paymentAddress, pubkey, readonlyKey, privateKey, validatorKey string, shardId int, err error)
                                                                                                      	CreateWalletAddressByShardId(byShardId int) (paymentAddress, pubkey, readonlyKey, privateKey string, shardId int, err error)
                                                                                                      	ListRewardAmounts() ([]entity.RewardAmount, error)
                                                                                                      	ListRewardAmountAll() ([]entity.RewardData, error)
                                                                                                      	GetBalanceByPrivateKey(privateKey string) (uint64, error)
                                                                                                      	GetBalanceByPaymentAddress(paymentAddress string) (uint64, error)
                                                                                                      	GetListCustomTokenBalance(paymentAddress string) (*entity.ListCustomTokenBalance, error)
                                                                                                      	GetListPrivacyCustomTokenBalanceByID(privateKey, tokenID string) (*big.Int, error)
                                                                                                      	GetAmountVoteToken(paymentAddress string) (*entity.ListCustomTokenBalance, error)
                                                                                                      	CreateAndSendConstantTransaction(privateKey string, req entity.WalletSend) (string, error)
                                                                                                      	CreateAndSendConstantPrivacyTransaction(privateKey string, req entity.WalletSend) (string, error)
                                                                                                      	SendPrivacyCustomTokenTransaction(privateKey string, req entity.WalletSend) (map[string]interface{}, error)
                                                                                                      	ListPrivacyCustomToken() ([]entity.PCustomToken, error)
                                                                                                      	GetTxByHash(txHash string) (*entity.TransactionDetail, error)
                                                                                                      	GetDecryptOutputCoinByKeyOfTransaction(txHash, paymentAddress, readonlyKey string) (*entity.DecrypTransactionPRV, error)
                                                                                                      	GetAmountByHashFromReceiveAddressAndToAddress(txHash, fromAddress, toAddress string) (*big.Int, error)
                                                                                                      	GetDecryptOutputCoinByKeyOfTrans(txHash, paymentAddress, readonlyKey string) (map[string]interface{}, error)
                                                                                                      	CreateAndSendIssuingRequest(privateKey, cstDCBIssueAddress, receiveAddress string, depositedAmount *big.Int, ConstantAssetType string, ConstantCurrencyType string) (string, error)
                                                                                                      	GetIssuingStatus(txHash string) (string, uint64, error)
                                                                                                      	GetContractingStatus(txHash string) (string, *big.Int, error)
                                                                                                      	CreateAndSendIssuingRequestForPrivacyToken(privateKey string, metadata map[string]interface{}) (string, error)
                                                                                                      	CreateAndSendContractingRequestForPrivacyToken(privateKey string, autoChargePRVFee int, metadata map[string]interface{}) (string, error)
                                                                                                      	CreateAndSendTxWithIssuingEth(privateKey, burnerAddress string, metadata map[string]interface{}) (string, []byte, error)
                                                                                                      	GetBridgeReqWithStatus(TxReqID string) (int, error)
                                                                                                      	GenerateTokenID(symbol, pSymbol string) (string, error)
                                                                                                      	GetPublickeyFromPaymentAddress(paymentAddress string) (string, error)
                                                                                                      	GetShardFromPaymentAddress(paymentAddress string) (int, error)
                                                                                                      	GetBurningAddressFromChain() (string, error)
                                                                                                      	GetTransactionByReceivers(PaymentAddress, ReadonlyKey string) (res *entity.ReceivedTransactions, err error)
                                                                                                      	GetAmountByMemo(listTrans []entity.ReceivedTransaction, memo, tokenID string) (string, uint64)
                                                                                                      	CreateAndSendBurningForDepositToSCRequest(
                                                                                                      		incPrivateKey string,
                                                                                                      		amount *big.Int,
                                                                                                      		remoteAddrStr string,
                                                                                                      		incTokenId string,
                                                                                                      	) (*entity.BurningForDepositToSCRes, error)
                                                                                                      	GetBalance(privateKey string, tokenId string) (uint64, error)
                                                                                                      	SellPRV(privateKey string, buyTokenId string, tradingFee uint64, sellTokenAmount uint64, minimumAmount uint64, traderAddress string) (string, error)
                                                                                                      	SellPToken(privateKey string, buyTokenId string, tradingFee uint64, sellTokenId string, sellTokenAmount uint64, minimumAmount uint64, traderAddress string, networkFeeTokenID string, networkFee uint64) (string, error)
                                                                                                      	GetTransactionAmount(txId string, walletAddress string, readOnlyKey string) (uint64, error)
                                                                                                      	SendToken(privateKey string, receiverAddress string, tokenId string, amount uint64, fee uint64, feeTokenId string) (string, error)
                                                                                                      	DefragmentationPrv(privateKey string, maxValue int64) (string, error)
                                                                                                      	DefragmentationPToken(privateKey string, tokenId string) (string, error)
                                                                                                      	GetTotalStaker() (float64, error)
                                                                                                      }

                                                                                                      Directories

                                                                                                      Path Synopsis