New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

verify-xrpl-signature

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verify-xrpl-signature - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

2

package.json
{
"name": "verify-xrpl-signature",
"version": "4.1.0",
"version": "4.1.1",
"description": "Verify XRPL signed TX blob",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -31,8 +31,17 @@ # Verify XRPL tx blob signatures [![npm version](https://badge.fury.io/js/verify-xrpl-signature.svg)](https://www.npmjs.com/verify-xrpl-signature)

Note! When a known NetworkID is detected in the transaction, network definitions will be automatically fetched from a public RPC
endpoint. Known NetworkIDs used to fetch definitions:
Since v4.1.0 this lib ships a `getDefinitions(network)` async method. The only input argument can be `string` (network code, e.g. `MAINNET`) or integer (e.g. `21337`). The method will then fetch definitions accordingly from the right network, providing it's known in XRPL Lab's `rails` endpoint. You can then use the response to pass as the third argument (`definitions`) of `verifySignature(...)`
- 21337 (Xahau Mainnet)
- 21338 (Xahau Testnet)
```javascript
const { verifySignature, getDefinitions } = require('verify-xrpl-signature')
// Or for `.mjs`:
// import verifyXrplSignature from 'verify-xrpl-signature'
// const { verifySignature, getDefinitions } = verifyXrplSignature
;(async () => {
const someTx = '<<binhex>>'
// console.log(verifySignature(someTx, undefined, await getDefinitions('XAHAU') )) // Network identifier
console.log(verifySignature(someTx, undefined, await getDefinitions(21337) )) // Network ID
})()
```
##### Manual definition fetching

@@ -55,5 +64,2 @@

console.log(verifySignature(someTx, undefined, definitions))
// In case of explicit MultiSign signer verification:
// console.log(verifySignature(someTx, 'rwiETSee2wMz3SBnAG8hkMsCgvGy9LWbZ1', definitions))
})()

@@ -78,5 +84,2 @@ ```

console.log(verifySignature(someTx, undefined, definitions))
// In case of explicit MultiSign signer verification:
// console.log(verifySignature(someTx, 'rwiETSee2wMz3SBnAG8hkMsCgvGy9LWbZ1', definitions))
```

@@ -83,0 +86,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc