atlaschiew / bitcoin-cryptocurrency-tutorial

PHP & Cryptocurrencies Collections. Powered By https://btcschools.net
https://www.btcschools.net
Apache License 2.0
159 stars 21 forks source link

About the address format #22

Closed hungyu99 closed 1 year ago

hungyu99 commented 1 year ago

Hello, may I ask the address format of KASPA kaspa:precqv0krj3r6uyyfa36ga7s0u9jct0v4wg8ctsfde2gkrsgwgw8jgxfzfc98 How can I get this address format? https://github.com/kaspanet/kaspad https://kaspa.org/ sorry for the trouble, thank you

您好,請問KASPA這個的地址格式kaspa:precqv0krj3r6uyyfa36ga7s0u9jct0v4wg8ctsfde2gkrsgwgw8jgxfzfc98 請問如何取得這種的地址格式呢? https://github.com/kaspanet/kaspad https://kaspa.org/ 麻煩您了,謝謝

atlaschiew commented 1 year ago

hi, 我不了解kaspa,但我随便到go里看,他们是使用bech32 encoding

address library https://github.com/kaspanet/kaspad/blob/master/util/address.go

如何操作函数就直接看test file吧 https://github.com/kaspanet/kaspad/blob/master/util/address_test.go

hungyu99 commented 1 year ago

您好, 另外請問是否可以使用下列2個工具可以導出Kaspa這種地址格式呢?

  1. https://iancoleman.io/bip39/ https://github.com/iancoleman/bip39
  2. https://github.com/dan-da/hd-wallet-derive 感謝您的解答,不勝感激!!
atlaschiew commented 1 year ago

大概率是可以的,原因是这两个repo都有bech32 library。只是你要花时间去推导出来。