@echoxyz/sonar-core 0.2.1 → 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 +6 -0
- package/README.md +1 -3
- package/dist/index.cjs +0 -2
- package/dist/index.d.cts +0 -2
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ pnpm add @echoxyz/sonar-core
|
|
|
13
13
|
The default client targets Echo’s hosted API and reads the auth token from `localStorage` under the `sonar:auth-token` key.
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
import { createClient, buildAuthorizationUrl, generatePKCEParams
|
|
16
|
+
import { createClient, buildAuthorizationUrl, generatePKCEParams } from "@echoxyz/sonar-core";
|
|
17
17
|
|
|
18
18
|
// Configure once at app startup
|
|
19
19
|
const saleUUID = "<your-sale-uuid>";
|
|
@@ -79,7 +79,6 @@ export async function exampleCalls() {
|
|
|
79
79
|
const pre = await client.prePurchaseCheck({
|
|
80
80
|
saleUUID,
|
|
81
81
|
entityUUID: Entity.EntityUUID,
|
|
82
|
-
entityType: EntityType.USER, // or EntityType.ORGANIZATION
|
|
83
82
|
walletAddress: "0x1234...abcd" as `0x${string}`,
|
|
84
83
|
});
|
|
85
84
|
|
|
@@ -88,7 +87,6 @@ export async function exampleCalls() {
|
|
|
88
87
|
const permit = await client.generatePurchasePermit({
|
|
89
88
|
saleUUID,
|
|
90
89
|
entityUUID: Entity.EntityUUID,
|
|
91
|
-
entityType: EntityType.USER,
|
|
92
90
|
walletAddress: "0x1234...abcd" as `0x${string}`,
|
|
93
91
|
});
|
|
94
92
|
console.log(permit.Signature, permit.Permit);
|
package/dist/index.cjs
CHANGED
|
@@ -278,7 +278,6 @@ var SonarClient = class {
|
|
|
278
278
|
return this.postJSON("/externalapi.PrePurchaseCheck", {
|
|
279
279
|
SaleUUID: args.saleUUID,
|
|
280
280
|
EntityUUID: args.entityUUID,
|
|
281
|
-
EntityType: args.entityType,
|
|
282
281
|
PurchasingWalletAddress: args.walletAddress
|
|
283
282
|
});
|
|
284
283
|
}
|
|
@@ -286,7 +285,6 @@ var SonarClient = class {
|
|
|
286
285
|
return this.postJSON("/externalapi.GenerateSalePurchasePermit", {
|
|
287
286
|
SaleUUID: args.saleUUID,
|
|
288
287
|
EntityUUID: args.entityUUID,
|
|
289
|
-
EntityType: args.entityType,
|
|
290
288
|
PurchasingWalletAddress: args.walletAddress
|
|
291
289
|
});
|
|
292
290
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -135,13 +135,11 @@ declare class SonarClient {
|
|
|
135
135
|
prePurchaseCheck(args: {
|
|
136
136
|
saleUUID: string;
|
|
137
137
|
entityUUID: string;
|
|
138
|
-
entityType: EntityType;
|
|
139
138
|
walletAddress: string;
|
|
140
139
|
}): Promise<PrePurchaseCheckResponse>;
|
|
141
140
|
generatePurchasePermit(args: {
|
|
142
141
|
saleUUID: string;
|
|
143
142
|
entityUUID: string;
|
|
144
|
-
entityType: EntityType;
|
|
145
143
|
walletAddress: string;
|
|
146
144
|
}): Promise<GeneratePurchasePermitResponse>;
|
|
147
145
|
fetchAllocation(args: {
|
package/dist/index.d.ts
CHANGED
|
@@ -135,13 +135,11 @@ declare class SonarClient {
|
|
|
135
135
|
prePurchaseCheck(args: {
|
|
136
136
|
saleUUID: string;
|
|
137
137
|
entityUUID: string;
|
|
138
|
-
entityType: EntityType;
|
|
139
138
|
walletAddress: string;
|
|
140
139
|
}): Promise<PrePurchaseCheckResponse>;
|
|
141
140
|
generatePurchasePermit(args: {
|
|
142
141
|
saleUUID: string;
|
|
143
142
|
entityUUID: string;
|
|
144
|
-
entityType: EntityType;
|
|
145
143
|
walletAddress: string;
|
|
146
144
|
}): Promise<GeneratePurchasePermitResponse>;
|
|
147
145
|
fetchAllocation(args: {
|
package/dist/index.js
CHANGED
|
@@ -241,7 +241,6 @@ var SonarClient = class {
|
|
|
241
241
|
return this.postJSON("/externalapi.PrePurchaseCheck", {
|
|
242
242
|
SaleUUID: args.saleUUID,
|
|
243
243
|
EntityUUID: args.entityUUID,
|
|
244
|
-
EntityType: args.entityType,
|
|
245
244
|
PurchasingWalletAddress: args.walletAddress
|
|
246
245
|
});
|
|
247
246
|
}
|
|
@@ -249,7 +248,6 @@ var SonarClient = class {
|
|
|
249
248
|
return this.postJSON("/externalapi.GenerateSalePurchasePermit", {
|
|
250
249
|
SaleUUID: args.saleUUID,
|
|
251
250
|
EntityUUID: args.entityUUID,
|
|
252
|
-
EntityType: args.entityType,
|
|
253
251
|
PurchasingWalletAddress: args.walletAddress
|
|
254
252
|
});
|
|
255
253
|
}
|