-
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.
feat(common-scripts): whitelist to disallow p2sh by default
- Loading branch information
Showing
6 changed files
with
55 additions
and
25 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
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"] | ||
} | ||
}) | ||
``` |