@coinlist-co/react 0.4.0 → 0.5.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/dist/chunk-CRACFEJ4.js +17 -0
- package/dist/chunk-CRACFEJ4.js.map +1 -0
- package/dist/{chunk-NC45IO63.js → chunk-N3WBC2VS.js} +20 -325
- package/dist/chunk-N3WBC2VS.js.map +1 -0
- package/dist/chunk-V6WO67RO.js +311 -0
- package/dist/chunk-V6WO67RO.js.map +1 -0
- package/dist/client/index.cjs +1013 -220
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.d.cts +526 -9
- package/dist/client/index.d.ts +526 -9
- package/dist/client/index.js +1464 -94
- package/dist/client/index.js.map +1 -1
- package/dist/{participation-DMMEDxON.d.cts → requirement-BEO42QOr.d.cts} +204 -2
- package/dist/{participation-E-bT-GXJ.d.ts → requirement-BEO42QOr.d.ts} +204 -2
- package/dist/server/index.cjs +9 -91
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +4 -21
- package/dist/server/index.d.ts +4 -21
- package/dist/server/index.js +14 -78
- package/dist/server/index.js.map +1 -1
- package/dist/shared/index.cjs +375 -0
- package/dist/shared/index.cjs.map +1 -0
- package/dist/shared/index.d.cts +35 -0
- package/dist/shared/index.d.ts +35 -0
- package/dist/{client/core → shared}/index.js +35 -16
- package/dist/shared/index.js.map +1 -0
- package/package.json +7 -22
- package/dist/RequirementItem-B-MvcxSr.d.cts +0 -37
- package/dist/RequirementItem-DcYot2uC.d.ts +0 -37
- package/dist/chunk-EHZ6PIGN.js +0 -414
- package/dist/chunk-EHZ6PIGN.js.map +0 -1
- package/dist/chunk-NC45IO63.js.map +0 -1
- package/dist/chunk-RIFATQB5.js +0 -257
- package/dist/chunk-RIFATQB5.js.map +0 -1
- package/dist/chunk-UGJUTRXC.js +0 -304
- package/dist/chunk-UGJUTRXC.js.map +0 -1
- package/dist/chunk-YJQMJFA7.js +0 -16
- package/dist/chunk-YJQMJFA7.js.map +0 -1
- package/dist/client/components/index.cjs +0 -1108
- package/dist/client/components/index.cjs.map +0 -1
- package/dist/client/components/index.d.cts +0 -139
- package/dist/client/components/index.d.ts +0 -139
- package/dist/client/components/index.js +0 -558
- package/dist/client/components/index.js.map +0 -1
- package/dist/client/core/index.cjs +0 -1047
- package/dist/client/core/index.cjs.map +0 -1
- package/dist/client/core/index.d.cts +0 -23
- package/dist/client/core/index.d.ts +0 -23
- package/dist/client/core/index.js.map +0 -1
- package/dist/client/hooks/index.cjs +0 -307
- package/dist/client/hooks/index.cjs.map +0 -1
- package/dist/client/hooks/index.d.cts +0 -126
- package/dist/client/hooks/index.d.ts +0 -126
- package/dist/client/hooks/index.js +0 -19
- package/dist/client/hooks/index.js.map +0 -1
- package/dist/coinlist-client-BSxpqylo.d.ts +0 -158
- package/dist/coinlist-client-Cah5c_aF.d.cts +0 -158
- package/dist/requirement-XWT0T_zO.d.cts +0 -205
- package/dist/requirement-XWT0T_zO.d.ts +0 -205
- package/dist/useCoinListRequirements-B5-ZPOMz.d.ts +0 -80
- package/dist/useCoinListRequirements-Cuc32Tqw.d.cts +0 -80
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
// src/shared/api/pagination.ts
|
|
2
|
+
var Cursor = (value) => value;
|
|
3
|
+
async function fetchAllPages(fetchPage, baseParams) {
|
|
4
|
+
const items = [];
|
|
5
|
+
let cursor = null;
|
|
6
|
+
do {
|
|
7
|
+
const params = {
|
|
8
|
+
...baseParams ?? {},
|
|
9
|
+
after: cursor ?? void 0
|
|
10
|
+
};
|
|
11
|
+
const page = await fetchPage(params);
|
|
12
|
+
items.push(...page.data);
|
|
13
|
+
cursor = page.startingAfter;
|
|
14
|
+
} while (cursor);
|
|
15
|
+
return items;
|
|
16
|
+
}
|
|
17
|
+
var PaginatedResponse = {
|
|
18
|
+
fromDto: (dto, itemMapper) => ({
|
|
19
|
+
data: dto.data.map(itemMapper),
|
|
20
|
+
startingAfter: dto.starting_after ? Cursor(dto.starting_after) : null,
|
|
21
|
+
startingBefore: dto.starting_before ? Cursor(dto.starting_before) : null
|
|
22
|
+
})
|
|
23
|
+
};
|
|
24
|
+
var PaginationParams = {
|
|
25
|
+
toQueryParams: (params) => {
|
|
26
|
+
const queryParams = {};
|
|
27
|
+
if (params.after) {
|
|
28
|
+
queryParams.starting_after = params.after;
|
|
29
|
+
}
|
|
30
|
+
if (params.before) {
|
|
31
|
+
queryParams.starting_before = params.before;
|
|
32
|
+
}
|
|
33
|
+
if (params.limit) {
|
|
34
|
+
queryParams.limit = params.limit;
|
|
35
|
+
}
|
|
36
|
+
return queryParams;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// src/shared/utils.ts
|
|
41
|
+
async function sha256(data) {
|
|
42
|
+
const bytes = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
43
|
+
const buffer = bytes.buffer.slice(
|
|
44
|
+
bytes.byteOffset,
|
|
45
|
+
bytes.byteOffset + bytes.byteLength
|
|
46
|
+
);
|
|
47
|
+
return crypto.subtle.digest("SHA-256", buffer);
|
|
48
|
+
}
|
|
49
|
+
function arrayBufferToBase64Url(buffer, padding = true) {
|
|
50
|
+
const bytes = new Uint8Array(buffer);
|
|
51
|
+
let binary = "";
|
|
52
|
+
for (let i = 0; i < bytes.length; i++) {
|
|
53
|
+
binary += String.fromCharCode(bytes[i]);
|
|
54
|
+
}
|
|
55
|
+
let base64 = btoa(binary);
|
|
56
|
+
base64 = base64.replace(/\+/g, "-").replace(/\//g, "_");
|
|
57
|
+
if (!padding) {
|
|
58
|
+
base64 = base64.replace(/=+$/, "");
|
|
59
|
+
}
|
|
60
|
+
return base64;
|
|
61
|
+
}
|
|
62
|
+
function generateSecureRandomBase64Url(byteLength) {
|
|
63
|
+
const bytes = new Uint8Array(byteLength);
|
|
64
|
+
crypto.getRandomValues(bytes);
|
|
65
|
+
const buffer = bytes.buffer;
|
|
66
|
+
return arrayBufferToBase64Url(buffer, false);
|
|
67
|
+
}
|
|
68
|
+
function getUUIDv4() {
|
|
69
|
+
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
70
|
+
return crypto.randomUUID();
|
|
71
|
+
}
|
|
72
|
+
if (typeof crypto !== "undefined" && typeof crypto.getRandomValues === "function") {
|
|
73
|
+
const bytes = new Uint8Array(16);
|
|
74
|
+
crypto.getRandomValues(bytes);
|
|
75
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
76
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
77
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0"));
|
|
78
|
+
return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(6, 8).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10, 16).join("")}`;
|
|
79
|
+
}
|
|
80
|
+
return `${Date.now()}-${Math.random().toString(36).slice(2, 12)}`;
|
|
81
|
+
}
|
|
82
|
+
function notBlankStringOrNull(value) {
|
|
83
|
+
if (value?.trim()) {
|
|
84
|
+
return value;
|
|
85
|
+
} else {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// src/shared/types/offer.ts
|
|
91
|
+
var OfferId = (value) => value;
|
|
92
|
+
var OfferSlug = (value) => value;
|
|
93
|
+
var Offer = {
|
|
94
|
+
fromDto: (dto) => ({
|
|
95
|
+
id: OfferId(dto.id),
|
|
96
|
+
slug: OfferSlug(dto.slug),
|
|
97
|
+
tagline: notBlankStringOrNull(dto.tagline),
|
|
98
|
+
bannerUrl: notBlankStringOrNull(dto.banner_url),
|
|
99
|
+
logoUrl: notBlankStringOrNull(dto.logo_url),
|
|
100
|
+
startsAt: new Date(dto.starts_at),
|
|
101
|
+
endsAt: new Date(dto.ends_at)
|
|
102
|
+
})
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
// src/shared/types/asset.ts
|
|
106
|
+
var AssetId = (value) => value;
|
|
107
|
+
var AssetCode = (value) => value;
|
|
108
|
+
var Asset = {
|
|
109
|
+
fromDto: (dto) => ({
|
|
110
|
+
id: AssetId(dto.id),
|
|
111
|
+
code: AssetCode(dto.code),
|
|
112
|
+
name: dto.name,
|
|
113
|
+
fractionalDigits: dto.fractional_digits
|
|
114
|
+
})
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// src/shared/types/offer-detail.ts
|
|
118
|
+
var OfferOptionId = (value) => value;
|
|
119
|
+
var OfferOptionSlug = (value) => value;
|
|
120
|
+
var OfferDetail = {
|
|
121
|
+
fromDto: (dto) => {
|
|
122
|
+
if (!Array.isArray(dto.funding_assets)) {
|
|
123
|
+
throw new Error(`funding_assets must be an array`);
|
|
124
|
+
}
|
|
125
|
+
if (!Array.isArray(dto.options)) {
|
|
126
|
+
throw new Error(`options must be an array`);
|
|
127
|
+
}
|
|
128
|
+
if (!Array.isArray(dto.terms)) {
|
|
129
|
+
throw new Error(`terms must be an array`);
|
|
130
|
+
}
|
|
131
|
+
if (!Array.isArray(dto.links)) {
|
|
132
|
+
throw new Error(`links must be an array`);
|
|
133
|
+
}
|
|
134
|
+
if (!Array.isArray(dto.faqs)) {
|
|
135
|
+
throw new Error(`faqs must be an array`);
|
|
136
|
+
}
|
|
137
|
+
if (!Array.isArray(dto.milestones)) {
|
|
138
|
+
throw new Error(`milestones must be an array`);
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
id: OfferId(dto.id),
|
|
142
|
+
slug: OfferSlug(dto.slug),
|
|
143
|
+
name: dto.name,
|
|
144
|
+
asset: Asset.fromDto(dto.asset),
|
|
145
|
+
fundingAssets: dto.funding_assets.map(Asset.fromDto),
|
|
146
|
+
about: notBlankStringOrNull(dto.about),
|
|
147
|
+
tagline: notBlankStringOrNull(dto.tagline),
|
|
148
|
+
bannerUrl: notBlankStringOrNull(dto.banner_url),
|
|
149
|
+
logoUrl: notBlankStringOrNull(dto.logo_url),
|
|
150
|
+
category: notBlankStringOrNull(dto.category),
|
|
151
|
+
startsAt: new Date(dto.starts_at),
|
|
152
|
+
endsAt: new Date(dto.ends_at),
|
|
153
|
+
faqs: dto.faqs.map(FaqItem.fromDto),
|
|
154
|
+
links: dto.links.map(Link.fromDto),
|
|
155
|
+
milestones: dto.milestones.map(Milestone.fromDto),
|
|
156
|
+
options: dto.options.map(OfferOption.fromDto),
|
|
157
|
+
terms: dto.terms.map(TermItem.fromDto)
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
var OfferOption = {
|
|
162
|
+
fromDto: (dto) => ({
|
|
163
|
+
id: OfferOptionId(dto.id),
|
|
164
|
+
slug: OfferOptionSlug(dto.slug),
|
|
165
|
+
bidIncrement: dto.bid_increment,
|
|
166
|
+
floorPriceUsd: dto.floor_price_usd,
|
|
167
|
+
minimumPurchaseUsd: dto.minimum_purchase_usd,
|
|
168
|
+
priceUsd: dto.price_usd,
|
|
169
|
+
saleAgreementUrl: notBlankStringOrNull(dto.sale_agreement_url),
|
|
170
|
+
totalTokenSupply: dto.total_token_supply
|
|
171
|
+
})
|
|
172
|
+
};
|
|
173
|
+
var FaqItem = {
|
|
174
|
+
fromDto: (dto) => ({
|
|
175
|
+
question: notBlankStringOrNull(dto.question),
|
|
176
|
+
answer: notBlankStringOrNull(dto.answer)
|
|
177
|
+
})
|
|
178
|
+
};
|
|
179
|
+
var Link = {
|
|
180
|
+
fromDto: (dto) => ({
|
|
181
|
+
label: notBlankStringOrNull(dto.label),
|
|
182
|
+
url: notBlankStringOrNull(dto.url)
|
|
183
|
+
})
|
|
184
|
+
};
|
|
185
|
+
var TermItem = {
|
|
186
|
+
fromDto: (dto) => ({
|
|
187
|
+
key: notBlankStringOrNull(dto.key),
|
|
188
|
+
value: notBlankStringOrNull(dto.value)
|
|
189
|
+
})
|
|
190
|
+
};
|
|
191
|
+
var Milestone = {
|
|
192
|
+
fromDto: (dto) => ({
|
|
193
|
+
name: notBlankStringOrNull(dto.name),
|
|
194
|
+
schedule: notBlankStringOrNull(dto.schedule),
|
|
195
|
+
status: dto.status
|
|
196
|
+
})
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
// src/shared/types/participation.ts
|
|
200
|
+
var ParticipationId = (value) => value;
|
|
201
|
+
var Blockchain = (value) => value;
|
|
202
|
+
var WalletAddress = (value) => value;
|
|
203
|
+
var ParticipationsPaginationParams = {
|
|
204
|
+
toQueryParams: (params) => {
|
|
205
|
+
const queryParams = PaginationParams.toQueryParams(params);
|
|
206
|
+
if (params.offerId) {
|
|
207
|
+
queryParams["filters[0][field]"] = "offer_id";
|
|
208
|
+
queryParams["filters[0][op]"] = "==";
|
|
209
|
+
queryParams["filters[0][value]"] = params.offerId;
|
|
210
|
+
}
|
|
211
|
+
return queryParams;
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
var Participation = {
|
|
215
|
+
/** Maps API DTO shape into the SDK participation domain model. */
|
|
216
|
+
fromDto: (dto) => {
|
|
217
|
+
const walletAddress = notBlankStringOrNull(dto.wallet_address);
|
|
218
|
+
return {
|
|
219
|
+
id: ParticipationId(dto.id),
|
|
220
|
+
offerId: OfferId(dto.offer_id),
|
|
221
|
+
offerOptionId: OfferOptionId(dto.offer_option_id),
|
|
222
|
+
status: dto.status,
|
|
223
|
+
amount: dto.amount,
|
|
224
|
+
displayAmount: dto.amount_string,
|
|
225
|
+
asset: Asset.fromDto(dto.asset),
|
|
226
|
+
chain: Blockchain(dto.chain),
|
|
227
|
+
insertedAt: dto.inserted_at ? new Date(dto.inserted_at) : null,
|
|
228
|
+
updatedAt: dto.updated_at ? new Date(dto.updated_at) : null,
|
|
229
|
+
walletAddress: walletAddress ? WalletAddress(walletAddress) : null
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
var CreateParticipationParams = {
|
|
234
|
+
/** Maps participation creation params into API DTO payload. */
|
|
235
|
+
toDto: (params) => ({
|
|
236
|
+
offer_id: params.offerId,
|
|
237
|
+
offer_option_id: params.offerOptionId,
|
|
238
|
+
chain: params.chain,
|
|
239
|
+
wallet_address: params.walletAddress,
|
|
240
|
+
amount: params.amount,
|
|
241
|
+
asset_id: params.assetId,
|
|
242
|
+
approval_transaction_hash: params.approvalTransactionHash
|
|
243
|
+
})
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// src/shared/types/requirement.ts
|
|
247
|
+
var RequirementId = (value) => value;
|
|
248
|
+
var Requirement = {
|
|
249
|
+
fromDto: (dto) => ({
|
|
250
|
+
id: RequirementId(dto.id),
|
|
251
|
+
type: dto.type,
|
|
252
|
+
details: dto.details
|
|
253
|
+
})
|
|
254
|
+
};
|
|
255
|
+
var RequirementStatusInfo = {
|
|
256
|
+
fromStatusesDto: (dto) => Object.entries(dto.statuses).map(([id, status]) => ({
|
|
257
|
+
id: RequirementId(id),
|
|
258
|
+
status
|
|
259
|
+
}))
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// src/shared/types/errors.ts
|
|
263
|
+
var NotImplementedError = class extends Error {
|
|
264
|
+
constructor(message = "Not implemented yet") {
|
|
265
|
+
super(message);
|
|
266
|
+
this.name = "NotImplementedError";
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
var NotAuthenticatedError = class extends Error {
|
|
270
|
+
constructor(message = "The user is not authenticated. Go through the OAuth flow first!") {
|
|
271
|
+
super(message);
|
|
272
|
+
this.name = "NotAuthenticatedError";
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export {
|
|
277
|
+
sha256,
|
|
278
|
+
arrayBufferToBase64Url,
|
|
279
|
+
generateSecureRandomBase64Url,
|
|
280
|
+
getUUIDv4,
|
|
281
|
+
Cursor,
|
|
282
|
+
fetchAllPages,
|
|
283
|
+
PaginatedResponse,
|
|
284
|
+
PaginationParams,
|
|
285
|
+
OfferId,
|
|
286
|
+
OfferSlug,
|
|
287
|
+
Offer,
|
|
288
|
+
AssetId,
|
|
289
|
+
AssetCode,
|
|
290
|
+
Asset,
|
|
291
|
+
OfferOptionId,
|
|
292
|
+
OfferOptionSlug,
|
|
293
|
+
OfferDetail,
|
|
294
|
+
OfferOption,
|
|
295
|
+
FaqItem,
|
|
296
|
+
Link,
|
|
297
|
+
TermItem,
|
|
298
|
+
Milestone,
|
|
299
|
+
ParticipationId,
|
|
300
|
+
Blockchain,
|
|
301
|
+
WalletAddress,
|
|
302
|
+
ParticipationsPaginationParams,
|
|
303
|
+
Participation,
|
|
304
|
+
CreateParticipationParams,
|
|
305
|
+
RequirementId,
|
|
306
|
+
Requirement,
|
|
307
|
+
RequirementStatusInfo,
|
|
308
|
+
NotImplementedError,
|
|
309
|
+
NotAuthenticatedError
|
|
310
|
+
};
|
|
311
|
+
//# sourceMappingURL=chunk-V6WO67RO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/api/pagination.ts","../src/shared/utils.ts","../src/shared/types/offer.ts","../src/shared/types/asset.ts","../src/shared/types/offer-detail.ts","../src/shared/types/participation.ts","../src/shared/types/requirement.ts","../src/shared/types/errors.ts"],"sourcesContent":["import type { QueryParamValue } from '@/shared/api/http';\nimport type { Newtype } from '@/shared/types/newtype';\n\nexport type Cursor = Newtype<string, 'Cursor'>;\nexport const Cursor = (value: string) => value as Cursor;\n\n/**\n * Cursor-based pagination input used when requesting paginated API resources.\n * Set `after` or `before` to navigate relative to a known cursor, and `limit`\n * to control the maximum number of returned items.\n */\nexport interface PaginationParams {\n before?: Cursor;\n after?: Cursor;\n limit?: number;\n}\n\nexport interface PaginatedResponseDto<T> {\n data: T[];\n starting_after?: string;\n starting_before?: string;\n}\n\nexport interface PaginatedResponse<T> {\n data: T[];\n startingAfter: Cursor | null;\n startingBefore: Cursor | null;\n}\n\nexport async function fetchAllPages<\n A,\n P extends PaginationParams = PaginationParams,\n>(\n fetchPage: (params: P) => Promise<PaginatedResponse<A>>,\n baseParams?: Omit<P, keyof PaginationParams>\n): Promise<A[]> {\n const items: A[] = [];\n let cursor: Cursor | null = null;\n\n do {\n const params = {\n ...(baseParams ?? {}),\n after: cursor ?? undefined,\n } as P;\n const page = await fetchPage(params);\n items.push(...page.data);\n cursor = page.startingAfter;\n } while (cursor);\n\n return items;\n}\n\nexport const PaginatedResponse = {\n fromDto: <A, B>(\n dto: PaginatedResponseDto<A>,\n itemMapper: (item: A) => B\n ): PaginatedResponse<B> => ({\n data: dto.data.map(itemMapper),\n startingAfter: dto.starting_after ? Cursor(dto.starting_after) : null,\n startingBefore: dto.starting_before ? Cursor(dto.starting_before) : null,\n }),\n};\n\nexport const PaginationParams = {\n toQueryParams: (\n params: PaginationParams\n ): Record<string, QueryParamValue> => {\n const queryParams: Record<string, QueryParamValue> = {};\n if (params.after) {\n queryParams.starting_after = params.after;\n }\n if (params.before) {\n queryParams.starting_before = params.before;\n }\n if (params.limit) {\n queryParams.limit = params.limit;\n }\n return queryParams;\n },\n};\n","/**\n * Computes SHA-256 digest of the input (UTF-8 string or raw bytes).\n * Uses the Web Crypto API.\n */\nexport async function sha256(data: string | Uint8Array): Promise<ArrayBuffer> {\n const bytes =\n typeof data === 'string' ? new TextEncoder().encode(data) : data;\n const buffer = bytes.buffer.slice(\n bytes.byteOffset,\n bytes.byteOffset + bytes.byteLength\n ) as ArrayBuffer;\n return crypto.subtle.digest('SHA-256', buffer);\n}\n\n/**\n * Converts an ArrayBuffer to Base64-URL encoding (RFC 4648).\n * @param padding - If false, omits trailing '=' padding (e.g. for PKCE).\n */\nexport function arrayBufferToBase64Url(\n buffer: ArrayBuffer,\n padding: boolean = true\n): string {\n const bytes = new Uint8Array(buffer);\n let binary = '';\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n let base64 = btoa(binary);\n base64 = base64.replace(/\\+/g, '-').replace(/\\//g, '_');\n if (!padding) {\n base64 = base64.replace(/=+$/, '');\n }\n return base64;\n}\n\n/**\n * Securely generates random bytes and returns them as Base64-URL (no padding).\n * Suitable for PKCE code_verifier and OAuth state.\n * @param byteLength - Number of random bytes (e.g. 32 for PKCE).\n */\nexport function generateSecureRandomBase64Url(byteLength: number): string {\n const bytes = new Uint8Array(byteLength);\n crypto.getRandomValues(bytes);\n const buffer = bytes.buffer;\n return arrayBufferToBase64Url(buffer, false);\n}\n\n/**\n * Generate a UUID v4 using the standard Web Crypto API (crypto.randomUUID).\n * Falls back to RFC 4122–compliant generation via crypto.getRandomValues in old browsers.\n */\nexport function getUUIDv4(): string {\n if (\n typeof crypto !== 'undefined' &&\n typeof crypto.randomUUID === 'function'\n ) {\n return crypto.randomUUID();\n }\n\n if (\n typeof crypto !== 'undefined' &&\n typeof crypto.getRandomValues === 'function'\n ) {\n const bytes = new Uint8Array(16);\n crypto.getRandomValues(bytes);\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0'));\n return `${hex.slice(0, 4).join('')}-${hex.slice(4, 6).join('')}-${hex.slice(6, 8).join('')}-${hex.slice(8, 10).join('')}-${hex.slice(10, 16).join('')}`;\n }\n\n return `${Date.now()}-${Math.random().toString(36).slice(2, 12)}`;\n}\n\nexport function notBlankStringOrNull(value?: string | null): string | null {\n if (value?.trim()) {\n return value;\n } else {\n return null;\n }\n}\n","import type { OfferDto } from '@/shared/types/dto/offer';\nimport type { Newtype } from '@/shared/types/newtype';\nimport { notBlankStringOrNull } from '@/shared/utils';\n\nexport type OfferId = Newtype<string, 'OfferId'>;\nexport const OfferId = (value: string) => value as OfferId;\n\nexport type OfferSlug = Newtype<string, 'OfferSlug'>;\nexport const OfferSlug = (value: string) => value as OfferSlug;\n\nexport type Offer = {\n id: OfferId;\n slug: OfferSlug;\n tagline: string | null;\n bannerUrl: string | null;\n logoUrl: string | null;\n startsAt: Date;\n endsAt: Date;\n};\n\nexport const Offer = {\n fromDto: (dto: OfferDto): Offer => ({\n id: OfferId(dto.id),\n slug: OfferSlug(dto.slug),\n tagline: notBlankStringOrNull(dto.tagline),\n bannerUrl: notBlankStringOrNull(dto.banner_url),\n logoUrl: notBlankStringOrNull(dto.logo_url),\n startsAt: new Date(dto.starts_at),\n endsAt: new Date(dto.ends_at),\n }),\n};\n","import type { AssetDto } from '@/shared/types/dto/asset';\nimport type { Newtype } from '@/shared/types/newtype';\n\nexport type AssetId = Newtype<string, 'AssetId'>;\nexport const AssetId = (value: string) => value as AssetId;\n\nexport type AssetCode = Newtype<string, 'AssetCode'>;\nexport const AssetCode = (value: string) => value as AssetCode;\n\nexport type Asset = {\n id: AssetId;\n code: AssetCode;\n name: string;\n fractionalDigits: number;\n};\n\nexport const Asset = {\n fromDto: (dto: AssetDto): Asset => ({\n id: AssetId(dto.id),\n code: AssetCode(dto.code),\n name: dto.name,\n fractionalDigits: dto.fractional_digits,\n }),\n};\n","import { Asset } from '@/shared/types/asset';\nimport type {\n OfferDetailDto,\n OfferDetailFaqDto,\n OfferDetailLinkDto,\n OfferDetailMilestoneDto,\n OfferDetailOptionDto,\n OfferDetailTermDto,\n} from '@/shared/types/dto/offer-detail';\nimport type { Newtype } from '@/shared/types/newtype';\nimport { OfferId, OfferSlug } from '@/shared/types/offer';\nimport { notBlankStringOrNull } from '@/shared/utils';\n\nexport type OfferDetail = {\n id: OfferId;\n slug: OfferSlug;\n name: string;\n\n asset: Asset;\n fundingAssets: Asset[];\n\n about: string | null;\n tagline: string | null;\n bannerUrl: string | null;\n logoUrl: string | null;\n category: string | null;\n\n startsAt: Date;\n endsAt: Date;\n\n faqs: FaqItem[];\n links: Link[];\n milestones: Milestone[];\n options: OfferOption[];\n terms: TermItem[];\n};\n\nexport type OfferOptionId = Newtype<string, 'OfferOptionId'>;\nexport const OfferOptionId = (value: string) => value as OfferOptionId;\n\nexport type OfferOptionSlug = Newtype<string, 'OfferOptionSlug'>;\nexport const OfferOptionSlug = (value: string) => value as OfferOptionSlug;\n\nexport type OfferOption = {\n id: OfferOptionId;\n slug: OfferOptionSlug;\n bidIncrement: number | null;\n floorPriceUsd: number | null;\n minimumPurchaseUsd: number | null;\n priceUsd: string | null;\n saleAgreementUrl: string | null;\n totalTokenSupply: number | null;\n};\n\nexport type FaqItem = {\n question: string | null;\n answer: string | null;\n};\n\nexport type TermItem = {\n key: string | null;\n value: string | null;\n};\n\nexport type Milestone = {\n name: string | null;\n schedule: string | null;\n status: 'completed' | 'active' | 'upcoming';\n};\n\nexport type Link = {\n label: string | null;\n url: string | null;\n};\n\nexport const OfferDetail = {\n fromDto: (dto: OfferDetailDto): OfferDetail => {\n if (!Array.isArray(dto.funding_assets)) {\n throw new Error(`funding_assets must be an array`);\n }\n\n if (!Array.isArray(dto.options)) {\n throw new Error(`options must be an array`);\n }\n\n if (!Array.isArray(dto.terms)) {\n throw new Error(`terms must be an array`);\n }\n\n if (!Array.isArray(dto.links)) {\n throw new Error(`links must be an array`);\n }\n\n if (!Array.isArray(dto.faqs)) {\n throw new Error(`faqs must be an array`);\n }\n\n if (!Array.isArray(dto.milestones)) {\n throw new Error(`milestones must be an array`);\n }\n\n return {\n id: OfferId(dto.id),\n slug: OfferSlug(dto.slug),\n name: dto.name,\n\n asset: Asset.fromDto(dto.asset),\n fundingAssets: dto.funding_assets.map(Asset.fromDto),\n\n about: notBlankStringOrNull(dto.about),\n tagline: notBlankStringOrNull(dto.tagline),\n bannerUrl: notBlankStringOrNull(dto.banner_url),\n logoUrl: notBlankStringOrNull(dto.logo_url),\n category: notBlankStringOrNull(dto.category),\n\n startsAt: new Date(dto.starts_at),\n endsAt: new Date(dto.ends_at),\n\n faqs: dto.faqs.map(FaqItem.fromDto),\n links: dto.links.map(Link.fromDto),\n milestones: dto.milestones.map(Milestone.fromDto),\n options: dto.options.map(OfferOption.fromDto),\n terms: dto.terms.map(TermItem.fromDto),\n };\n },\n};\n\nexport const OfferOption = {\n fromDto: (dto: OfferDetailOptionDto): OfferOption => ({\n id: OfferOptionId(dto.id),\n slug: OfferOptionSlug(dto.slug),\n bidIncrement: dto.bid_increment,\n floorPriceUsd: dto.floor_price_usd,\n minimumPurchaseUsd: dto.minimum_purchase_usd,\n priceUsd: dto.price_usd,\n saleAgreementUrl: notBlankStringOrNull(dto.sale_agreement_url),\n totalTokenSupply: dto.total_token_supply,\n }),\n};\n\nexport const FaqItem = {\n fromDto: (dto: OfferDetailFaqDto): FaqItem => ({\n question: notBlankStringOrNull(dto.question),\n answer: notBlankStringOrNull(dto.answer),\n }),\n};\n\nexport const Link = {\n fromDto: (dto: OfferDetailLinkDto): Link => ({\n label: notBlankStringOrNull(dto.label),\n url: notBlankStringOrNull(dto.url),\n }),\n};\n\nexport const TermItem = {\n fromDto: (dto: OfferDetailTermDto): TermItem => ({\n key: notBlankStringOrNull(dto.key),\n value: notBlankStringOrNull(dto.value),\n }),\n};\n\nexport const Milestone = {\n fromDto: (dto: OfferDetailMilestoneDto): Milestone => ({\n name: notBlankStringOrNull(dto.name),\n schedule: notBlankStringOrNull(dto.schedule),\n status: dto.status,\n }),\n};\n","import type { QueryParamValue } from '@/shared/api/http';\nimport { PaginationParams } from '@/shared/api/pagination';\nimport { Asset, type AssetId } from '@/shared/types/asset';\nimport type {\n CreateParticipationDto,\n ParticipationDto,\n ParticipationStatusDto,\n} from '@/shared/types/dto/participation';\nimport type { Newtype } from '@/shared/types/newtype';\nimport { OfferId, type OfferId as OfferIdType } from '@/shared/types/offer';\nimport {\n OfferOptionId,\n type OfferOptionId as OfferOptionIdType,\n} from '@/shared/types/offer-detail';\nimport { notBlankStringOrNull } from '@/shared/utils';\n\n/** Unique identifier for a participation. */\nexport type ParticipationId = Newtype<string, 'ParticipationId'>;\n/** Casts a string into a typed {@link ParticipationId}. */\nexport const ParticipationId = (value: string) => value as ParticipationId;\n\n/** Blockchain identifier for where a participation is funded. */\nexport type Blockchain = Newtype<string, 'Blockchain'>;\n/** Casts a string into a typed {@link Blockchain}. */\nexport const Blockchain = (value: string) => value as Blockchain;\n\n/** Wallet address used for a participation. */\nexport type WalletAddress = Newtype<string, 'WalletAddress'>;\n/** Casts a string into a typed {@link WalletAddress}. */\nexport const WalletAddress = (value: string) => value as WalletAddress;\n\n/** Possible participation lifecycle states returned by the API. */\nexport type ParticipationStatus = ParticipationStatusDto;\n\n/** Domain model for a participation returned by CoinList APIs. */\nexport type Participation = {\n /** Unique participation id. */\n id: ParticipationId;\n /** Parent offer id. */\n offerId: OfferIdType;\n /** Selected offer option id. */\n offerOptionId: OfferOptionIdType;\n /** Current processing status. */\n status: ParticipationStatus;\n /** Raw participation amount from API. */\n amount: string;\n /** Human-readable formatted amount from API. */\n displayAmount: string;\n /** Asset metadata for the participation amount. */\n asset: Asset;\n /** Funding chain identifier. */\n chain: Blockchain;\n /** Creation timestamp, if returned by API. */\n insertedAt: Date | null;\n /** Last update timestamp, if returned by API. */\n updatedAt: Date | null;\n /** Wallet used for participation, blank values normalized to null. */\n walletAddress: WalletAddress | null;\n};\n\n/** Parameters required to create a new participation. */\nexport type CreateParticipationParams = {\n /** Offer to participate in. */\n offerId: OfferIdType;\n /** Offer option selected for participation. */\n offerOptionId: OfferOptionIdType;\n /** Blockchain for funding. */\n chain: Blockchain;\n /** Wallet address that funds the participation. */\n walletAddress: WalletAddress;\n /** Raw amount to participate with. */\n amount: string;\n /** Funding asset id. */\n assetId: AssetId;\n /** Optional approval transaction hash, if applicable. */\n approvalTransactionHash?: string | null;\n};\n\n/** Pagination params for listing participations, with an optional offer filter. */\nexport interface ParticipationsPaginationParams extends PaginationParams {\n offerId?: OfferIdType;\n}\n\nexport const ParticipationsPaginationParams = {\n toQueryParams: (\n params: ParticipationsPaginationParams\n ): Record<string, QueryParamValue> => {\n const queryParams = PaginationParams.toQueryParams(params);\n if (params.offerId) {\n queryParams['filters[0][field]'] = 'offer_id';\n queryParams['filters[0][op]'] = '==';\n queryParams['filters[0][value]'] = params.offerId;\n }\n return queryParams;\n },\n};\n\nexport const Participation = {\n /** Maps API DTO shape into the SDK participation domain model. */\n fromDto: (dto: ParticipationDto): Participation => {\n const walletAddress = notBlankStringOrNull(dto.wallet_address);\n return {\n id: ParticipationId(dto.id),\n offerId: OfferId(dto.offer_id),\n offerOptionId: OfferOptionId(dto.offer_option_id),\n status: dto.status,\n amount: dto.amount,\n displayAmount: dto.amount_string,\n asset: Asset.fromDto(dto.asset),\n chain: Blockchain(dto.chain),\n insertedAt: dto.inserted_at ? new Date(dto.inserted_at) : null,\n updatedAt: dto.updated_at ? new Date(dto.updated_at) : null,\n walletAddress: walletAddress ? WalletAddress(walletAddress) : null,\n };\n },\n};\n\nexport const CreateParticipationParams = {\n /** Maps participation creation params into API DTO payload. */\n toDto: (params: CreateParticipationParams): CreateParticipationDto => ({\n offer_id: params.offerId,\n offer_option_id: params.offerOptionId,\n chain: params.chain,\n wallet_address: params.walletAddress,\n amount: params.amount,\n asset_id: params.assetId,\n approval_transaction_hash: params.approvalTransactionHash,\n }),\n};\n","import type {\n RequirementDto,\n RequirementStatusesDto,\n RequirementStatusValueDto,\n RequirementTypeDto,\n} from '@/shared/types/dto/requirement';\nimport type { Newtype } from '@/shared/types/newtype';\n\nexport type RequirementId = Newtype<string, 'RequirementId'>;\nexport const RequirementId = (value: string) => value as RequirementId;\n\nexport type RequirementType = RequirementTypeDto;\nexport type RequirementStatusValue = RequirementStatusValueDto;\n\nexport type Requirement = {\n id: RequirementId;\n type: RequirementType;\n details: Record<string, unknown> | null;\n};\n\nexport const Requirement = {\n fromDto: (dto: RequirementDto): Requirement => ({\n id: RequirementId(dto.id),\n type: dto.type,\n details: dto.details,\n }),\n};\n\nexport type RequirementStatusInfo = {\n id: RequirementId;\n status: RequirementStatusValue;\n};\n\nexport const RequirementStatusInfo = {\n fromStatusesDto: (dto: RequirementStatusesDto): RequirementStatusInfo[] =>\n Object.entries(dto.statuses).map(([id, status]) => ({\n id: RequirementId(id),\n status,\n })),\n};\n","/**\n * Error thrown when a feature or code path is not yet implemented.\n */\nexport class NotImplementedError extends Error {\n constructor(message = 'Not implemented yet') {\n super(message);\n this.name = 'NotImplementedError';\n }\n}\n\n/**\n * Error thrown when accessing a feature that requires authentication\n * without being authenticated.\n */\nexport class NotAuthenticatedError extends Error {\n constructor(\n message = 'The user is not authenticated. Go through the OAuth flow first!'\n ) {\n super(message);\n this.name = 'NotAuthenticatedError';\n }\n}\n"],"mappings":";AAIO,IAAM,SAAS,CAAC,UAAkB;AAyBzC,eAAsB,cAIpB,WACA,YACc;AACd,QAAM,QAAa,CAAC;AACpB,MAAI,SAAwB;AAE5B,KAAG;AACD,UAAM,SAAS;AAAA,MACb,GAAI,cAAc,CAAC;AAAA,MACnB,OAAO,UAAU;AAAA,IACnB;AACA,UAAM,OAAO,MAAM,UAAU,MAAM;AACnC,UAAM,KAAK,GAAG,KAAK,IAAI;AACvB,aAAS,KAAK;AAAA,EAChB,SAAS;AAET,SAAO;AACT;AAEO,IAAM,oBAAoB;AAAA,EAC/B,SAAS,CACP,KACA,gBAC0B;AAAA,IAC1B,MAAM,IAAI,KAAK,IAAI,UAAU;AAAA,IAC7B,eAAe,IAAI,iBAAiB,OAAO,IAAI,cAAc,IAAI;AAAA,IACjE,gBAAgB,IAAI,kBAAkB,OAAO,IAAI,eAAe,IAAI;AAAA,EACtE;AACF;AAEO,IAAM,mBAAmB;AAAA,EAC9B,eAAe,CACb,WACoC;AACpC,UAAM,cAA+C,CAAC;AACtD,QAAI,OAAO,OAAO;AAChB,kBAAY,iBAAiB,OAAO;AAAA,IACtC;AACA,QAAI,OAAO,QAAQ;AACjB,kBAAY,kBAAkB,OAAO;AAAA,IACvC;AACA,QAAI,OAAO,OAAO;AAChB,kBAAY,QAAQ,OAAO;AAAA,IAC7B;AACA,WAAO;AAAA,EACT;AACF;;;AC3EA,eAAsB,OAAO,MAAiD;AAC5E,QAAM,QACJ,OAAO,SAAS,WAAW,IAAI,YAAY,EAAE,OAAO,IAAI,IAAI;AAC9D,QAAM,SAAS,MAAM,OAAO;AAAA,IAC1B,MAAM;AAAA,IACN,MAAM,aAAa,MAAM;AAAA,EAC3B;AACA,SAAO,OAAO,OAAO,OAAO,WAAW,MAAM;AAC/C;AAMO,SAA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