Skip to content

Commit 91ca75d

Browse files
authored
Merge pull request #29 from EthanYuan/support-signet
feat: update spv lib to support signet
2 parents 3a9f048 + e76b9c6 commit 91ca75d

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

checksums.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
6bbea4820329050e1fc65f9c15cab5948b824c73aa3430d7d92b793c53ca66b6 build/release/can-update-without-ownership-lock
2-
037b7d66cbe8fcea2d13a3da6693e2fc14d6510a075dce20ebb7289647077a5e build/release/ckb-bitcoin-spv-type-lock
2+
eaa9e3aeb1205e611078a819e960c33f4934ea49029aab3445a241955e696ee1 build/release/ckb-bitcoin-spv-type-lock

contracts/ckb-bitcoin-spv-type-lock/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ckb-bitcoin-spv-type-lock"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
authors = ["Boyu Yang <[email protected]>"]
55
edition = "2021"
66
license = "MIT"
@@ -15,6 +15,6 @@ ckb-hash = { version = "0.112.1", default-features = false, features = ["ckb-con
1515
[dependencies.ckb-bitcoin-spv-verifier]
1616
version = "0.1.0"
1717
git = "https://github.com/ckb-cell/ckb-bitcoin-spv"
18-
rev = "a13477b"
18+
rev = "bfc71d7"
1919
default-features = false
20-
features = ["no-std"]
20+
features = ["no-std"]

contracts/ckb-bitcoin-spv-type-lock/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ A Bitcoin SPV instance contains two types of cells: **SPV info cell** and **SPV
4545
- tip client cell id
4646
```
4747

48+
- Flags
49+
50+
[Flags](https://github.com/ckb-cell/ckb-bitcoin-spv/blob/bfc71d7daf17e96f34e8e287f45254e512383330/verifier/schemas/types.mol#L58) is the last part of `args` and takes up one byte. The highest two bits
51+
are used to indicate different btc chain types. The supported chain types are:
52+
53+
- Mainnet
54+
- Testnet
55+
- Signet
56+
57+
see [BTC chain type] for details.
58+
4859
### Operations
4960

5061
There are 4 kinds of operations in the Bitcoin SPV type script:
@@ -239,3 +250,5 @@ To verify a transaction using the Bitcoin SPV Client cell, follow these steps:
239250
[Section "Code Locating"]: https://github.com/nervosnetwork/rfcs/blob/v2020.01.15/rfcs/0022-transaction-structure/0022-transaction-structure.md#code-locating
240251
[CKB RFC 0032]: https://github.com/nervosnetwork/rfcs/blob/dff5235616e5c7aec706326494dce1c54163c4be/rfcs/0032-ckb-vm-version-selection/0032-ckb-vm-version-selection.md#specification
241252
[CKB RFC 0051]: https://github.com/nervosnetwork/rfcs/blob/dff5235616e5c7aec706326494dce1c54163c4be/rfcs/0051-ckb2023/0051-ckb2023.md#ckb-vm-v2
253+
254+
[btc chain type]: https://github.com/ckb-cell/ckb-bitcoin-spv/blob/bfc71d7daf17e96f34e8e287f45254e512383330/verifier/src/constants.rs#L3

tests/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ walkdir = "2.4"
1717
[dev-dependencies.ckb-bitcoin-spv-prover]
1818
version = "0.1.0"
1919
git = "https://github.com/ckb-cell/ckb-bitcoin-spv"
20-
rev = "a13477b"
20+
rev = "bfc71d7"
2121

2222
[dev-dependencies.ckb-bitcoin-spv-verifier]
2323
version = "0.1.0"
2424
git = "https://github.com/ckb-cell/ckb-bitcoin-spv"
25-
rev = "a13477b"
25+
rev = "bfc71d7"

0 commit comments

Comments
 (0)