@dfinity/rosetta-client
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -161,5 +161,9 @@ const asn1Validator = require("node-forge/lib/asn1-validator"); | ||
function address_from_hex(hex_str) { | ||
assert.equal(hex_str.length, 64, "invalid input hex length"); | ||
const buf = bufferFromArrayBufferView(blobFromHex(hex_str)); | ||
assert(buf.byteLength === 32); | ||
return crc32_del(buf); | ||
assert.equal(buf.byteLength, 32, "invalid address length in bytes"); | ||
const ret = crc32_del(buf); | ||
const hex_str2 = address_to_hex(ret); | ||
assert.equal(hex_str.toLowerCase(), hex_str2.toLowerCase(), "dencode/encode roundtrip changes the address"); | ||
return ret; | ||
} | ||
@@ -166,0 +170,0 @@ |
@@ -22,2 +22,3 @@ const { blobToHex } = require("@dfinity/candid"); | ||
headers: { "Content-Type": "application/json;charset=utf-8" }, | ||
proxy: params.proxy, | ||
}); | ||
@@ -24,0 +25,0 @@ |
{ | ||
"name": "@dfinity/rosetta-client", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"main": "./index.js", | ||
@@ -39,3 +39,3 @@ "type": "commonjs", | ||
"json-bigint": "^1.0.0", | ||
"node-forge": "^0.10.0", | ||
"node-forge": "^1.0.0", | ||
"tweetnacl": "^1.0.3" | ||
@@ -42,0 +42,0 @@ }, |
@@ -89,3 +89,3 @@ # `@dfinity/rosetta-client` | ||
// 的 RosettaClient 类接口,可以调用 RosettaClient 的方法使用 Rosetta API。 | ||
let session = new Session({ baseUrl: "http://localhost:8080" }); | ||
let session = new Session({ baseUrl: "http://127.0.0.1:8080" }); | ||
@@ -92,0 +92,0 @@ // The network_identifier value used in requests. |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
9536
2
368771
14
+ Addednode-forge@1.3.1(transitive)
- Removednode-forge@0.10.0(transitive)
Updatednode-forge@^1.0.0