Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WASM SDK update, public node resolver and TypeScript bindings (#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 (#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>
- Loading branch information