Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check bounded merge depth #36

Merged
merged 6 commits into from
Sep 6, 2022
Merged

Conversation

someone235
Copy link
Contributor

No description provided.

},
};

pub struct BlockAtDepthDepthManager<S: DepthStoreReader, U: ReachabilityStoreReader, V: GhostdagStoreReader> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe simply BlockDepthManager ?

block_chain_2.push(hash);
}

// The merge depth root belongs to selected_chain, and block_chain_2[1] is red doesn't have it in its past, and is not in the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is red and doesn't

@someone235 someone235 merged commit 609b565 into kaspanet:master Sep 6, 2022
@someone235 someone235 deleted the mergedepth branch September 6, 2022 14:13
HLXEasy pushed a commit to HLXEasy/rusty-kaspa that referenced this pull request Apr 22, 2024
michaelsutton pushed a commit that referenced this pull request May 5, 2024
* using IConnectOptions struct instead of Jsvalue for socket connection

* Cargo.lock

* WIP - initial Wallet API typescript bindings

* WIP - Wallet API typescript bindings

* typescript setup

* TS related issue

* relocate TypeScript StringArray to kaspa_consensus_wasm

* Update deploy GitHub Action to use folders inside WASM archives

* WIP: TSDoc setup

* WIP: TSdoc

* build-docs updated for typedoc uses

* XPublicKey toString/fromString support for JS

* WASM + Wallet API refactoring for TypeScript

* rearrange nodejs JS/TS examples

* moved ts files to src dir

* rpc frame size

* utxo context listener tests

* WIP - public node wRPC beacons

* fix TS merge

* refactor/restructure past typedoc merge

* Add a warning on build-node-dev

* cleanup

* utxo events issue

* rename README

* rename README

* WIP - typescript bindings and related refactoring

* code formatting

* wasm32-sdk feature gate

* wasm32-sdk feature gating TS/JS-side APIs and types; typedoc handling in macros; relocate wasm RpcClient API into kaspa-wrpc-wasm;

* documentation parsing

* refactor typescript types & JS/TS examples

* simplify HexString (typescript type)

* doc processing in macros

* wRPC Beacon

* #!/bin/bash headers for bash scripts

* wRPC Beacon Cargo.toml update

* WASM wRPC Beacon

* INetworkId type

* toString for XPrv

* renaming SerdeJson to Json

* fix wasm32-sdk propagation

* fix wasm32-sdk propagation

* WIP JS examples

* code formatting

* fix beacon config loading

* updating examples init script

* SerdeJson renaming

* WIP TS: rename XPxxKey to PxxKeyGenerator

* module rename

* finish merging with master

* build*-dev warning text

* WIP: Wallet API updates

* wasm32-sdk infra

* fix IndexMap "deprecated" warning in orphan processing

* kaspa-beacon CORS handling

* Prefix : ktrv, ktub

* key generator (xprv,xpub, signer, keypair) moved to wallet/core/wasm

* XPrv creation from string (xprvxxxx), examples

* change wallet xpub example

* restructure docs location

* hex serialization for RPC components

* WASM32 SDK examples (WIP)

* code formatting

* set /test and /check bash scripts to use -e for immediate exit on failure

* rename from_str to from_xprv_str (clippy)

* wasm32-sdk changelog

* CI updates for wasm32-sdk

* WASM32 SDK CHANGELOG updates

* WIP RPC & Wallet event types

* code formatting

* docs

* Segregating wallet core from keys crates (WASM32 WIP)

* WIP WASM32 release

* WIP WASM32 release

* WIP WASM32 structure

* WASM32 rename packages

* docs

* fix build scripts

* script updates

* fix gitignore

* update kaspa-beacon; fix misc issues, improve election algorithm;

* display error in case of metrics failure

* rename client-side Beacon to Resolver; impl related WASM32 bindings and handling for RpcClient and Resolver

* WASM32 wRPC addEventListener() handling & misc bug fixes

* mix fixes, docs, update WASM32 examples to use updated APIs

* update WASM32 examples

* replace EventDispatcher with localized event handlers

* Refactor wasm event listeners (RPC, UtxoProcessor, Wallet) + update LICENSE

* Support contexts in event listeners

* additional TypeScript interfaces and docs

* WASM32 changelog updates

* WASM32 release scripts

* Kaspa Beacon - tentative access lists

* Kaspa Beacon ACL

* Kaspa Beacon ACLs

* Fix parsing issues with typedoc

* Fix TypeDoc parsing issues

* WASM32 updates to UtxoProcessor (ctors, UTXO access)

* misc UtxoContext updates

* fix typo in cli wizard

* WASM32 - refactor key APIs; fix GetBalancesByAddresses conversion; rename IXxx types to XxxT (convention).

* WASM32 / client - additional key management APIs

* WASM32 Wallet API

* CryptoBox wrapper (+ WASM32 interface)

* WASM32 - PublicKeyGenerator functions, hash functions to support plain text hashing, CryptoBox API, fix RPC shutdown/disconnect mishandling in certain cases.

* Fix broken typedoc link

* fix createAddresses() TS type handling

* WASM32 improve UtxoProcessor restart messaging

* WASM - Fix Generator priorityFee type binding

* WIP - WASM CastFromJS+TryCastFromJS derive macros and traits. Refactoring JsValue casting to Rust objects. secp256k1 update to latest (pending warning resolution)

* WASM - TryCastFromJs updates

* Update PrvKeyDataCreateArgs to use Secret for mnemonic + related CLI changes

* Fix IGeneratorSettingsObject "entries" ingest order

* logging for generator testing

* Generator logs

* browser extension scaffolding

* cleanup logging after debugging

* update WASM changelog

* gate wasm binding by feature

* put comments back

* add and rename crate

* wallet transport

* Change decrypt error to be more generic

* impl and isolate WASM Header bindings from consensus Header

* Fix From<HexString> for JsValue recursion (fixes WASM message signing)

* lowercase hex

* Change decryption failure error message to be more generic

* Update attribute cleaner deps

* Cleanup

* add --weak-refs to wasm-pack

* implement Wallet API accounts_ensure_default() helper

* Update WASM examples/init script to the latest API changes

* Fix typescript mixed array types

* remove sync monitor logs

* Fix mixed typescript array declarations

* Add Debug to WASM event sinks

* Fix grammar

* re-order NetworkTypeT to NetworkType conversion due to failing native WBG enum ABI resolution during type mix (try_from_js_value)

* WASM: fix multi-listener handling for RPC-subscribed events

* Replace from_slice with from_digest_slice to handle warnings

* cleanup logs

* Fix incorrect call on wRPC client disconnect

* WIP - transaction serialization and input signing

* Fix txscript collision due to multiple implementations

* Fix incorrect opcode enum variant name

* WIP transaction serialization

* PendingTransaction -> serializeXXX impl

* Adapter examples (#30)

* wip: wallet extension connection
* dark theme
* Update Cargo.toml

* docs + TransactionInput.utxo()

* Fix handling of passing arrays to Generator

* WIP - signing

* code formatting

* WASM RPC: accept extraData as hex or vec in GetBlockTemplateRequest

* WASM RPC: GetBlockTemplateRequest - accept extraData as plain text instead of a hex string

* WASM: remove ? from header hash interface

* RpcClient: Refactor notification handling in wRPC client + add various guards around connect/disconnect and start/stop API calls

* unify WASM logs with workflow-rs logger

* Split connect/disconnect guards to allow concurrent disconnect while connect is pending...

* cleanup logs

* Stop RPC client services on connection error in fallback mode

* Fix misc issues post-merge with master

* wRPC add prelude to the kaspa-wrpc-client crate

* add kaspa-wrpc-example-subscriber example

* cleanup

* add TransactionRecord.has_address() helper to check if an address is used in the transaction record

* Update WASM TypeScript example for event casing and ITransactionRecord access

* addEventListener event union (#31)

* Cargo.lock

* rename kaspa-beacon app to kaspa-resolver

* WASM wasm_bindgen bindings for TransactionRecord and a dedicated path on

* Wallet Metrics event;
retain_context(), change_network_id() and account_select() api calls;
get_status_call() updates;

* Cleanup

* TS wallet events (#32)

* Apply map-based event typing on wallet events (following UtxoProcessor type design)
* WASM: implement event type maps on RpcClient event notifications

* WASM TS events - remove "All" variants;
Wallet::set_network_id() -> wrpc_client.set_network_id();
set_network_id() updates;

* Cargo.lock

* Cleanup

* add Wallet::retain_context() to WASM Wallet Class

* cleanup

* Migrate WASM functions that use SignableTransaction to Transaction (#33)

* Migrate WASM functions that use SignableTransaction to Transaction

* invalid data handling via returning error

* Cargo.lock

* WASM: declare events that receive undefined data

* typo (#34)

* transaction.addresses getter added, SignableTransaction struct removed (#35)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* docs

* WASM changelog

* master merge

* docs

* todo (#36)

* Todo (#37)

* Todo (#38)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* minor doc updates

* Update to published workflow-rs 0.11.1

* Fix unit tests and WASM SDK build process

* cleanup

* Fix symbols missed during the publicKey() to toPublicKey() rename.

* Update README info for building WASM SDK

* Update README info for building WASM SDK

* Rename RPC open/close events to connect/disconnect

* Add try getters for rpc in UtxoProcessor, Wallet, Wallet API

* Update WASM SDK README

* DIsable Account class (but keep the scaffolding for potential future re-integration)

* Update WASM SDK README with instructions on how to run NodeJs examples

* WalletEvent structure, wallet api example update,  (#40)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* batch mode issue

* Delete mod copy.rs

* AccountKind constructor, WalletApiObjectExtension helper method

* TS IAccountsCreateRequest type updated using union
* IWalletEvent "event" property renamed to "type"
* examples/wallet.js WIP

* TransactionRecord  notification structure

* TransactionRecord notification structure

* wallet example update

* ecdsa address creation issue

* create_address : ecdsa param use case

* Update CHANGELOG.md

* changelogs, deps version update

* Update wallet.js

* Update package.json

* Update CLI to use a public node Resolver (#39)

* Move Tracker memory configuration message from info!() to debug!()

* cleanup

* cleanup

* support public resolver in CLI (default server now is 'public')

* lints

* Update connect command to print a notice when connecting to a public node.
Rename the local url variable.

* cleanup

* cleanup

* Remove optional from ISerializableTransactionInput::utxo field and cleanup previousOutpoint comment

* Cleanup and comments

* UtxoEntry and UtxoEntryReference: toString override for js (#41)

* Fix resolver docs, improve resolver URL argument handling.

* Remove IUtxosByAddressesEntry as in WASM we optimize by converting GetUtxosByAddress entries directly to UtxoEntryReference

* bump MSRV to 1.78.0

* CI: update arduino/setup-protoc to v3

---------

Co-authored-by: Surinder Singh Matoo <surinder83singh@gmail.com>
Co-authored-by: max143672 <biryukov.maxim.vladimirovich@yandex.ru>
Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this pull request Jun 18, 2024
* Check bounded merge depth

* Add bounded_merge_depth_test

* Remove double references

* Rename

* Rename
smartgoo pushed a commit to smartgoo/rusty-kaspa that referenced this pull request Jun 18, 2024
…et#459)

* using IConnectOptions struct instead of Jsvalue for socket connection

* Cargo.lock

* WIP - initial Wallet API typescript bindings

* WIP - Wallet API typescript bindings

* typescript setup

* TS related issue

* relocate TypeScript StringArray to kaspa_consensus_wasm

* Update deploy GitHub Action to use folders inside WASM archives

* WIP: TSDoc setup

* WIP: TSdoc

* build-docs updated for typedoc uses

* XPublicKey toString/fromString support for JS

* WASM + Wallet API refactoring for TypeScript

* rearrange nodejs JS/TS examples

* moved ts files to src dir

* rpc frame size

* utxo context listener tests

* WIP - public node wRPC beacons

* fix TS merge

* refactor/restructure past typedoc merge

* Add a warning on build-node-dev

* cleanup

* utxo events issue

* rename README

* rename README

* WIP - typescript bindings and related refactoring

* code formatting

* wasm32-sdk feature gate

* wasm32-sdk feature gating TS/JS-side APIs and types; typedoc handling in macros; relocate wasm RpcClient API into kaspa-wrpc-wasm;

* documentation parsing

* refactor typescript types & JS/TS examples

* simplify HexString (typescript type)

* doc processing in macros

* wRPC Beacon

* #!/bin/bash headers for bash scripts

* wRPC Beacon Cargo.toml update

* WASM wRPC Beacon

* INetworkId type

* toString for XPrv

* renaming SerdeJson to Json

* fix wasm32-sdk propagation

* fix wasm32-sdk propagation

* WIP JS examples

* code formatting

* fix beacon config loading

* updating examples init script

* SerdeJson renaming

* WIP TS: rename XPxxKey to PxxKeyGenerator

* module rename

* finish merging with master

* build*-dev warning text

* WIP: Wallet API updates

* wasm32-sdk infra

* fix IndexMap "deprecated" warning in orphan processing

* kaspa-beacon CORS handling

* Prefix : ktrv, ktub

* key generator (xprv,xpub, signer, keypair) moved to wallet/core/wasm

* XPrv creation from string (xprvxxxx), examples

* change wallet xpub example

* restructure docs location

* hex serialization for RPC components

* WASM32 SDK examples (WIP)

* code formatting

* set /test and /check bash scripts to use -e for immediate exit on failure

* rename from_str to from_xprv_str (clippy)

* wasm32-sdk changelog

* CI updates for wasm32-sdk

* WASM32 SDK CHANGELOG updates

* WIP RPC & Wallet event types

* code formatting

* docs

* Segregating wallet core from keys crates (WASM32 WIP)

* WIP WASM32 release

* WIP WASM32 release

* WIP WASM32 structure

* WASM32 rename packages

* docs

* fix build scripts

* script updates

* fix gitignore

* update kaspa-beacon; fix misc issues, improve election algorithm;

* display error in case of metrics failure

* rename client-side Beacon to Resolver; impl related WASM32 bindings and handling for RpcClient and Resolver

* WASM32 wRPC addEventListener() handling & misc bug fixes

* mix fixes, docs, update WASM32 examples to use updated APIs

* update WASM32 examples

* replace EventDispatcher with localized event handlers

* Refactor wasm event listeners (RPC, UtxoProcessor, Wallet) + update LICENSE

* Support contexts in event listeners

* additional TypeScript interfaces and docs

* WASM32 changelog updates

* WASM32 release scripts

* Kaspa Beacon - tentative access lists

* Kaspa Beacon ACL

* Kaspa Beacon ACLs

* Fix parsing issues with typedoc

* Fix TypeDoc parsing issues

* WASM32 updates to UtxoProcessor (ctors, UTXO access)

* misc UtxoContext updates

* fix typo in cli wizard

* WASM32 - refactor key APIs; fix GetBalancesByAddresses conversion; rename IXxx types to XxxT (convention).

* WASM32 / client - additional key management APIs

* WASM32 Wallet API

* CryptoBox wrapper (+ WASM32 interface)

* WASM32 - PublicKeyGenerator functions, hash functions to support plain text hashing, CryptoBox API, fix RPC shutdown/disconnect mishandling in certain cases.

* Fix broken typedoc link

* fix createAddresses() TS type handling

* WASM32 improve UtxoProcessor restart messaging

* WASM - Fix Generator priorityFee type binding

* WIP - WASM CastFromJS+TryCastFromJS derive macros and traits. Refactoring JsValue casting to Rust objects. secp256k1 update to latest (pending warning resolution)

* WASM - TryCastFromJs updates

* Update PrvKeyDataCreateArgs to use Secret for mnemonic + related CLI changes

* Fix IGeneratorSettingsObject "entries" ingest order

* logging for generator testing

* Generator logs

* browser extension scaffolding

* cleanup logging after debugging

* update WASM changelog

* gate wasm binding by feature

* put comments back

* add and rename crate

* wallet transport

* Change decrypt error to be more generic

* impl and isolate WASM Header bindings from consensus Header

* Fix From<HexString> for JsValue recursion (fixes WASM message signing)

* lowercase hex

* Change decryption failure error message to be more generic

* Update attribute cleaner deps

* Cleanup

* add --weak-refs to wasm-pack

* implement Wallet API accounts_ensure_default() helper

* Update WASM examples/init script to the latest API changes

* Fix typescript mixed array types

* remove sync monitor logs

* Fix mixed typescript array declarations

* Add Debug to WASM event sinks

* Fix grammar

* re-order NetworkTypeT to NetworkType conversion due to failing native WBG enum ABI resolution during type mix (try_from_js_value)

* WASM: fix multi-listener handling for RPC-subscribed events

* Replace from_slice with from_digest_slice to handle warnings

* cleanup logs

* Fix incorrect call on wRPC client disconnect

* WIP - transaction serialization and input signing

* Fix txscript collision due to multiple implementations

* Fix incorrect opcode enum variant name

* WIP transaction serialization

* PendingTransaction -> serializeXXX impl

* Adapter examples (kaspanet#30)

* wip: wallet extension connection
* dark theme
* Update Cargo.toml

* docs + TransactionInput.utxo()

* Fix handling of passing arrays to Generator

* WIP - signing

* code formatting

* WASM RPC: accept extraData as hex or vec in GetBlockTemplateRequest

* WASM RPC: GetBlockTemplateRequest - accept extraData as plain text instead of a hex string

* WASM: remove ? from header hash interface

* RpcClient: Refactor notification handling in wRPC client + add various guards around connect/disconnect and start/stop API calls

* unify WASM logs with workflow-rs logger

* Split connect/disconnect guards to allow concurrent disconnect while connect is pending...

* cleanup logs

* Stop RPC client services on connection error in fallback mode

* Fix misc issues post-merge with master

* wRPC add prelude to the kaspa-wrpc-client crate

* add kaspa-wrpc-example-subscriber example

* cleanup

* add TransactionRecord.has_address() helper to check if an address is used in the transaction record

* Update WASM TypeScript example for event casing and ITransactionRecord access

* addEventListener event union (kaspanet#31)

* Cargo.lock

* rename kaspa-beacon app to kaspa-resolver

* WASM wasm_bindgen bindings for TransactionRecord and a dedicated path on

* Wallet Metrics event;
retain_context(), change_network_id() and account_select() api calls;
get_status_call() updates;

* Cleanup

* TS wallet events (kaspanet#32)

* Apply map-based event typing on wallet events (following UtxoProcessor type design)
* WASM: implement event type maps on RpcClient event notifications

* WASM TS events - remove "All" variants;
Wallet::set_network_id() -> wrpc_client.set_network_id();
set_network_id() updates;

* Cargo.lock

* Cleanup

* add Wallet::retain_context() to WASM Wallet Class

* cleanup

* Migrate WASM functions that use SignableTransaction to Transaction (kaspanet#33)

* Migrate WASM functions that use SignableTransaction to Transaction

* invalid data handling via returning error

* Cargo.lock

* WASM: declare events that receive undefined data

* typo (kaspanet#34)

* transaction.addresses getter added, SignableTransaction struct removed (kaspanet#35)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* docs

* WASM changelog

* master merge

* docs

* todo (kaspanet#36)

* Todo (kaspanet#37)

* Todo (kaspanet#38)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* minor doc updates

* Update to published workflow-rs 0.11.1

* Fix unit tests and WASM SDK build process

* cleanup

* Fix symbols missed during the publicKey() to toPublicKey() rename.

* Update README info for building WASM SDK

* Update README info for building WASM SDK

* Rename RPC open/close events to connect/disconnect

* Add try getters for rpc in UtxoProcessor, Wallet, Wallet API

* Update WASM SDK README

* DIsable Account class (but keep the scaffolding for potential future re-integration)

* Update WASM SDK README with instructions on how to run NodeJs examples

* WalletEvent structure, wallet api example update,  (kaspanet#40)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* batch mode issue

* Delete mod copy.rs

* AccountKind constructor, WalletApiObjectExtension helper method

* TS IAccountsCreateRequest type updated using union
* IWalletEvent "event" property renamed to "type"
* examples/wallet.js WIP

* TransactionRecord  notification structure

* TransactionRecord notification structure

* wallet example update

* ecdsa address creation issue

* create_address : ecdsa param use case

* Update CHANGELOG.md

* changelogs, deps version update

* Update wallet.js

* Update package.json

* Update CLI to use a public node Resolver (kaspanet#39)

* Move Tracker memory configuration message from info!() to debug!()

* cleanup

* cleanup

* support public resolver in CLI (default server now is 'public')

* lints

* Update connect command to print a notice when connecting to a public node.
Rename the local url variable.

* cleanup

* cleanup

* Remove optional from ISerializableTransactionInput::utxo field and cleanup previousOutpoint comment

* Cleanup and comments

* UtxoEntry and UtxoEntryReference: toString override for js (kaspanet#41)

* Fix resolver docs, improve resolver URL argument handling.

* Remove IUtxosByAddressesEntry as in WASM we optimize by converting GetUtxosByAddress entries directly to UtxoEntryReference

* bump MSRV to 1.78.0

* CI: update arduino/setup-protoc to v3

---------

Co-authored-by: Surinder Singh Matoo <surinder83singh@gmail.com>
Co-authored-by: max143672 <biryukov.maxim.vladimirovich@yandex.ru>
Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jul 12, 2024
…et#459)

* using IConnectOptions struct instead of Jsvalue for socket connection

* Cargo.lock

* WIP - initial Wallet API typescript bindings

* WIP - Wallet API typescript bindings

* typescript setup

* TS related issue

* relocate TypeScript StringArray to kaspa_consensus_wasm

* Update deploy GitHub Action to use folders inside WASM archives

* WIP: TSDoc setup

* WIP: TSdoc

* build-docs updated for typedoc uses

* XPublicKey toString/fromString support for JS

* WASM + Wallet API refactoring for TypeScript

* rearrange nodejs JS/TS examples

* moved ts files to src dir

* rpc frame size

* utxo context listener tests

* WIP - public node wRPC beacons

* fix TS merge

* refactor/restructure past typedoc merge

* Add a warning on build-node-dev

* cleanup

* utxo events issue

* rename README

* rename README

* WIP - typescript bindings and related refactoring

* code formatting

* wasm32-sdk feature gate

* wasm32-sdk feature gating TS/JS-side APIs and types; typedoc handling in macros; relocate wasm RpcClient API into kaspa-wrpc-wasm;

* documentation parsing

* refactor typescript types & JS/TS examples

* simplify HexString (typescript type)

* doc processing in macros

* wRPC Beacon

* #!/bin/bash headers for bash scripts

* wRPC Beacon Cargo.toml update

* WASM wRPC Beacon

* INetworkId type

* toString for XPrv

* renaming SerdeJson to Json

* fix wasm32-sdk propagation

* fix wasm32-sdk propagation

* WIP JS examples

* code formatting

* fix beacon config loading

* updating examples init script

* SerdeJson renaming

* WIP TS: rename XPxxKey to PxxKeyGenerator

* module rename

* finish merging with master

* build*-dev warning text

* WIP: Wallet API updates

* wasm32-sdk infra

* fix IndexMap "deprecated" warning in orphan processing

* kaspa-beacon CORS handling

* Prefix : ktrv, ktub

* key generator (xprv,xpub, signer, keypair) moved to wallet/core/wasm

* XPrv creation from string (xprvxxxx), examples

* change wallet xpub example

* restructure docs location

* hex serialization for RPC components

* WASM32 SDK examples (WIP)

* code formatting

* set /test and /check bash scripts to use -e for immediate exit on failure

* rename from_str to from_xprv_str (clippy)

* wasm32-sdk changelog

* CI updates for wasm32-sdk

* WASM32 SDK CHANGELOG updates

* WIP RPC & Wallet event types

* code formatting

* docs

* Segregating wallet core from keys crates (WASM32 WIP)

* WIP WASM32 release

* WIP WASM32 release

* WIP WASM32 structure

* WASM32 rename packages

* docs

* fix build scripts

* script updates

* fix gitignore

* update kaspa-beacon; fix misc issues, improve election algorithm;

* display error in case of metrics failure

* rename client-side Beacon to Resolver; impl related WASM32 bindings and handling for RpcClient and Resolver

* WASM32 wRPC addEventListener() handling & misc bug fixes

* mix fixes, docs, update WASM32 examples to use updated APIs

* update WASM32 examples

* replace EventDispatcher with localized event handlers

* Refactor wasm event listeners (RPC, UtxoProcessor, Wallet) + update LICENSE

* Support contexts in event listeners

* additional TypeScript interfaces and docs

* WASM32 changelog updates

* WASM32 release scripts

* Kaspa Beacon - tentative access lists

* Kaspa Beacon ACL

* Kaspa Beacon ACLs

* Fix parsing issues with typedoc

* Fix TypeDoc parsing issues

* WASM32 updates to UtxoProcessor (ctors, UTXO access)

* misc UtxoContext updates

* fix typo in cli wizard

* WASM32 - refactor key APIs; fix GetBalancesByAddresses conversion; rename IXxx types to XxxT (convention).

* WASM32 / client - additional key management APIs

* WASM32 Wallet API

* CryptoBox wrapper (+ WASM32 interface)

* WASM32 - PublicKeyGenerator functions, hash functions to support plain text hashing, CryptoBox API, fix RPC shutdown/disconnect mishandling in certain cases.

* Fix broken typedoc link

* fix createAddresses() TS type handling

* WASM32 improve UtxoProcessor restart messaging

* WASM - Fix Generator priorityFee type binding

* WIP - WASM CastFromJS+TryCastFromJS derive macros and traits. Refactoring JsValue casting to Rust objects. secp256k1 update to latest (pending warning resolution)

* WASM - TryCastFromJs updates

* Update PrvKeyDataCreateArgs to use Secret for mnemonic + related CLI changes

* Fix IGeneratorSettingsObject "entries" ingest order

* logging for generator testing

* Generator logs

* browser extension scaffolding

* cleanup logging after debugging

* update WASM changelog

* gate wasm binding by feature

* put comments back

* add and rename crate

* wallet transport

* Change decrypt error to be more generic

* impl and isolate WASM Header bindings from consensus Header

* Fix From<HexString> for JsValue recursion (fixes WASM message signing)

* lowercase hex

* Change decryption failure error message to be more generic

* Update attribute cleaner deps

* Cleanup

* add --weak-refs to wasm-pack

* implement Wallet API accounts_ensure_default() helper

* Update WASM examples/init script to the latest API changes

* Fix typescript mixed array types

* remove sync monitor logs

* Fix mixed typescript array declarations

* Add Debug to WASM event sinks

* Fix grammar

* re-order NetworkTypeT to NetworkType conversion due to failing native WBG enum ABI resolution during type mix (try_from_js_value)

* WASM: fix multi-listener handling for RPC-subscribed events

* Replace from_slice with from_digest_slice to handle warnings

* cleanup logs

* Fix incorrect call on wRPC client disconnect

* WIP - transaction serialization and input signing

* Fix txscript collision due to multiple implementations

* Fix incorrect opcode enum variant name

* WIP transaction serialization

* PendingTransaction -> serializeXXX impl

* Adapter examples (kaspanet#30)

* wip: wallet extension connection
* dark theme
* Update Cargo.toml

* docs + TransactionInput.utxo()

* Fix handling of passing arrays to Generator

* WIP - signing

* code formatting

* WASM RPC: accept extraData as hex or vec in GetBlockTemplateRequest

* WASM RPC: GetBlockTemplateRequest - accept extraData as plain text instead of a hex string

* WASM: remove ? from header hash interface

* RpcClient: Refactor notification handling in wRPC client + add various guards around connect/disconnect and start/stop API calls

* unify WASM logs with workflow-rs logger

* Split connect/disconnect guards to allow concurrent disconnect while connect is pending...

* cleanup logs

* Stop RPC client services on connection error in fallback mode

* Fix misc issues post-merge with master

* wRPC add prelude to the kaspa-wrpc-client crate

* add kaspa-wrpc-example-subscriber example

* cleanup

* add TransactionRecord.has_address() helper to check if an address is used in the transaction record

* Update WASM TypeScript example for event casing and ITransactionRecord access

* addEventListener event union (kaspanet#31)

* Cargo.lock

* rename kaspa-beacon app to kaspa-resolver

* WASM wasm_bindgen bindings for TransactionRecord and a dedicated path on

* Wallet Metrics event;
retain_context(), change_network_id() and account_select() api calls;
get_status_call() updates;

* Cleanup

* TS wallet events (kaspanet#32)

* Apply map-based event typing on wallet events (following UtxoProcessor type design)
* WASM: implement event type maps on RpcClient event notifications

* WASM TS events - remove "All" variants;
Wallet::set_network_id() -> wrpc_client.set_network_id();
set_network_id() updates;

* Cargo.lock

* Cleanup

* add Wallet::retain_context() to WASM Wallet Class

* cleanup

* Migrate WASM functions that use SignableTransaction to Transaction (kaspanet#33)

* Migrate WASM functions that use SignableTransaction to Transaction

* invalid data handling via returning error

* Cargo.lock

* WASM: declare events that receive undefined data

* typo (kaspanet#34)

* transaction.addresses getter added, SignableTransaction struct removed (kaspanet#35)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* docs

* WASM changelog

* master merge

* docs

* todo (kaspanet#36)

* Todo (kaspanet#37)

* Todo (kaspanet#38)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* minor doc updates

* Update to published workflow-rs 0.11.1

* Fix unit tests and WASM SDK build process

* cleanup

* Fix symbols missed during the publicKey() to toPublicKey() rename.

* Update README info for building WASM SDK

* Update README info for building WASM SDK

* Rename RPC open/close events to connect/disconnect

* Add try getters for rpc in UtxoProcessor, Wallet, Wallet API

* Update WASM SDK README

* DIsable Account class (but keep the scaffolding for potential future re-integration)

* Update WASM SDK README with instructions on how to run NodeJs examples

* WalletEvent structure, wallet api example update,  (kaspanet#40)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* batch mode issue

* Delete mod copy.rs

* AccountKind constructor, WalletApiObjectExtension helper method

* TS IAccountsCreateRequest type updated using union
* IWalletEvent "event" property renamed to "type"
* examples/wallet.js WIP

* TransactionRecord  notification structure

* TransactionRecord notification structure

* wallet example update

* ecdsa address creation issue

* create_address : ecdsa param use case

* Update CHANGELOG.md

* changelogs, deps version update

* Update wallet.js

* Update package.json

* Update CLI to use a public node Resolver (kaspanet#39)

* Move Tracker memory configuration message from info!() to debug!()

* cleanup

* cleanup

* support public resolver in CLI (default server now is 'public')

* lints

* Update connect command to print a notice when connecting to a public node.
Rename the local url variable.

* cleanup

* cleanup

* Remove optional from ISerializableTransactionInput::utxo field and cleanup previousOutpoint comment

* Cleanup and comments

* UtxoEntry and UtxoEntryReference: toString override for js (kaspanet#41)

* Fix resolver docs, improve resolver URL argument handling.

* Remove IUtxosByAddressesEntry as in WASM we optimize by converting GetUtxosByAddress entries directly to UtxoEntryReference

* bump MSRV to 1.78.0

* CI: update arduino/setup-protoc to v3

---------

Co-authored-by: Surinder Singh Matoo <surinder83singh@gmail.com>
Co-authored-by: max143672 <biryukov.maxim.vladimirovich@yandex.ru>
Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jul 12, 2024
…et#459)

* using IConnectOptions struct instead of Jsvalue for socket connection

* Cargo.lock

* WIP - initial Wallet API typescript bindings

* WIP - Wallet API typescript bindings

* typescript setup

* TS related issue

* relocate TypeScript StringArray to kaspa_consensus_wasm

* Update deploy GitHub Action to use folders inside WASM archives

* WIP: TSDoc setup

* WIP: TSdoc

* build-docs updated for typedoc uses

* XPublicKey toString/fromString support for JS

* WASM + Wallet API refactoring for TypeScript

* rearrange nodejs JS/TS examples

* moved ts files to src dir

* rpc frame size

* utxo context listener tests

* WIP - public node wRPC beacons

* fix TS merge

* refactor/restructure past typedoc merge

* Add a warning on build-node-dev

* cleanup

* utxo events issue

* rename README

* rename README

* WIP - typescript bindings and related refactoring

* code formatting

* wasm32-sdk feature gate

* wasm32-sdk feature gating TS/JS-side APIs and types; typedoc handling in macros; relocate wasm RpcClient API into kaspa-wrpc-wasm;

* documentation parsing

* refactor typescript types & JS/TS examples

* simplify HexString (typescript type)

* doc processing in macros

* wRPC Beacon

* #!/bin/bash headers for bash scripts

* wRPC Beacon Cargo.toml update

* WASM wRPC Beacon

* INetworkId type

* toString for XPrv

* renaming SerdeJson to Json

* fix wasm32-sdk propagation

* fix wasm32-sdk propagation

* WIP JS examples

* code formatting

* fix beacon config loading

* updating examples init script

* SerdeJson renaming

* WIP TS: rename XPxxKey to PxxKeyGenerator

* module rename

* finish merging with master

* build*-dev warning text

* WIP: Wallet API updates

* wasm32-sdk infra

* fix IndexMap "deprecated" warning in orphan processing

* kaspa-beacon CORS handling

* Prefix : ktrv, ktub

* key generator (xprv,xpub, signer, keypair) moved to wallet/core/wasm

* XPrv creation from string (xprvxxxx), examples

* change wallet xpub example

* restructure docs location

* hex serialization for RPC components

* WASM32 SDK examples (WIP)

* code formatting

* set /test and /check bash scripts to use -e for immediate exit on failure

* rename from_str to from_xprv_str (clippy)

* wasm32-sdk changelog

* CI updates for wasm32-sdk

* WASM32 SDK CHANGELOG updates

* WIP RPC & Wallet event types

* code formatting

* docs

* Segregating wallet core from keys crates (WASM32 WIP)

* WIP WASM32 release

* WIP WASM32 release

* WIP WASM32 structure

* WASM32 rename packages

* docs

* fix build scripts

* script updates

* fix gitignore

* update kaspa-beacon; fix misc issues, improve election algorithm;

* display error in case of metrics failure

* rename client-side Beacon to Resolver; impl related WASM32 bindings and handling for RpcClient and Resolver

* WASM32 wRPC addEventListener() handling & misc bug fixes

* mix fixes, docs, update WASM32 examples to use updated APIs

* update WASM32 examples

* replace EventDispatcher with localized event handlers

* Refactor wasm event listeners (RPC, UtxoProcessor, Wallet) + update LICENSE

* Support contexts in event listeners

* additional TypeScript interfaces and docs

* WASM32 changelog updates

* WASM32 release scripts

* Kaspa Beacon - tentative access lists

* Kaspa Beacon ACL

* Kaspa Beacon ACLs

* Fix parsing issues with typedoc

* Fix TypeDoc parsing issues

* WASM32 updates to UtxoProcessor (ctors, UTXO access)

* misc UtxoContext updates

* fix typo in cli wizard

* WASM32 - refactor key APIs; fix GetBalancesByAddresses conversion; rename IXxx types to XxxT (convention).

* WASM32 / client - additional key management APIs

* WASM32 Wallet API

* CryptoBox wrapper (+ WASM32 interface)

* WASM32 - PublicKeyGenerator functions, hash functions to support plain text hashing, CryptoBox API, fix RPC shutdown/disconnect mishandling in certain cases.

* Fix broken typedoc link

* fix createAddresses() TS type handling

* WASM32 improve UtxoProcessor restart messaging

* WASM - Fix Generator priorityFee type binding

* WIP - WASM CastFromJS+TryCastFromJS derive macros and traits. Refactoring JsValue casting to Rust objects. secp256k1 update to latest (pending warning resolution)

* WASM - TryCastFromJs updates

* Update PrvKeyDataCreateArgs to use Secret for mnemonic + related CLI changes

* Fix IGeneratorSettingsObject "entries" ingest order

* logging for generator testing

* Generator logs

* browser extension scaffolding

* cleanup logging after debugging

* update WASM changelog

* gate wasm binding by feature

* put comments back

* add and rename crate

* wallet transport

* Change decrypt error to be more generic

* impl and isolate WASM Header bindings from consensus Header

* Fix From<HexString> for JsValue recursion (fixes WASM message signing)

* lowercase hex

* Change decryption failure error message to be more generic

* Update attribute cleaner deps

* Cleanup

* add --weak-refs to wasm-pack

* implement Wallet API accounts_ensure_default() helper

* Update WASM examples/init script to the latest API changes

* Fix typescript mixed array types

* remove sync monitor logs

* Fix mixed typescript array declarations

* Add Debug to WASM event sinks

* Fix grammar

* re-order NetworkTypeT to NetworkType conversion due to failing native WBG enum ABI resolution during type mix (try_from_js_value)

* WASM: fix multi-listener handling for RPC-subscribed events

* Replace from_slice with from_digest_slice to handle warnings

* cleanup logs

* Fix incorrect call on wRPC client disconnect

* WIP - transaction serialization and input signing

* Fix txscript collision due to multiple implementations

* Fix incorrect opcode enum variant name

* WIP transaction serialization

* PendingTransaction -> serializeXXX impl

* Adapter examples (kaspanet#30)

* wip: wallet extension connection
* dark theme
* Update Cargo.toml

* docs + TransactionInput.utxo()

* Fix handling of passing arrays to Generator

* WIP - signing

* code formatting

* WASM RPC: accept extraData as hex or vec in GetBlockTemplateRequest

* WASM RPC: GetBlockTemplateRequest - accept extraData as plain text instead of a hex string

* WASM: remove ? from header hash interface

* RpcClient: Refactor notification handling in wRPC client + add various guards around connect/disconnect and start/stop API calls

* unify WASM logs with workflow-rs logger

* Split connect/disconnect guards to allow concurrent disconnect while connect is pending...

* cleanup logs

* Stop RPC client services on connection error in fallback mode

* Fix misc issues post-merge with master

* wRPC add prelude to the kaspa-wrpc-client crate

* add kaspa-wrpc-example-subscriber example

* cleanup

* add TransactionRecord.has_address() helper to check if an address is used in the transaction record

* Update WASM TypeScript example for event casing and ITransactionRecord access

* addEventListener event union (kaspanet#31)

* Cargo.lock

* rename kaspa-beacon app to kaspa-resolver

* WASM wasm_bindgen bindings for TransactionRecord and a dedicated path on

* Wallet Metrics event;
retain_context(), change_network_id() and account_select() api calls;
get_status_call() updates;

* Cleanup

* TS wallet events (kaspanet#32)

* Apply map-based event typing on wallet events (following UtxoProcessor type design)
* WASM: implement event type maps on RpcClient event notifications

* WASM TS events - remove "All" variants;
Wallet::set_network_id() -> wrpc_client.set_network_id();
set_network_id() updates;

* Cargo.lock

* Cleanup

* add Wallet::retain_context() to WASM Wallet Class

* cleanup

* Migrate WASM functions that use SignableTransaction to Transaction (kaspanet#33)

* Migrate WASM functions that use SignableTransaction to Transaction

* invalid data handling via returning error

* Cargo.lock

* WASM: declare events that receive undefined data

* typo (kaspanet#34)

* transaction.addresses getter added, SignableTransaction struct removed (kaspanet#35)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* docs

* WASM changelog

* master merge

* docs

* todo (kaspanet#36)

* Todo (kaspanet#37)

* Todo (kaspanet#38)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* minor doc updates

* Update to published workflow-rs 0.11.1

* Fix unit tests and WASM SDK build process

* cleanup

* Fix symbols missed during the publicKey() to toPublicKey() rename.

* Update README info for building WASM SDK

* Update README info for building WASM SDK

* Rename RPC open/close events to connect/disconnect

* Add try getters for rpc in UtxoProcessor, Wallet, Wallet API

* Update WASM SDK README

* DIsable Account class (but keep the scaffolding for potential future re-integration)

* Update WASM SDK README with instructions on how to run NodeJs examples

* WalletEvent structure, wallet api example update,  (kaspanet#40)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* batch mode issue

* Delete mod copy.rs

* AccountKind constructor, WalletApiObjectExtension helper method

* TS IAccountsCreateRequest type updated using union
* IWalletEvent "event" property renamed to "type"
* examples/wallet.js WIP

* TransactionRecord  notification structure

* TransactionRecord notification structure

* wallet example update

* ecdsa address creation issue

* create_address : ecdsa param use case

* Update CHANGELOG.md

* changelogs, deps version update

* Update wallet.js

* Update package.json

* Update CLI to use a public node Resolver (kaspanet#39)

* Move Tracker memory configuration message from info!() to debug!()

* cleanup

* cleanup

* support public resolver in CLI (default server now is 'public')

* lints

* Update connect command to print a notice when connecting to a public node.
Rename the local url variable.

* cleanup

* cleanup

* Remove optional from ISerializableTransactionInput::utxo field and cleanup previousOutpoint comment

* Cleanup and comments

* UtxoEntry and UtxoEntryReference: toString override for js (kaspanet#41)

* Fix resolver docs, improve resolver URL argument handling.

* Remove IUtxosByAddressesEntry as in WASM we optimize by converting GetUtxosByAddress entries directly to UtxoEntryReference

* bump MSRV to 1.78.0

* CI: update arduino/setup-protoc to v3

---------

Co-authored-by: Surinder Singh Matoo <surinder83singh@gmail.com>
Co-authored-by: max143672 <biryukov.maxim.vladimirovich@yandex.ru>
Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
D-Stacks pushed a commit to D-Stacks/rusty-kaspa that referenced this pull request Jul 17, 2024
…et#459)

* using IConnectOptions struct instead of Jsvalue for socket connection

* Cargo.lock

* WIP - initial Wallet API typescript bindings

* WIP - Wallet API typescript bindings

* typescript setup

* TS related issue

* relocate TypeScript StringArray to kaspa_consensus_wasm

* Update deploy GitHub Action to use folders inside WASM archives

* WIP: TSDoc setup

* WIP: TSdoc

* build-docs updated for typedoc uses

* XPublicKey toString/fromString support for JS

* WASM + Wallet API refactoring for TypeScript

* rearrange nodejs JS/TS examples

* moved ts files to src dir

* rpc frame size

* utxo context listener tests

* WIP - public node wRPC beacons

* fix TS merge

* refactor/restructure past typedoc merge

* Add a warning on build-node-dev

* cleanup

* utxo events issue

* rename README

* rename README

* WIP - typescript bindings and related refactoring

* code formatting

* wasm32-sdk feature gate

* wasm32-sdk feature gating TS/JS-side APIs and types; typedoc handling in macros; relocate wasm RpcClient API into kaspa-wrpc-wasm;

* documentation parsing

* refactor typescript types & JS/TS examples

* simplify HexString (typescript type)

* doc processing in macros

* wRPC Beacon

* #!/bin/bash headers for bash scripts

* wRPC Beacon Cargo.toml update

* WASM wRPC Beacon

* INetworkId type

* toString for XPrv

* renaming SerdeJson to Json

* fix wasm32-sdk propagation

* fix wasm32-sdk propagation

* WIP JS examples

* code formatting

* fix beacon config loading

* updating examples init script

* SerdeJson renaming

* WIP TS: rename XPxxKey to PxxKeyGenerator

* module rename

* finish merging with master

* build*-dev warning text

* WIP: Wallet API updates

* wasm32-sdk infra

* fix IndexMap "deprecated" warning in orphan processing

* kaspa-beacon CORS handling

* Prefix : ktrv, ktub

* key generator (xprv,xpub, signer, keypair) moved to wallet/core/wasm

* XPrv creation from string (xprvxxxx), examples

* change wallet xpub example

* restructure docs location

* hex serialization for RPC components

* WASM32 SDK examples (WIP)

* code formatting

* set /test and /check bash scripts to use -e for immediate exit on failure

* rename from_str to from_xprv_str (clippy)

* wasm32-sdk changelog

* CI updates for wasm32-sdk

* WASM32 SDK CHANGELOG updates

* WIP RPC & Wallet event types

* code formatting

* docs

* Segregating wallet core from keys crates (WASM32 WIP)

* WIP WASM32 release

* WIP WASM32 release

* WIP WASM32 structure

* WASM32 rename packages

* docs

* fix build scripts

* script updates

* fix gitignore

* update kaspa-beacon; fix misc issues, improve election algorithm;

* display error in case of metrics failure

* rename client-side Beacon to Resolver; impl related WASM32 bindings and handling for RpcClient and Resolver

* WASM32 wRPC addEventListener() handling & misc bug fixes

* mix fixes, docs, update WASM32 examples to use updated APIs

* update WASM32 examples

* replace EventDispatcher with localized event handlers

* Refactor wasm event listeners (RPC, UtxoProcessor, Wallet) + update LICENSE

* Support contexts in event listeners

* additional TypeScript interfaces and docs

* WASM32 changelog updates

* WASM32 release scripts

* Kaspa Beacon - tentative access lists

* Kaspa Beacon ACL

* Kaspa Beacon ACLs

* Fix parsing issues with typedoc

* Fix TypeDoc parsing issues

* WASM32 updates to UtxoProcessor (ctors, UTXO access)

* misc UtxoContext updates

* fix typo in cli wizard

* WASM32 - refactor key APIs; fix GetBalancesByAddresses conversion; rename IXxx types to XxxT (convention).

* WASM32 / client - additional key management APIs

* WASM32 Wallet API

* CryptoBox wrapper (+ WASM32 interface)

* WASM32 - PublicKeyGenerator functions, hash functions to support plain text hashing, CryptoBox API, fix RPC shutdown/disconnect mishandling in certain cases.

* Fix broken typedoc link

* fix createAddresses() TS type handling

* WASM32 improve UtxoProcessor restart messaging

* WASM - Fix Generator priorityFee type binding

* WIP - WASM CastFromJS+TryCastFromJS derive macros and traits. Refactoring JsValue casting to Rust objects. secp256k1 update to latest (pending warning resolution)

* WASM - TryCastFromJs updates

* Update PrvKeyDataCreateArgs to use Secret for mnemonic + related CLI changes

* Fix IGeneratorSettingsObject "entries" ingest order

* logging for generator testing

* Generator logs

* browser extension scaffolding

* cleanup logging after debugging

* update WASM changelog

* gate wasm binding by feature

* put comments back

* add and rename crate

* wallet transport

* Change decrypt error to be more generic

* impl and isolate WASM Header bindings from consensus Header

* Fix From<HexString> for JsValue recursion (fixes WASM message signing)

* lowercase hex

* Change decryption failure error message to be more generic

* Update attribute cleaner deps

* Cleanup

* add --weak-refs to wasm-pack

* implement Wallet API accounts_ensure_default() helper

* Update WASM examples/init script to the latest API changes

* Fix typescript mixed array types

* remove sync monitor logs

* Fix mixed typescript array declarations

* Add Debug to WASM event sinks

* Fix grammar

* re-order NetworkTypeT to NetworkType conversion due to failing native WBG enum ABI resolution during type mix (try_from_js_value)

* WASM: fix multi-listener handling for RPC-subscribed events

* Replace from_slice with from_digest_slice to handle warnings

* cleanup logs

* Fix incorrect call on wRPC client disconnect

* WIP - transaction serialization and input signing

* Fix txscript collision due to multiple implementations

* Fix incorrect opcode enum variant name

* WIP transaction serialization

* PendingTransaction -> serializeXXX impl

* Adapter examples (kaspanet#30)

* wip: wallet extension connection
* dark theme
* Update Cargo.toml

* docs + TransactionInput.utxo()

* Fix handling of passing arrays to Generator

* WIP - signing

* code formatting

* WASM RPC: accept extraData as hex or vec in GetBlockTemplateRequest

* WASM RPC: GetBlockTemplateRequest - accept extraData as plain text instead of a hex string

* WASM: remove ? from header hash interface

* RpcClient: Refactor notification handling in wRPC client + add various guards around connect/disconnect and start/stop API calls

* unify WASM logs with workflow-rs logger

* Split connect/disconnect guards to allow concurrent disconnect while connect is pending...

* cleanup logs

* Stop RPC client services on connection error in fallback mode

* Fix misc issues post-merge with master

* wRPC add prelude to the kaspa-wrpc-client crate

* add kaspa-wrpc-example-subscriber example

* cleanup

* add TransactionRecord.has_address() helper to check if an address is used in the transaction record

* Update WASM TypeScript example for event casing and ITransactionRecord access

* addEventListener event union (kaspanet#31)

* Cargo.lock

* rename kaspa-beacon app to kaspa-resolver

* WASM wasm_bindgen bindings for TransactionRecord and a dedicated path on

* Wallet Metrics event;
retain_context(), change_network_id() and account_select() api calls;
get_status_call() updates;

* Cleanup

* TS wallet events (kaspanet#32)

* Apply map-based event typing on wallet events (following UtxoProcessor type design)
* WASM: implement event type maps on RpcClient event notifications

* WASM TS events - remove "All" variants;
Wallet::set_network_id() -> wrpc_client.set_network_id();
set_network_id() updates;

* Cargo.lock

* Cleanup

* add Wallet::retain_context() to WASM Wallet Class

* cleanup

* Migrate WASM functions that use SignableTransaction to Transaction (kaspanet#33)

* Migrate WASM functions that use SignableTransaction to Transaction

* invalid data handling via returning error

* Cargo.lock

* WASM: declare events that receive undefined data

* typo (kaspanet#34)

* transaction.addresses getter added, SignableTransaction struct removed (kaspanet#35)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* docs

* WASM changelog

* master merge

* docs

* todo (kaspanet#36)

* Todo (kaspanet#37)

* Todo (kaspanet#38)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* minor doc updates

* Update to published workflow-rs 0.11.1

* Fix unit tests and WASM SDK build process

* cleanup

* Fix symbols missed during the publicKey() to toPublicKey() rename.

* Update README info for building WASM SDK

* Update README info for building WASM SDK

* Rename RPC open/close events to connect/disconnect

* Add try getters for rpc in UtxoProcessor, Wallet, Wallet API

* Update WASM SDK README

* DIsable Account class (but keep the scaffolding for potential future re-integration)

* Update WASM SDK README with instructions on how to run NodeJs examples

* WalletEvent structure, wallet api example update,  (kaspanet#40)

* transaction.addresses getter

* SignableTransaction struct removed

* docs

* Address.isValid(string)  : a static method for address validation

* typescript docs: Optional NetworkId

* Address.isValid -> Address.validate

* tx.addresses getter to tx.addresses() method

* transaction.addresses() updated for address creation from SPK

* using NetworkTypeT instead of NetworkType

* batch mode issue

* Delete mod copy.rs

* AccountKind constructor, WalletApiObjectExtension helper method

* TS IAccountsCreateRequest type updated using union
* IWalletEvent "event" property renamed to "type"
* examples/wallet.js WIP

* TransactionRecord  notification structure

* TransactionRecord notification structure

* wallet example update

* ecdsa address creation issue

* create_address : ecdsa param use case

* Update CHANGELOG.md

* changelogs, deps version update

* Update wallet.js

* Update package.json

* Update CLI to use a public node Resolver (kaspanet#39)

* Move Tracker memory configuration message from info!() to debug!()

* cleanup

* cleanup

* support public resolver in CLI (default server now is 'public')

* lints

* Update connect command to print a notice when connecting to a public node.
Rename the local url variable.

* cleanup

* cleanup

* Remove optional from ISerializableTransactionInput::utxo field and cleanup previousOutpoint comment

* Cleanup and comments

* UtxoEntry and UtxoEntryReference: toString override for js (kaspanet#41)

* Fix resolver docs, improve resolver URL argument handling.

* Remove IUtxosByAddressesEntry as in WASM we optimize by converting GetUtxosByAddress entries directly to UtxoEntryReference

* bump MSRV to 1.78.0

* CI: update arduino/setup-protoc to v3

---------

Co-authored-by: Surinder Singh Matoo <surinder83singh@gmail.com>
Co-authored-by: max143672 <biryukov.maxim.vladimirovich@yandex.ru>
Co-authored-by: coderofstuff <114628839+coderofstuff@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants