@exodus/asset-types 0.2.4 → 0.3.1

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 CHANGED
@@ -3,6 +3,26 @@
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.1](https://github.com/ExodusMovement/assets/compare/@exodus/asset-types@0.3.0...@exodus/asset-types@0.3.1) (2025-06-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+
12
+ * fix: remove unused gradientCoords from meta and validation (#5937)
13
+
14
+
15
+
16
+ ## [0.3.0](https://github.com/ExodusMovement/assets/compare/@exodus/asset-types@0.2.4...@exodus/asset-types@0.3.0) (2025-03-31)
17
+
18
+
19
+ ### Features
20
+
21
+
22
+ * feat: add types for schnorr signing (#5352)
23
+
24
+
25
+
6
26
  ## [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
27
 
8
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/asset-types",
3
- "version": "0.2.4",
3
+ "version": "0.3.1",
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": "fb14012ea166f96ea8eb3f7bc9038bdcb10a71be"
35
+ "gitHead": "526664d72a7a3c24ec8db150493fb3f1c490faa3"
36
36
  }
@@ -1,12 +1,5 @@
1
1
  import type { UnitType } from '@exodus/currency'
2
2
 
3
- export type GradientCoords = {
4
- x1: string
5
- y1: string
6
- x2: string
7
- y2: string
8
- }
9
-
10
3
  export type Info = {
11
4
  description?: string
12
5
  reddit?: string
@@ -30,7 +23,6 @@ export type AssetMeta = {
30
23
  displayNetworkTicker: string
31
24
  displayTicker: string
32
25
  gradientColors: string[]
33
- gradientCoords: GradientCoords
34
26
  tokenAssetType?: string
35
27
  info?: Info
36
28
  primaryColor: string
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 enum SignatureType {
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: SignatureType.Ecdsa
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: SignatureType.Ed25519
32
+ signatureType: 'ed25519'
29
33
  data: Buffer
30
34
  } & BaseSignParams
31
35
 
32
- export type SignParams<Enc extends SignatureEncoding> = EcdsaSignParams<Enc> | Ed25519SignParams
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