@tixprotocol/tdp-sdk 0.2.0 → 0.4.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/README.md +9 -0
- package/dist/{chunk-RLIW34CX.js → chunk-7IWD2KHF.js} +15 -3
- package/dist/chunk-7IWD2KHF.js.map +1 -0
- package/dist/{chunk-3SJAQTJ4.js → chunk-DKU7DEI5.js} +36 -27
- package/dist/chunk-DKU7DEI5.js.map +1 -0
- package/dist/errors.d.ts +14 -3
- package/dist/errors.js +5 -1
- package/dist/index.d.ts +108 -147
- package/dist/index.js +98 -31
- package/dist/index.js.map +1 -1
- package/dist/schemas.d.ts +24 -6
- package/dist/schemas.js +3 -1
- package/dist/schemas.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3SJAQTJ4.js.map +0 -1
- package/dist/chunk-RLIW34CX.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
ApiKeyHeadersSchema,
|
|
5
5
|
EventPathParametersSchema,
|
|
6
6
|
GetAddressResponseSchema,
|
|
7
|
+
GetPurchaseStatusResponseSchema,
|
|
7
8
|
IdempotencyKeyAndApiKeyHeadersSchema,
|
|
9
|
+
MAX_PERMITS_PER_CLAIM_WALLET,
|
|
8
10
|
NoPathParametersSchema,
|
|
9
11
|
PostIntegratorMetadataRequestBodySchema,
|
|
10
12
|
PostTixIndexerIntegratorMetadataResultSchema,
|
|
@@ -12,14 +14,17 @@ import {
|
|
|
12
14
|
SignTransactionResponseSchema,
|
|
13
15
|
SubmitTenantTransactionRequestBodySchema,
|
|
14
16
|
SubmitTenantTransactionResponseSchema,
|
|
17
|
+
TicketPathParametersSchema,
|
|
15
18
|
WalletPathParametersSchema,
|
|
16
19
|
defineClientRoute,
|
|
20
|
+
requireUniquePermitKeys,
|
|
17
21
|
solanaDataApiClientRoutes,
|
|
18
22
|
tixIndexerReadApiClientRoutes
|
|
19
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DKU7DEI5.js";
|
|
20
24
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
TdpApiError,
|
|
26
|
+
TdpResponseValidationError
|
|
27
|
+
} from "./chunk-7IWD2KHF.js";
|
|
23
28
|
|
|
24
29
|
// src/solana-data-api/create-solana-client.ts
|
|
25
30
|
function createSolanaClient(tixApi) {
|
|
@@ -92,6 +97,14 @@ var responseBodySchemaByRouteKey2 = Object.fromEntries(
|
|
|
92
97
|
)
|
|
93
98
|
);
|
|
94
99
|
|
|
100
|
+
// src/routes/create-tdp-api-error-from-route-failure.ts
|
|
101
|
+
function createTdpApiErrorFromRouteFailure(failure) {
|
|
102
|
+
return failure.kind === "response-validation" ? new TdpResponseValidationError(failure) : new TdpApiError(failure);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// src/routes/execute-client-route.ts
|
|
106
|
+
import { z } from "zod";
|
|
107
|
+
|
|
95
108
|
// src/utils/join-url-segments.ts
|
|
96
109
|
function joinUrlSegments(baseUrl, path) {
|
|
97
110
|
return `${baseUrl.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
|
|
@@ -109,6 +122,7 @@ async function readResponsePayload(response) {
|
|
|
109
122
|
}
|
|
110
123
|
|
|
111
124
|
// src/routes/execute-client-route.ts
|
|
125
|
+
var ErrorBodyCodeSchema = z.object({ code: z.string() });
|
|
112
126
|
async function executeClientRoute({
|
|
113
127
|
baseApiUrl,
|
|
114
128
|
fetchImpl,
|
|
@@ -143,9 +157,16 @@ async function executeClientRoute({
|
|
|
143
157
|
path,
|
|
144
158
|
status: response.status,
|
|
145
159
|
statusText: response.statusText,
|
|
146
|
-
payload
|
|
160
|
+
payload,
|
|
161
|
+
requestId: response.headers.get("apigw-requestid") ?? void 0
|
|
147
162
|
};
|
|
148
|
-
if (!response.ok)
|
|
163
|
+
if (!response.ok) {
|
|
164
|
+
throw createError({
|
|
165
|
+
kind: "http-status",
|
|
166
|
+
...failure,
|
|
167
|
+
code: ErrorBodyCodeSchema.safeParse(payload).data?.code
|
|
168
|
+
});
|
|
169
|
+
}
|
|
149
170
|
const parsed = route.responseBodySchema.safeParse(payload);
|
|
150
171
|
if (!parsed.success) {
|
|
151
172
|
throw createError({
|
|
@@ -189,7 +210,7 @@ function createTixApiClientForRoutes({
|
|
|
189
210
|
"x-api-key": typeof apiKey === "string" ? apiKey : await apiKey(),
|
|
190
211
|
...additionalHeaders
|
|
191
212
|
},
|
|
192
|
-
createError:
|
|
213
|
+
createError: createTdpApiErrorFromRouteFailure
|
|
193
214
|
});
|
|
194
215
|
};
|
|
195
216
|
}
|
|
@@ -217,7 +238,7 @@ function createTixApiClient({
|
|
|
217
238
|
// src/tix-indexer-api/create-indexer-client.ts
|
|
218
239
|
function createIndexerClient(tixApi) {
|
|
219
240
|
return {
|
|
220
|
-
listActiveListings(queryParams
|
|
241
|
+
listActiveListings(queryParams, options) {
|
|
221
242
|
return tixApi(
|
|
222
243
|
{
|
|
223
244
|
route: "get-active-listings",
|
|
@@ -258,6 +279,7 @@ var SIGN_USER_TRANSACTION_ROUTE_KEY = "POST /wallets/users/{subject}/signatures"
|
|
|
258
279
|
var SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY = "POST /wallets/integrators/{subject}/signatures";
|
|
259
280
|
var SUBMIT_TENANT_TRANSACTION_ROUTE_KEY = "POST /transactions/submissions";
|
|
260
281
|
var ACCEPT_CLAIM_OFFERS_ROUTE_KEY = "POST /claim_wallets";
|
|
282
|
+
var GET_PURCHASE_STATUS_ROUTE_KEY = "GET /claim_wallets/purchase-status";
|
|
261
283
|
var GET_FEE_PAYER_ADDRESS_ROUTE_KEY = "GET /wallets/fee-payer/address";
|
|
262
284
|
var GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY = "GET /wallets/protocol-authority/address";
|
|
263
285
|
|
|
@@ -311,6 +333,15 @@ var apiKeyWalletCustodyApiClientRoutes = {
|
|
|
311
333
|
requestBodySchema: SubmitTenantTransactionRequestBodySchema,
|
|
312
334
|
responseBodySchema: SubmitTenantTransactionResponseSchema
|
|
313
335
|
}),
|
|
336
|
+
"get-purchase-status": defineClientRoute({
|
|
337
|
+
name: "get-purchase-status",
|
|
338
|
+
method: "GET",
|
|
339
|
+
routeKey: GET_PURCHASE_STATUS_ROUTE_KEY,
|
|
340
|
+
pathParamsSchema: NoPathParametersSchema,
|
|
341
|
+
buildPath: ({ baseApiUrl = "" }) => `${baseApiUrl}/claim_wallets/purchase-status`,
|
|
342
|
+
headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,
|
|
343
|
+
responseBodySchema: GetPurchaseStatusResponseSchema
|
|
344
|
+
}),
|
|
314
345
|
"accept-claim-offers": defineClientRoute({
|
|
315
346
|
name: "accept-claim-offers",
|
|
316
347
|
method: "POST",
|
|
@@ -345,7 +376,7 @@ var apiKeyWalletCustodyApiClientRoutes = {
|
|
|
345
376
|
function executeWalletCustodyRoute(request) {
|
|
346
377
|
return executeClientRoute({
|
|
347
378
|
...request,
|
|
348
|
-
createError:
|
|
379
|
+
createError: createTdpApiErrorFromRouteFailure
|
|
349
380
|
});
|
|
350
381
|
}
|
|
351
382
|
|
|
@@ -380,16 +411,59 @@ function createWalletCustodyApiClient({
|
|
|
380
411
|
}
|
|
381
412
|
|
|
382
413
|
// src/wallet-custody/create-claim-wallets-client.ts
|
|
383
|
-
|
|
414
|
+
import { z as z2 } from "zod";
|
|
415
|
+
|
|
416
|
+
// src/wallet-custody/resolve-claim-offer.ts
|
|
417
|
+
async function resolveClaimOffer(solana, ticket, protocol, eventResponse, options) {
|
|
418
|
+
const [listing, event, permit] = await Promise.all([
|
|
419
|
+
solana.getListing(ticket, options),
|
|
420
|
+
eventResponse,
|
|
421
|
+
solana.getPermit(ticket, options)
|
|
422
|
+
]);
|
|
423
|
+
return {
|
|
424
|
+
event_id: listing.event_id,
|
|
425
|
+
ticket_id: listing.ticket_id,
|
|
426
|
+
permit_version: listing.permit_version,
|
|
427
|
+
seller_payout: listing.payout_ata,
|
|
428
|
+
royalty_destinations: event.royalty_recipients_count > 0 ? event.royalty_recipients.slice(0, event.royalty_recipients_count).map(({ destination }) => destination) : [protocol.default_royalty_vault],
|
|
429
|
+
ticket_type_config: permit.ticket_type_config,
|
|
430
|
+
usdc_mint: protocol.usdc_mint
|
|
431
|
+
};
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
// src/wallet-custody/create-claim-wallets-client.ts
|
|
435
|
+
var AcceptOffersBodySchema = AcceptClaimOffersRequestBodySchema.extend({
|
|
436
|
+
offers: z2.array(TicketPathParametersSchema).min(1).max(MAX_PERMITS_PER_CLAIM_WALLET).superRefine(requireUniquePermitKeys)
|
|
437
|
+
});
|
|
438
|
+
function createClaimWalletsClient(walletCustodyApi, solana) {
|
|
384
439
|
return {
|
|
385
|
-
|
|
440
|
+
getPurchaseStatus({
|
|
441
|
+
idempotencyKey
|
|
442
|
+
}, options) {
|
|
443
|
+
return walletCustodyApi(
|
|
444
|
+
{ route: "get-purchase-status", idempotencyKey },
|
|
445
|
+
options
|
|
446
|
+
);
|
|
447
|
+
},
|
|
448
|
+
async acceptOffers({
|
|
386
449
|
idempotencyKey,
|
|
387
450
|
body
|
|
388
451
|
}, options) {
|
|
452
|
+
const parsedBody = AcceptOffersBodySchema.parse(body);
|
|
453
|
+
const protocol = await solana.getProtocolConfig(options);
|
|
454
|
+
const events = /* @__PURE__ */ new Map();
|
|
455
|
+
const offers = await Promise.all(
|
|
456
|
+
parsedBody.offers.map((ticket) => {
|
|
457
|
+
const eventId = String(ticket.eventId);
|
|
458
|
+
const event = events.get(eventId) ?? solana.getEvent({ eventId }, options);
|
|
459
|
+
events.set(eventId, event);
|
|
460
|
+
return resolveClaimOffer(solana, ticket, protocol, event, options);
|
|
461
|
+
})
|
|
462
|
+
);
|
|
389
463
|
return walletCustodyApi(
|
|
390
464
|
{
|
|
391
465
|
route: "accept-claim-offers",
|
|
392
|
-
body,
|
|
466
|
+
body: { ...parsedBody, offers },
|
|
393
467
|
idempotencyKey
|
|
394
468
|
},
|
|
395
469
|
options
|
|
@@ -398,26 +472,15 @@ function createClaimWalletsClient(walletCustodyApi) {
|
|
|
398
472
|
};
|
|
399
473
|
}
|
|
400
474
|
|
|
475
|
+
// src/wallet-custody/const.ts
|
|
476
|
+
var INTEGRATOR_PRIMARY_ADDRESS_SUBJECT = "PRIMARY_ADDRESS";
|
|
477
|
+
|
|
401
478
|
// src/wallet-custody/create-transactions-client.ts
|
|
402
479
|
function createTransactionsClient(walletCustodyApi) {
|
|
403
480
|
return {
|
|
404
|
-
|
|
405
|
-
subject,
|
|
406
|
-
idempotencyKey,
|
|
407
|
-
body
|
|
408
|
-
}, options) {
|
|
409
|
-
return walletCustodyApi(
|
|
410
|
-
{
|
|
411
|
-
route: "sign-user-transaction",
|
|
412
|
-
pathParams: { subject },
|
|
413
|
-
body,
|
|
414
|
-
idempotencyKey
|
|
415
|
-
},
|
|
416
|
-
options
|
|
417
|
-
);
|
|
418
|
-
},
|
|
481
|
+
/** A `subject` is not necessary. */
|
|
419
482
|
signIntegrator({
|
|
420
|
-
subject,
|
|
483
|
+
subject = INTEGRATOR_PRIMARY_ADDRESS_SUBJECT,
|
|
421
484
|
idempotencyKey,
|
|
422
485
|
body
|
|
423
486
|
}, options) {
|
|
@@ -457,11 +520,14 @@ function createWalletClient(walletCustodyApi) {
|
|
|
457
520
|
options
|
|
458
521
|
);
|
|
459
522
|
},
|
|
460
|
-
|
|
523
|
+
/** A `subject` is not necessary. */
|
|
524
|
+
getIntegratorAddress({
|
|
525
|
+
subject = INTEGRATOR_PRIMARY_ADDRESS_SUBJECT
|
|
526
|
+
} = {}, options) {
|
|
461
527
|
return walletCustodyApi(
|
|
462
528
|
{
|
|
463
529
|
route: "get-integrator-address",
|
|
464
|
-
pathParams
|
|
530
|
+
pathParams: { subject }
|
|
465
531
|
},
|
|
466
532
|
options
|
|
467
533
|
);
|
|
@@ -489,12 +555,13 @@ function createWalletClient(walletCustodyApi) {
|
|
|
489
555
|
function createTdpClient(options) {
|
|
490
556
|
const tixApi = createTixApiClient(options);
|
|
491
557
|
const walletCustodyApi = createWalletCustodyApiClient(options);
|
|
558
|
+
const solana = createSolanaClient(tixApi);
|
|
492
559
|
return {
|
|
493
|
-
solana
|
|
560
|
+
solana,
|
|
494
561
|
indexer: createIndexerClient(tixApi),
|
|
495
562
|
wallets: createWalletClient(walletCustodyApi),
|
|
496
563
|
transactions: createTransactionsClient(walletCustodyApi),
|
|
497
|
-
claimWallets: createClaimWalletsClient(walletCustodyApi)
|
|
564
|
+
claimWallets: createClaimWalletsClient(walletCustodyApi, solana)
|
|
498
565
|
};
|
|
499
566
|
}
|
|
500
567
|
export {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/solana-data-api/create-solana-client.ts","../../tdp-schemas/src/tix-indexer-api/routes.ts","../src/utils/join-url-segments.ts","../src/utils/read-response-payload.ts","../src/routes/execute-client-route.ts","../src/tix-api/create-tix-api-client.ts","../src/tix-api/api-client.ts","../src/tix-indexer-api/create-indexer-client.ts","../../tdp-schemas/src/wallet-custody/api-key-route-keys.ts","../../tdp-schemas/src/wallet-custody/api-key-routes.ts","../src/wallet-custody/execute-wallet-custody-route.ts","../src/wallet-custody/api-client.ts","../src/wallet-custody/create-claim-wallets-client.ts","../src/wallet-custody/create-transactions-client.ts","../src/wallet-custody/create-wallet-client.ts","../src/index.ts"],"sourcesContent":["import type { RoutePathParams } from \"../routes/client-request-types\";\nimport type { TixApiClient, TixApiRoutes } from \"../tix-api/api-client\";\n\nexport function createSolanaClient(tixApi: TixApiClient) {\n return {\n getEvent(\n pathParams: RoutePathParams<TixApiRoutes[\"get-event-account\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-event-account\",\n pathParams,\n },\n options,\n );\n },\n getListing(\n pathParams: RoutePathParams<TixApiRoutes[\"get-listing-account\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-listing-account\",\n pathParams,\n },\n options,\n );\n },\n getPermit(\n pathParams: RoutePathParams<TixApiRoutes[\"get-permit\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-permit\",\n pathParams,\n },\n options,\n );\n },\n getProtocolConfig(options?: Pick<RequestInit, \"signal\">) {\n return tixApi(\n {\n route: \"get-protocol-config-account\",\n },\n options,\n );\n },\n getIntegrator(\n pathParams: RoutePathParams<TixApiRoutes[\"get-integrator-account\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-integrator-account\",\n pathParams,\n },\n options,\n );\n },\n };\n}\n","import type { z } from \"zod\";\nimport { defineClientRoute } from \"../routes/define-client-route\";\nimport { ApiKeyHeadersSchema } from \"../routes/request-schemas\";\nimport { EventPathParametersSchema } from \"../tix-api/path-params\";\nimport {\n PostIntegratorMetadataRequestBodySchema,\n PostTixIndexerIntegratorMetadataResultSchema,\n} from \"./metadata\";\nimport { tixIndexerReadApiClientRoutes } from \"./read-routes\";\n\nexport { PostIntegratorMetadataRequestBodySchema } from \"./metadata\";\nexport {\n GET_ACTIVE_LISTINGS_ROUTE_KEY,\n GET_UPCOMING_EVENTS_ROUTE_KEY,\n LimitCursorQuerySchema,\n} from \"./read-routes\";\nexport const POST_INTEGRATOR_METADATA_ROUTE_KEY =\n \"POST /events/{eventId}/metadata\";\n\nexport const tixIndexerApiClientRoutes = {\n ...tixIndexerReadApiClientRoutes,\n \"post-integrator-metadata\": defineClientRoute({\n name: \"post-integrator-metadata\",\n method: \"POST\" as const,\n routeKey: POST_INTEGRATOR_METADATA_ROUTE_KEY,\n pathParamsSchema: EventPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", eventId }) =>\n `${baseApiUrl}/events/${eventId}/metadata`,\n headersSchema: ApiKeyHeadersSchema,\n requestBodySchema: PostIntegratorMetadataRequestBodySchema,\n responseBodySchema: PostTixIndexerIntegratorMetadataResultSchema,\n }),\n} as const satisfies Record<string, unknown>;\n\nexport const responseBodySchemaByRouteKey = Object.fromEntries(\n Object.values(tixIndexerApiClientRoutes).map(\n (route) => [route.routeKey, route.responseBodySchema] as const,\n ),\n) as Record<string, z.ZodType<Record<string, unknown>>>;\n","/**\n * Joins URL segments with one slash; i.e., remove repeated slashes.\n */\nexport function joinUrlSegments(baseUrl: string, path: string): string {\n return `${baseUrl.replace(/\\/+$/, \"\")}/${path.replace(/^\\/+/, \"\")}`;\n}\n","/**\n * Reads the body without letting an empty or non-JSON payload mask the HTTP status.\n **/\nexport async function readResponsePayload(\n response: Response,\n): Promise<unknown> {\n const rawBody = await response.text();\n if (rawBody.length === 0) return undefined;\n try {\n return JSON.parse(rawBody);\n } catch {\n return rawBody;\n }\n}\n","import type { z } from \"zod\";\nimport { joinUrlSegments } from \"../utils/join-url-segments\";\nimport { readResponsePayload } from \"../utils/read-response-payload\";\nimport type { AnyClientRoute } from \"./define-client-route\";\n\nexport type ClientRouteFailure = {\n kind: \"http-status\" | \"response-validation\";\n route: string;\n method: string;\n path: string;\n status: number;\n statusText: string;\n payload: unknown;\n validationError?: z.ZodError;\n};\n\n/** Builds the URL, headers, and body for a route, sends it, and parses the response through the route's schema. */\nexport async function executeClientRoute<TRoute extends AnyClientRoute>({\n baseApiUrl,\n fetchImpl,\n headers,\n signal,\n routeName,\n route,\n pathParams,\n queryParams,\n body,\n routeHeadersInput,\n createError,\n}: {\n baseApiUrl: string;\n fetchImpl: typeof fetch;\n headers?: HeadersInit;\n signal?: RequestInit[\"signal\"];\n routeName: string;\n route: TRoute;\n pathParams: unknown;\n queryParams?: unknown;\n body: unknown;\n routeHeadersInput: Record<string, string | undefined>;\n createError: (failure: ClientRouteFailure) => Error;\n}): Promise<z.output<TRoute[\"responseBodySchema\"]>> {\n // TS can't reconcile the route's output types with input types, hence the `as never` clauses.\n const path = route.buildPath(pathParams as never);\n const routeHeaders = route.buildHeaders(routeHeadersInput as never);\n const url =\n joinUrlSegments(baseApiUrl, path) +\n (queryParams === undefined\n ? \"\"\n : route.buildQueryString(queryParams as never));\n\n const requestHeaders = new Headers(headers);\n requestHeaders.set(\"content-type\", \"application/json\");\n new Headers(routeHeaders as HeadersInit).forEach((value, name) => {\n requestHeaders.set(name, value);\n });\n const response = await fetchImpl(url, {\n method: route.method,\n ...(signal === undefined ? {} : { signal }),\n headers: Object.fromEntries(requestHeaders),\n body:\n body === undefined ? undefined : route.buildJsonPayload(body as never),\n });\n const payload = await readResponsePayload(response);\n const failure = {\n route: routeName,\n method: route.method,\n path,\n status: response.status,\n statusText: response.statusText,\n payload,\n };\n if (!response.ok) throw createError({ kind: \"http-status\", ...failure });\n\n const parsed = route.responseBodySchema.safeParse(payload);\n if (!parsed.success) {\n throw createError({\n kind: \"response-validation\",\n ...failure,\n validationError: parsed.error,\n });\n }\n return parsed.data as z.output<TRoute[\"responseBodySchema\"]>;\n}\n","import type {\n ClientRouteMap,\n ClientRouteRequest,\n RouteQueryParams,\n RouteRequestField,\n RouteResponseBody,\n} from \"../routes/client-request-types\";\nimport { executeClientRoute } from \"../routes/execute-client-route\";\nimport { solanaDataApiClientRoutes } from \"../solana-data-api/routes\";\nimport { WalletCustodyApiError } from \"../wallet-custody/http-error\";\n\n/** Both APIs are mapped onto one domain under these keys. */\nexport const SOLANA_DATA_API_PATH_PREFIX = \"solana\";\nexport const TIX_INDEXER_API_PATH_PREFIX = \"tix-indexer\";\n\n/** The request for a route. No caller-settable `headers`: the client injects them itself. */\ntype FetchTixApiRequest<\n TRoutes extends ClientRouteMap,\n TRouteName extends keyof TRoutes,\n> = ClientRouteRequest<TRoutes, TRouteName> &\n RouteRequestField<\"queryParams\", RouteQueryParams<TRoutes[TRouteName]>>;\n\nexport function createTixApiClientForRoutes<TRoutes extends ClientRouteMap>({\n routes,\n baseApiUrl,\n apiKey,\n fetchImpl = fetch,\n headers,\n additionalHeaders,\n}: {\n routes: TRoutes;\n baseApiUrl: string;\n apiKey: string | (() => Promise<string>);\n fetchImpl?: typeof fetch;\n headers?: HeadersInit;\n additionalHeaders?: Parameters<\n typeof executeClientRoute\n >[0][\"routeHeadersInput\"];\n}) {\n return async function fetchTixApi<TRouteName extends keyof TRoutes & string>(\n {\n route,\n pathParams,\n queryParams,\n body,\n }: FetchTixApiRequest<TRoutes, TRouteName>,\n { signal }: Pick<RequestInit, \"signal\"> = {},\n ): Promise<RouteResponseBody<TRoutes[TRouteName]>> {\n const prefix =\n route in solanaDataApiClientRoutes\n ? SOLANA_DATA_API_PATH_PREFIX\n : TIX_INDEXER_API_PATH_PREFIX;\n return executeClientRoute({\n baseApiUrl: `${baseApiUrl}/${prefix}`,\n fetchImpl,\n headers,\n signal,\n routeName: route,\n route: routes[route],\n pathParams,\n queryParams,\n body,\n routeHeadersInput: {\n \"x-api-key\": typeof apiKey === \"string\" ? apiKey : await apiKey(),\n ...additionalHeaders,\n },\n createError: (failure) => new WalletCustodyApiError(failure),\n }) as Promise<RouteResponseBody<TRoutes[TRouteName]>>;\n };\n}\n","import { solanaDataApiClientRoutes } from \"../solana-data-api/routes\";\nimport { tixIndexerApiClientRoutes } from \"../tix-indexer-api/routes\";\nimport { createTixApiClientForRoutes } from \"./create-tix-api-client\";\n\nexport {\n SOLANA_DATA_API_PATH_PREFIX,\n TIX_INDEXER_API_PATH_PREFIX,\n} from \"./create-tix-api-client\";\n\nexport const tixApiClientRoutes = {\n ...solanaDataApiClientRoutes,\n ...tixIndexerApiClientRoutes,\n} as const;\n\nexport type TixApiRoutes = typeof tixApiClientRoutes;\nexport type TixApiClient = ReturnType<typeof createTixApiClient>;\n\nexport function createTixApiClient({\n baseApiUrl,\n apiKey,\n fetchImpl = fetch,\n headers,\n}: {\n baseApiUrl: string;\n apiKey: string | (() => Promise<string>);\n fetchImpl?: typeof fetch;\n /**\n * Additional request headers. SDK-managed headers take precedence.\n * Cross-origin browser requests require server CORS support for custom headers.\n */\n headers?: HeadersInit;\n}) {\n return createTixApiClientForRoutes({\n routes: tixApiClientRoutes,\n baseApiUrl,\n apiKey,\n fetchImpl,\n headers,\n });\n}\n","import type {\n ClientRouteRequest,\n RouteQueryParams,\n} from \"../routes/client-request-types\";\nimport type { TixApiClient, TixApiRoutes } from \"../tix-api/api-client\";\n\ntype MetadataRequest = ClientRouteRequest<\n TixApiRoutes,\n \"post-integrator-metadata\"\n>;\ntype ActiveListingsQuery = RouteQueryParams<\n TixApiRoutes[\"get-active-listings\"]\n>;\ntype UpcomingEventsQuery = RouteQueryParams<\n TixApiRoutes[\"get-upcoming-events\"]\n>;\n\nexport function createIndexerClient(tixApi: TixApiClient) {\n return {\n listActiveListings(\n queryParams: ActiveListingsQuery = {},\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-active-listings\",\n queryParams,\n },\n options,\n );\n },\n listUpcomingEvents(\n queryParams: UpcomingEventsQuery = {},\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-upcoming-events\",\n queryParams,\n },\n options,\n );\n },\n updateEventMetadata(\n {\n eventId,\n body,\n }: MetadataRequest[\"pathParams\"] & Pick<MetadataRequest, \"body\">,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"post-integrator-metadata\",\n pathParams: { eventId },\n body,\n },\n options,\n );\n },\n };\n}\n","export const GET_USER_ADDRESS_ROUTE_KEY =\n \"GET /wallets/users/{subject}/address\";\nexport const GET_INTEGRATOR_ADDRESS_ROUTE_KEY =\n \"GET /wallets/integrators/{subject}/address\";\nexport const SIGN_USER_TRANSACTION_ROUTE_KEY =\n \"POST /wallets/users/{subject}/signatures\";\nexport const SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY =\n \"POST /wallets/integrators/{subject}/signatures\";\nexport const SUBMIT_TENANT_TRANSACTION_ROUTE_KEY =\n \"POST /transactions/submissions\";\nexport const ACCEPT_CLAIM_OFFERS_ROUTE_KEY = \"POST /claim_wallets\";\nexport const GET_FEE_PAYER_ADDRESS_ROUTE_KEY = \"GET /wallets/fee-payer/address\";\nexport const GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY =\n \"GET /wallets/protocol-authority/address\";\n","import { defineClientRoute } from \"../routes/define-client-route\";\nimport {\n ApiKeyHeadersSchema,\n IdempotencyKeyAndApiKeyHeadersSchema,\n NoPathParametersSchema,\n} from \"../routes/request-schemas\";\nimport {\n GetAddressResponseSchema,\n WalletPathParametersSchema,\n} from \"./addresses\";\nimport {\n ACCEPT_CLAIM_OFFERS_ROUTE_KEY,\n GET_FEE_PAYER_ADDRESS_ROUTE_KEY,\n GET_INTEGRATOR_ADDRESS_ROUTE_KEY,\n GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY,\n GET_USER_ADDRESS_ROUTE_KEY,\n SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY,\n SIGN_USER_TRANSACTION_ROUTE_KEY,\n SUBMIT_TENANT_TRANSACTION_ROUTE_KEY,\n} from \"./api-key-route-keys\";\nimport {\n AcceptClaimOffersRequestBodySchema,\n AcceptClaimOffersResponseSchema,\n} from \"./claim-offers\";\nimport { SignTransactionResponseSchema } from \"./signing-responses\";\nimport { SubmitTenantTransactionResponseSchema } from \"./submission-responses\";\nimport {\n SignTenantTransactionRequestBodySchema,\n SubmitTenantTransactionRequestBodySchema,\n} from \"./transaction-inputs\";\n\nexport const apiKeyWalletCustodyApiClientRoutes = {\n \"get-user-address\": defineClientRoute({\n name: \"get-user-address\",\n method: \"GET\",\n routeKey: GET_USER_ADDRESS_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/users/${subject}/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n \"get-integrator-address\": defineClientRoute({\n name: \"get-integrator-address\",\n method: \"GET\",\n routeKey: GET_INTEGRATOR_ADDRESS_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/integrators/${subject}/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n \"sign-user-transaction\": defineClientRoute({\n name: \"sign-user-transaction\",\n method: \"POST\",\n routeKey: SIGN_USER_TRANSACTION_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/users/${subject}/signatures`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n requestBodySchema: SignTenantTransactionRequestBodySchema,\n responseBodySchema: SignTransactionResponseSchema,\n }),\n \"sign-integrator-transaction\": defineClientRoute({\n name: \"sign-integrator-transaction\",\n method: \"POST\",\n routeKey: SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/integrators/${subject}/signatures`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n requestBodySchema: SignTenantTransactionRequestBodySchema,\n responseBodySchema: SignTransactionResponseSchema,\n }),\n \"submit-tenant-transaction\": defineClientRoute({\n name: \"submit-tenant-transaction\",\n method: \"POST\",\n routeKey: SUBMIT_TENANT_TRANSACTION_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/transactions/submissions`,\n headersSchema: ApiKeyHeadersSchema,\n requestBodySchema: SubmitTenantTransactionRequestBodySchema,\n responseBodySchema: SubmitTenantTransactionResponseSchema,\n }),\n \"accept-claim-offers\": defineClientRoute({\n name: \"accept-claim-offers\",\n method: \"POST\",\n routeKey: ACCEPT_CLAIM_OFFERS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) => `${baseApiUrl}/claim_wallets`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n requestBodySchema: AcceptClaimOffersRequestBodySchema,\n responseBodySchema: AcceptClaimOffersResponseSchema,\n }),\n \"get-fee-payer-address\": defineClientRoute({\n name: \"get-fee-payer-address\",\n method: \"GET\",\n routeKey: GET_FEE_PAYER_ADDRESS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/wallets/fee-payer/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n \"get-protocol-authority-address\": defineClientRoute({\n name: \"get-protocol-authority-address\",\n method: \"GET\",\n routeKey: GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/wallets/protocol-authority/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n};\n","import type {\n ClientRouteMap,\n ClientRouteRequest,\n RouteRequestField,\n RouteRequestHeader,\n} from \"../routes/client-request-types\";\nimport type { AnyClientRoute } from \"../routes/define-client-route\";\nimport { executeClientRoute } from \"../routes/execute-client-route\";\nimport { WalletCustodyApiError } from \"./http-error\";\n\nexport type FetchWalletCustodyApiRequest<\n TRoutes extends ClientRouteMap,\n TRouteName extends keyof TRoutes,\n> = ClientRouteRequest<TRoutes, TRouteName> &\n RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<TRoutes[TRouteName], \"idempotency-key\">\n >;\n\nexport function executeWalletCustodyRoute<TRoute extends AnyClientRoute>(\n request: Omit<\n Parameters<typeof executeClientRoute<TRoute>>[0],\n \"createError\"\n >,\n) {\n return executeClientRoute({\n ...request,\n createError: (failure) => new WalletCustodyApiError(failure),\n } satisfies Parameters<typeof executeClientRoute<TRoute>>[0]);\n}\n","import { apiKeyWalletCustodyApiClientRoutes } from \"@kyd-labs/tdp-schemas/wallet-custody/api-key-routes\";\nimport type {\n RouteNamesRequiringHeader,\n RouteResponseBody,\n} from \"../routes/client-request-types\";\nimport {\n executeWalletCustodyRoute,\n type FetchWalletCustodyApiRequest,\n} from \"./execute-wallet-custody-route\";\nimport type { walletCustodyApiClientRoutes } from \"./routes\";\n\nexport type WalletCustodyApiClient = ReturnType<\n typeof createWalletCustodyApiClient\n>;\n\n/** Client for claim routes authorized by an API key. */\nexport function createWalletCustodyApiClient({\n baseApiUrl,\n apiKey,\n fetchImpl = fetch,\n headers,\n}: {\n baseApiUrl: string;\n apiKey: string | (() => Promise<string>);\n fetchImpl?: typeof fetch;\n headers?: HeadersInit;\n}) {\n return async function fetchWalletCustodyApi<\n TRouteName extends ApiKeyWalletCustodyApiRouteName,\n >(\n {\n route,\n pathParams,\n body,\n idempotencyKey,\n }: FetchWalletCustodyApiRequest<ApiKeyWalletCustodyApiRoutes, TRouteName>,\n { signal }: Pick<RequestInit, \"signal\"> = {},\n ): Promise<RouteResponseBody<RouteForName<TRouteName>>> {\n return executeWalletCustodyRoute({\n baseApiUrl,\n fetchImpl,\n headers,\n signal,\n routeName: route,\n route: apiKeyWalletCustodyApiClientRoutes[route],\n pathParams,\n body,\n routeHeadersInput: {\n \"x-api-key\": typeof apiKey === \"string\" ? apiKey : await apiKey(),\n \"idempotency-key\": idempotencyKey,\n },\n }) as Promise<RouteResponseBody<RouteForName<TRouteName>>>;\n };\n}\n\n// -------------------------------------- Route helper types ---------------------------------------\nexport type WalletCustodyApiRoutes = typeof walletCustodyApiClientRoutes;\nexport type ApiKeyWalletCustodyApiRoutes =\n typeof apiKeyWalletCustodyApiClientRoutes;\ntype ApiKeyWalletCustodyApiRouteName = RouteNamesRequiringHeader<\n ApiKeyWalletCustodyApiRoutes,\n \"x-api-key\"\n>;\ntype RouteForName<TRouteName extends ApiKeyWalletCustodyApiRouteName> =\n ApiKeyWalletCustodyApiRoutes[TRouteName];\n","import type {\n RouteRequestBody,\n RouteRequestField,\n RouteRequestHeader,\n} from \"../routes/client-request-types\";\nimport type {\n ApiKeyWalletCustodyApiRoutes,\n WalletCustodyApiClient,\n} from \"./api-client\";\n\ntype AcceptOffersRoute = ApiKeyWalletCustodyApiRoutes[\"accept-claim-offers\"];\n\nexport function createClaimWalletsClient(\n walletCustodyApi: WalletCustodyApiClient,\n) {\n return {\n acceptOffers(\n {\n idempotencyKey,\n body,\n }: RouteRequestField<\"body\", RouteRequestBody<AcceptOffersRoute>> &\n RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<AcceptOffersRoute, \"idempotency-key\">\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"accept-claim-offers\",\n body,\n idempotencyKey,\n },\n options,\n );\n },\n };\n}\n","import type {\n RoutePathParams,\n RouteRequestBody,\n RouteRequestField,\n RouteRequestHeader,\n} from \"../routes/client-request-types\";\nimport type {\n ApiKeyWalletCustodyApiRoutes,\n WalletCustodyApiClient,\n} from \"./api-client\";\n\ntype SignTransactionInput<\n TRoute extends \"sign-user-transaction\" | \"sign-integrator-transaction\",\n> = RoutePathParams<ApiKeyWalletCustodyApiRoutes[TRoute]> &\n RouteRequestField<\n \"body\",\n RouteRequestBody<ApiKeyWalletCustodyApiRoutes[TRoute]>\n > &\n RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<ApiKeyWalletCustodyApiRoutes[TRoute], \"idempotency-key\">\n >;\n\nexport function createTransactionsClient(\n walletCustodyApi: WalletCustodyApiClient,\n) {\n return {\n signUser(\n {\n subject,\n idempotencyKey,\n body,\n }: SignTransactionInput<\"sign-user-transaction\">,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"sign-user-transaction\",\n pathParams: { subject },\n body,\n idempotencyKey,\n },\n options,\n );\n },\n signIntegrator(\n {\n subject,\n idempotencyKey,\n body,\n }: SignTransactionInput<\"sign-integrator-transaction\">,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"sign-integrator-transaction\",\n pathParams: { subject },\n body,\n idempotencyKey,\n },\n options,\n );\n },\n submit(\n {\n body,\n }: RouteRequestField<\n \"body\",\n RouteRequestBody<\n ApiKeyWalletCustodyApiRoutes[\"submit-tenant-transaction\"]\n >\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"submit-tenant-transaction\",\n body,\n },\n options,\n );\n },\n };\n}\n","import type { RoutePathParams } from \"../routes/client-request-types\";\nimport type {\n ApiKeyWalletCustodyApiRoutes,\n WalletCustodyApiClient,\n} from \"./api-client\";\n\nexport function createWalletClient(walletCustodyApi: WalletCustodyApiClient) {\n return {\n getUserAddress(\n pathParams: RoutePathParams<\n ApiKeyWalletCustodyApiRoutes[\"get-user-address\"]\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"get-user-address\",\n pathParams,\n },\n options,\n );\n },\n getIntegratorAddress(\n pathParams: RoutePathParams<\n ApiKeyWalletCustodyApiRoutes[\"get-integrator-address\"]\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"get-integrator-address\",\n pathParams,\n },\n options,\n );\n },\n getFeePayerAddress(options?: Pick<RequestInit, \"signal\">) {\n return walletCustodyApi(\n {\n route: \"get-fee-payer-address\",\n },\n options,\n );\n },\n getProtocolAuthorityAddress(options?: Pick<RequestInit, \"signal\">) {\n return walletCustodyApi(\n {\n route: \"get-protocol-authority-address\",\n },\n options,\n );\n },\n };\n}\n","import { createSolanaClient } from \"./solana-data-api/create-solana-client\";\nimport { createTixApiClient } from \"./tix-api/api-client\";\nimport { createIndexerClient } from \"./tix-indexer-api/create-indexer-client\";\nimport { createWalletCustodyApiClient } from \"./wallet-custody/api-client\";\nimport { createClaimWalletsClient } from \"./wallet-custody/create-claim-wallets-client\";\nimport { createTransactionsClient } from \"./wallet-custody/create-transactions-client\";\nimport { createWalletClient } from \"./wallet-custody/create-wallet-client\";\n\nexport type * from \"./types/index\";\n\nexport type TdpClientOptions = Parameters<typeof createTixApiClient>[0];\nexport type TdpClient = ReturnType<typeof createTdpClient>;\n\nexport function createTdpClient(options: TdpClientOptions) {\n const tixApi = createTixApiClient(options);\n const walletCustodyApi = createWalletCustodyApiClient(options);\n return {\n solana: createSolanaClient(tixApi),\n indexer: createIndexerClient(tixApi),\n wallets: createWalletClient(walletCustodyApi),\n transactions: createTransactionsClient(walletCustodyApi),\n claimWallets: createClaimWalletsClient(walletCustodyApi),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,mBAAmB,QAAsB;AACvD,SAAO;AAAA,IACL,SACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,WACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,UACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,kBAAkB,SAAuC;AACvD,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,cACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AC9CO,IAAM,qCACX;AAEK,IAAM,4BAA4B;AAAA,EACvC,GAAG;AAAA,EACH,4BAA4B,kBAAkB;AAAA,IAC5C,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,WAAW,CAAC,EAAE,aAAa,IAAI,QAAQ,MACrC,GAAG,UAAU,WAAW,OAAO;AAAA,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,IAC5C,cAAc,yBAAyB,gBAAgB;AAAA,IACvD,cAAc,yBAAyB,gBAAgB;AAAA,EACzD;AACF;","names":["responseBodySchemaByRouteKey"]}
|
|
1
|
+
{"version":3,"sources":["../src/solana-data-api/create-solana-client.ts","../../tdp-schemas/src/tix-indexer-api/routes.ts","../src/routes/create-tdp-api-error-from-route-failure.ts","../src/routes/execute-client-route.ts","../src/utils/join-url-segments.ts","../src/utils/read-response-payload.ts","../src/tix-api/create-tix-api-client.ts","../src/tix-api/api-client.ts","../src/tix-indexer-api/create-indexer-client.ts","../../tdp-schemas/src/wallet-custody/api-key-route-keys.ts","../../tdp-schemas/src/wallet-custody/api-key-routes.ts","../src/wallet-custody/execute-wallet-custody-route.ts","../src/wallet-custody/api-client.ts","../src/wallet-custody/create-claim-wallets-client.ts","../src/wallet-custody/resolve-claim-offer.ts","../src/wallet-custody/const.ts","../src/wallet-custody/create-transactions-client.ts","../src/wallet-custody/create-wallet-client.ts","../src/index.ts"],"sourcesContent":["import type { RoutePathParams } from \"../routes/client-request-types\";\nimport type { TixApiClient, TixApiRoutes } from \"../tix-api/api-client\";\n\nexport function createSolanaClient(tixApi: TixApiClient) {\n return {\n getEvent(\n pathParams: RoutePathParams<TixApiRoutes[\"get-event-account\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-event-account\",\n pathParams,\n },\n options,\n );\n },\n getListing(\n pathParams: RoutePathParams<TixApiRoutes[\"get-listing-account\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-listing-account\",\n pathParams,\n },\n options,\n );\n },\n getPermit(\n pathParams: RoutePathParams<TixApiRoutes[\"get-permit\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-permit\",\n pathParams,\n },\n options,\n );\n },\n getProtocolConfig(options?: Pick<RequestInit, \"signal\">) {\n return tixApi(\n {\n route: \"get-protocol-config-account\",\n },\n options,\n );\n },\n getIntegrator(\n pathParams: RoutePathParams<TixApiRoutes[\"get-integrator-account\"]>,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-integrator-account\",\n pathParams,\n },\n options,\n );\n },\n };\n}\n","import type { z } from \"zod\";\nimport { defineClientRoute } from \"../routes/define-client-route\";\nimport { ApiKeyHeadersSchema } from \"../routes/request-schemas\";\nimport { EventPathParametersSchema } from \"../tix-api/path-params\";\nimport {\n PostIntegratorMetadataRequestBodySchema,\n PostTixIndexerIntegratorMetadataResultSchema,\n} from \"./metadata\";\nimport { tixIndexerReadApiClientRoutes } from \"./read-routes\";\n\nexport { PostIntegratorMetadataRequestBodySchema } from \"./metadata\";\nexport {\n ActiveListingsQuerySchema,\n GET_ACTIVE_LISTINGS_ROUTE_KEY,\n GET_UPCOMING_EVENTS_ROUTE_KEY,\n LimitCursorQuerySchema,\n} from \"./read-routes\";\nexport const POST_INTEGRATOR_METADATA_ROUTE_KEY =\n \"POST /events/{eventId}/metadata\";\n\nexport const tixIndexerApiClientRoutes = {\n ...tixIndexerReadApiClientRoutes,\n \"post-integrator-metadata\": defineClientRoute({\n name: \"post-integrator-metadata\",\n method: \"POST\" as const,\n routeKey: POST_INTEGRATOR_METADATA_ROUTE_KEY,\n pathParamsSchema: EventPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", eventId }) =>\n `${baseApiUrl}/events/${eventId}/metadata`,\n headersSchema: ApiKeyHeadersSchema,\n requestBodySchema: PostIntegratorMetadataRequestBodySchema,\n responseBodySchema: PostTixIndexerIntegratorMetadataResultSchema,\n }),\n} as const satisfies Record<string, unknown>;\n\nexport const responseBodySchemaByRouteKey = Object.fromEntries(\n Object.values(tixIndexerApiClientRoutes).map(\n (route) => [route.routeKey, route.responseBodySchema] as const,\n ),\n) as Record<string, z.ZodType<Record<string, unknown>>>;\n","import {\n TdpApiError,\n TdpResponseValidationError,\n} from \"../wallet-custody/http-error\";\nimport type { ClientRouteFailure } from \"./execute-client-route\";\n\nexport function createTdpApiErrorFromRouteFailure(failure: ClientRouteFailure) {\n return failure.kind === \"response-validation\"\n ? new TdpResponseValidationError(failure)\n : new TdpApiError(failure);\n}\n","import { z } from \"zod\";\nimport { joinUrlSegments } from \"../utils/join-url-segments\";\nimport { readResponsePayload } from \"../utils/read-response-payload\";\nimport type { AnyClientRoute } from \"./define-client-route\";\n\nexport type ClientRouteFailure = {\n kind: \"http-status\" | \"response-validation\";\n route: string;\n method: string;\n path: string;\n status: number;\n statusText: string;\n payload: unknown;\n code?: string;\n requestId?: string;\n validationError?: z.ZodError;\n};\n\nconst ErrorBodyCodeSchema = z.object({ code: z.string() });\n\n/** Builds the URL, headers, and body for a route, sends it, and parses the response through the route's schema. */\nexport async function executeClientRoute<TRoute extends AnyClientRoute>({\n baseApiUrl,\n fetchImpl,\n headers,\n signal,\n routeName,\n route,\n pathParams,\n queryParams,\n body,\n routeHeadersInput,\n createError,\n}: {\n baseApiUrl: string;\n fetchImpl: typeof fetch;\n headers?: HeadersInit;\n signal?: RequestInit[\"signal\"];\n routeName: string;\n route: TRoute;\n pathParams: unknown;\n queryParams?: unknown;\n body: unknown;\n routeHeadersInput: Record<string, string | undefined>;\n createError: (failure: ClientRouteFailure) => Error;\n}): Promise<z.output<TRoute[\"responseBodySchema\"]>> {\n // TS can't reconcile the route's output types with input types, hence the `as never` clauses.\n const path = route.buildPath(pathParams as never);\n const routeHeaders = route.buildHeaders(routeHeadersInput as never);\n const url =\n joinUrlSegments(baseApiUrl, path) +\n (queryParams === undefined\n ? \"\"\n : route.buildQueryString(queryParams as never));\n\n const requestHeaders = new Headers(headers);\n requestHeaders.set(\"content-type\", \"application/json\");\n new Headers(routeHeaders as HeadersInit).forEach((value, name) => {\n requestHeaders.set(name, value);\n });\n const response = await fetchImpl(url, {\n method: route.method,\n ...(signal === undefined ? {} : { signal }),\n headers: Object.fromEntries(requestHeaders),\n body:\n body === undefined ? undefined : route.buildJsonPayload(body as never),\n });\n const payload = await readResponsePayload(response);\n const failure = {\n route: routeName,\n method: route.method,\n path,\n status: response.status,\n statusText: response.statusText,\n payload,\n requestId: response.headers.get(\"apigw-requestid\") ?? undefined,\n };\n if (!response.ok) {\n throw createError({\n kind: \"http-status\",\n ...failure,\n code: ErrorBodyCodeSchema.safeParse(payload).data?.code,\n });\n }\n\n const parsed = route.responseBodySchema.safeParse(payload);\n if (!parsed.success) {\n throw createError({\n kind: \"response-validation\",\n ...failure,\n validationError: parsed.error,\n });\n }\n return parsed.data as z.output<TRoute[\"responseBodySchema\"]>;\n}\n","/**\n * Joins URL segments with one slash; i.e., remove repeated slashes.\n */\nexport function joinUrlSegments(baseUrl: string, path: string): string {\n return `${baseUrl.replace(/\\/+$/, \"\")}/${path.replace(/^\\/+/, \"\")}`;\n}\n","/**\n * Reads the body without letting an empty or non-JSON payload mask the HTTP status.\n **/\nexport async function readResponsePayload(\n response: Response,\n): Promise<unknown> {\n const rawBody = await response.text();\n if (rawBody.length === 0) return undefined;\n try {\n return JSON.parse(rawBody);\n } catch {\n return rawBody;\n }\n}\n","import type {\n ClientRouteMap,\n ClientRouteRequest,\n RouteQueryParams,\n RouteRequestField,\n RouteResponseBody,\n} from \"../routes/client-request-types\";\nimport { createTdpApiErrorFromRouteFailure } from \"../routes/create-tdp-api-error-from-route-failure\";\nimport { executeClientRoute } from \"../routes/execute-client-route\";\nimport { solanaDataApiClientRoutes } from \"../solana-data-api/routes\";\n\n/** Both APIs are mapped onto one domain under these keys. */\nexport const SOLANA_DATA_API_PATH_PREFIX = \"solana\";\nexport const TIX_INDEXER_API_PATH_PREFIX = \"tix-indexer\";\n\n/** The request for a route. No caller-settable `headers`: the client injects them itself. */\ntype FetchTixApiRequest<\n TRoutes extends ClientRouteMap,\n TRouteName extends keyof TRoutes,\n> = ClientRouteRequest<TRoutes, TRouteName> &\n RouteRequestField<\"queryParams\", RouteQueryParams<TRoutes[TRouteName]>>;\n\nexport function createTixApiClientForRoutes<TRoutes extends ClientRouteMap>({\n routes,\n baseApiUrl,\n apiKey,\n fetchImpl = fetch,\n headers,\n additionalHeaders,\n}: {\n routes: TRoutes;\n baseApiUrl: string;\n apiKey: string | (() => Promise<string>);\n fetchImpl?: typeof fetch;\n headers?: HeadersInit;\n additionalHeaders?: Parameters<\n typeof executeClientRoute\n >[0][\"routeHeadersInput\"];\n}) {\n return async function fetchTixApi<TRouteName extends keyof TRoutes & string>(\n {\n route,\n pathParams,\n queryParams,\n body,\n }: FetchTixApiRequest<TRoutes, TRouteName>,\n { signal }: Pick<RequestInit, \"signal\"> = {},\n ): Promise<RouteResponseBody<TRoutes[TRouteName]>> {\n const prefix =\n route in solanaDataApiClientRoutes\n ? SOLANA_DATA_API_PATH_PREFIX\n : TIX_INDEXER_API_PATH_PREFIX;\n return executeClientRoute({\n baseApiUrl: `${baseApiUrl}/${prefix}`,\n fetchImpl,\n headers,\n signal,\n routeName: route,\n route: routes[route],\n pathParams,\n queryParams,\n body,\n routeHeadersInput: {\n \"x-api-key\": typeof apiKey === \"string\" ? apiKey : await apiKey(),\n ...additionalHeaders,\n },\n createError: createTdpApiErrorFromRouteFailure,\n }) as Promise<RouteResponseBody<TRoutes[TRouteName]>>;\n };\n}\n","import { solanaDataApiClientRoutes } from \"../solana-data-api/routes\";\nimport { tixIndexerApiClientRoutes } from \"../tix-indexer-api/routes\";\nimport { createTixApiClientForRoutes } from \"./create-tix-api-client\";\n\nexport {\n SOLANA_DATA_API_PATH_PREFIX,\n TIX_INDEXER_API_PATH_PREFIX,\n} from \"./create-tix-api-client\";\n\nexport const tixApiClientRoutes = {\n ...solanaDataApiClientRoutes,\n ...tixIndexerApiClientRoutes,\n} as const;\n\nexport type TixApiRoutes = typeof tixApiClientRoutes;\nexport type TixApiClient = ReturnType<typeof createTixApiClient>;\n\nexport function createTixApiClient({\n baseApiUrl,\n apiKey,\n fetchImpl = fetch,\n headers,\n}: {\n baseApiUrl: string;\n apiKey: string | (() => Promise<string>);\n fetchImpl?: typeof fetch;\n /**\n * Additional request headers. SDK-managed headers take precedence.\n * Cross-origin browser requests require server CORS support for custom headers.\n */\n headers?: HeadersInit;\n}) {\n return createTixApiClientForRoutes({\n routes: tixApiClientRoutes,\n baseApiUrl,\n apiKey,\n fetchImpl,\n headers,\n });\n}\n","import type {\n ClientRouteRequest,\n RouteQueryParams,\n} from \"../routes/client-request-types\";\nimport type { TixApiClient, TixApiRoutes } from \"../tix-api/api-client\";\n\ntype MetadataRequest = ClientRouteRequest<\n TixApiRoutes,\n \"post-integrator-metadata\"\n>;\n/** The route schemas coerce `limit` from a query string, which leaves its input type as `unknown`. */\ntype WithNumericLimit<TQuery> = Omit<TQuery, \"limit\"> & { limit?: number };\ntype ActiveListingsQuery = WithNumericLimit<\n RouteQueryParams<TixApiRoutes[\"get-active-listings\"]>\n>;\ntype UpcomingEventsQuery = WithNumericLimit<\n RouteQueryParams<TixApiRoutes[\"get-upcoming-events\"]>\n>;\n\nexport function createIndexerClient(tixApi: TixApiClient) {\n return {\n listActiveListings(\n queryParams: ActiveListingsQuery,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-active-listings\",\n queryParams,\n },\n options,\n );\n },\n listUpcomingEvents(\n queryParams: UpcomingEventsQuery = {},\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"get-upcoming-events\",\n queryParams,\n },\n options,\n );\n },\n updateEventMetadata(\n {\n eventId,\n body,\n }: MetadataRequest[\"pathParams\"] & Pick<MetadataRequest, \"body\">,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return tixApi(\n {\n route: \"post-integrator-metadata\",\n pathParams: { eventId },\n body,\n },\n options,\n );\n },\n };\n}\n","export const GET_USER_ADDRESS_ROUTE_KEY =\n \"GET /wallets/users/{subject}/address\";\nexport const GET_INTEGRATOR_ADDRESS_ROUTE_KEY =\n \"GET /wallets/integrators/{subject}/address\";\nexport const SIGN_USER_TRANSACTION_ROUTE_KEY =\n \"POST /wallets/users/{subject}/signatures\";\nexport const SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY =\n \"POST /wallets/integrators/{subject}/signatures\";\nexport const SUBMIT_TENANT_TRANSACTION_ROUTE_KEY =\n \"POST /transactions/submissions\";\nexport const ACCEPT_CLAIM_OFFERS_ROUTE_KEY = \"POST /claim_wallets\";\nexport const GET_PURCHASE_STATUS_ROUTE_KEY =\n \"GET /claim_wallets/purchase-status\";\nexport const GET_FEE_PAYER_ADDRESS_ROUTE_KEY = \"GET /wallets/fee-payer/address\";\nexport const GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY =\n \"GET /wallets/protocol-authority/address\";\n","import { defineClientRoute } from \"../routes/define-client-route\";\nimport {\n ApiKeyHeadersSchema,\n IdempotencyKeyAndApiKeyHeadersSchema,\n NoPathParametersSchema,\n} from \"../routes/request-schemas\";\nimport {\n GetAddressResponseSchema,\n WalletPathParametersSchema,\n} from \"./addresses\";\nimport {\n ACCEPT_CLAIM_OFFERS_ROUTE_KEY,\n GET_FEE_PAYER_ADDRESS_ROUTE_KEY,\n GET_INTEGRATOR_ADDRESS_ROUTE_KEY,\n GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY,\n GET_PURCHASE_STATUS_ROUTE_KEY,\n GET_USER_ADDRESS_ROUTE_KEY,\n SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY,\n SIGN_USER_TRANSACTION_ROUTE_KEY,\n SUBMIT_TENANT_TRANSACTION_ROUTE_KEY,\n} from \"./api-key-route-keys\";\nimport {\n AcceptClaimOffersRequestBodySchema,\n AcceptClaimOffersResponseSchema,\n} from \"./claim-offers\";\nimport { GetPurchaseStatusResponseSchema } from \"./purchase-status\";\nimport { SignTransactionResponseSchema } from \"./signing-responses\";\nimport { SubmitTenantTransactionResponseSchema } from \"./submission-responses\";\nimport {\n SignTenantTransactionRequestBodySchema,\n SubmitTenantTransactionRequestBodySchema,\n} from \"./transaction-inputs\";\n\nexport const apiKeyWalletCustodyApiClientRoutes = {\n \"get-user-address\": defineClientRoute({\n name: \"get-user-address\",\n method: \"GET\",\n routeKey: GET_USER_ADDRESS_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/users/${subject}/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n \"get-integrator-address\": defineClientRoute({\n name: \"get-integrator-address\",\n method: \"GET\",\n routeKey: GET_INTEGRATOR_ADDRESS_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/integrators/${subject}/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n \"sign-user-transaction\": defineClientRoute({\n name: \"sign-user-transaction\",\n method: \"POST\",\n routeKey: SIGN_USER_TRANSACTION_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/users/${subject}/signatures`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n requestBodySchema: SignTenantTransactionRequestBodySchema,\n responseBodySchema: SignTransactionResponseSchema,\n }),\n \"sign-integrator-transaction\": defineClientRoute({\n name: \"sign-integrator-transaction\",\n method: \"POST\",\n routeKey: SIGN_INTEGRATOR_TRANSACTION_ROUTE_KEY,\n pathParamsSchema: WalletPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\", subject }) =>\n `${baseApiUrl}/wallets/integrators/${subject}/signatures`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n requestBodySchema: SignTenantTransactionRequestBodySchema,\n responseBodySchema: SignTransactionResponseSchema,\n }),\n \"submit-tenant-transaction\": defineClientRoute({\n name: \"submit-tenant-transaction\",\n method: \"POST\",\n routeKey: SUBMIT_TENANT_TRANSACTION_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/transactions/submissions`,\n headersSchema: ApiKeyHeadersSchema,\n requestBodySchema: SubmitTenantTransactionRequestBodySchema,\n responseBodySchema: SubmitTenantTransactionResponseSchema,\n }),\n \"get-purchase-status\": defineClientRoute({\n name: \"get-purchase-status\",\n method: \"GET\",\n routeKey: GET_PURCHASE_STATUS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/claim_wallets/purchase-status`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n responseBodySchema: GetPurchaseStatusResponseSchema,\n }),\n \"accept-claim-offers\": defineClientRoute({\n name: \"accept-claim-offers\",\n method: \"POST\",\n routeKey: ACCEPT_CLAIM_OFFERS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) => `${baseApiUrl}/claim_wallets`,\n headersSchema: IdempotencyKeyAndApiKeyHeadersSchema,\n requestBodySchema: AcceptClaimOffersRequestBodySchema,\n responseBodySchema: AcceptClaimOffersResponseSchema,\n }),\n \"get-fee-payer-address\": defineClientRoute({\n name: \"get-fee-payer-address\",\n method: \"GET\",\n routeKey: GET_FEE_PAYER_ADDRESS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/wallets/fee-payer/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n \"get-protocol-authority-address\": defineClientRoute({\n name: \"get-protocol-authority-address\",\n method: \"GET\",\n routeKey: GET_PROTOCOL_AUTHORITY_ADDRESS_ROUTE_KEY,\n pathParamsSchema: NoPathParametersSchema,\n buildPath: ({ baseApiUrl = \"\" }) =>\n `${baseApiUrl}/wallets/protocol-authority/address`,\n headersSchema: ApiKeyHeadersSchema,\n responseBodySchema: GetAddressResponseSchema,\n }),\n};\n","import type {\n ClientRouteMap,\n ClientRouteRequest,\n RouteRequestField,\n RouteRequestHeader,\n} from \"../routes/client-request-types\";\nimport { createTdpApiErrorFromRouteFailure } from \"../routes/create-tdp-api-error-from-route-failure\";\nimport type { AnyClientRoute } from \"../routes/define-client-route\";\nimport { executeClientRoute } from \"../routes/execute-client-route\";\n\nexport type FetchWalletCustodyApiRequest<\n TRoutes extends ClientRouteMap,\n TRouteName extends keyof TRoutes,\n> = ClientRouteRequest<TRoutes, TRouteName> &\n RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<TRoutes[TRouteName], \"idempotency-key\">\n >;\n\nexport function executeWalletCustodyRoute<TRoute extends AnyClientRoute>(\n request: Omit<\n Parameters<typeof executeClientRoute<TRoute>>[0],\n \"createError\"\n >,\n) {\n return executeClientRoute({\n ...request,\n createError: createTdpApiErrorFromRouteFailure,\n } satisfies Parameters<typeof executeClientRoute<TRoute>>[0]);\n}\n","import { apiKeyWalletCustodyApiClientRoutes } from \"@kyd-labs/tdp-schemas/wallet-custody/api-key-routes\";\nimport type {\n RouteNamesRequiringHeader,\n RouteResponseBody,\n} from \"../routes/client-request-types\";\nimport {\n executeWalletCustodyRoute,\n type FetchWalletCustodyApiRequest,\n} from \"./execute-wallet-custody-route\";\nimport type { walletCustodyApiClientRoutes } from \"./routes\";\n\nexport type WalletCustodyApiClient = ReturnType<\n typeof createWalletCustodyApiClient\n>;\n\n/** Client for claim routes authorized by an API key. */\nexport function createWalletCustodyApiClient({\n baseApiUrl,\n apiKey,\n fetchImpl = fetch,\n headers,\n}: {\n baseApiUrl: string;\n apiKey: string | (() => Promise<string>);\n fetchImpl?: typeof fetch;\n headers?: HeadersInit;\n}) {\n return async function fetchWalletCustodyApi<\n TRouteName extends ApiKeyWalletCustodyApiRouteName,\n >(\n {\n route,\n pathParams,\n body,\n idempotencyKey,\n }: FetchWalletCustodyApiRequest<ApiKeyWalletCustodyApiRoutes, TRouteName>,\n { signal }: Pick<RequestInit, \"signal\"> = {},\n ): Promise<RouteResponseBody<RouteForName<TRouteName>>> {\n return executeWalletCustodyRoute({\n baseApiUrl,\n fetchImpl,\n headers,\n signal,\n routeName: route,\n route: apiKeyWalletCustodyApiClientRoutes[route],\n pathParams,\n body,\n routeHeadersInput: {\n \"x-api-key\": typeof apiKey === \"string\" ? apiKey : await apiKey(),\n \"idempotency-key\": idempotencyKey,\n },\n }) as Promise<RouteResponseBody<RouteForName<TRouteName>>>;\n };\n}\n\n// -------------------------------------- Route helper types ---------------------------------------\nexport type WalletCustodyApiRoutes = typeof walletCustodyApiClientRoutes;\nexport type ApiKeyWalletCustodyApiRoutes =\n typeof apiKeyWalletCustodyApiClientRoutes;\ntype ApiKeyWalletCustodyApiRouteName = RouteNamesRequiringHeader<\n ApiKeyWalletCustodyApiRoutes,\n \"x-api-key\"\n>;\ntype RouteForName<TRouteName extends ApiKeyWalletCustodyApiRouteName> =\n ApiKeyWalletCustodyApiRoutes[TRouteName];\n","import { TicketPathParametersSchema } from \"@kyd-labs/tdp-schemas/tix-api/path-params\";\nimport { AcceptClaimOffersRequestBodySchema } from \"@kyd-labs/tdp-schemas/wallet-custody/claim-offers\";\nimport { MAX_PERMITS_PER_CLAIM_WALLET } from \"@kyd-labs/tdp-schemas/wallet-custody/const\";\nimport { requireUniquePermitKeys } from \"@kyd-labs/tix-wire-schema/instructions\";\nimport { z } from \"zod\";\nimport type {\n RouteRequestField,\n RouteRequestHeader,\n} from \"../routes/client-request-types\";\nimport type { createSolanaClient } from \"../solana-data-api/create-solana-client\";\nimport type {\n ApiKeyWalletCustodyApiRoutes,\n WalletCustodyApiClient,\n} from \"./api-client\";\nimport { resolveClaimOffer } from \"./resolve-claim-offer\";\n\ntype AcceptOffersRoute = ApiKeyWalletCustodyApiRoutes[\"accept-claim-offers\"];\n\nconst AcceptOffersBodySchema = AcceptClaimOffersRequestBodySchema.extend({\n offers: z\n .array(TicketPathParametersSchema)\n .min(1)\n .max(MAX_PERMITS_PER_CLAIM_WALLET)\n .superRefine(requireUniquePermitKeys),\n});\n\nexport function createClaimWalletsClient(\n walletCustodyApi: WalletCustodyApiClient,\n solana: ReturnType<typeof createSolanaClient>,\n) {\n return {\n getPurchaseStatus(\n {\n idempotencyKey,\n }: RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<\n ApiKeyWalletCustodyApiRoutes[\"get-purchase-status\"],\n \"idempotency-key\"\n >\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n { route: \"get-purchase-status\", idempotencyKey },\n options,\n );\n },\n async acceptOffers(\n {\n idempotencyKey,\n body,\n }: RouteRequestField<\"body\", z.input<typeof AcceptOffersBodySchema>> &\n RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<AcceptOffersRoute, \"idempotency-key\">\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n const parsedBody = AcceptOffersBodySchema.parse(body);\n const protocol = await solana.getProtocolConfig(options);\n const events = new Map<string, ReturnType<typeof solana.getEvent>>();\n const offers = await Promise.all(\n parsedBody.offers.map((ticket) => {\n const eventId = String(ticket.eventId);\n const event =\n events.get(eventId) ?? solana.getEvent({ eventId }, options);\n events.set(eventId, event);\n return resolveClaimOffer(solana, ticket, protocol, event, options);\n }),\n );\n return walletCustodyApi(\n {\n route: \"accept-claim-offers\",\n body: { ...parsedBody, offers },\n idempotencyKey,\n },\n options,\n );\n },\n };\n}\n","import type { createSolanaClient } from \"../solana-data-api/create-solana-client\";\n\ntype SolanaClient = ReturnType<typeof createSolanaClient>;\n\n/** Resolves a ticket selection into the existing claim-purchase offer payload. */\nexport async function resolveClaimOffer(\n solana: SolanaClient,\n ticket: Parameters<SolanaClient[\"getListing\"]>[0],\n protocol: Awaited<ReturnType<SolanaClient[\"getProtocolConfig\"]>>,\n eventResponse: ReturnType<SolanaClient[\"getEvent\"]>,\n options?: Pick<RequestInit, \"signal\">,\n) {\n const [listing, event, permit] = await Promise.all([\n solana.getListing(ticket, options),\n eventResponse,\n solana.getPermit(ticket, options),\n ]);\n return {\n event_id: listing.event_id,\n ticket_id: listing.ticket_id,\n permit_version: listing.permit_version,\n seller_payout: listing.payout_ata,\n royalty_destinations:\n event.royalty_recipients_count > 0\n ? event.royalty_recipients\n .slice(0, event.royalty_recipients_count)\n .map(({ destination }) => destination)\n : [protocol.default_royalty_vault],\n ticket_type_config: permit.ticket_type_config,\n usdc_mint: protocol.usdc_mint,\n };\n}\n","export { MAX_PERMITS_PER_CLAIM_WALLET } from \"@kyd-labs/tdp-schemas/wallet-custody/const\";\n\nexport const INTEGRATOR_PRIMARY_ADDRESS_SUBJECT = \"PRIMARY_ADDRESS\";\n","import type {\n RoutePathParams,\n RouteRequestBody,\n RouteRequestField,\n RouteRequestHeader,\n} from \"../routes/client-request-types\";\nimport type {\n ApiKeyWalletCustodyApiRoutes,\n WalletCustodyApiClient,\n} from \"./api-client\";\nimport { INTEGRATOR_PRIMARY_ADDRESS_SUBJECT } from \"./const\";\n\ntype SignTransactionInput<\n TRoute extends \"sign-user-transaction\" | \"sign-integrator-transaction\",\n> = Partial<RoutePathParams<ApiKeyWalletCustodyApiRoutes[TRoute]>> &\n RouteRequestField<\n \"body\",\n RouteRequestBody<ApiKeyWalletCustodyApiRoutes[TRoute]>\n > &\n RouteRequestField<\n \"idempotencyKey\",\n RouteRequestHeader<ApiKeyWalletCustodyApiRoutes[TRoute], \"idempotency-key\">\n >;\n\nexport function createTransactionsClient(\n walletCustodyApi: WalletCustodyApiClient,\n) {\n return {\n /** A `subject` is not necessary. */\n signIntegrator(\n {\n subject = INTEGRATOR_PRIMARY_ADDRESS_SUBJECT,\n idempotencyKey,\n body,\n }: SignTransactionInput<\"sign-integrator-transaction\">,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"sign-integrator-transaction\",\n pathParams: { subject },\n body,\n idempotencyKey,\n },\n options,\n );\n },\n submit(\n {\n body,\n }: RouteRequestField<\n \"body\",\n RouteRequestBody<\n ApiKeyWalletCustodyApiRoutes[\"submit-tenant-transaction\"]\n >\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"submit-tenant-transaction\",\n body,\n },\n options,\n );\n },\n };\n}\n","import type { RoutePathParams } from \"../routes/client-request-types\";\nimport type {\n ApiKeyWalletCustodyApiRoutes,\n WalletCustodyApiClient,\n} from \"./api-client\";\nimport { INTEGRATOR_PRIMARY_ADDRESS_SUBJECT } from \"./const\";\n\nexport function createWalletClient(walletCustodyApi: WalletCustodyApiClient) {\n return {\n getUserAddress(\n pathParams: RoutePathParams<\n ApiKeyWalletCustodyApiRoutes[\"get-user-address\"]\n >,\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"get-user-address\",\n pathParams,\n },\n options,\n );\n },\n /** A `subject` is not necessary. */\n getIntegratorAddress(\n {\n subject = INTEGRATOR_PRIMARY_ADDRESS_SUBJECT,\n }: Partial<\n RoutePathParams<ApiKeyWalletCustodyApiRoutes[\"get-integrator-address\"]>\n > = {},\n options?: Pick<RequestInit, \"signal\">,\n ) {\n return walletCustodyApi(\n {\n route: \"get-integrator-address\",\n pathParams: { subject },\n },\n options,\n );\n },\n getFeePayerAddress(options?: Pick<RequestInit, \"signal\">) {\n return walletCustodyApi(\n {\n route: \"get-fee-payer-address\",\n },\n options,\n );\n },\n getProtocolAuthorityAddress(options?: Pick<RequestInit, \"signal\">) {\n return walletCustodyApi(\n {\n route: \"get-protocol-authority-address\",\n },\n options,\n );\n },\n };\n}\n","import { createSolanaClient } from \"./solana-data-api/create-solana-client\";\nimport { createTixApiClient } from \"./tix-api/api-client\";\nimport { createIndexerClient } from \"./tix-indexer-api/create-indexer-client\";\nimport { createWalletCustodyApiClient } from \"./wallet-custody/api-client\";\nimport { createClaimWalletsClient } from \"./wallet-custody/create-claim-wallets-client\";\nimport { createTransactionsClient } from \"./wallet-custody/create-transactions-client\";\nimport { createWalletClient } from \"./wallet-custody/create-wallet-client\";\n\nexport type * from \"./types/index\";\n\nexport type TdpClientOptions = Parameters<typeof createTixApiClient>[0];\nexport type TdpClient = ReturnType<typeof createTdpClient>;\n\nexport function createTdpClient(options: TdpClientOptions) {\n const tixApi = createTixApiClient(options);\n const walletCustodyApi = createWalletCustodyApiClient(options);\n const solana = createSolanaClient(tixApi);\n return {\n solana,\n indexer: createIndexerClient(tixApi),\n wallets: createWalletClient(walletCustodyApi),\n transactions: createTransactionsClient(walletCustodyApi),\n claimWallets: createClaimWalletsClient(walletCustodyApi, solana),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGO,SAAS,mBAAmB,QAAsB;AACvD,SAAO;AAAA,IACL,SACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,WACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,UACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,kBAAkB,SAAuC;AACvD,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,cACE,YACA,SACA;AACA,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,UACP;AAAA,QACF;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AC7CO,IAAM,qCACX;AAEK,IAAM,4BAA4B;AAAA,EACvC,GAAG;AAAA,EACH,4BAA4B,kBAAkB;AAAA,IAC5C,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,kBAAkB;AAAA,IAClB,WAAW,CAAC,EAAE,aAAa,IAAI,QAAQ,MACrC,GAAG,UAAU,WAAW,OAAO;AAAA,I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MACF;AAAA,IACF;AAAA,IACA,mBAAmB,SAAuC;AACxD,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,4BAA4B,SAAuC;AACjE,aAAO;AAAA,QACL;AAAA,UACE,OAAO;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AC5CO,SAAS,gBAAgB,SAA2B;AACzD,QAAM,SAAS,mBAAmB,OAAO;AACzC,QAAM,mBAAmB,6BAA6B,OAAO;AAC7D,QAAM,SAAS,mBAAmB,MAAM;AACxC,SAAO;AAAA,IACL;AAAA,IACA,SAAS,oBAAoB,MAAM;AAAA,IACnC,SAAS,mBAAmB,gBAAgB;AAAA,IAC5C,cAAc,yBAAyB,gBAAgB;AAAA,IACvD,cAAc,yBAAyB,kBAAkB,MAAM;AAAA,EACjE;AACF;","names":["responseBodySchemaByRouteKey","z","z"]}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -23,10 +23,10 @@ declare const AcceptClaimOffersSchema: z.ZodObject<{
|
|
|
23
23
|
event_id: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>;
|
|
24
24
|
ticket_id: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>;
|
|
25
25
|
permit_version: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>;
|
|
26
|
+
ticket_type_config: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>>>;
|
|
26
27
|
usdc_mint: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
27
28
|
seller_payout: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
28
29
|
royalty_destinations: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>>;
|
|
29
|
-
ticket_type_config: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>>>;
|
|
30
30
|
}, z.core.$strict>;
|
|
31
31
|
declare const AcceptClaimOffersRequestBodySchema: z.ZodObject<{
|
|
32
32
|
userSubject: z.ZodString;
|
|
@@ -35,10 +35,10 @@ declare const AcceptClaimOffersRequestBodySchema: z.ZodObject<{
|
|
|
35
35
|
event_id: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>;
|
|
36
36
|
ticket_id: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>;
|
|
37
37
|
permit_version: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>;
|
|
38
|
+
ticket_type_config: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>>>;
|
|
38
39
|
usdc_mint: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
39
40
|
seller_payout: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
40
41
|
royalty_destinations: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>>;
|
|
41
|
-
ticket_type_config: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>>>;
|
|
42
42
|
}, z.core.$strict>>;
|
|
43
43
|
}, z.core.$strip>;
|
|
44
44
|
declare const AcceptClaimOffersResponseSchema: z.ZodObject<{
|
|
@@ -57,6 +57,23 @@ declare const AcceptClaimOffersResponseSchema: z.ZodObject<{
|
|
|
57
57
|
}, z.core.$strip>;
|
|
58
58
|
type AcceptClaimOffersResponse = z.infer<typeof AcceptClaimOffersResponseSchema>;
|
|
59
59
|
|
|
60
|
+
declare const GetPurchaseStatusResponseSchema: z.ZodObject<{
|
|
61
|
+
custodialTransactionId: z.ZodPipe<z.ZodCustomStringFormat<"sha256_hex">, z.ZodTransform<Sha256Hex, string>>;
|
|
62
|
+
transactionSignature: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Signature, string>>;
|
|
63
|
+
status: z.ZodNullable<z.ZodEnum<{
|
|
64
|
+
processing: "processing";
|
|
65
|
+
confirmed: "confirmed";
|
|
66
|
+
landed_with_error: "landed_with_error";
|
|
67
|
+
expired: "expired";
|
|
68
|
+
}>>;
|
|
69
|
+
failureReason: z.ZodOptional<z.ZodString>;
|
|
70
|
+
claimWallet: z.ZodObject<{
|
|
71
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
72
|
+
claimWalletId: z.ZodPipe<z.ZodCustomStringFormat<"sha256_hex">, z.ZodTransform<Sha256Hex, string>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
type GetPurchaseStatusResponse = z.infer<typeof GetPurchaseStatusResponseSchema>;
|
|
76
|
+
|
|
60
77
|
declare const SignTransactionResponseSchema: z.ZodObject<{
|
|
61
78
|
custodialTransactionId: z.ZodPipe<z.ZodCustomStringFormat<"sha256_hex">, z.ZodTransform<Sha256Hex, string>>;
|
|
62
79
|
signerAddress: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
@@ -166,6 +183,7 @@ declare const PermitV1ResponseSchema: z.ZodObject<{
|
|
|
166
183
|
owner: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
167
184
|
status: z.ZodNumber;
|
|
168
185
|
ticket_type_id: z.ZodNumber;
|
|
186
|
+
ticket_type_config: z.ZodPipe<z.ZodString, z.ZodTransform<_solana_kit.Address<string>, string>>;
|
|
169
187
|
version: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>, z.ZodTransform<string, string>>;
|
|
170
188
|
ticket_id: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>, z.ZodTransform<string, string>>;
|
|
171
189
|
listing_lock_expiry: z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBigInt]>, z.ZodTransform<bigint, string | number | bigint>>, z.ZodBigInt>, z.ZodTransform<string, bigint>>, z.ZodTransform<string, string>>;
|
|
@@ -235,15 +253,15 @@ declare const TixIndexerUpcomingEventsResultSchema: z.ZodObject<{
|
|
|
235
253
|
start_at: z.ZodNullable<z.ZodString>;
|
|
236
254
|
on_sale_at: z.ZodNullable<z.ZodString>;
|
|
237
255
|
image_url: z.ZodNullable<z.ZodString>;
|
|
256
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
257
|
+
address: z.ZodNullable<z.ZodString>;
|
|
258
|
+
venue: z.ZodNullable<z.ZodString>;
|
|
238
259
|
active_listing_count: z.ZodNumber;
|
|
239
260
|
tickets_issued_count: z.ZodNumber;
|
|
240
261
|
integrator_identity: z.ZodNullable<z.ZodString>;
|
|
241
262
|
updated_at: z.ZodNullable<z.ZodString>;
|
|
242
263
|
found: z.ZodLiteral<true>;
|
|
243
264
|
genres: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
244
|
-
timezone: z.ZodNullable<z.ZodString>;
|
|
245
|
-
address: z.ZodNullable<z.ZodString>;
|
|
246
|
-
venue: z.ZodNullable<z.ZodString>;
|
|
247
265
|
}, z.core.$strict>>;
|
|
248
266
|
next_cursor: z.ZodNullable<z.ZodString>;
|
|
249
267
|
}, z.core.$strict>;
|
|
@@ -396,4 +414,4 @@ type TixWireInstructionBatch = z.infer<typeof TixWireInstructionBatchSchema>;
|
|
|
396
414
|
|
|
397
415
|
declare const Base64WireEncodedTransactionSchema: z.ZodPipe<z.ZodBase64, z.ZodTransform<Base64EncodedWireTransaction, string>>;
|
|
398
416
|
|
|
399
|
-
export { AcceptClaimOffersRequestBodySchema, type AcceptClaimOffersResponse, AcceptClaimOffersResponseSchema, AcceptClaimOffersSchema, AcceptOfferV2InstructionBatchSchema, AcceptOfferV2ParamsSchema, AdditionalSignaturesSchema, Base58Address, Base64WireEncodedTransactionSchema, Blockhash, CancelListingV1InstructionBatchSchema, CancelListingV1ParamsSchema, EventPathParametersSchema, EventV1ResponseSchema, GetAddressResponseSchema, IntegratorAccountResponseSchema, IntegratorPathParametersSchema, LimitCursorQuerySchema, ListTicketV2InstructionBatchSchema, ListTicketV2ParamsSchema, ListingV1ResponseSchema, PermitV1ResponseSchema, PostIntegratorMetadataRequestBodySchema, type PostTixIndexerIntegratorMetadataResult, PostTixIndexerIntegratorMetadataResultSchema, ProtocolConfigV1ResponseSchema, SignTenantTransactionRequestBodySchema, SignTransactionResponseSchema, Signature, SubmitTenantTransactionRequestBodySchema, SubmitTenantTransactionResponseSchema, TicketPathParametersSchema, type TixIndexerActiveListingsResult, TixIndexerActiveListingsResultSchema, type TixIndexerUpcomingEventsResult, TixIndexerUpcomingEventsResultSchema, type TixWireInstructionBatch, TixWireInstructionBatchSchema, type UserWalletPathParameters, WalletPathParametersSchema, WireI64, WireU16, WireU32, WireU64 };
|
|
417
|
+
export { AcceptClaimOffersRequestBodySchema, type AcceptClaimOffersResponse, AcceptClaimOffersResponseSchema, AcceptClaimOffersSchema, AcceptOfferV2InstructionBatchSchema, AcceptOfferV2ParamsSchema, AdditionalSignaturesSchema, Base58Address, Base64WireEncodedTransactionSchema, Blockhash, CancelListingV1InstructionBatchSchema, CancelListingV1ParamsSchema, EventPathParametersSchema, EventV1ResponseSchema, GetAddressResponseSchema, type GetPurchaseStatusResponse, GetPurchaseStatusResponseSchema, IntegratorAccountResponseSchema, IntegratorPathParametersSchema, LimitCursorQuerySchema, ListTicketV2InstructionBatchSchema, ListTicketV2ParamsSchema, ListingV1ResponseSchema, PermitV1ResponseSchema, PostIntegratorMetadataRequestBodySchema, type PostTixIndexerIntegratorMetadataResult, PostTixIndexerIntegratorMetadataResultSchema, ProtocolConfigV1ResponseSchema, SignTenantTransactionRequestBodySchema, SignTransactionResponseSchema, Signature, SubmitTenantTransactionRequestBodySchema, SubmitTenantTransactionResponseSchema, TicketPathParametersSchema, type TixIndexerActiveListingsResult, TixIndexerActiveListingsResultSchema, type TixIndexerUpcomingEventsResult, TixIndexerUpcomingEventsResultSchema, type TixWireInstructionBatch, TixWireInstructionBatchSchema, type UserWalletPathParameters, WalletPathParametersSchema, WireI64, WireU16, WireU32, WireU64 };
|
package/dist/schemas.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
EventPathParametersSchema,
|
|
14
14
|
EventV1ResponseSchema,
|
|
15
15
|
GetAddressResponseSchema,
|
|
16
|
+
GetPurchaseStatusResponseSchema,
|
|
16
17
|
IntegratorAccountResponseSchema,
|
|
17
18
|
IntegratorPathParametersSchema,
|
|
18
19
|
LimitCursorQuerySchema,
|
|
@@ -39,7 +40,7 @@ import {
|
|
|
39
40
|
WireU16,
|
|
40
41
|
WireU32,
|
|
41
42
|
WireU64
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-DKU7DEI5.js";
|
|
43
44
|
|
|
44
45
|
// ../tdp-schemas/src/primitives/api-environment.ts
|
|
45
46
|
import { z } from "zod";
|
|
@@ -60,6 +61,7 @@ export {
|
|
|
60
61
|
EventPathParametersSchema,
|
|
61
62
|
EventV1ResponseSchema,
|
|
62
63
|
GetAddressResponseSchema,
|
|
64
|
+
GetPurchaseStatusResponseSchema,
|
|
63
65
|
IntegratorAccountResponseSchema,
|
|
64
66
|
IntegratorPathParametersSchema,
|
|
65
67
|
LimitCursorQuerySchema,
|
package/dist/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../tdp-schemas/src/primitives/api-environment.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ApiEnvironmentSchema = z.enum([\"sandbox\", \"live\"]);\nexport type ApiEnvironment = z.infer<typeof ApiEnvironmentSchema>;\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../tdp-schemas/src/primitives/api-environment.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const ApiEnvironmentSchema = z.enum([\"sandbox\", \"live\"]);\nexport type ApiEnvironment = z.infer<typeof ApiEnvironmentSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAEX,IAAM,uBAAuB,EAAE,KAAK,CAAC,WAAW,MAAM,CAAC;","names":[]}
|