@did-btcr2/common 1.1.0 → 2.0.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/dist/cjs/constants.js +4 -4
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/errors.js +50 -50
- package/dist/cjs/errors.js.map +1 -1
- package/dist/cjs/patch.js +3 -3
- package/dist/cjs/patch.js.map +1 -1
- package/dist/cjs/types.js +10 -10
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/constants.js +4 -4
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/errors.js +50 -50
- package/dist/esm/errors.js.map +1 -1
- package/dist/esm/patch.js +3 -3
- package/dist/esm/patch.js.map +1 -1
- package/dist/esm/types.js +10 -10
- package/dist/esm/types.js.map +1 -1
- package/dist/types/constants.d.ts +4 -4
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/errors.d.ts +17 -17
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/interfaces.d.ts +6 -6
- package/dist/types/interfaces.d.ts.map +1 -1
- package/dist/types/types.d.ts +10 -10
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +4 -4
- package/src/errors.ts +23 -23
- package/src/interfaces.ts +6 -6
- package/src/patch.ts +3 -3
- package/src/types.ts +10 -10
package/src/types.ts
CHANGED
|
@@ -57,22 +57,22 @@ export type MethodName = string;
|
|
|
57
57
|
export type MethodSpecificId = string;
|
|
58
58
|
export type DecentralizedIdentifierExplicit = `${DID}:${MethodName}:${MethodSpecificId}`;
|
|
59
59
|
export type DecentralizedIdentifier = string;
|
|
60
|
-
export type
|
|
61
|
-
export type
|
|
62
|
-
export type
|
|
63
|
-
export type
|
|
60
|
+
export type Btcr2MethodName = 'btcr2';
|
|
61
|
+
export type Btcr2DeterministicPrefix = 'k';
|
|
62
|
+
export type Btcr2ExternalPrefix = 'x';
|
|
63
|
+
export type Btcr2Prefix = `${Btcr2DeterministicPrefix | Btcr2ExternalPrefix}1`;
|
|
64
64
|
export type Bech32Id = string;
|
|
65
|
-
export type
|
|
66
|
-
export type
|
|
67
|
-
export type
|
|
68
|
-
export type Controller =
|
|
65
|
+
export type Btcr2Id = `${Btcr2Prefix}${Bech32Id}`
|
|
66
|
+
export type Btcr2IdentifierExplicit = `${DID}:${Btcr2MethodName}:${Btcr2Id}`;
|
|
67
|
+
export type Btcr2Identifier = string;
|
|
68
|
+
export type Controller = Btcr2Identifier;
|
|
69
69
|
export type Id = 'initialKey';
|
|
70
70
|
export type FullId = `${Controller}#${Id}`;
|
|
71
|
-
export enum
|
|
71
|
+
export enum Btcr2IdentifierTypes {
|
|
72
72
|
KEY = 'KEY',
|
|
73
73
|
EXTERNAL = 'EXTERNAL'
|
|
74
74
|
}
|
|
75
|
-
export enum
|
|
75
|
+
export enum Btcr2IdentifierHrp {
|
|
76
76
|
k = 'k',
|
|
77
77
|
x = 'x'
|
|
78
78
|
}
|