-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: disallow p2sh converting by default since risky (#699)
- Loading branch information
Showing
6 changed files
with
175 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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,5 @@ | ||
--- | ||
"@ckb-lumos/common-scripts": minor | ||
--- | ||
|
||
**BREAKING CHANGE**: `createOmnilockScript` uses the `allows` option to restrict allowed btc addresses |
This file contains 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 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 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 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 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,19 @@ | ||
# Migrate to Lumos v0.24 | ||
|
||
## Disallow the Omnilock P2SH Address by Default | ||
|
||
The default options of `createOmnilockScript` disallows the use of P2SH addresses for security reasons. | ||
Not all P2SH addresses are P2SH-P2WPKH addresses. | ||
This means that developers may unintentionally use a non-P2SH-P2WPKH address to convert to an Omnilock script, | ||
which can lead to the script not being lockable. | ||
If you still need to use a P2SH address, use the following code | ||
|
||
```diff | ||
createOmnilockScript({ | ||
auth: { | ||
flag: "BITCOIN", | ||
content: addr, | ||
+ allows: ["P2WPKH", "P2PKH", "P2SH-P2WPKH"] | ||
} | ||
}) | ||
``` |
f2f5666
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 New canary release:
0.0.0-canary-f2f5666-20240614035156