@ceramicnetwork/blockchain-utils-linking
Advanced tools
Comparing version 1.3.2-rc.0 to 1.3.2-rc.1
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.3.2-rc.1](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-linking@1.3.2-rc.0...@ceramicnetwork/blockchain-utils-linking@1.3.2-rc.1) (2021-10-28) | ||
**Note:** Version bump only for package @ceramicnetwork/blockchain-utils-linking | ||
## [1.3.2-rc.0](/compare/@ceramicnetwork/blockchain-utils-linking@1.3.1...@ceramicnetwork/blockchain-utils-linking@1.3.2-rc.0) (2021-10-25) | ||
@@ -8,0 +16,0 @@ |
@@ -21,5 +21,2 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -31,3 +28,3 @@ exports.NearAuthProvider = void 0; | ||
const nearApiJs = __importStar(require("near-api-js")); | ||
const crypto_1 = __importDefault(require("crypto")); | ||
const sha256 = __importStar(require("@stablelib/sha256")); | ||
const getSignature = async (signer, accountId, message, networkId) => { | ||
@@ -47,4 +44,4 @@ const signed = await signer.signMessage(message, accountId, networkId); | ||
const signer = await nearApiJs.InMemorySigner.fromKeyPair(this.chainRef, this.accountName, key); | ||
const hash = crypto_1.default.createHash('sha256').update(message).digest(); | ||
const { signature } = await signer.signMessage(hash, this.accountName, this.chainRef); | ||
const digest = sha256.hash(uint8arrays.fromString(message)); | ||
const { signature } = await signer.signMessage(digest, this.accountName, this.chainRef); | ||
return uint8arrays.toString(signature, 'base16'); | ||
@@ -51,0 +48,0 @@ } |
{ | ||
"name": "@ceramicnetwork/blockchain-utils-linking", | ||
"version": "1.3.2-rc.0", | ||
"version": "1.3.2-rc.1", | ||
"description": "Blockchain utils for linking blockchain accounts to DID", | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "538800c0c2b7e9a691232e76bf120f060ffdc83b" | ||
"gitHead": "7e6e6641c2400933a5fdb4cb86564eab76413863" | ||
} |
Sorry, the diff of this file is not supported yet
81079
871