0516 BitShares狀態更新我已經更新了測試指南, 請見此:
http://bitshares.org/documentation/group__dpos__manual__testing.html主要的變更在於API(應用程式介面)的使用方式以及錢包管理.
主要的目標是讓人們在使用時不是把錢送給特定"地址"而是送給特定"帳號",
帳號則是一串階層式金鑰.
每一次你送給某個帳號的時候, 你都會使用不同的公鑰 (地址),
最終來說這將會允許隱私加強轉賬的自動化.
我們也已經擴充了API, 並實做了更多東西. 請參考以下資訊:
blockchain_get_block <block_hash> 從指定的區塊hash擷取區塊標頭. Retrieves the block header for the given block hash
blockchain_get_block_by_number <block_number> 從指定的區塊數擷取區塊標頭. Retrieves the block header for the given block number
blockchain_get_blockcount 從最長區塊鏈傳回區塊數目. Returns the number of blocks in the longest block chain.
blockchain_get_blockhash <block_num> 從索引提供的最佳區塊鏈傳回區塊的hash值. Returns hash of block in best-block-chain at index provided..
blockchain_get_delegates [first] [count] 傳回代表清單, 並以選票數排序. Returns the list of delegates sorted by vote
blockchain_get_name_record <name> 擷取特定名稱的紀錄. Retrieves the name record
blockchain_get_names [first] [count] 傳回保留的名稱清單, 並且以字母排序. Returns the list of reserved names sorted alphabetically
blockchain_get_transaction <transaction_id> 獲得錢包內轉帳的詳細資訊. Get detailed information about an in-wallet transaction
get_info 提供一般的資訊, 例如錢包餘額, 區塊數, 連線, 以及鎖定時間. Provides common data, such as balance, block count, connections, and lock time
help [command] 列出指令集或是指定指令的詳細資訊. Lists commands or detailed help for specified command.
network_add_node <node> <command> 嘗試從節點清單加入或移除<node>或是嘗試連線到<node>. Attempts add or remove <node> from the peer list or try a connection to <node> once
network_get_connection_count 傳回連接到其他節點的連線數. Returns the number of connections to other nodes.
network_get_peer_info 傳回已連線節點的資訊. Returns data about each connected node.
stop 停止BitShares伺服器. Stop BitShares server
validate_address <address> 傳回指定Bitshares地址的資訊. Return information about given BitShares address.
wallet_close 關閉目前打開的錢包. Closes the curent wallet if one is open.
wallet_create <wallet_name> <password> 打開指定名稱的錢包. Opens the wallet of the given name
wallet_create_receive_account <account_name> 加入新的收款的帳號. Add new account for receiving payments
wallet_create_sending_account <account_name> <account_key> 加入新的付款帳號. Add new account for sending payments
wallet_get_account <account_name> 列出所有外來地址以及它們聯繫到這個錢包的標籤. Lists all foreign addresses and their labels associated with this wallet
wallet_get_balance [account_name] [minconf] [asset] 傳回錢包的目前餘額. Returns the wallet's current balance
wallet_get_name 傳回wallet_open接收到的錢包名稱. Returns the wallet name passed to wallet_open
wallet_get_transaction_history [count] 擷取這個錢包的所有轉帳. Retrieves all transactions into or out of this wallet.
wallet_import_bitcoin <filename> <password> 匯入一個BTC/PTS錢包. Import a BTC/PTS wallet
wallet_import_private_key <key> [account_name] [wallet_rescan_blockchain] 匯入一個BTC/PTS 私鑰(WIF格式). Import a BTC/PTS private key in wallet import format (WIF)
wallet_list_receive_accounts [start] [count] 列出所有的外來地址以及它們聯繫到這個錢包的標籤. Lists all foreign addresses and their labels associated with this wallet
wallet_list_reserved_names [account_name] 列出這個錢包所掌控的保留名稱, 並且以帳號過濾. Lists all reserved names controlled by this wallet, filtered by account.
wallet_list_sending_accounts [start] [count] 列出所有的外來地址以及它們聯繫到這個錢包的標籤. Lists all foreign addresses and their labels associated with this wallet
wallet_lock 鎖定錢包內的私鑰, 停止支付指令直到解鎖. Lock the private keys in wallet, disables spending commands until unlocked
wallet_open <wallet_name> <password> 打開指定名稱的錢包. Opens the wallet of the given name
wallet_open_file <wallet_file> <password> 打開指定路徑的錢包. Opens the wallet at the given path.
wallet_register_delegate <name> <data> 註冊一個代表來被持股人投票. Registeres a delegate to be voted upon by shareholders.
wallet_rename_account <current_account_name> <new_account_name> 列出這個錢包所掌控的保留名稱, 並且以帳號過濾. Lists all reserved names controlled by this wallet, filtered by account.
wallet_rescan_blockchain [starting_block] 從指定區塊重新掃描區塊鏈. Rescan the block chain from the given block
wallet_rescan_blockchain_state 重新掃描創世區塊以及狀態(非轉帳). Rescans the genesis block and state (not the transactions)
wallet_reserve_name <name> <data> 擷取名稱紀錄. Retrieves the name record
wallet_transfer <amount> <sending_account_name> [invoice_memo] [from_account] [asset_id] 送出指定數量到指定帳號, 預設是DAC的股份數. Sends given amount to the given address, assumes shares in DAC
wallet_unlock <spending_pass> <timeout> 解鎖錢包內的私鑰來開啟支付操作. Unlock the private keys in the wallet to enable spending operations
如果你對於新的轉帳結構感到好奇,
你可以在這裡參見以下範例json dump:
{
"expiration": null,
"delegate_id": null,
"operations": [{
"type": "withdraw_op_type",
"data": {
"balance_id": "XTSKh6JP6QzMmeUmmK1T16gxgadrJ547ocGT",
"amount": 154321,
"claim_input_data": ""
}
},{
"type": "deposit_op_type",
"data": {
"amount": 54321,
"condition": {
"asset_id": 0,
"delegate_id": 8,
"condition": "withdraw_signature_type",
"data": {
"owner": "XTSAg5YxD9reTXr5iQWBZEJrLzzMxMxvnFhy"
}
}
}
}
],
"signatures": [
"2028da68efe2696ab7895e86c1b35affbb7cd1b71d8f33124fe81ad785ace3ed55226e0e622098b9c45f8660801b4b929556102c3da549d887c5da99262b5c6275"
]
}
如你所見, 整個轉帳在區塊鏈之外便是完全可讀的,
上述例子正從XTSKh6JP6QzMmeUmmK1T16gxgadrJ547ocGT轉移154321,
並送給XTSAg5YxD9reTXr5iQWBZEJrLzzMxMxvnFhy共計54321,
轉帳費用則是100000.