@echoxyz/sonar-core 0.8.0 → 0.9.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @echoxyz/sonar-core
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cbf7964: Support new V2 permit
8
+
3
9
  ## 0.8.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -398,6 +398,7 @@ var SaleEligibility = /* @__PURE__ */ ((SaleEligibility2) => {
398
398
  })(SaleEligibility || {});
399
399
  var PurchasePermitType = /* @__PURE__ */ ((PurchasePermitType2) => {
400
400
  PurchasePermitType2["BASIC"] = "basic";
401
+ PurchasePermitType2["BASIC_V2"] = "basic-v2";
401
402
  PurchasePermitType2["ALLOCATION"] = "allocation";
402
403
  return PurchasePermitType2;
403
404
  })(PurchasePermitType || {});
package/dist/index.d.cts CHANGED
@@ -59,11 +59,23 @@ type AllocationPermit = {
59
59
  MaxAmount: string;
60
60
  MinAmount: string;
61
61
  };
62
+ type BasicPermitV2 = {
63
+ EntityID: Hex;
64
+ SaleUUID: Hex;
65
+ Wallet: Hex;
66
+ ExpiresAt: number;
67
+ MinAmount: string;
68
+ MaxAmount: string;
69
+ MinPrice: number;
70
+ MaxPrice: number;
71
+ Payload: Hex;
72
+ };
62
73
  declare enum PurchasePermitType {
63
74
  BASIC = "basic",
75
+ BASIC_V2 = "basic-v2",
64
76
  ALLOCATION = "allocation"
65
77
  }
66
- type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
78
+ type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.BASIC_V2 ? BasicPermitV2 : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
67
79
  declare enum PrePurchaseFailureReason {
68
80
  UNKNOWN = "unknown",
69
81
  WALLET_RISK = "wallet-risk",
@@ -94,7 +106,7 @@ type PrePurchaseCheckResponse = {
94
106
  LivenessCheckURL: string;
95
107
  };
96
108
  type GeneratePurchasePermitResponse = {
97
- PermitJSON: BasicPermit | AllocationPermit;
109
+ PermitJSON: BasicPermit | BasicPermitV2 | AllocationPermit;
98
110
  Signature: Hex;
99
111
  };
100
112
  type AllocationResponse = {
@@ -197,4 +209,4 @@ type CreateClientOptions = {
197
209
  };
198
210
  declare function createClient(options?: CreateClientOptions): SonarClient;
199
211
 
200
- export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type ListAvailableEntitiesResponse, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, type TokenResponse, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
212
+ export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BasicPermitV2, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type ListAvailableEntitiesResponse, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, type TokenResponse, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
package/dist/index.d.ts CHANGED
@@ -59,11 +59,23 @@ type AllocationPermit = {
59
59
  MaxAmount: string;
60
60
  MinAmount: string;
61
61
  };
62
+ type BasicPermitV2 = {
63
+ EntityID: Hex;
64
+ SaleUUID: Hex;
65
+ Wallet: Hex;
66
+ ExpiresAt: number;
67
+ MinAmount: string;
68
+ MaxAmount: string;
69
+ MinPrice: number;
70
+ MaxPrice: number;
71
+ Payload: Hex;
72
+ };
62
73
  declare enum PurchasePermitType {
63
74
  BASIC = "basic",
75
+ BASIC_V2 = "basic-v2",
64
76
  ALLOCATION = "allocation"
65
77
  }
66
- type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
78
+ type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.BASIC_V2 ? BasicPermitV2 : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
67
79
  declare enum PrePurchaseFailureReason {
68
80
  UNKNOWN = "unknown",
69
81
  WALLET_RISK = "wallet-risk",
@@ -94,7 +106,7 @@ type PrePurchaseCheckResponse = {
94
106
  LivenessCheckURL: string;
95
107
  };
96
108
  type GeneratePurchasePermitResponse = {
97
- PermitJSON: BasicPermit | AllocationPermit;
109
+ PermitJSON: BasicPermit | BasicPermitV2 | AllocationPermit;
98
110
  Signature: Hex;
99
111
  };
100
112
  type AllocationResponse = {
@@ -197,4 +209,4 @@ type CreateClientOptions = {
197
209
  };
198
210
  declare function createClient(options?: CreateClientOptions): SonarClient;
199
211
 
200
- export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type ListAvailableEntitiesResponse, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, type TokenResponse, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
212
+ export { APIError, type AllocationPermit, type AllocationResponse, type BasicPermit, type BasicPermitV2, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type ListAvailableEntitiesResponse, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, type TokenResponse, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
package/dist/index.js CHANGED
@@ -361,6 +361,7 @@ var SaleEligibility = /* @__PURE__ */ ((SaleEligibility2) => {
361
361
  })(SaleEligibility || {});
362
362
  var PurchasePermitType = /* @__PURE__ */ ((PurchasePermitType2) => {
363
363
  PurchasePermitType2["BASIC"] = "basic";
364
+ PurchasePermitType2["BASIC_V2"] = "basic-v2";
364
365
  PurchasePermitType2["ALLOCATION"] = "allocation";
365
366
  return PurchasePermitType2;
366
367
  })(PurchasePermitType || {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echoxyz/sonar-core",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",