Closed kf106 closed 2 years ago
If you run a node of custom Waves blockchain, then you just need to set the Custom profile and specify URL to your node API. For example, http://localhost:6869
Chaid ID will be extracted from the node API automatically.
Thanks for the rapid response. I'll give it a try.
Nope, on adding the custom node and entering a seed phrase, the address generated still starts with 3. I guess there's a possibility the API isn't returning the correct chainId, but as the Java wallet works fine I suspect this isn't the case. Is it possible to introduce a hard override for the chainId?
I can see how the network byte is obtained in waves.ts
:
export function networkByteFromAddress(address: string): string {
return String.fromCharCode(libs.crypto.base58Decode(address)[1]);
}
But I'm looking for the chain ID, which is libs.crypto.base58Decode(address)[0]
In the node code it's here: Address.scala:
val AddressVersion: Byte = 1
Chain ID is exactly at index [1]
. The byte at index [0]
is a type of recipient: 1
is address and 2
is alias
Now I get it. So that's why it's called Address version. Is it possible to specify different custom versions, e.g. 3 or 4 for special kinds of addresses?
The Waves blockchain has only these two versions. If you are developing your custom network, then you are free to do whatever you want in it.
Thank you very much for taking the time to answer my questions - I very much appreciate it. You've pointed me in the right direction and saved me a lot of time.
I'm trying to use the Waves Keeper wallet for a custom (permissioned) clone of Waves. The custom options, although present in the code, don't appear to be visible in the interface.
Is it possible to override the chainID of 1 in the wallet anywhere? I can change the network byte for the mainnet from W to some other character in the code, but I can't see anywhere that I can specify that the first byte of the public address key should be something other than 0x01.