@echoxyz/sonar-core 0.11.0 → 0.13.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 +28 -0
- package/README.md +10 -3
- package/dist/index.cjs +11 -4
- package/dist/index.d.cts +39 -11
- package/dist/index.d.ts +39 -11
- package/dist/index.js +11 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @echoxyz/sonar-core
|
|
2
2
|
|
|
3
|
+
## 0.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c551d7c: Add BasicPermitV3 type with OpensAt and ClosesAt fields for time-gated commitment windows:
|
|
8
|
+
- Add `BasicPermitV3` type with new `OpensAt` and `ClosesAt` fields
|
|
9
|
+
- Add `BASIC_V3` to `PurchasePermitType` enum
|
|
10
|
+
- Update `PurchasePermit` conditional type to handle V3
|
|
11
|
+
- Update `GeneratePurchasePermitResponse` to include `BasicPermitV3`
|
|
12
|
+
- Mark `BasicPermitV2` as deprecated
|
|
13
|
+
|
|
14
|
+
- b2cd697: Rename Allocation API to Limits API to match backend changes:
|
|
15
|
+
- `fetchAllocation` → `fetchLimits`
|
|
16
|
+
- `AllocationResponse` → `LimitsResponse`
|
|
17
|
+
- Response fields renamed: `HasReservedAllocation` → `HasCustomCommitmentAmountLimit`, `ReservedAmountUSD` removed, `MaxAmountUSD` → `MaxCommitmentAmount`, added `MinCommitmentAmount`
|
|
18
|
+
- `PrePurchaseFailureReason.NO_RESERVED_ALLOCATION` → `PrePurchaseFailureReason.NO_CUSTOM_COMMITMENT_AMOUNT_LIMIT`
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- e276112: Add `pnpm fmt` script for running prettier and format check to CI
|
|
23
|
+
- 171a0db: Added support for ReadEntityInvestmentHistory API
|
|
24
|
+
|
|
25
|
+
## 0.12.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- cc7380c: Sync EntitySetupState and SaleEligibility with the API
|
|
30
|
+
|
|
3
31
|
## 0.11.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -72,6 +72,13 @@ export async function completeOAuthFromCallback() {
|
|
|
72
72
|
export async function exampleCalls() {
|
|
73
73
|
const { walletAddress } = useWallet(); // User's connected wallet.
|
|
74
74
|
|
|
75
|
+
// Get the authenticated user's profile information
|
|
76
|
+
const profile = await client.myProfile();
|
|
77
|
+
console.log(profile.EntityID); // Entity ID for the authenticated user
|
|
78
|
+
if (profile.EmailAddress) {
|
|
79
|
+
console.log(profile.EmailAddress); // Email address (only present if authorized with contact:email scope)
|
|
80
|
+
}
|
|
81
|
+
|
|
75
82
|
// Read the entity for linked to the wallet for the configured sale.
|
|
76
83
|
// If the authenticated user has not yet linked the wallet on Sonar, this will return a 404.
|
|
77
84
|
const { Entity } = await client.readEntity({ saleUUID, walletAddress });
|
|
@@ -96,9 +103,9 @@ export async function exampleCalls() {
|
|
|
96
103
|
console.log(permit.Signature, permit.Permit);
|
|
97
104
|
}
|
|
98
105
|
|
|
99
|
-
// Fetch
|
|
100
|
-
const
|
|
101
|
-
console.log(
|
|
106
|
+
// Fetch limits
|
|
107
|
+
const limits = await client.fetchLimits({ saleUUID, walletAddress });
|
|
108
|
+
console.log(limits);
|
|
102
109
|
}
|
|
103
110
|
```
|
|
104
111
|
|
package/dist/index.cjs
CHANGED
|
@@ -279,6 +279,12 @@ var SonarClient = class {
|
|
|
279
279
|
refresh_token: args.refreshToken
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
|
+
async myProfile() {
|
|
283
|
+
return this.postJSON("/externalapi.MyProfile", {});
|
|
284
|
+
}
|
|
285
|
+
async readEntityInvestmentHistory() {
|
|
286
|
+
return this.postJSON("/externalapi.ReadEntityInvestmentHistory", {});
|
|
287
|
+
}
|
|
282
288
|
async prePurchaseCheck(args) {
|
|
283
289
|
return this.postJSON("/externalapi.PrePurchaseCheck", {
|
|
284
290
|
SaleUUID: args.saleUUID,
|
|
@@ -293,8 +299,8 @@ var SonarClient = class {
|
|
|
293
299
|
PurchasingWalletAddress: args.walletAddress
|
|
294
300
|
});
|
|
295
301
|
}
|
|
296
|
-
async
|
|
297
|
-
return this.postJSON("/externalapi.
|
|
302
|
+
async fetchLimits(args) {
|
|
303
|
+
return this.postJSON("/externalapi.Limits", {
|
|
298
304
|
SaleUUID: args.saleUUID,
|
|
299
305
|
WalletAddress: args.walletAddress
|
|
300
306
|
});
|
|
@@ -387,18 +393,20 @@ var EntitySetupState = /* @__PURE__ */ ((EntitySetupState2) => {
|
|
|
387
393
|
EntitySetupState2["IN_REVIEW"] = "in-review";
|
|
388
394
|
EntitySetupState2["FAILURE"] = "failure";
|
|
389
395
|
EntitySetupState2["FAILURE_FINAL"] = "failure-final";
|
|
396
|
+
EntitySetupState2["TECHNICAL_ISSUE"] = "technical-issue";
|
|
390
397
|
EntitySetupState2["COMPLETE"] = "complete";
|
|
391
398
|
return EntitySetupState2;
|
|
392
399
|
})(EntitySetupState || {});
|
|
393
400
|
var SaleEligibility = /* @__PURE__ */ ((SaleEligibility2) => {
|
|
394
401
|
SaleEligibility2["ELIGIBLE"] = "eligible";
|
|
395
402
|
SaleEligibility2["NOT_ELIGIBLE"] = "not-eligible";
|
|
396
|
-
SaleEligibility2["
|
|
403
|
+
SaleEligibility2["UNKNOWN_SETUP_INCOMPLETE"] = "unknown-setup-incomplete";
|
|
397
404
|
return SaleEligibility2;
|
|
398
405
|
})(SaleEligibility || {});
|
|
399
406
|
var PurchasePermitType = /* @__PURE__ */ ((PurchasePermitType2) => {
|
|
400
407
|
PurchasePermitType2["BASIC"] = "basic";
|
|
401
408
|
PurchasePermitType2["BASIC_V2"] = "basic-v2";
|
|
409
|
+
PurchasePermitType2["BASIC_V3"] = "basic-v3";
|
|
402
410
|
PurchasePermitType2["ALLOCATION"] = "allocation";
|
|
403
411
|
return PurchasePermitType2;
|
|
404
412
|
})(PurchasePermitType || {});
|
|
@@ -407,7 +415,6 @@ var PrePurchaseFailureReason = /* @__PURE__ */ ((PrePurchaseFailureReason2) => {
|
|
|
407
415
|
PrePurchaseFailureReason2["WALLET_RISK"] = "wallet-risk";
|
|
408
416
|
PrePurchaseFailureReason2["MAX_WALLETS_USED"] = "max-wallets-used";
|
|
409
417
|
PrePurchaseFailureReason2["REQUIRES_LIVENESS"] = "requires-liveness";
|
|
410
|
-
PrePurchaseFailureReason2["NO_RESERVED_ALLOCATION"] = "no-reserved-allocation";
|
|
411
418
|
PrePurchaseFailureReason2["SALE_NOT_ACTIVE"] = "sale-not-active";
|
|
412
419
|
PrePurchaseFailureReason2["WALLET_NOT_LINKED"] = "wallet-not-linked";
|
|
413
420
|
return PrePurchaseFailureReason2;
|
package/dist/index.d.cts
CHANGED
|
@@ -40,12 +40,13 @@ declare enum EntitySetupState {
|
|
|
40
40
|
IN_REVIEW = "in-review",
|
|
41
41
|
FAILURE = "failure",
|
|
42
42
|
FAILURE_FINAL = "failure-final",
|
|
43
|
+
TECHNICAL_ISSUE = "technical-issue",
|
|
43
44
|
COMPLETE = "complete"
|
|
44
45
|
}
|
|
45
46
|
declare enum SaleEligibility {
|
|
46
47
|
ELIGIBLE = "eligible",
|
|
47
48
|
NOT_ELIGIBLE = "not-eligible",
|
|
48
|
-
|
|
49
|
+
UNKNOWN_SETUP_INCOMPLETE = "unknown-setup-incomplete"
|
|
49
50
|
}
|
|
50
51
|
type BasicPermit = {
|
|
51
52
|
EntityID: Hex;
|
|
@@ -71,18 +72,31 @@ type BasicPermitV2 = {
|
|
|
71
72
|
MaxPrice: number;
|
|
72
73
|
Payload: Hex;
|
|
73
74
|
};
|
|
75
|
+
type BasicPermitV3 = {
|
|
76
|
+
SaleSpecificEntityID: Hex;
|
|
77
|
+
SaleUUID: Hex;
|
|
78
|
+
Wallet: Hex;
|
|
79
|
+
ExpiresAt: number;
|
|
80
|
+
MinAmount: string;
|
|
81
|
+
MaxAmount: string;
|
|
82
|
+
MinPrice: number;
|
|
83
|
+
MaxPrice: number;
|
|
84
|
+
OpensAt: number;
|
|
85
|
+
ClosesAt: number;
|
|
86
|
+
Payload: Hex;
|
|
87
|
+
};
|
|
74
88
|
declare enum PurchasePermitType {
|
|
75
89
|
BASIC = "basic",
|
|
76
90
|
BASIC_V2 = "basic-v2",
|
|
91
|
+
BASIC_V3 = "basic-v3",
|
|
77
92
|
ALLOCATION = "allocation"
|
|
78
93
|
}
|
|
79
|
-
type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.BASIC_V2 ? BasicPermitV2 : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
|
|
94
|
+
type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.BASIC_V2 ? BasicPermitV2 : T extends PurchasePermitType.BASIC_V3 ? BasicPermitV3 : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
|
|
80
95
|
declare enum PrePurchaseFailureReason {
|
|
81
96
|
UNKNOWN = "unknown",
|
|
82
97
|
WALLET_RISK = "wallet-risk",
|
|
83
98
|
MAX_WALLETS_USED = "max-wallets-used",
|
|
84
99
|
REQUIRES_LIVENESS = "requires-liveness",
|
|
85
|
-
NO_RESERVED_ALLOCATION = "no-reserved-allocation",
|
|
86
100
|
SALE_NOT_ACTIVE = "sale-not-active",
|
|
87
101
|
WALLET_NOT_LINKED = "wallet-not-linked"
|
|
88
102
|
}
|
|
@@ -100,6 +114,18 @@ type EntityDetails = {
|
|
|
100
114
|
SaleEligibility: SaleEligibility;
|
|
101
115
|
InvestingRegion: InvestingRegion;
|
|
102
116
|
};
|
|
117
|
+
type MyProfileResponse = {
|
|
118
|
+
EntityID: string;
|
|
119
|
+
EmailAddress?: string;
|
|
120
|
+
};
|
|
121
|
+
type EntityInvestment = {
|
|
122
|
+
CompanyName: string;
|
|
123
|
+
Round: string;
|
|
124
|
+
InvestedOn: string;
|
|
125
|
+
};
|
|
126
|
+
type EntityInvestmentHistoryResponse = {
|
|
127
|
+
Investments: EntityInvestment[];
|
|
128
|
+
};
|
|
103
129
|
|
|
104
130
|
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
105
131
|
type PrePurchaseCheckResponse = {
|
|
@@ -108,13 +134,13 @@ type PrePurchaseCheckResponse = {
|
|
|
108
134
|
LivenessCheckURL: string;
|
|
109
135
|
};
|
|
110
136
|
type GeneratePurchasePermitResponse = {
|
|
111
|
-
PermitJSON: BasicPermit | BasicPermitV2 | AllocationPermit;
|
|
137
|
+
PermitJSON: BasicPermit | BasicPermitV2 | BasicPermitV3 | AllocationPermit;
|
|
112
138
|
Signature: Hex;
|
|
113
139
|
};
|
|
114
|
-
type
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
140
|
+
type LimitsResponse = {
|
|
141
|
+
HasCustomCommitmentAmountLimit: boolean;
|
|
142
|
+
MinCommitmentAmount: string;
|
|
143
|
+
MaxCommitmentAmount: string;
|
|
118
144
|
};
|
|
119
145
|
type ReadEntityResponse = {
|
|
120
146
|
Entity: EntityDetails;
|
|
@@ -156,6 +182,8 @@ declare class SonarClient {
|
|
|
156
182
|
refreshToken(args: {
|
|
157
183
|
refreshToken: string;
|
|
158
184
|
}): Promise<TokenResponse>;
|
|
185
|
+
myProfile(): Promise<MyProfileResponse>;
|
|
186
|
+
readEntityInvestmentHistory(): Promise<EntityInvestmentHistoryResponse>;
|
|
159
187
|
prePurchaseCheck(args: {
|
|
160
188
|
saleUUID: string;
|
|
161
189
|
entityID: EntityID;
|
|
@@ -166,10 +194,10 @@ declare class SonarClient {
|
|
|
166
194
|
entityID: EntityID;
|
|
167
195
|
walletAddress: string;
|
|
168
196
|
}): Promise<GeneratePurchasePermitResponse>;
|
|
169
|
-
|
|
197
|
+
fetchLimits(args: {
|
|
170
198
|
saleUUID: string;
|
|
171
199
|
walletAddress: string;
|
|
172
|
-
}): Promise<
|
|
200
|
+
}): Promise<LimitsResponse>;
|
|
173
201
|
readEntity(args: {
|
|
174
202
|
saleUUID: string;
|
|
175
203
|
walletAddress: string;
|
|
@@ -211,4 +239,4 @@ type CreateClientOptions = {
|
|
|
211
239
|
};
|
|
212
240
|
declare function createClient(options?: CreateClientOptions): SonarClient;
|
|
213
241
|
|
|
214
|
-
export { APIError, type AllocationPermit, type
|
|
242
|
+
export { APIError, type AllocationPermit, type BasicPermit, type BasicPermitV2, type BasicPermitV3, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, type EntityID, type EntityInvestment, type EntityInvestmentHistoryResponse, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type LimitsResponse, type ListAvailableEntitiesResponse, type MyProfileResponse, 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
|
@@ -40,12 +40,13 @@ declare enum EntitySetupState {
|
|
|
40
40
|
IN_REVIEW = "in-review",
|
|
41
41
|
FAILURE = "failure",
|
|
42
42
|
FAILURE_FINAL = "failure-final",
|
|
43
|
+
TECHNICAL_ISSUE = "technical-issue",
|
|
43
44
|
COMPLETE = "complete"
|
|
44
45
|
}
|
|
45
46
|
declare enum SaleEligibility {
|
|
46
47
|
ELIGIBLE = "eligible",
|
|
47
48
|
NOT_ELIGIBLE = "not-eligible",
|
|
48
|
-
|
|
49
|
+
UNKNOWN_SETUP_INCOMPLETE = "unknown-setup-incomplete"
|
|
49
50
|
}
|
|
50
51
|
type BasicPermit = {
|
|
51
52
|
EntityID: Hex;
|
|
@@ -71,18 +72,31 @@ type BasicPermitV2 = {
|
|
|
71
72
|
MaxPrice: number;
|
|
72
73
|
Payload: Hex;
|
|
73
74
|
};
|
|
75
|
+
type BasicPermitV3 = {
|
|
76
|
+
SaleSpecificEntityID: Hex;
|
|
77
|
+
SaleUUID: Hex;
|
|
78
|
+
Wallet: Hex;
|
|
79
|
+
ExpiresAt: number;
|
|
80
|
+
MinAmount: string;
|
|
81
|
+
MaxAmount: string;
|
|
82
|
+
MinPrice: number;
|
|
83
|
+
MaxPrice: number;
|
|
84
|
+
OpensAt: number;
|
|
85
|
+
ClosesAt: number;
|
|
86
|
+
Payload: Hex;
|
|
87
|
+
};
|
|
74
88
|
declare enum PurchasePermitType {
|
|
75
89
|
BASIC = "basic",
|
|
76
90
|
BASIC_V2 = "basic-v2",
|
|
91
|
+
BASIC_V3 = "basic-v3",
|
|
77
92
|
ALLOCATION = "allocation"
|
|
78
93
|
}
|
|
79
|
-
type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.BASIC_V2 ? BasicPermitV2 : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
|
|
94
|
+
type PurchasePermit<T extends PurchasePermitType> = T extends PurchasePermitType.BASIC ? BasicPermit : T extends PurchasePermitType.BASIC_V2 ? BasicPermitV2 : T extends PurchasePermitType.BASIC_V3 ? BasicPermitV3 : T extends PurchasePermitType.ALLOCATION ? AllocationPermit : never;
|
|
80
95
|
declare enum PrePurchaseFailureReason {
|
|
81
96
|
UNKNOWN = "unknown",
|
|
82
97
|
WALLET_RISK = "wallet-risk",
|
|
83
98
|
MAX_WALLETS_USED = "max-wallets-used",
|
|
84
99
|
REQUIRES_LIVENESS = "requires-liveness",
|
|
85
|
-
NO_RESERVED_ALLOCATION = "no-reserved-allocation",
|
|
86
100
|
SALE_NOT_ACTIVE = "sale-not-active",
|
|
87
101
|
WALLET_NOT_LINKED = "wallet-not-linked"
|
|
88
102
|
}
|
|
@@ -100,6 +114,18 @@ type EntityDetails = {
|
|
|
100
114
|
SaleEligibility: SaleEligibility;
|
|
101
115
|
InvestingRegion: InvestingRegion;
|
|
102
116
|
};
|
|
117
|
+
type MyProfileResponse = {
|
|
118
|
+
EntityID: string;
|
|
119
|
+
EmailAddress?: string;
|
|
120
|
+
};
|
|
121
|
+
type EntityInvestment = {
|
|
122
|
+
CompanyName: string;
|
|
123
|
+
Round: string;
|
|
124
|
+
InvestedOn: string;
|
|
125
|
+
};
|
|
126
|
+
type EntityInvestmentHistoryResponse = {
|
|
127
|
+
Investments: EntityInvestment[];
|
|
128
|
+
};
|
|
103
129
|
|
|
104
130
|
type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
|
|
105
131
|
type PrePurchaseCheckResponse = {
|
|
@@ -108,13 +134,13 @@ type PrePurchaseCheckResponse = {
|
|
|
108
134
|
LivenessCheckURL: string;
|
|
109
135
|
};
|
|
110
136
|
type GeneratePurchasePermitResponse = {
|
|
111
|
-
PermitJSON: BasicPermit | BasicPermitV2 | AllocationPermit;
|
|
137
|
+
PermitJSON: BasicPermit | BasicPermitV2 | BasicPermitV3 | AllocationPermit;
|
|
112
138
|
Signature: Hex;
|
|
113
139
|
};
|
|
114
|
-
type
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
140
|
+
type LimitsResponse = {
|
|
141
|
+
HasCustomCommitmentAmountLimit: boolean;
|
|
142
|
+
MinCommitmentAmount: string;
|
|
143
|
+
MaxCommitmentAmount: string;
|
|
118
144
|
};
|
|
119
145
|
type ReadEntityResponse = {
|
|
120
146
|
Entity: EntityDetails;
|
|
@@ -156,6 +182,8 @@ declare class SonarClient {
|
|
|
156
182
|
refreshToken(args: {
|
|
157
183
|
refreshToken: string;
|
|
158
184
|
}): Promise<TokenResponse>;
|
|
185
|
+
myProfile(): Promise<MyProfileResponse>;
|
|
186
|
+
readEntityInvestmentHistory(): Promise<EntityInvestmentHistoryResponse>;
|
|
159
187
|
prePurchaseCheck(args: {
|
|
160
188
|
saleUUID: string;
|
|
161
189
|
entityID: EntityID;
|
|
@@ -166,10 +194,10 @@ declare class SonarClient {
|
|
|
166
194
|
entityID: EntityID;
|
|
167
195
|
walletAddress: string;
|
|
168
196
|
}): Promise<GeneratePurchasePermitResponse>;
|
|
169
|
-
|
|
197
|
+
fetchLimits(args: {
|
|
170
198
|
saleUUID: string;
|
|
171
199
|
walletAddress: string;
|
|
172
|
-
}): Promise<
|
|
200
|
+
}): Promise<LimitsResponse>;
|
|
173
201
|
readEntity(args: {
|
|
174
202
|
saleUUID: string;
|
|
175
203
|
walletAddress: string;
|
|
@@ -211,4 +239,4 @@ type CreateClientOptions = {
|
|
|
211
239
|
};
|
|
212
240
|
declare function createClient(options?: CreateClientOptions): SonarClient;
|
|
213
241
|
|
|
214
|
-
export { APIError, type AllocationPermit, type
|
|
242
|
+
export { APIError, type AllocationPermit, type BasicPermit, type BasicPermitV2, type BasicPermitV3, type BuildAuthorizationUrlArgs, type ClientOptions, type CreateClientOptions, type EntityDetails, type EntityID, type EntityInvestment, type EntityInvestmentHistoryResponse, EntitySetupState, EntityType, type FetchLike, type GeneratePurchasePermitResponse, type Hex, InvestingRegion, type LimitsResponse, type ListAvailableEntitiesResponse, type MyProfileResponse, type PrePurchaseCheckResponse, PrePurchaseFailureReason, type PurchasePermit, PurchasePermitType, type ReadEntityResponse, SaleEligibility, SonarClient, type StorageLike, type TokenResponse, buildAuthorizationUrl, createClient, createMemoryStorage, createWebStorage, generatePKCEParams };
|
package/dist/index.js
CHANGED
|
@@ -242,6 +242,12 @@ var SonarClient = class {
|
|
|
242
242
|
refresh_token: args.refreshToken
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
+
async myProfile() {
|
|
246
|
+
return this.postJSON("/externalapi.MyProfile", {});
|
|
247
|
+
}
|
|
248
|
+
async readEntityInvestmentHistory() {
|
|
249
|
+
return this.postJSON("/externalapi.ReadEntityInvestmentHistory", {});
|
|
250
|
+
}
|
|
245
251
|
async prePurchaseCheck(args) {
|
|
246
252
|
return this.postJSON("/externalapi.PrePurchaseCheck", {
|
|
247
253
|
SaleUUID: args.saleUUID,
|
|
@@ -256,8 +262,8 @@ var SonarClient = class {
|
|
|
256
262
|
PurchasingWalletAddress: args.walletAddress
|
|
257
263
|
});
|
|
258
264
|
}
|
|
259
|
-
async
|
|
260
|
-
return this.postJSON("/externalapi.
|
|
265
|
+
async fetchLimits(args) {
|
|
266
|
+
return this.postJSON("/externalapi.Limits", {
|
|
261
267
|
SaleUUID: args.saleUUID,
|
|
262
268
|
WalletAddress: args.walletAddress
|
|
263
269
|
});
|
|
@@ -350,18 +356,20 @@ var EntitySetupState = /* @__PURE__ */ ((EntitySetupState2) => {
|
|
|
350
356
|
EntitySetupState2["IN_REVIEW"] = "in-review";
|
|
351
357
|
EntitySetupState2["FAILURE"] = "failure";
|
|
352
358
|
EntitySetupState2["FAILURE_FINAL"] = "failure-final";
|
|
359
|
+
EntitySetupState2["TECHNICAL_ISSUE"] = "technical-issue";
|
|
353
360
|
EntitySetupState2["COMPLETE"] = "complete";
|
|
354
361
|
return EntitySetupState2;
|
|
355
362
|
})(EntitySetupState || {});
|
|
356
363
|
var SaleEligibility = /* @__PURE__ */ ((SaleEligibility2) => {
|
|
357
364
|
SaleEligibility2["ELIGIBLE"] = "eligible";
|
|
358
365
|
SaleEligibility2["NOT_ELIGIBLE"] = "not-eligible";
|
|
359
|
-
SaleEligibility2["
|
|
366
|
+
SaleEligibility2["UNKNOWN_SETUP_INCOMPLETE"] = "unknown-setup-incomplete";
|
|
360
367
|
return SaleEligibility2;
|
|
361
368
|
})(SaleEligibility || {});
|
|
362
369
|
var PurchasePermitType = /* @__PURE__ */ ((PurchasePermitType2) => {
|
|
363
370
|
PurchasePermitType2["BASIC"] = "basic";
|
|
364
371
|
PurchasePermitType2["BASIC_V2"] = "basic-v2";
|
|
372
|
+
PurchasePermitType2["BASIC_V3"] = "basic-v3";
|
|
365
373
|
PurchasePermitType2["ALLOCATION"] = "allocation";
|
|
366
374
|
return PurchasePermitType2;
|
|
367
375
|
})(PurchasePermitType || {});
|
|
@@ -370,7 +378,6 @@ var PrePurchaseFailureReason = /* @__PURE__ */ ((PrePurchaseFailureReason2) => {
|
|
|
370
378
|
PrePurchaseFailureReason2["WALLET_RISK"] = "wallet-risk";
|
|
371
379
|
PrePurchaseFailureReason2["MAX_WALLETS_USED"] = "max-wallets-used";
|
|
372
380
|
PrePurchaseFailureReason2["REQUIRES_LIVENESS"] = "requires-liveness";
|
|
373
|
-
PrePurchaseFailureReason2["NO_RESERVED_ALLOCATION"] = "no-reserved-allocation";
|
|
374
381
|
PrePurchaseFailureReason2["SALE_NOT_ACTIVE"] = "sale-not-active";
|
|
375
382
|
PrePurchaseFailureReason2["WALLET_NOT_LINKED"] = "wallet-not-linked";
|
|
376
383
|
return PrePurchaseFailureReason2;
|