Giter Club home page Giter Club logo

Comments (11)

rekiwu avatar rekiwu commented on August 21, 2024

補充
listaccounts的結果是
{ "" : { }, "Reki" : { } }

from gcoin-community.

lbyyy avatar lbyyy commented on August 21, 2024

getassetinfo無法使用是怎樣的情況呢
我這邊看沒啥問題

from gcoin-community.

rekiwu avatar rekiwu commented on August 21, 2024

我是顯示如下:
./src/bitcoin-cli -gcoin getassetinfo
error: {"code":-1,"message":"getassetinfo\n\n\n\nReturn a JSON object of licenseinfo of color.\n\nArguments:\n1. \"color\" (numeric, required) The color\n\nResult:\n{\n \"version\" : n, (numeric) The version\n \"name\" : xxx, (string) The name\n \"description\" : xxx, (string) The description\n \"issuer\" : xxx, (string) The issuer name\n \"divisibility\" : true, (bool) The divisibility\n \"fee_type\" : n, (int) The fee type\n \"fee_rate\" : x.xx, (double) The fee rate\n \"fee_collector\" : xxx, (string) The fee collector address\n \"upper_limit\" : xxx, (numeric) The upper limit\n \"mint_schedule\" : false, (bool) Have mint schedule or not\n \"member_control\" : false, (bool) Have member control or not \n \"metadata_link\" : xxx, (string) Hyper link for the metadata \n \"metadata_hash\" : xxx, (string) Hash for the metadata \n}\n\nExamples:\n> bitcoin-cli getassetinfo \n> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getassetinfo\", \"params\": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n"}

from gcoin-community.

willliw avatar willliw commented on August 21, 2024

getassetinfo 後面參數接 color

from gcoin-community.

willliw avatar willliw commented on August 21, 2024

正好在弄先改一下

from gcoin-community.

rekiwu avatar rekiwu commented on August 21, 2024

謝謝告知
看起來getassetinfo內容就是license info ??

from gcoin-community.

hihiben avatar hihiben commented on August 21, 2024

是的,getassetinfo應該回傳該color所對應到的license info內容

from gcoin-community.

hihiben avatar hihiben commented on August 21, 2024

account這邊基本上應該是follow原本bitcoin上面的使用邏輯,gcoin對account這邊沒有太大的更動。
由於在你的流程裡面沒有很詳細的步驟,在keypool裡面沒有key時應該是沒有辦法直接getaccountaddress的。
如果你有下keypoolrefill的話,getaccountaddress會幫你選一個key關聯到這個account並且把它當作這個account的代表key。setaccount會把你指定的address關聯到這個account但不會把這個所謂的代表key換掉,只有在你使用了這個address之後才會再另外指定一個address把現在這個替換掉。如果需要看目前所有和這個account有關的address則是用getaddressesbyaccount的指令來檢視。

from gcoin-community.

rekiwu avatar rekiwu commented on August 21, 2024

不好意思,我的流程簡述如下:
重新make一個ver. 1.1的gcoin node
bitcoind -gcoin -daemon./src/bitcoin-cli -gcoin來下指令

[1]$keypoolrefill
[2]$getfixedaddress
回傳1Cj2ij
[3]$setaccount 1Cj2ij Reki
[4]$getaccountaddress Reki
回傳176gaG
[5]$listonewalletaddress
回傳176gaG
[6]$getaccount 176gaG
回傳Reki
[7]$getaccount 1Cj2ij
回傳Reki
[8]$getaddressesbyaccount Reki
回傳["176gaG", "1Cj2ij"]

因為我只有執行過一次setaccount
Reki這個account name是在step [3]時才出現,並set給1Cj2ij
不太明白為何176gaG也被set Reki上去就是了...

因為透過account可能可以用來管理address,所以希望能弄清楚一些。

from gcoin-community.

lbyyy avatar lbyyy commented on August 21, 2024

簡單來說getaccountaddress就是拿一把沒用過的key把它標成account(Reki)
你先呼叫過getaccountaddress了所以176gaG也因此被標成Reki.

from gcoin-community.

rekiwu avatar rekiwu commented on August 21, 2024

原來如此
是我會錯意了,以為getaccountaddress是查詢用

from gcoin-community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.