-
Notifications
You must be signed in to change notification settings - Fork 19
Support wasm #91
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
Merged
Merged
Support wasm #91
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ef22334
Fix secp256k1-zkp WASM compatibility
danielgranhao e5c4f25
Enable js feature in getrandom
danielgranhao 0ebb55b
Use async reqwest
danielgranhao 85d56dc
Use tokio-tungstenite-wasm for websocket stream
danielgranhao c3af0f6
Add esplora support
danielgranhao 89da463
Adjust GH actions
danielgranhao 9a353e7
Update README.md
danielgranhao 04e2408
Fix esplora timeout const name
danielgranhao 2ff289d
Esplora fixes
danielgranhao 3598ac2
Use test macros where missing
danielgranhao 2ea8ad7
Add missing esplora conditionals
danielgranhao d7395ba
Fix get swap
danielgranhao 840404a
Fix fmt lint
danielgranhao 8aab73a
Run tests on regtest
danielgranhao e2b7034
Update secp256k1-zkp patch
danielgranhao a6d9d1c
Allow chain client reuse
danielgranhao b6b46ca
Update readme
danielgranhao a27d7b5
Rename const
danielgranhao c1caf6c
Add missing new line
danielgranhao 3cebee2
Switch to vendored native tls on tokio-tungetenite
danielgranhao 3f7ee4c
Expose WebSocketStream
danielgranhao 2fb92c9
Optimize electrum's fetch_utxos_core
danielgranhao 58f93e5
Rename fetch_utxo_core to extract_address_utxos
danielgranhao bd904fc
Split configs and chain into Bitcoin and Liquid counterparts
danielgranhao d43ffc9
Expose entire tokio-tungstenite-wasm
danielgranhao 73a41a3
Drop client configs
danielgranhao f48f3d5
Refactor ws message structs and add ping/pong messages
danielgranhao 662ab3b
Bump crate version
danielgranhao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "regtest/boltz"] | ||
path = regtest/boltz | ||
url = https://github.com/BoltzExchange/regtest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
UNAME := $(shell uname) | ||
|
||
ifeq ($(UNAME), Darwin) | ||
CLANG_PREFIX += AR=$(shell brew --prefix llvm)/bin/llvm-ar CC=$(shell brew --prefix llvm)/bin/clang | ||
endif | ||
|
||
LND_MACAROON_HEX=$(shell xxd -p regtest/boltz/data/lnd1/data/chain/bitcoin/regtest/admin.macaroon | tr -d '\n') | ||
BITCOIND_COOKIE=$(shell cat regtest/boltz/data/bitcoind/regtest/.cookie) | ||
REGTEST_PREFIX = LND_MACAROON_HEX=$(LND_MACAROON_HEX) BITCOIND_COOKIE=$(BITCOIND_COOKIE) | ||
|
||
init: | ||
cargo install wasm-pack | ||
|
||
build: cargo-build cargo-clippy | ||
|
||
cargo-build: | ||
cargo build --all-targets --all-features | ||
|
||
wasm-build: | ||
cargo build --target=wasm32-unknown-unknown --all-features | ||
|
||
clippy: cargo-clippy wasm-clippy | ||
|
||
test: cargo-test wasm-test | ||
|
||
regtest-test: cargo-regtest-test wasm-regtest-test | ||
|
||
cargo-clippy: | ||
cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
cargo-test: | ||
cargo test --features "esplora, electrum, lnurl" -- --nocapture | ||
|
||
cargo-regtest-test: | ||
$(REGTEST_PREFIX) cargo test regtest --features "electrum, regtest" -- --nocapture | ||
|
||
wasm-clippy: | ||
$(CLANG_PREFIX) cargo clippy --target=wasm32-unknown-unknown --all-features -- -D warnings | ||
|
||
BROWSER ?= firefox | ||
|
||
wasm-test: | ||
$(CLANG_PREFIX) wasm-pack test --headless --$(BROWSER) | ||
|
||
wasm-test-chrome: | ||
BROWSER=chrome $(MAKE) wasm-test | ||
|
||
wasm-test-safari: | ||
BROWSER=safari $(MAKE) wasm-test | ||
|
||
wasm-regtest-test: | ||
$(CLANG_PREFIX) $(REGTEST_PREFIX) WASM_BINDGEN_TEST_TIMEOUT=500 wasm-pack test --headless --$(BROWSER) --features regtest -- regtest | ||
|
||
wasm-regtest-test-chrome: | ||
BROWSER=chrome $(MAKE) wasm-regtest-test | ||
|
||
wasm-regtest-test-safari: | ||
BROWSER=safari $(MAKE) wasm-regtest-test |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.