Skip to content

Commit 5f43cd2

Browse files
authored
Revert wasm compatility changes (#21)
1 parent 3313e10 commit 5f43cd2

35 files changed

Lines changed: 578 additions & 2190 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,6 @@ jobs:
3939
shell: bash # Default on Winblows is powershell
4040
run: cargo check --workspace --verbose --color always
4141

42-
wasm:
43-
runs-on: ubuntu-latest
44-
env:
45-
TOOLCHAIN: stable
46-
steps:
47-
- name: Checkout source code
48-
uses: actions/checkout@v4
49-
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
50-
run: |
51-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
52-
- name: Install wasm32 target
53-
run: rustup target add wasm32-unknown-unknown
54-
- name: Build lightning for wasm32 (rgb-wasm backend)
55-
run: cargo check -p lightning --target wasm32-unknown-unknown --no-default-features --features std,grind_signatures,rgb-wasm --verbose --color always
56-
- name: Build lightning-transaction-sync for wasm32 (rgb-wasm backend)
57-
run: cargo check --manifest-path lightning-transaction-sync/Cargo.toml --target wasm32-unknown-unknown --no-default-features --features time,esplora-async,rgb-wasm --verbose --color always
58-
5942
linting:
6043
runs-on: ubuntu-latest
6144
env:

lightning-background-processor/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ std = ["lightning/std", "lightning-liquidity/std", "bitcoin-io/std", "bitcoin_ha
2323
bitcoin = { version = "0.32.2", default-features = false }
2424
bitcoin_hashes = { version = "0.14.0", default-features = false }
2525
bitcoin-io = { version = "0.1.2", default-features = false }
26-
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["rgb-native"] }
26+
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
2727
lightning-rapid-gossip-sync = { version = "0.2.0", path = "../lightning-rapid-gossip-sync", default-features = false }
2828
lightning-liquidity = { version = "0.2.0", path = "../lightning-liquidity", default-features = false }
2929
possiblyrandom = { version = "0.2", path = "../possiblyrandom", default-features = false }

lightning-dns-resolver/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "A crate which implements DNSSEC resolution for lightning clients
99
edition = "2021"
1010

1111
[dependencies]
12-
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["rgb-native"] }
12+
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
1313
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
1414
dnssec-prover = { version = "0.6", default-features = false, features = [ "std", "tokio" ] }
1515
tokio = { version = "1.0", default-features = false, features = ["rt"] }

lightning-invoice/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ rustdoc-args = ["--cfg", "docsrs"]
1717
[features]
1818
std = []
1919

20-
default = []
21-
2220
[dependencies]
2321
bech32 = { version = "0.11.0", default-features = false }
2422
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
2523
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }
2624
bitcoin = { version = "0.32.2", default-features = false, features = ["secp-recovery"] }
2725

28-
# RGB protocol types
29-
rgb-ops = { version = "=0.11.1-rc.10", default-features = false }
26+
# RGB and related
27+
rgb-lib = { git = "https://github.com/UTEXO-Protocol/rgb-lib.git", tag = "v0.3.0-beta.24", features = [
28+
"electrum",
29+
"esplora",
30+
] }
3031

3132
[dev-dependencies]
3233
serde_json = { version = "1"}

lightning-invoice/src/de.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use lightning_types::routing::{RouteHint, RouteHintHop, RoutingFees};
2222
use bitcoin::secp256k1::ecdsa::{RecoverableSignature, RecoveryId};
2323
use bitcoin::secp256k1::PublicKey;
2424

25-
use crate::ContractId;
25+
use rgb_lib::ContractId;
2626

2727
use super::{
2828
constants, Bolt11Invoice, Bolt11InvoiceFeatures, Bolt11InvoiceSignature, Bolt11ParseError,

lightning-invoice/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use bitcoin::secp256k1::ecdsa::RecoverableSignature;
4040
use bitcoin::secp256k1::PublicKey;
4141
use bitcoin::secp256k1::{Message, Secp256k1};
4242

43-
pub use rgbstd::ContractId;
43+
use rgb_lib::ContractId;
4444

4545
use alloc::boxed::Box;
4646
use alloc::string;
@@ -1682,7 +1682,7 @@ impl Bolt11Invoice {
16821682

16831683
/// Returns the invoice's `rgb_contract_id` if present
16841684
pub fn rgb_contract_id(&self) -> Option<ContractId> {
1685-
self.signed_invoice.rgb_contract_id().map(|x| x.0.clone())
1685+
self.signed_invoice.rgb_contract_id().map(|x| x.0)
16861686
}
16871687
}
16881688

lightning-liquidity/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ backtrace = ["dep:backtrace"]
2121
_test_utils = []
2222

2323
[dependencies]
24-
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["rgb-native"] }
24+
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
2525
lightning-types = { version = "0.3.0", path = "../lightning-types", default-features = false }
2626
lightning-invoice = { version = "0.34.0", path = "../lightning-invoice", default-features = false, features = ["serde"] }
2727
lightning-macros = { version = "0.2.0", path = "../lightning-macros" }
@@ -34,7 +34,7 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
3434
backtrace = { version = "0.3", optional = true }
3535

3636
[dev-dependencies]
37-
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["_test_utils", "rgb-native"] }
37+
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["_test_utils"] }
3838
lightning-invoice = { version = "0.34.0", path = "../lightning-invoice", default-features = false, features = ["serde", "std"] }
3939
lightning-persister = { version = "0.2.0", path = "../lightning-persister", default-features = false }
4040

lightning-rapid-gossip-sync/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ default = ["std"]
1414
std = ["bitcoin-io/std", "bitcoin_hashes/std"]
1515

1616
[dependencies]
17-
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["rgb-native"] }
17+
lightning = { version = "0.2.0", path = "../lightning", default-features = false }
1818
bitcoin = { version = "0.32.2", default-features = false }
1919
bitcoin_hashes = { version = "0.14.0", default-features = false }
2020
bitcoin-io = { version = "0.1.2", default-features = false }

lightning-transaction-sync/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ all-features = true
1515
rustdoc-args = ["--cfg", "docsrs"]
1616

1717
[features]
18-
default = ["time", "rgb-native"]
19-
time = ["dep:web-time"]
20-
rgb-native = ["lightning/rgb-native"]
21-
rgb-wasm = ["lightning/rgb-wasm"]
18+
default = ["time"]
19+
time = []
2220
esplora-async = ["async-interface", "esplora-client/async", "esplora-client/tokio", "futures"]
2321
esplora-async-https = ["esplora-async", "esplora-client/async-https-rustls"]
2422
esplora-blocking = ["esplora-client/blocking"]
@@ -40,10 +38,9 @@ bitcoin = { version = "0.32.2", default-features = false }
4038
futures = { version = "0.3", optional = true }
4139
esplora-client = { version = "0.12", default-features = false, optional = true }
4240
electrum-client = { version = "0.24.0", optional = true, default-features = false, features = ["proxy"] }
43-
web-time = { version = "1.1", optional = true }
4441

4542
[dev-dependencies]
46-
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["std", "_test_utils", "rgb-native"] }
43+
lightning = { version = "0.2.0", path = "../lightning", default-features = false, features = ["std", "_test_utils"] }
4744
tokio = { version = "1.35.0", features = ["macros"] }
4845

4946
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]

lightning-transaction-sync/src/electrum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use bitcoin::{BlockHash, Script, Transaction, Txid};
2323
use std::collections::HashSet;
2424
use std::ops::Deref;
2525
use std::sync::{Arc, Mutex};
26-
use web_time::Instant;
26+
use std::time::Instant;
2727

2828
/// Synchronizes LDK with a given Electrum server.
2929
///

0 commit comments

Comments
 (0)