Comments (4)
Replacing with the following seems to help:
.trim()
// Replace one or more consecutive whitespace characters (spaces, tabs,
// or line breaks) with a single space.
.replace(/\s+/g, ' ')
// Now encode numbers to little endian hex. Note that numbers are not
// enclosed in <>, since <> represents hex code already encoded.
// The regex below will match one or more digits within a string,
// except if the sequence is surrounded by "<" and ">"
.replace(/(<\d+>)|\b\d+\b/g, (match) =>
match.startsWith('<') ? match : numberEncodeAsm(Number(match))
)
// we don't have numbers anymore, now it's safe to remove < and > since we
// know that every remaining is either an op_code or a hex encoded number
.replace(/[<>]/g, '');
from descriptors.
Thanks @serious-sammy . This looks good to me. Do you want to submit a PR with the proposal? I can do it for you if you don't want to (or have the time). Let me know.
from descriptors.
I'd appreciate if you would do it 🙏
from descriptors.
Thanks for the report @serious-sammy . I've updated npm with a new version with the change.
from descriptors.
Related Issues (20)
- add compatibility with Ledger HOT 1
- Add new methods HOT 6
- Refactor DescriptorsLibrary HOT 1
- WIF or xprv keyExpressions should automatically sign the Psbt
- `updatePsbt` throws an Error when attempting to add another UTXO belonging to the same timelocked descriptor/address HOT 4
- `sortedmulti` nestedn in `wsh`? HOT 1
- Forced to invoke the construtor and instantiate a new object every time I want to increment an address index HOT 1
- Error: cannot finalize psbt index 0 since it does not correspond to this descriptor HOT 5
- Support for `@scure/btc-signer` HOT 1
- Output descriptor with both receiving and change paths HOT 4
- Master key prefix m is added to non-master xpub's path HOT 5
- TS types are not available HOT 4
- new Output with descriptor: addr(TAPROOT) HOT 6
- Remove bitcoinCoreFixtures.js from git; it's generated automatically HOT 1
- support multiple wildcards, and pass an array of indices
- Take into account Resource Limitations HOT 1
- Run createcreateFixtures.js before tests are run
- Handle BIP 32 path element overflow
- Return key origin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from descriptors.