@windingtree/org.id-utils
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -7,2 +7,4 @@ export declare const phone: RegExp; | ||
export declare const bitcoinAddress: RegExp; | ||
export declare const blockchainAccountId: RegExp; | ||
export declare const blockchainAccountIdGrouped: RegExp; | ||
export declare const X25519: RegExp; | ||
@@ -9,0 +11,0 @@ export declare const secp256k1: RegExp; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.didGrouped = exports.did = exports.iban = exports.swift = exports.bytes32 = exports.secp256k1 = exports.X25519 = exports.bitcoinAddress = exports.ethereumAddress = exports.isoDate = exports.email = exports.uri = exports.phone = void 0; | ||
exports.didGrouped = exports.did = exports.iban = exports.swift = exports.bytes32 = exports.secp256k1 = exports.X25519 = exports.blockchainAccountIdGrouped = exports.blockchainAccountId = exports.bitcoinAddress = exports.ethereumAddress = exports.isoDate = exports.email = exports.uri = exports.phone = void 0; | ||
// Common | ||
@@ -10,4 +10,6 @@ exports.phone = /^([+]{0,1})([0-9- ()/]+)$/; | ||
// Crypto addresses | ||
exports.ethereumAddress = /^0x[a-fA-F0-9]{40}$/i; | ||
exports.bitcoinAddress = /^(bc1|[13]{1})([a-zA-HJ-NP-Z0-9]{25,39})$/i; | ||
exports.ethereumAddress = /^0x[a-fA-F0-9]{40}$/; | ||
exports.bitcoinAddress = /^(bc1|[13]{1})([a-zA-HJ-NP-Z0-9]{25,39})$/; | ||
exports.blockchainAccountId = /^([a-zA-Z-0-9]+)@([a-zA-Z-0-9]+):([a-zA-Z-0-9]+)$/; | ||
exports.blockchainAccountIdGrouped = /^(?<accountId>[a-zA-Z-0-9]+)@(?<blockchainType>[a-zA-Z-0-9]+):(?<blockchainId>[a-zA-Z-0-9]+)$/; | ||
// Public keys (as strings) | ||
@@ -22,4 +24,4 @@ exports.X25519 = /^(MCowBQYDK2VuAyEA[a-zA-Z0-9/]{43}=)$/; | ||
// DID | ||
exports.did = /^did:orgid:([a-zA-Z]*:)?(0x[a-fA-F0-9]{64})?(\?([\w=&%-]+))?((?:#)([[0-9a-zA-Z-]+))?$/i; | ||
exports.didGrouped = /^(?<did>did:(?<method>[a-zA-Z]+):(?<submethod>[a-zA-Z]+)?([:]{1})?(?<id>0x[a-fA-F0-9]{64}))?(\?(?<query>[\w\d=&%-]+))?((?:#)(?<fragment>[[0-9a-zA-Z-]+))?$/i; | ||
exports.did = /^did:orgid:([a-zA-Z]*:)?(0x[a-fA-F0-9]{64})?([?]{1}([0-9a-zA-Z_=&%-]+))?((?:#)([[0-9a-zA-Z-]+))?$/; | ||
exports.didGrouped = /^(?<did>did:(?<method>[a-zA-Z]+):(?<submethod>[a-zA-Z]+)?([:]{1})?(?<id>0x[a-fA-F0-9]{64}))?(\?(?<query>[0-9a-zA-Z_=&%-]+))?((?:#)(?<fragment>[[0-9a-zA-Z-]+))?$/; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@windingtree/org.id-utils", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Shared ORGiD utilities", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -43,2 +43,4 @@ [](https://www.npmjs.com/package/@windingtree/org.id-utils) | ||
bitcoinAddress, | ||
blockchainAccountId, | ||
blockchainAccountIdGrouped, | ||
X25519, // <-- X25519 pub key | ||
@@ -45,0 +47,0 @@ secp256k1, // <-- secp256k1 pub key |
Sorry, the diff of this file is not supported yet
13491
194
87