What is a blockchain address? How to get address information | Tokenview

The blockchain address generally refers to the wallet address. To put it bluntly, the wallet on the blockchain is a tool for managing digital assets (we usually call currency). The transfer of your currency and the records of transfer and transfer are all realized through the wallet. Just like you need a home address when you go home, digital currency also needs a home address. The difference is that the address of digital currency is unique. Once you have an address, others can transfer money to you.

What is the address? In a blockchain system, the private key is generally a 256-bit binary string randomly generated by a special random algorithm, and the public key is generated by the private key through an irreversible algorithm, (that is, you only The result can be deduced from the initial value, but the initial value cannot be deduced from the result), and the public key is output through the irreversible algorithm. In order to make the system more secure.) What I have to mention here is that because the operation is performed by an irreversible algorithm, the public key can only be deduced from the private key, and the address can be deduced from the public key. On the contrary, if you know someone else’s address or public key, you It is completely impossible to push out other people's private keys.

How to get the address information of the blockchain? If you build it yourself or with a team, it will take time and effort. In fact, you can also learn from third-party node services, and directly call the interface to obtain address information for building a blockchain wallet .

  • Non-smart contract public chain: The address information can be obtained through the public chain abbreviation and address, including: balance, ranking, transaction times, transfer amount, income amount, and the latest transaction details, example:
  •         
            	{
      "code": 1,
      "msg": "成功",
      "data": [
        {
          "type": "address",
          "network": "BTC",
          "hash": "183hmJGRuTEi2YDCWy5iozY8rZtFwVgahM",
          "rank": 6,
          "txCount": 32,
          "spend": 0,
          "receive": 85947.34749882,
          "txs": [
            {
              "type": "tx",
              "network": "BTC",
              "height": 548509,
              "index": "802",
              "time": 1541201463,
              "txid": "af77d09561400f32cc2036ca43b5c40a90405d1905a51f59bc3bf4ff94674d5f",
              "fee": "0.00000226",
              "inputs": [
                {
                  "input_no": 0,
                  "address": "1AK4LYE6PYwBmSYHQX3v2UsXXHTvCAsJeK",
                  "value": "0.00073409"
                }
              ],
              "outputs": [
                {
                  "output_no": 0,
                  "address": "1AK4LYE6PYwBmSYHQX3v2UsXXHTvCAsJeK",
                  "value": "0.00072628"
                },
                {
                  "output_no": 1,
                  "address": "183hmJGRuTEi2YDCWy5iozY8rZtFwVgahM",
                  "value": "0.00000555"
                }
              ]
            }
          ]
        }
      ]
    }
    
    
  • Smart contract public chain: through the abbreviation of the public chain and the token address, the information of obtaining the token includes: the number of transactions of the token, the number of people holding the token (balance > 0), and the issuance of the token Quantity, full name, abbreviation, precision, icon information. Example:
  •         
    {
      "code": 1,
      "msg": "成功",
      "data": {
        "network": "ETH",
        "tokenHash": "0x519475b31653e46d20cd09f9fdcf3b12bdacb4f5",
        "transferCnt": 1007327,
        "holderCnt": 2839,
        "tokenInfo": {
          "h": "0x519475b31653e46d20cd09f9fdcf3b12bdacb4f5",
          "p": "ETH",
          "f": "VIU",
          "s": "VIU",
          "d": "18",
          "t": "1000000000"
        }
      }
    }
    
    
  • Address balance: Obtain the address balance through the abbreviation and address of the public chain. Example:
  •         
    {
      "code": 1,
      "msg": "成功",
      "data": "0.019239809829239"
    }
    
    
  • Smart contract address: Through the abbreviation and address of the public chain, the address information includes: balance, ranking, transaction times, transfer amount, income amount, and the latest transaction details, example
  •         
            	{
      "code": 1,
      "msg": "成功",
      "data": {
        "type": "address",
        "network": "ETH",
        "hash": "0x77777777777c868ba9b9772b1da1128d820a3cc0",
        "addrAlias": null,
        "rank": 3429146,
        "txCount": null,
        "spend": null,
        "receive": null,
        "txs": [
          {
            "type": "tx",
            "network": "ETH",
            "height": 4669357,
            "blockHash": "0xecff7b1c859a913068604c231fb7a6e2498c6d51050d008555457a074ac7a9b5",
            "index": "54",
            "time": 1512319744,
            "txid": "0x6369b23c7e1648026559952dff6e2e1e6c5b15040e279aa69e76750a9e461907",
            "fee": "0.000021",
            "confirmations": null,
            "nonce": 4359091,
            "formIsContract": null,
            "toIsContract": null,
            "block_no": 4669357,
            "gasPrice": 1000000000,
            "from": "0xea674fdde714fd979de3edf0f56aa9716b898ec8",
            "gasLimit": 50000,
            "value": "0.04958108415768947",
            "to": "0x77777777777c868ba9b9772b1da1128d820a3cc0",
            "gasUsed": 21000,
            "callTransferErr": null,
            "tokenTransferErr": null,
            "traceErr": null,
            "receiptErr": null,
            "create": null,
            "suicide": null,
            "callTransfer": null,
            "tokenTransfer": null
          },
      
    
  • Token holder address information: Through the abbreviation and address of the token platform, the address information includes: balance, ranking, transaction times, and details of the last 50 transactions. Example:
  •         
    {
      "code": 1,
      "msg": "成功",
      "data": {
        "type": "address",
        "network": "ETH",
        "hash": "0x18a744e4564601a5241c910aa0cd69aee82287a8",
        "rank": 834906,
        "txs": [
          {
            "type": "tx",
            "network": "ETH",
            "height": 6636957,
            "blockHash": "0x26cb320d14a0e4845dab192eed1b8e740268e6d6fab720e2433b4e65cd794941",
            "index": "105",
            "time": 1541264645,
            "txid": "0xb7ade7d9c0bd088679e76056f4024d3c9494609f005309c0b9dfafa209139a47",
            "fee": "0.00036624",
            "nonce": 60,
            "toIsContract": 1,
            "block_no": 6636957,
            "gasPrice": 10000000000,
            "from": "0x18a744e4564601a5241c910aa0cd69aee82287a8",
            "gasLimit": 54168,
            "value": "0",
            "to": "0xe36df5bb57e80629cfc28a31e5f794071c085eca",
            "gasUsed": 36624
          },
      
    

おすすめ

転載: blog.csdn.net/Tokenview/article/details/103370161