Remove kaspa
prefix from NetworkId, refactor and stabilize JavaScript examples. Introduce wasm::Network
type for WASM bindings.
#251
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a general PR that overhauls
NetworkId
type removingkaspa
prefix and refactoring / stabilizing related JavaScript examples.This PR introduces the following changes:
kapsa
prefix from theNetworkId
and introducesNetworkId::from_prefixed()
andNetworkId::to_prefixed()
. The prefix is retained within gRPC protowire conversions, and in parameters needed for p2p comms. The prefix is currently removed from folder names (can be resurrected during the review).kaspa_consensus_core::network_type
is renamed tokaspa_consensus_core::network
as it containsNetworkType
andNetworkId
Network
type is introduced inside of thenetwork::wasm
module:kaspa_consensus_core::network::wasm::Network
. This type is specific to WASM bindings allowing functions to receive either aNetworkType
orNetworkId
(it effectively allows passingNetworkId
whereNetworkType
is required).It contains the following TypeScript signature:
NetworkType | NetworkId | string
.This simplifies the usage of network ids/types within the JavaScript SDK.
Mnemonic::toSeed()
has been changed to not require a passwordnodejs/refactoring/
tonodejs/
(namelymnemonic
andderivation
)