https://github.com/bitcoinjs/pushdata-bitcoin
encode/decode number as bitcoin pushdata integer
https://github.com/bitcoinjs/pushdata-bitcoin
Last synced: 12 months ago
JSON representation
encode/decode number as bitcoin pushdata integer
- Host: GitHub
- URL: https://github.com/bitcoinjs/pushdata-bitcoin
- Owner: bitcoinjs
- License: mit
- Created: 2016-12-17T13:41:32.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-01-03T06:55:02.000Z (over 7 years ago)
- Last Synced: 2025-06-27T09:55:15.108Z (about 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pushdata-bitcoin
[](https://www.npmjs.org/package/pushdata-bitcoin)
[](https://travis-ci.org/bitcoinjs/pushdata-bitcoin)
[](https://github.com/feross/standard)
Encode/decode value as bitcoin `OP_PUSHDATA` integer
## Example
``` javascript
var pushdata = require('pushdata-bitcoin')
var i = 120
var buffer = new Buffer(pushdata.encodingLength(i))
pushdata.encode(buffer, i)
```
## LICENSE [MIT](LICENSE)