Author Topic: how to list balance of a specify address (no-titan)  (Read 1042 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
thank you , the balance ID is similar as change of address in btc,what is different ?
na .. in BTS there are NO change addresses ..
but there are different assets on the blockchain which can be held by the SAME address / key ..

hence, in order to distinguish different assets in the same address you can use balance ids ..
a balanceid holds a single asset for a single owner .. and also says how much funds are (left) in that balance id ..
it's like a sub section in a deposit box .. one key .. different sections that can be identified with a balanceid

Offline BTSdac

  • Hero Member
  • *****
  • Posts: 1219
    • View Profile
  • BitShares: K1
thank you , the balance ID is similar as change of address in btc,what is different ?
github.com :pureland
BTS2.0 API :ws://139.196.37.179:8091
BTS2.0 API 数据源ws://139.196.37.179:8091

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
The keys behind "owner" are the keys that are need to access the funds .. those are the keys for which you need a private key and which are used to sign transactions ..

the other keys starting with BTS (i.e., those above "condition") are actually NOT KEYS .. they are what is called a balanceID .. and they refer to a asset,slate_od,owner pair .. you can think of it as an unspent output like in bitcoin ..

the balanceids are derived from the 'condition' below it (hash of it) .. and hence:
DO NOT SEND FUNDS TO A BALANCEID ..

Offline BTSdac

  • Hero Member
  • *****
  • Posts: 1219
    • View Profile
  • BitShares: K1
how to list balance of a specify address
Code: [Select]
[code]blockchain_list_address_balances BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom

[[
    "BTSJszjT28TrQYCxXxKhsrBLHZVprjCu5y5L",{
      "condition": {
        "asset_id": 0,
        "slate_id": 9028950458771370249,
        "type": "withdraw_signature_type",
        "data": {
          "owner": "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom",
          "memo": {
            "one_time_key": "BTS7PEn8jtaaCGJRetk1iSf6vnBaMUSQKp9c3NB1DAAgdueHYdPFP",
            "encrypted_memo_data": "c7b0b04ba638379db5f2d87a931b39040be9d79d0a9102c8cfb7dd0c1cba405f28eda2d0957d2a510487912a5af8e242aff76ef2bd11ac45176165a3242b5012"
          }
        }
      },
      "balance": 11244920862148,
      "restricted_owner": null,
      "snapshot_info": null,
      "deposit_date": "2015-03-18T08:11:20",
      "last_update": "2015-03-18T08:11:20",
      "meta_data": null
    }
  ],[
    "BTSKdfQKVyFDadEdckZddnQKd1jzENLKfgno",{
      "condition": {
        "asset_id": 0,
        "slate_id": 0,
        "type": "withdraw_signature_type",
        "data": {
          "owner": "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom",
          "memo": {
            "one_time_key": "BTS6K49EbGG2sPLL8tsraWyUFTfqVGrwqMgb27Pq8PCBRudjVccWk",
            "encrypted_memo_data": "a723f8e70908fb93c2ccf8a06fc41750a98c58d769b97c482f7b30b9d1b0b63d1fef4a058d981a62dc742fd3b9947da1e972d67a17af8f6bc46fc6841a9576ea"
          }
        }
      },
      "balance": 1000000,
      "restricted_owner": null,
      "snapshot_info": null,
      "deposit_date": "2015-03-18T08:07:30",
      "last_update": "2015-03-18T08:07:30",
      "meta_data": null
    }
  ],[
    "BTSMEt4hPaw59csDTUgSVv5etKU4njb2Qedi",{
      "condition": {
        "asset_id": 0,
        "slate_id": 9028950458771370249,
        "type": "withdraw_signature_type",
        "data": {
          "owner": "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom",
          "memo": {
            "one_time_key": "BTS6aTHLi4rJxgRSoheMTrFNvnhiKRt2pLKj5ij179xA8Qy8Yifpi",
            "encrypted_memo_data": "e7a22d029a67c9797046c531f25ee493d36ed410d919964f3e0a23dfc2b074f4b6294a972cf39c855fe1ef5404ce16e459ddb2b208aa981f5ae471111f3a694a"
          }
        }
      },
      "balance": 4500000000000,
      "restricted_owner": null,
      "snapshot_info": null,
      "deposit_date": "2015-03-18T08:46:10",
      "last_update": "2015-03-18T08:46:10",
      "meta_data": null
    }
  ]
]
[/code]
I don`t know below address "BTSAeGeuB22wYgnLg5ek3qeLiuXT3LMHwtom" there are  there others address ,what the relationship between  them?
github.com :pureland
BTS2.0 API :ws://139.196.37.179:8091
BTS2.0 API 数据源ws://139.196.37.179:8091