@keplr-wallet/common 0.11.23 → 0.11.24-rc.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/LICENSE +8 -2
- package/build/icns/index.d.ts +2 -0
- package/build/icns/index.js +22 -0
- package/build/icns/index.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/package.json +3 -3
- package/src/icns/index.ts +18 -0
- package/src/index.ts +1 -0
package/LICENSE
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
License: Apache2.0
|
|
1
|
+
License: Apache2.0 (Extension) / All rights reserved (Mobile)
|
|
2
|
+
|
|
3
|
+
## Keplr Extension License:
|
|
2
4
|
|
|
3
5
|
Apache License
|
|
4
6
|
Version 2.0, January 2004
|
|
@@ -200,4 +202,8 @@ License: Apache2.0
|
|
|
200
202
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
201
203
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
202
204
|
See the License for the specific language governing permissions and
|
|
203
|
-
limitations under the License.
|
|
205
|
+
limitations under the License.
|
|
206
|
+
|
|
207
|
+
## Keplr Mobile License
|
|
208
|
+
|
|
209
|
+
Copyright (c) 2021 Chainapsis Inc. All rights reserved.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateICNSName = exports.parseICNSName = void 0;
|
|
4
|
+
function parseICNSName(name) {
|
|
5
|
+
const split = name.split(".");
|
|
6
|
+
if (split.length === 2) {
|
|
7
|
+
if (split[0].length > 0 && split[1].length > 0) {
|
|
8
|
+
return [split[0], split[1]];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
exports.parseICNSName = parseICNSName;
|
|
14
|
+
function validateICNSName(name, bech32Prefix) {
|
|
15
|
+
const parsed = parseICNSName(name);
|
|
16
|
+
if (!parsed) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return parsed[1] === bech32Prefix;
|
|
20
|
+
}
|
|
21
|
+
exports.validateICNSName = validateICNSName;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icns/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,IAAY;IACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAC9C,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7B;KACF;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AATD,sCASC;AAED,SAAgB,gBAAgB,CAAC,IAAY,EAAE,YAAoB;IACjE,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,KAAK,CAAC;KACd;IACD,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC;AACpC,CAAC;AAND,4CAMC"}
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keplr-wallet/common",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.24-rc.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"author": "chainapsis",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@keplr-wallet/crypto": "0.11.
|
|
20
|
+
"@keplr-wallet/crypto": "0.11.24-rc.0",
|
|
21
21
|
"buffer": "^6.0.3",
|
|
22
22
|
"delay": "^4.4.0"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "df8a8c310ee0401b4551fc48f7409bd9d85840fc"
|
|
25
25
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function parseICNSName(name: string): [string, string] | undefined {
|
|
2
|
+
const split = name.split(".");
|
|
3
|
+
if (split.length === 2) {
|
|
4
|
+
if (split[0].length > 0 && split[1].length > 0) {
|
|
5
|
+
return [split[0], split[1]];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return undefined;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function validateICNSName(name: string, bech32Prefix: string): boolean {
|
|
13
|
+
const parsed = parseICNSName(name);
|
|
14
|
+
if (!parsed) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return parsed[1] === bech32Prefix;
|
|
18
|
+
}
|
package/src/index.ts
CHANGED