@polkadot-api/substrate-bindings
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -89,3 +89,3 @@ 'use strict'; | ||
const textDecoder$2 = new TextDecoder(); | ||
const _Binary = class _Binary { | ||
class Binary { | ||
constructor(data) { | ||
@@ -101,15 +101,14 @@ __privateAdd(this, _bytes); | ||
static fromText(input) { | ||
return new _Binary(textEncoder$3.encode(input)); | ||
return new this(textEncoder$3.encode(input)); | ||
} | ||
static fromHex(input) { | ||
return new _Binary(utils.fromHex(input)); | ||
return new this(utils.fromHex(input)); | ||
} | ||
static fromBytes(input) { | ||
return new _Binary(input); | ||
return new this(input); | ||
} | ||
}; | ||
} | ||
_bytes = new WeakMap(); | ||
_hex = new WeakMap(); | ||
_str = new WeakMap(); | ||
let Binary = _Binary; | ||
class FixedSizeBinary extends Binary { | ||
@@ -120,3 +119,3 @@ constructor(data) { | ||
static fromArray(input) { | ||
return new FixedSizeBinary(new Uint8Array(input)); | ||
return new this(new Uint8Array(input)); | ||
} | ||
@@ -130,3 +129,4 @@ } | ||
const _dec = scaleTs.Bytes.dec(nBytes); | ||
return (value) => Binary.fromBytes(_dec(value)); | ||
const Bin2 = nBytes == null ? Binary : FixedSizeBinary; | ||
return (value) => Bin2.fromBytes(_dec(value)); | ||
}; | ||
@@ -133,0 +133,0 @@ const Bin = (nBytes) => scaleTs.createCodec(enc$1(nBytes), dec$1(nBytes)); |
{ | ||
"name": "@polkadot-api/substrate-bindings", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"author": "Josep M Sobrepere (https://github.com/josepot)", | ||
@@ -38,4 +38,4 @@ "repository": { | ||
"dependencies": { | ||
"@noble/hashes": "^1.3.1", | ||
"@scure/base": "^1.1.1", | ||
"@noble/hashes": "^1.4.0", | ||
"@scure/base": "^1.1.7", | ||
"scale-ts": "^1.6.0", | ||
@@ -45,7 +45,8 @@ "@polkadot-api/utils": "0.1.1" | ||
"devDependencies": { | ||
"bigint-conversion": "^2.4.1", | ||
"hash-wasm": "^4.9.0" | ||
"bigint-conversion": "^2.4.3", | ||
"hash-wasm": "^4.11.0" | ||
}, | ||
"scripts": { | ||
"build": "tsc --noEmit && rollup -c ../../rollup.config.js", | ||
"build-core": "tsc --noEmit && rollup -c ../../rollup.config.js", | ||
"build": "pnpm build-core", | ||
"test": "vitest", | ||
@@ -52,0 +53,0 @@ "lint": "prettier --check README.md \"src/**/*.{js,jsx,ts,tsx,json,md}\"", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
204645
0
Updated@noble/hashes@^1.4.0
Updated@scure/base@^1.1.7