Closed AnasSaeed123 closed 4 years ago
@AnasSaeed123 26 is the version to use for testnet addresses, not the value used for transactions. See https://github.com/blockstack/stacks-transactions-js/blob/f41adb10bc93327668ccf74f76a826d545196e6a/src/constants.ts#L89
@AnasSaeed123 26 is the version to use for testnet addresses, not the value used for transactions. See
It is using transaction version not address version.
@psq Thanks a lot for your reply. I have created address from address version and received tokens from faucet. But in this repository it is giving wrong input argument in address generation.
the code is correct, you just need to dig a bit deeper, because it ends up translating the TansactionVersion.Testnet
into the correct value:
https://github.com/blockstack/stacks-transactions-js/blob/02cbef85dc26487ee40d6ca4e8484c6e485ae714/src/types.ts#L159-L160
@psq Thanks a lot.
I am giving input argument (TransactionVersion.Testnet) in c32address function
The value of TransactionVersion.Testnet is: 128
When making testnet address it gives me this error:
'Invalid version (must be between 0 and 31)'