@exodus/asset-types 0.2.4 → 0.3.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 +10 -0
- package/package.json +2 -2
- package/src/index.d.ts +12 -0
- package/src/signer.d.ts +15 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
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
|
+
## [0.3.0](https://github.com/ExodusMovement/assets/compare/@exodus/asset-types@0.2.4...@exodus/asset-types@0.3.0) (2025-03-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* feat: add types for schnorr signing (#5352)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
6
16
|
## [0.2.4](https://github.com/ExodusMovement/assets/compare/@exodus/asset-types@0.2.3...@exodus/asset-types@0.2.4) (2025-02-07)
|
|
7
17
|
|
|
8
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/asset-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Typings for Assets",
|
|
5
5
|
"author": "Exodus Movement, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/bn.js": "^5"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "c5a19c29bd6066318ca6fc83e86ba9d3c0ef5bbb"
|
|
36
36
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -30,3 +30,15 @@ export type {
|
|
|
30
30
|
AssetAddress,
|
|
31
31
|
ApiFeatures,
|
|
32
32
|
} from './asset.js'
|
|
33
|
+
|
|
34
|
+
export type {
|
|
35
|
+
EcdsaSignParams,
|
|
36
|
+
Ed25519SignParams,
|
|
37
|
+
EncodedEcdsaSignature,
|
|
38
|
+
SchnorrSignParams,
|
|
39
|
+
SignParams,
|
|
40
|
+
SignReturnValue,
|
|
41
|
+
SignatureEncoding,
|
|
42
|
+
SignatureType,
|
|
43
|
+
Signer,
|
|
44
|
+
} from './signer.js'
|
package/src/signer.d.ts
CHANGED
|
@@ -8,28 +8,36 @@ type BaseSignParams = {
|
|
|
8
8
|
keyId?: KeyIdentifier
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export
|
|
12
|
-
Ed25519 = 'ed25519',
|
|
13
|
-
Ecdsa = 'ecdsa',
|
|
14
|
-
}
|
|
11
|
+
export type SignatureType = 'ed25519' | 'ecdsa' | 'schnorr'
|
|
15
12
|
|
|
16
13
|
export type EcdsaSignParams<Enc extends SignatureEncoding> = {
|
|
17
|
-
signatureType:
|
|
14
|
+
signatureType: 'ecdsa'
|
|
18
15
|
data: Buffer
|
|
19
16
|
ecOptions?: { canoncial?: boolean }
|
|
20
17
|
extraEntropy?: Buffer
|
|
21
18
|
enc: Enc
|
|
22
19
|
} & BaseSignParams
|
|
23
20
|
|
|
21
|
+
export type SchnorrSignParams = {
|
|
22
|
+
signatureType: 'schnorr'
|
|
23
|
+
data: Buffer
|
|
24
|
+
extraEntropy?: Buffer
|
|
25
|
+
tweak?: Buffer
|
|
26
|
+
} & BaseSignParams
|
|
27
|
+
|
|
24
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
29
|
export type EncodedEcdsaSignature<Enc extends SignatureEncoding> = Enc extends 'der' ? Buffer : any
|
|
26
30
|
|
|
27
31
|
export type Ed25519SignParams = {
|
|
28
|
-
signatureType:
|
|
32
|
+
signatureType: 'ed25519'
|
|
29
33
|
data: Buffer
|
|
30
34
|
} & BaseSignParams
|
|
31
35
|
|
|
32
|
-
export type SignParams<Enc extends SignatureEncoding> =
|
|
36
|
+
export type SignParams<Enc extends SignatureEncoding> =
|
|
37
|
+
| EcdsaSignParams<Enc>
|
|
38
|
+
| Ed25519SignParams
|
|
39
|
+
| SchnorrSignParams
|
|
40
|
+
|
|
33
41
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
42
|
export type SignReturnValue<T extends SignParams<any>> =
|
|
35
43
|
T extends EcdsaSignParams<infer Enc> ? EncodedEcdsaSignature<Enc> : Buffer
|