@ceramicnetwork/blockchain-utils-validation 1.1.3-rc.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.2.0](/compare/@ceramicnetwork/blockchain-utils-validation@1.2.0-rc.0...@ceramicnetwork/blockchain-utils-validation@1.2.0) (2021-09-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @ceramicnetwork/blockchain-utils-validation
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [1.2.0-rc.0](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-validation@1.1.4-rc.0...@ceramicnetwork/blockchain-utils-validation@1.2.0-rc.0) (2021-09-13)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* caip10 ethereum+eos integration test ([#1668](https://github.com/ceramicnetwork/js-ceramic/issues/1668)) ([4267d8b](https://github.com/ceramicnetwork/js-ceramic/commit/4267d8b31fca38a163bb009198a49e1de22b2a58)), closes [#1678](https://github.com/ceramicnetwork/js-ceramic/issues/1678)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.1.4-rc.0](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-validation@1.1.3...@ceramicnetwork/blockchain-utils-validation@1.1.4-rc.0) (2021-09-08)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @ceramicnetwork/blockchain-utils-validation
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.1.3](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-validation@1.1.3-rc.0...@ceramicnetwork/blockchain-utils-validation@1.1.3) (2021-09-08)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @ceramicnetwork/blockchain-utils-validation
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [1.1.3-rc.0](https://github.com/ceramicnetwork/js-ceramic/compare/@ceramicnetwork/blockchain-utils-validation@1.1.2...@ceramicnetwork/blockchain-utils-validation@1.1.3-rc.0) (2021-09-02)
|
|
7
42
|
|
|
8
43
|
**Note:** Version bump only for package @ceramicnetwork/blockchain-utils-validation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polkadot.d.ts","sourceRoot":"","sources":["../../src/blockchains/polkadot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"polkadot.d.ts","sourceRoot":"","sources":["../../src/blockchains/polkadot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAkBzD,QAAA,MAAM,OAAO,EAAE,iBAGd,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const caip_1 = require("caip");
|
|
4
7
|
const util_crypto_1 = require("@polkadot/util-crypto");
|
|
8
|
+
const uint8arrays_1 = __importDefault(require("uint8arrays"));
|
|
5
9
|
const namespace = 'polkadot';
|
|
10
|
+
const stringHex = (str) => `0x${uint8arrays_1.default.toString(uint8arrays_1.default.fromString(str), 'base16')}`;
|
|
6
11
|
async function validateLink(proof) {
|
|
7
12
|
const address = new caip_1.AccountID(proof.account).address;
|
|
8
|
-
const
|
|
13
|
+
const message = stringHex(proof.message);
|
|
14
|
+
const res = await util_crypto_1.signatureVerify(message, proof.signature, address);
|
|
9
15
|
return res.isValid ? proof : null;
|
|
10
16
|
}
|
|
11
17
|
const Handler = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polkadot.js","sourceRoot":"","sources":["../../src/blockchains/polkadot.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"polkadot.js","sourceRoot":"","sources":["../../src/blockchains/polkadot.ts"],"names":[],"mappings":";;;;;AACA,+BAAgC;AAChC,uDAAuD;AAEvD,8DAAsC;AAEtC,MAAM,SAAS,GAAG,UAAU,CAAA;AAE5B,MAAM,SAAS,GAAG,CAAC,GAAW,EAAU,EAAE,CACxC,KAAK,qBAAW,CAAC,QAAQ,CAAC,qBAAW,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAA;AAEpE,KAAK,UAAU,YAAY,CAAC,KAAgB;IAC1C,MAAM,OAAO,GAAG,IAAI,gBAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,OAAO,CAAA;IACpD,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACxC,MAAM,GAAG,GAAG,MAAM,6BAAe,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACpE,OAAO,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;AACnC,CAAC;AAED,MAAM,OAAO,GAAsB;IACjC,SAAS;IACT,YAAY;CACb,CAAA;AAED,kBAAe,OAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ceramicnetwork/blockchain-utils-validation",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Blockchain utils for validation of linked blockchain accounts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ceramic",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"clean": "rm -rf ./lib"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@ceramicnetwork/blockchain-utils-linking": "^1.
|
|
27
|
+
"@ceramicnetwork/blockchain-utils-linking": "^1.2.0",
|
|
28
28
|
"@ethersproject/contracts": "^5.4.1",
|
|
29
29
|
"@ethersproject/providers": "^5.4.5",
|
|
30
30
|
"@ethersproject/wallet": "^5.4.0",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"ganache-core": "^2.13.1",
|
|
53
53
|
"near-api-js": "^0.36.3"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "fa473ad18278a01b4a21c3539b2b456d1820f5c5"
|
|
56
56
|
}
|