@echoxyz/sonar-core 0.4.1 → 0.6.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,17 @@
1
1
  # @echoxyz/sonar-core
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f47a532: Replace EntityUUID + ObfuscatedEntityID in the API interface with a single EntityID
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - bece3e6: Update types to match new GeneratePurchasePermit API.
14
+
3
15
  ## 0.4.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -77,7 +77,7 @@ export async function exampleCalls() {
77
77
  // Run a pre-purchase check
78
78
  const pre = await client.prePurchaseCheck({
79
79
  saleUUID,
80
- entityUUID: Entity.EntityUUID,
80
+ entityID: Entity.EntityID,
81
81
  walletAddress: "0x1234...abcd" as `0x${string}`,
82
82
  });
83
83
 
@@ -85,7 +85,7 @@ export async function exampleCalls() {
85
85
  // Generate a purchase permit
86
86
  const permit = await client.generatePurchasePermit({
87
87
  saleUUID,
88
- entityUUID: Entity.EntityUUID,
88
+ entityID: Entity.EntityID,
89
89
  walletAddress: "0x1234...abcd" as `0x${string}`,
90
90
  });
91
91
  console.log(permit.Signature, permit.Permit);
package/dist/index.cjs CHANGED
@@ -277,14 +277,14 @@ var SonarClient = class {
277
277
  async prePurchaseCheck(args) {
278
278
  return this.postJSON("/externalapi.PrePurchaseCheck", {
279
279
  SaleUUID: args.saleUUID,
280
- EntityUUID: args.entityUUID,
280
+ EntityID: args.entityID,
281
281
  PurchasingWalletAddress: args.walletAddress
282
282
  });
283
283
  }
284
284
  async generatePurchasePermit(args) {
285
285
  return this.postJSON("/externalapi.GenerateSalePurchasePermit", {
286
286
  SaleUUID: args.saleUUID,
287
- EntityUUID: args.entityUUID,
287
+ EntityID: args.entityID,
288
288
  PurchasingWalletAddress: args.walletAddress
289
289
  });
290
290
  }
package/dist/index.d.cts CHANGED
@@ -47,11 +47,11 @@ declare enum SaleEligibility {
47
47
  UNKNOWN_INCOMPLETE_SETUP = "unknown-incomplete-setup"
48
48
  }
49
49
  type BasicPermit = {
50
- EntityID: Uint8Array;
51
- SaleUUID: Uint8Array;
52
- Wallet: string;
53
- ExpiresAt: string;
54
- Payload: Uint8Array;
50
+ EntityID: Hex;
51
+ SaleUUID: Hex;
52
+ Wallet: Hex;
53
+ ExpiresAt: number;
54
+ Payload: Hex;
55
55
  };
56
56
  type AllocationPermit = {
57
57
  Permit: BasicPermit;
@@ -80,12 +80,11 @@ declare enum InvestingRegion {
80
80
  }
81
81
  type EntityDetails = {
82
82
  Label: string;
83
- EntityUUID: string;
83
+ EntityID: Hex;
84
84
  EntityType: EntityType;
85
85
  EntitySetupState: EntitySetupState;
86
86
  SaleEligibility: SaleEligibility;
87
87
  InvestingRegion: InvestingRegion;
88
- ObfuscatedEntityID: `0x${string}`;
89
88
  };
90
89
 
91
90
  type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
@@ -96,7 +95,7 @@ type PrePurchaseCheckResponse = {
96
95
  };
97
96
  type GeneratePurchasePermitResponse = {
98
97
  PermitJSON: BasicPermit | AllocationPermit;
99
- Signature: string;
98
+ Signature: Hex;
100
99
  };
101
100
  type AllocationResponse = {
102
101
  HasReservedAllocation: boolean;
@@ -135,12 +134,12 @@ declare class SonarClient {
135
134
  }>;
136
135
  prePurchaseCheck(args: {
137
136
  saleUUID: string;
138
- entityUUID: string;
137
+ entityID: Hex;
139
138
  walletAddress: string;
140
139
  }): Promise<PrePurchaseCheckResponse>;
141
140
  generatePurchasePermit(args: {
142
141
  saleUUID: string;
143
- entityUUID: string;
142
+ entityID: Hex;
144
143
  walletAddress: string;
145
144
  }): Promise<GeneratePurchasePermitResponse>;
146
145
  fetchAllocation(args: {
package/dist/index.d.ts CHANGED
@@ -47,11 +47,11 @@ declare enum SaleEligibility {
47
47
  UNKNOWN_INCOMPLETE_SETUP = "unknown-incomplete-setup"
48
48
  }
49
49
  type BasicPermit = {
50
- EntityID: Uint8Array;
51
- SaleUUID: Uint8Array;
52
- Wallet: string;
53
- ExpiresAt: string;
54
- Payload: Uint8Array;
50
+ EntityID: Hex;
51
+ SaleUUID: Hex;
52
+ Wallet: Hex;
53
+ ExpiresAt: number;
54
+ Payload: Hex;
55
55
  };
56
56
  type AllocationPermit = {
57
57
  Permit: BasicPermit;
@@ -80,12 +80,11 @@ declare enum InvestingRegion {
80
80
  }
81
81
  type EntityDetails = {
82
82
  Label: string;
83
- EntityUUID: string;
83
+ EntityID: Hex;
84
84
  EntityType: EntityType;
85
85
  EntitySetupState: EntitySetupState;
86
86
  SaleEligibility: SaleEligibility;
87
87
  InvestingRegion: InvestingRegion;
88
- ObfuscatedEntityID: `0x${string}`;
89
88
  };
90
89
 
91
90
  type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
@@ -96,7 +95,7 @@ type PrePurchaseCheckResponse = {
96
95
  };
97
96
  type GeneratePurchasePermitResponse = {
98
97
  PermitJSON: BasicPermit | AllocationPermit;
99
- Signature: string;
98
+ Signature: Hex;
100
99
  };
101
100
  type AllocationResponse = {
102
101
  HasReservedAllocation: boolean;
@@ -135,12 +134,12 @@ declare class SonarClient {
135
134
  }>;
136
135
  prePurchaseCheck(args: {
137
136
  saleUUID: string;
138
- entityUUID: string;
137
+ entityID: Hex;
139
138
  walletAddress: string;
140
139
  }): Promise<PrePurchaseCheckResponse>;
141
140
  generatePurchasePermit(args: {
142
141
  saleUUID: string;
143
- entityUUID: string;
142
+ entityID: Hex;
144
143
  walletAddress: string;
145
144
  }): Promise<GeneratePurchasePermitResponse>;
146
145
  fetchAllocation(args: {
package/dist/index.js CHANGED
@@ -240,14 +240,14 @@ var SonarClient = class {
240
240
  async prePurchaseCheck(args) {
241
241
  return this.postJSON("/externalapi.PrePurchaseCheck", {
242
242
  SaleUUID: args.saleUUID,
243
- EntityUUID: args.entityUUID,
243
+ EntityID: args.entityID,
244
244
  PurchasingWalletAddress: args.walletAddress
245
245
  });
246
246
  }
247
247
  async generatePurchasePermit(args) {
248
248
  return this.postJSON("/externalapi.GenerateSalePurchasePermit", {
249
249
  SaleUUID: args.saleUUID,
250
- EntityUUID: args.entityUUID,
250
+ EntityID: args.entityID,
251
251
  PurchasingWalletAddress: args.walletAddress
252
252
  });
253
253
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echoxyz/sonar-core",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",