@xyo-network/key-model 2.57.4 → 2.57.6
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/docs.json +1214 -1135
- package/dist/types/Key/KeyPair.d.ts +4 -4
- package/dist/types/Key/PrivateKey.d.ts +4 -6
- package/dist/types/Key/PrivateKey.d.ts.map +1 -1
- package/dist/types/Key/PublicKey.d.ts +1 -3
- package/dist/types/Key/PublicKey.d.ts.map +1 -1
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1367 -0
- package/docs/index.html +59 -0
- package/docs/interfaces/AddressValueInstance.html +166 -0
- package/docs/interfaces/AddressValueStatic.html +149 -0
- package/docs/interfaces/KeyPairInstance.html +85 -0
- package/docs/interfaces/KeyPairStatic.html +100 -0
- package/docs/interfaces/PrivateKeyInstance.html +191 -0
- package/docs/interfaces/PrivateKeyStatic.html +100 -0
- package/docs/interfaces/PublicKeyInstance.html +176 -0
- package/docs/interfaces/PublicKeyStatic.html +100 -0
- package/docs/modules.html +56 -0
- package/package.json +4 -4
- package/src/Key/KeyPair.ts +4 -4
- package/src/Key/PrivateKey.ts +4 -7
- package/src/Key/PublicKey.ts +1 -4
package/package.json
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xyo-network/core": "^2.57.
|
|
13
|
+
"@xyo-network/core": "^2.57.6"
|
|
14
14
|
},
|
|
15
15
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@xylabs/ts-scripts-yarn3": "^2.17.
|
|
18
|
-
"@xylabs/tsconfig": "^2.17.
|
|
17
|
+
"@xylabs/ts-scripts-yarn3": "^2.17.13",
|
|
18
|
+
"@xylabs/tsconfig": "^2.17.13",
|
|
19
19
|
"typescript": "^5.0.4"
|
|
20
20
|
},
|
|
21
21
|
"browser": "dist/esm/index.js",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
|
52
52
|
"types": "dist/types/index.d.ts",
|
|
53
|
-
"version": "2.57.
|
|
53
|
+
"version": "2.57.6"
|
|
54
54
|
}
|
package/src/Key/KeyPair.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DataLike } from '@xyo-network/core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { PrivateKeyInstance } from './PrivateKey'
|
|
4
|
+
import { PublicKeyInstance } from './PublicKey'
|
|
5
5
|
|
|
6
6
|
export interface KeyPairInstance {
|
|
7
|
-
get private():
|
|
8
|
-
get public():
|
|
7
|
+
get private(): PrivateKeyInstance
|
|
8
|
+
get public(): PublicKeyInstance
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface KeyPairStatic {
|
package/src/Key/PrivateKey.ts
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { DataLike } from '@xyo-network/core'
|
|
2
2
|
|
|
3
3
|
import { EllipticKeyInstance } from './EllipticKey'
|
|
4
|
-
import {
|
|
4
|
+
import { PublicKeyInstance } from './PublicKey'
|
|
5
5
|
|
|
6
6
|
export interface PrivateKeyInstance extends EllipticKeyInstance {
|
|
7
|
-
get public():
|
|
8
|
-
sign(hash: DataLike): Uint8Array
|
|
9
|
-
verify(msg: Uint8Array | string, signature: Uint8Array | string): boolean
|
|
7
|
+
get public(): PublicKeyInstance
|
|
8
|
+
sign(hash: DataLike): Uint8Array | Promise<Uint8Array>
|
|
9
|
+
verify(msg: Uint8Array | string, signature: Uint8Array | string): boolean | Promise<boolean>
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface PrivateKeyStatic {
|
|
13
13
|
new (value?: DataLike): PrivateKeyInstance
|
|
14
14
|
isXyoPrivateKey(value: unknown): boolean
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
18
|
-
export interface XyoPrivateKeyModel extends PrivateKeyInstance {}
|
package/src/Key/PublicKey.ts
CHANGED
|
@@ -5,13 +5,10 @@ import { EllipticKeyInstance } from './EllipticKey'
|
|
|
5
5
|
|
|
6
6
|
export interface PublicKeyInstance extends EllipticKeyInstance {
|
|
7
7
|
get address(): AddressValueInstance
|
|
8
|
-
verify(msg: Uint8Array | string, signature: Uint8Array | string): boolean
|
|
8
|
+
verify(msg: Uint8Array | string, signature: Uint8Array | string): boolean | Promise<boolean>
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export interface PublicKeyStatic {
|
|
12
12
|
new (bytes: DataLike): PublicKeyInstance
|
|
13
13
|
isXyoPublicKey(value: unknown): boolean
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
17
|
-
export interface XyoPublicKeyModel extends PublicKeyInstance {}
|