@proofchain/sdk 2.20.0 → 2.21.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/index.d.mts +144 -2
- package/dist/index.d.ts +144 -2
- package/dist/index.js +106 -0
- package/dist/index.mjs +104 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1498,6 +1498,8 @@ interface EndUser {
|
|
|
1498
1498
|
bio?: string;
|
|
1499
1499
|
wallet_address?: string;
|
|
1500
1500
|
wallet_source?: string;
|
|
1501
|
+
cdp_wallet_address?: string;
|
|
1502
|
+
wallet_linked_at?: string;
|
|
1501
1503
|
status: string;
|
|
1502
1504
|
total_events: number;
|
|
1503
1505
|
first_event_at?: string;
|
|
@@ -1578,9 +1580,10 @@ interface ListEndUsersOptions {
|
|
|
1578
1580
|
sort_order?: 'asc' | 'desc';
|
|
1579
1581
|
}
|
|
1580
1582
|
interface LinkWalletRequest {
|
|
1581
|
-
wallet_address
|
|
1583
|
+
wallet_address?: string;
|
|
1582
1584
|
wallet_source?: string;
|
|
1583
1585
|
signature?: string;
|
|
1586
|
+
restore_cdp_wallet?: boolean;
|
|
1584
1587
|
}
|
|
1585
1588
|
interface MergeUsersRequest {
|
|
1586
1589
|
source_user_ids: string[];
|
|
@@ -3433,6 +3436,141 @@ declare class CredentialsClient {
|
|
|
3433
3436
|
verify(verificationCode: string): Promise<CredentialVerifyResult>;
|
|
3434
3437
|
}
|
|
3435
3438
|
|
|
3439
|
+
/**
|
|
3440
|
+
* NFT Minting Client — Standalone NFT minting service.
|
|
3441
|
+
*/
|
|
3442
|
+
|
|
3443
|
+
interface MintNFTRequest {
|
|
3444
|
+
/** Wallet address to receive the NFT */
|
|
3445
|
+
recipientAddress: string;
|
|
3446
|
+
/** NFT name */
|
|
3447
|
+
name: string;
|
|
3448
|
+
/** Image file (Blob, File, or ArrayBuffer) — provide this OR imageUrl */
|
|
3449
|
+
image?: Blob | File | ArrayBuffer;
|
|
3450
|
+
/** Filename for the image (used when image is a Blob/ArrayBuffer) */
|
|
3451
|
+
imageFilename?: string;
|
|
3452
|
+
/** External image URL — provide this OR image */
|
|
3453
|
+
imageUrl?: string;
|
|
3454
|
+
/** Optional end-user external_id */
|
|
3455
|
+
recipientUserId?: string;
|
|
3456
|
+
/** NFT description */
|
|
3457
|
+
description?: string;
|
|
3458
|
+
/** Whether the NFT is soulbound (non-transferable) */
|
|
3459
|
+
soulbound?: boolean;
|
|
3460
|
+
/** Validity period in days */
|
|
3461
|
+
validityDays?: number;
|
|
3462
|
+
/** Blockchain network (default: "base") */
|
|
3463
|
+
network?: string;
|
|
3464
|
+
/** Contract address override */
|
|
3465
|
+
contractAddress?: string;
|
|
3466
|
+
/** Extra metadata attributes to merge */
|
|
3467
|
+
metadata?: Record<string, unknown>;
|
|
3468
|
+
}
|
|
3469
|
+
interface NFTMint {
|
|
3470
|
+
id: string;
|
|
3471
|
+
tenant_id: string;
|
|
3472
|
+
recipient_address: string;
|
|
3473
|
+
recipient_user_id: string | null;
|
|
3474
|
+
token_id: number | null;
|
|
3475
|
+
tx_hash: string | null;
|
|
3476
|
+
contract_address: string;
|
|
3477
|
+
network: string;
|
|
3478
|
+
content_hash: string | null;
|
|
3479
|
+
cert_type: number;
|
|
3480
|
+
validity_days: number | null;
|
|
3481
|
+
metadata: Record<string, unknown> | null;
|
|
3482
|
+
metadata_uri: string | null;
|
|
3483
|
+
image_url: string;
|
|
3484
|
+
image_storage_path: string | null;
|
|
3485
|
+
name: string;
|
|
3486
|
+
description: string | null;
|
|
3487
|
+
status: string;
|
|
3488
|
+
error_message: string | null;
|
|
3489
|
+
gas_used: string | null;
|
|
3490
|
+
created_at: string | null;
|
|
3491
|
+
updated_at: string | null;
|
|
3492
|
+
}
|
|
3493
|
+
interface ListMintsOptions {
|
|
3494
|
+
recipientAddress?: string;
|
|
3495
|
+
network?: string;
|
|
3496
|
+
status?: string;
|
|
3497
|
+
limit?: number;
|
|
3498
|
+
offset?: number;
|
|
3499
|
+
}
|
|
3500
|
+
interface ListMintsResponse {
|
|
3501
|
+
mints: NFTMint[];
|
|
3502
|
+
total: number;
|
|
3503
|
+
}
|
|
3504
|
+
declare class NftClient {
|
|
3505
|
+
private http;
|
|
3506
|
+
constructor(http: HttpClient);
|
|
3507
|
+
/**
|
|
3508
|
+
* Mint an NFT and send it to a wallet address.
|
|
3509
|
+
*/
|
|
3510
|
+
mint(request: MintNFTRequest): Promise<NFTMint>;
|
|
3511
|
+
/**
|
|
3512
|
+
* List NFT mints for the current tenant.
|
|
3513
|
+
*/
|
|
3514
|
+
list(options?: ListMintsOptions): Promise<ListMintsResponse>;
|
|
3515
|
+
/**
|
|
3516
|
+
* Get a single NFT mint by ID.
|
|
3517
|
+
*/
|
|
3518
|
+
get(mintId: string): Promise<NFTMint>;
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
* Partner Keys Resource - OTT (One-Time Token) auth for partner integrations
|
|
3523
|
+
*/
|
|
3524
|
+
|
|
3525
|
+
interface OTTRequestResponse {
|
|
3526
|
+
ott: string;
|
|
3527
|
+
expires_in: number;
|
|
3528
|
+
}
|
|
3529
|
+
interface OTTRedeemResponse {
|
|
3530
|
+
user_id: string;
|
|
3531
|
+
session_timeout: number;
|
|
3532
|
+
session_data: Record<string, unknown>;
|
|
3533
|
+
jwt?: string;
|
|
3534
|
+
}
|
|
3535
|
+
interface OTTConfigUpdate {
|
|
3536
|
+
ott_enabled?: boolean;
|
|
3537
|
+
ott_ttl_seconds?: number;
|
|
3538
|
+
ott_redemption_mode?: 'jwt' | 'cookie';
|
|
3539
|
+
ott_jwt_ttl_seconds?: number;
|
|
3540
|
+
ott_session_data_keys?: string[];
|
|
3541
|
+
}
|
|
3542
|
+
interface OTTConfigResponse {
|
|
3543
|
+
partner_key_id: string;
|
|
3544
|
+
partner_name: string;
|
|
3545
|
+
ott_enabled: boolean;
|
|
3546
|
+
ott_ttl_seconds: number;
|
|
3547
|
+
ott_redemption_mode: 'jwt' | 'cookie';
|
|
3548
|
+
ott_jwt_ttl_seconds: number;
|
|
3549
|
+
ott_session_data_keys?: string[];
|
|
3550
|
+
}
|
|
3551
|
+
declare class PartnerKeysClient {
|
|
3552
|
+
private http;
|
|
3553
|
+
constructor(http: HttpClient);
|
|
3554
|
+
/**
|
|
3555
|
+
* Request a one-time token for a partner key (end-user JWKS auth).
|
|
3556
|
+
*/
|
|
3557
|
+
requestOTT(keyId: string): Promise<OTTRequestResponse>;
|
|
3558
|
+
/**
|
|
3559
|
+
* Redeem a one-time token (partner key auth).
|
|
3560
|
+
*/
|
|
3561
|
+
redeemOTT(body: {
|
|
3562
|
+
ott: string;
|
|
3563
|
+
}): Promise<OTTRedeemResponse>;
|
|
3564
|
+
/**
|
|
3565
|
+
* Update OTT configuration for a partner key.
|
|
3566
|
+
*/
|
|
3567
|
+
updateOTTConfig(keyId: string, config: OTTConfigUpdate): Promise<OTTConfigResponse>;
|
|
3568
|
+
/**
|
|
3569
|
+
* Get OTT configuration for a partner key.
|
|
3570
|
+
*/
|
|
3571
|
+
getOTTConfig(keyId: string): Promise<OTTConfigResponse>;
|
|
3572
|
+
}
|
|
3573
|
+
|
|
3436
3574
|
/**
|
|
3437
3575
|
* ProofChain Client
|
|
3438
3576
|
*/
|
|
@@ -3631,6 +3769,10 @@ declare class ProofChain {
|
|
|
3631
3769
|
notifications: NotificationsClient;
|
|
3632
3770
|
/** Credentials client for portable identity credentials */
|
|
3633
3771
|
credentials: CredentialsClient;
|
|
3772
|
+
/** NFT client for standalone NFT minting */
|
|
3773
|
+
nft: NftClient;
|
|
3774
|
+
/** Partner Keys client for OTT auth operations */
|
|
3775
|
+
partnerKeys: PartnerKeysClient;
|
|
3634
3776
|
constructor(options: ProofChainOptions);
|
|
3635
3777
|
/**
|
|
3636
3778
|
* Create a client for end-user JWT authentication (PWA/frontend use).
|
|
@@ -3846,4 +3988,4 @@ declare class TimeoutError extends ProofChainError {
|
|
|
3846
3988
|
constructor(message?: string);
|
|
3847
3989
|
}
|
|
3848
3990
|
|
|
3849
|
-
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type AnchorResult, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type ClaimNFTResult, type ClaimRewardResult, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateCredentialTypeRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest as CreateUserWalletRequest, type CreateWalletRequest$1 as CreateWalletRequest, type CreateWebhookRequest, type CredentialType, type CredentialVerifyResult, CredentialsClient, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, type DistributeResult, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, EndUserIngestionClient, type EndUserIngestionClientOptions, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type GDPRDeletionRequest, type GDPRDeletionResponse, type GDPRPreviewResponse, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type IssueCredentialRequest, type IssuedCredential, type LeaderboardUserProfile$1 as LeaderboardUserProfile, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListIssuedCredentialsOptions, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type NFT, NetworkError, NotFoundError, type NotificationCallback, type NotificationEvent, type NotificationEventType, NotificationsClient, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type PushSubscriptionJSON, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RegisterWalletRequest, type RevokeResult, type RewardAsset, type RewardAttestationResult, type RewardDefinition, type RewardEarned, type VerifyResult as RewardVerifyResult, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type SetProfileRequest, type Settlement, type StepCompletionResult, type StepProgress, type StepStartResult, type StreamAck, type StreamEventRequest, type SubscribeOptions, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type Unsubscribe, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserCredentialsSummary, type UserQuestProgress, type UserReward$1 as UserReward, type UserRewardsResponse, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletCreationResult, type WalletStats, type Webhook, WebhooksResource };
|
|
3991
|
+
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type AnchorResult, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type ClaimNFTResult, type ClaimRewardResult, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateCredentialTypeRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest as CreateUserWalletRequest, type CreateWalletRequest$1 as CreateWalletRequest, type CreateWebhookRequest, type CredentialType, type CredentialVerifyResult, CredentialsClient, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, type DistributeResult, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, EndUserIngestionClient, type EndUserIngestionClientOptions, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type GDPRDeletionRequest, type GDPRDeletionResponse, type GDPRPreviewResponse, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type IssueCredentialRequest, type IssuedCredential, type LeaderboardUserProfile$1 as LeaderboardUserProfile, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListIssuedCredentialsOptions, type ListMintsOptions, type ListMintsResponse, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type MintNFTRequest, type NFT, type NFTMint, NetworkError, NftClient, NotFoundError, type NotificationCallback, type NotificationEvent, type NotificationEventType, NotificationsClient, type OTTConfigResponse, type OTTConfigUpdate, type OTTRedeemResponse, type OTTRequestResponse, PartnerKeysClient, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type PushSubscriptionJSON, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RegisterWalletRequest, type RevokeResult, type RewardAsset, type RewardAttestationResult, type RewardDefinition, type RewardEarned, type VerifyResult as RewardVerifyResult, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type SetProfileRequest, type Settlement, type StepCompletionResult, type StepProgress, type StepStartResult, type StreamAck, type StreamEventRequest, type SubscribeOptions, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type Unsubscribe, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserCredentialsSummary, type UserQuestProgress, type UserReward$1 as UserReward, type UserRewardsResponse, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletCreationResult, type WalletStats, type Webhook, WebhooksResource };
|
package/dist/index.d.ts
CHANGED
|
@@ -1498,6 +1498,8 @@ interface EndUser {
|
|
|
1498
1498
|
bio?: string;
|
|
1499
1499
|
wallet_address?: string;
|
|
1500
1500
|
wallet_source?: string;
|
|
1501
|
+
cdp_wallet_address?: string;
|
|
1502
|
+
wallet_linked_at?: string;
|
|
1501
1503
|
status: string;
|
|
1502
1504
|
total_events: number;
|
|
1503
1505
|
first_event_at?: string;
|
|
@@ -1578,9 +1580,10 @@ interface ListEndUsersOptions {
|
|
|
1578
1580
|
sort_order?: 'asc' | 'desc';
|
|
1579
1581
|
}
|
|
1580
1582
|
interface LinkWalletRequest {
|
|
1581
|
-
wallet_address
|
|
1583
|
+
wallet_address?: string;
|
|
1582
1584
|
wallet_source?: string;
|
|
1583
1585
|
signature?: string;
|
|
1586
|
+
restore_cdp_wallet?: boolean;
|
|
1584
1587
|
}
|
|
1585
1588
|
interface MergeUsersRequest {
|
|
1586
1589
|
source_user_ids: string[];
|
|
@@ -3433,6 +3436,141 @@ declare class CredentialsClient {
|
|
|
3433
3436
|
verify(verificationCode: string): Promise<CredentialVerifyResult>;
|
|
3434
3437
|
}
|
|
3435
3438
|
|
|
3439
|
+
/**
|
|
3440
|
+
* NFT Minting Client — Standalone NFT minting service.
|
|
3441
|
+
*/
|
|
3442
|
+
|
|
3443
|
+
interface MintNFTRequest {
|
|
3444
|
+
/** Wallet address to receive the NFT */
|
|
3445
|
+
recipientAddress: string;
|
|
3446
|
+
/** NFT name */
|
|
3447
|
+
name: string;
|
|
3448
|
+
/** Image file (Blob, File, or ArrayBuffer) — provide this OR imageUrl */
|
|
3449
|
+
image?: Blob | File | ArrayBuffer;
|
|
3450
|
+
/** Filename for the image (used when image is a Blob/ArrayBuffer) */
|
|
3451
|
+
imageFilename?: string;
|
|
3452
|
+
/** External image URL — provide this OR image */
|
|
3453
|
+
imageUrl?: string;
|
|
3454
|
+
/** Optional end-user external_id */
|
|
3455
|
+
recipientUserId?: string;
|
|
3456
|
+
/** NFT description */
|
|
3457
|
+
description?: string;
|
|
3458
|
+
/** Whether the NFT is soulbound (non-transferable) */
|
|
3459
|
+
soulbound?: boolean;
|
|
3460
|
+
/** Validity period in days */
|
|
3461
|
+
validityDays?: number;
|
|
3462
|
+
/** Blockchain network (default: "base") */
|
|
3463
|
+
network?: string;
|
|
3464
|
+
/** Contract address override */
|
|
3465
|
+
contractAddress?: string;
|
|
3466
|
+
/** Extra metadata attributes to merge */
|
|
3467
|
+
metadata?: Record<string, unknown>;
|
|
3468
|
+
}
|
|
3469
|
+
interface NFTMint {
|
|
3470
|
+
id: string;
|
|
3471
|
+
tenant_id: string;
|
|
3472
|
+
recipient_address: string;
|
|
3473
|
+
recipient_user_id: string | null;
|
|
3474
|
+
token_id: number | null;
|
|
3475
|
+
tx_hash: string | null;
|
|
3476
|
+
contract_address: string;
|
|
3477
|
+
network: string;
|
|
3478
|
+
content_hash: string | null;
|
|
3479
|
+
cert_type: number;
|
|
3480
|
+
validity_days: number | null;
|
|
3481
|
+
metadata: Record<string, unknown> | null;
|
|
3482
|
+
metadata_uri: string | null;
|
|
3483
|
+
image_url: string;
|
|
3484
|
+
image_storage_path: string | null;
|
|
3485
|
+
name: string;
|
|
3486
|
+
description: string | null;
|
|
3487
|
+
status: string;
|
|
3488
|
+
error_message: string | null;
|
|
3489
|
+
gas_used: string | null;
|
|
3490
|
+
created_at: string | null;
|
|
3491
|
+
updated_at: string | null;
|
|
3492
|
+
}
|
|
3493
|
+
interface ListMintsOptions {
|
|
3494
|
+
recipientAddress?: string;
|
|
3495
|
+
network?: string;
|
|
3496
|
+
status?: string;
|
|
3497
|
+
limit?: number;
|
|
3498
|
+
offset?: number;
|
|
3499
|
+
}
|
|
3500
|
+
interface ListMintsResponse {
|
|
3501
|
+
mints: NFTMint[];
|
|
3502
|
+
total: number;
|
|
3503
|
+
}
|
|
3504
|
+
declare class NftClient {
|
|
3505
|
+
private http;
|
|
3506
|
+
constructor(http: HttpClient);
|
|
3507
|
+
/**
|
|
3508
|
+
* Mint an NFT and send it to a wallet address.
|
|
3509
|
+
*/
|
|
3510
|
+
mint(request: MintNFTRequest): Promise<NFTMint>;
|
|
3511
|
+
/**
|
|
3512
|
+
* List NFT mints for the current tenant.
|
|
3513
|
+
*/
|
|
3514
|
+
list(options?: ListMintsOptions): Promise<ListMintsResponse>;
|
|
3515
|
+
/**
|
|
3516
|
+
* Get a single NFT mint by ID.
|
|
3517
|
+
*/
|
|
3518
|
+
get(mintId: string): Promise<NFTMint>;
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
* Partner Keys Resource - OTT (One-Time Token) auth for partner integrations
|
|
3523
|
+
*/
|
|
3524
|
+
|
|
3525
|
+
interface OTTRequestResponse {
|
|
3526
|
+
ott: string;
|
|
3527
|
+
expires_in: number;
|
|
3528
|
+
}
|
|
3529
|
+
interface OTTRedeemResponse {
|
|
3530
|
+
user_id: string;
|
|
3531
|
+
session_timeout: number;
|
|
3532
|
+
session_data: Record<string, unknown>;
|
|
3533
|
+
jwt?: string;
|
|
3534
|
+
}
|
|
3535
|
+
interface OTTConfigUpdate {
|
|
3536
|
+
ott_enabled?: boolean;
|
|
3537
|
+
ott_ttl_seconds?: number;
|
|
3538
|
+
ott_redemption_mode?: 'jwt' | 'cookie';
|
|
3539
|
+
ott_jwt_ttl_seconds?: number;
|
|
3540
|
+
ott_session_data_keys?: string[];
|
|
3541
|
+
}
|
|
3542
|
+
interface OTTConfigResponse {
|
|
3543
|
+
partner_key_id: string;
|
|
3544
|
+
partner_name: string;
|
|
3545
|
+
ott_enabled: boolean;
|
|
3546
|
+
ott_ttl_seconds: number;
|
|
3547
|
+
ott_redemption_mode: 'jwt' | 'cookie';
|
|
3548
|
+
ott_jwt_ttl_seconds: number;
|
|
3549
|
+
ott_session_data_keys?: string[];
|
|
3550
|
+
}
|
|
3551
|
+
declare class PartnerKeysClient {
|
|
3552
|
+
private http;
|
|
3553
|
+
constructor(http: HttpClient);
|
|
3554
|
+
/**
|
|
3555
|
+
* Request a one-time token for a partner key (end-user JWKS auth).
|
|
3556
|
+
*/
|
|
3557
|
+
requestOTT(keyId: string): Promise<OTTRequestResponse>;
|
|
3558
|
+
/**
|
|
3559
|
+
* Redeem a one-time token (partner key auth).
|
|
3560
|
+
*/
|
|
3561
|
+
redeemOTT(body: {
|
|
3562
|
+
ott: string;
|
|
3563
|
+
}): Promise<OTTRedeemResponse>;
|
|
3564
|
+
/**
|
|
3565
|
+
* Update OTT configuration for a partner key.
|
|
3566
|
+
*/
|
|
3567
|
+
updateOTTConfig(keyId: string, config: OTTConfigUpdate): Promise<OTTConfigResponse>;
|
|
3568
|
+
/**
|
|
3569
|
+
* Get OTT configuration for a partner key.
|
|
3570
|
+
*/
|
|
3571
|
+
getOTTConfig(keyId: string): Promise<OTTConfigResponse>;
|
|
3572
|
+
}
|
|
3573
|
+
|
|
3436
3574
|
/**
|
|
3437
3575
|
* ProofChain Client
|
|
3438
3576
|
*/
|
|
@@ -3631,6 +3769,10 @@ declare class ProofChain {
|
|
|
3631
3769
|
notifications: NotificationsClient;
|
|
3632
3770
|
/** Credentials client for portable identity credentials */
|
|
3633
3771
|
credentials: CredentialsClient;
|
|
3772
|
+
/** NFT client for standalone NFT minting */
|
|
3773
|
+
nft: NftClient;
|
|
3774
|
+
/** Partner Keys client for OTT auth operations */
|
|
3775
|
+
partnerKeys: PartnerKeysClient;
|
|
3634
3776
|
constructor(options: ProofChainOptions);
|
|
3635
3777
|
/**
|
|
3636
3778
|
* Create a client for end-user JWT authentication (PWA/frontend use).
|
|
@@ -3846,4 +3988,4 @@ declare class TimeoutError extends ProofChainError {
|
|
|
3846
3988
|
constructor(message?: string);
|
|
3847
3989
|
}
|
|
3848
3990
|
|
|
3849
|
-
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type AnchorResult, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type ClaimNFTResult, type ClaimRewardResult, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateCredentialTypeRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest as CreateUserWalletRequest, type CreateWalletRequest$1 as CreateWalletRequest, type CreateWebhookRequest, type CredentialType, type CredentialVerifyResult, CredentialsClient, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, type DistributeResult, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, EndUserIngestionClient, type EndUserIngestionClientOptions, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type GDPRDeletionRequest, type GDPRDeletionResponse, type GDPRPreviewResponse, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type IssueCredentialRequest, type IssuedCredential, type LeaderboardUserProfile$1 as LeaderboardUserProfile, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListIssuedCredentialsOptions, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type NFT, NetworkError, NotFoundError, type NotificationCallback, type NotificationEvent, type NotificationEventType, NotificationsClient, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type PushSubscriptionJSON, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RegisterWalletRequest, type RevokeResult, type RewardAsset, type RewardAttestationResult, type RewardDefinition, type RewardEarned, type VerifyResult as RewardVerifyResult, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type SetProfileRequest, type Settlement, type StepCompletionResult, type StepProgress, type StepStartResult, type StreamAck, type StreamEventRequest, type SubscribeOptions, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type Unsubscribe, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserCredentialsSummary, type UserQuestProgress, type UserReward$1 as UserReward, type UserRewardsResponse, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletCreationResult, type WalletStats, type Webhook, WebhooksResource };
|
|
3991
|
+
export { type Achievement, type ActivitySummaryView, type AddNFTRequest, type AnchorResult, type ApiKey, type AttestRequest, type AttestationMode, type AttestationResult, AuthenticationError, AuthorizationError, type AvailableView, type Badge, type BatchIngestRequest, type BatchIngestResponse, type BatchVerifyResult, type BlockchainProof, type BlockchainStats, type Certificate, type CertificateVerifyResult, CertificatesResource, type Channel, type ChannelState, type ChannelStatus, ChannelsResource, type ClaimNFTResult, type ClaimRewardResult, type CohortDefinition, type CohortGroupStats, CohortLeaderboardClient, type CohortLeaderboardEntry, type CohortLeaderboardOptions, type CohortLeaderboardResponse, type ComprehensiveWalletInfo, type CreateAchievementRequest, type CreateApiKeyRequest, type CreateBadgeRequest, type CreateChannelRequest, type CreateCredentialTypeRequest, type CreateDataViewRequest, type CreateDualWalletsRequest, type CreateEndUserRequest, type CreateEventRequest, type CreatePassportDefinitionRequest, type CreatePassportRequest, type CreateQuestRequest, type CreateQuestStepRequest, type CreateRewardDefinitionRequest, type CreateSchemaRequest, type CreateTemplateFieldRequest, type CreateTemplateRequest, type CreateWalletRequest as CreateUserWalletRequest, type CreateWalletRequest$1 as CreateWalletRequest, type CreateWebhookRequest, type CredentialType, type CredentialVerifyResult, CredentialsClient, type DataViewColumn, type DataViewComputation, type DataViewDetail, type DataViewExecuteResult, type DataViewInfo, type DataViewListResponse, type DataViewPreviewRequest, type DataViewPreviewResult, type DataViewSummary, DataViewsClient, type DistributeResult, DocumentsResource, type DualWallets, type EarnedReward, type EndUser, EndUserIngestionClient, type EndUserIngestionClientOptions, type EndUserListResponse, EndUsersClient, type Event, type EventBatchProof, type EventMetadata, type EventStatus, EventsResource, type ExecuteSwapRequest, type Facet, type FacetsResponse, type FanProfileView, type FanpassGroupStats, FanpassLeaderboardClient, type FanpassLeaderboardEntry, type FanpassLeaderboardOptions, type FanpassLeaderboardResponse, type FanpassUserComparisonResponse, type FieldValue, type GDPRDeletionRequest, type GDPRDeletionResponse, type GDPRPreviewResponse, type IngestEventRequest, type IngestEventResponse, IngestionClient, type IngestionClientOptions, type IssueCertificateRequest, type IssueCredentialRequest, type IssuedCredential, type LeaderboardUserProfile$1 as LeaderboardUserProfile, type LinkWalletRequest, type ListCertificatesRequest, type ListCohortsOptions, type ListEndUsersOptions, type ListEventsRequest, type ListIssuedCredentialsOptions, type ListMintsOptions, type ListMintsResponse, type ListQuestsOptions, type ListRewardsOptions, type ListSchemasOptions, type ManualRewardRequest, type MergeUsersRequest, type Milestone, type MintNFTRequest, type NFT, type NFTMint, NetworkError, NftClient, NotFoundError, type NotificationCallback, type NotificationEvent, type NotificationEventType, NotificationsClient, type OTTConfigResponse, type OTTConfigUpdate, type OTTRedeemResponse, type OTTRequestResponse, PartnerKeysClient, type Passport, PassportClient, type PassportDefinition, type PassportFieldValue, type PassportHistory, type PassportTemplate, type PassportV2Data, type PassportWithFields, ProofChain, ProofChainError, type ProofChainOptions, type ProofVerifyResult, type PushSubscriptionJSON, type Quest, type QuestStep, type QuestWithProgress, QuestsClient, RateLimitError, type RegisterWalletRequest, type RevokeResult, type RewardAsset, type RewardAttestationResult, type RewardDefinition, type RewardEarned, type VerifyResult as RewardVerifyResult, RewardsClient, type Schema, type SchemaDetail, type SchemaField, type SchemaListResponse, type ValidationError$1 as SchemaValidationError, SchemasClient, type SearchFilters, type SearchQueryRequest, type SearchRequest, SearchResource, type SearchResponse, type SearchResult, type SearchStats, ServerError, type SetProfileRequest, type Settlement, type StepCompletionResult, type StepProgress, type StepStartResult, type StreamAck, type StreamEventRequest, type SubscribeOptions, type SwapQuote, type SwapQuoteRequest, type SwapResult, type TemplateField, type TenantInfo, TenantResource, type TierDefinition, TimeoutError, type TokenBalance, type TransferRequest, type TransferResult, type Unsubscribe, type UpdateDataViewRequest, type UpdateEndUserRequest, type UpdatePassportRequest, type UpdateWebhookRequest, type UsageStats, type UserAchievement, type UserActivity, type UserActivityResponse, type UserBadge, type UserBreakdownResponse, type UserCohortBreakdownEntry, type UserCredentialsSummary, type UserQuestProgress, type UserReward$1 as UserReward, type UserRewardsResponse, type UserWalletSummary, type UserWithWallets, type UsersWithWalletsResponse, type ValidateDataRequest, ValidationError, type ValidationErrorDetail, type ValidationResult, type VaultFile, type VaultFolder, type VaultListResponse, VaultResource, type VaultStats, type VaultUploadRequest, type VerificationResult, VerifyResource, type ViewColumn, type ViewTemplate, type Wallet, type WalletBalance, WalletClient, type WalletCreationResult, type WalletStats, type Webhook, WebhooksResource };
|
package/dist/index.js
CHANGED
|
@@ -34,8 +34,10 @@ __export(index_exports, {
|
|
|
34
34
|
FanpassLeaderboardClient: () => FanpassLeaderboardClient,
|
|
35
35
|
IngestionClient: () => IngestionClient,
|
|
36
36
|
NetworkError: () => NetworkError,
|
|
37
|
+
NftClient: () => NftClient,
|
|
37
38
|
NotFoundError: () => NotFoundError,
|
|
38
39
|
NotificationsClient: () => NotificationsClient,
|
|
40
|
+
PartnerKeysClient: () => PartnerKeysClient,
|
|
39
41
|
PassportClient: () => PassportClient,
|
|
40
42
|
ProofChain: () => ProofChain,
|
|
41
43
|
ProofChainError: () => ProofChainError,
|
|
@@ -2633,6 +2635,106 @@ var CredentialsClient = class {
|
|
|
2633
2635
|
}
|
|
2634
2636
|
};
|
|
2635
2637
|
|
|
2638
|
+
// src/nft.ts
|
|
2639
|
+
var NftClient = class {
|
|
2640
|
+
constructor(http) {
|
|
2641
|
+
this.http = http;
|
|
2642
|
+
}
|
|
2643
|
+
/**
|
|
2644
|
+
* Mint an NFT and send it to a wallet address.
|
|
2645
|
+
*/
|
|
2646
|
+
async mint(request) {
|
|
2647
|
+
const formData = new FormData();
|
|
2648
|
+
formData.append("recipient_address", request.recipientAddress);
|
|
2649
|
+
formData.append("name", request.name);
|
|
2650
|
+
if (request.image) {
|
|
2651
|
+
let blob;
|
|
2652
|
+
if (request.image instanceof Blob) {
|
|
2653
|
+
blob = request.image;
|
|
2654
|
+
} else if (request.image instanceof ArrayBuffer) {
|
|
2655
|
+
blob = new Blob([request.image]);
|
|
2656
|
+
} else {
|
|
2657
|
+
blob = new Blob([request.image]);
|
|
2658
|
+
}
|
|
2659
|
+
formData.append("image", blob, request.imageFilename || "image.png");
|
|
2660
|
+
}
|
|
2661
|
+
if (request.imageUrl) {
|
|
2662
|
+
formData.append("image_url", request.imageUrl);
|
|
2663
|
+
}
|
|
2664
|
+
if (request.recipientUserId) {
|
|
2665
|
+
formData.append("recipient_user_id", request.recipientUserId);
|
|
2666
|
+
}
|
|
2667
|
+
if (request.description) {
|
|
2668
|
+
formData.append("description", request.description);
|
|
2669
|
+
}
|
|
2670
|
+
if (request.soulbound !== void 0) {
|
|
2671
|
+
formData.append("soulbound", String(request.soulbound));
|
|
2672
|
+
}
|
|
2673
|
+
if (request.validityDays !== void 0) {
|
|
2674
|
+
formData.append("validity_days", String(request.validityDays));
|
|
2675
|
+
}
|
|
2676
|
+
if (request.network) {
|
|
2677
|
+
formData.append("network", request.network);
|
|
2678
|
+
}
|
|
2679
|
+
if (request.contractAddress) {
|
|
2680
|
+
formData.append("contract_address", request.contractAddress);
|
|
2681
|
+
}
|
|
2682
|
+
if (request.metadata) {
|
|
2683
|
+
formData.append("metadata", JSON.stringify(request.metadata));
|
|
2684
|
+
}
|
|
2685
|
+
return this.http.requestMultipart("/nft/mint", formData);
|
|
2686
|
+
}
|
|
2687
|
+
/**
|
|
2688
|
+
* List NFT mints for the current tenant.
|
|
2689
|
+
*/
|
|
2690
|
+
async list(options = {}) {
|
|
2691
|
+
return this.http.get("/nft/mints", {
|
|
2692
|
+
recipient_address: options.recipientAddress,
|
|
2693
|
+
network: options.network,
|
|
2694
|
+
status: options.status,
|
|
2695
|
+
limit: options.limit,
|
|
2696
|
+
offset: options.offset
|
|
2697
|
+
});
|
|
2698
|
+
}
|
|
2699
|
+
/**
|
|
2700
|
+
* Get a single NFT mint by ID.
|
|
2701
|
+
*/
|
|
2702
|
+
async get(mintId) {
|
|
2703
|
+
return this.http.get(`/nft/mints/${mintId}`);
|
|
2704
|
+
}
|
|
2705
|
+
};
|
|
2706
|
+
|
|
2707
|
+
// src/partner-keys.ts
|
|
2708
|
+
var PartnerKeysClient = class {
|
|
2709
|
+
constructor(http) {
|
|
2710
|
+
this.http = http;
|
|
2711
|
+
}
|
|
2712
|
+
/**
|
|
2713
|
+
* Request a one-time token for a partner key (end-user JWKS auth).
|
|
2714
|
+
*/
|
|
2715
|
+
async requestOTT(keyId) {
|
|
2716
|
+
return this.http.post(`/partner-keys/${keyId}/ott/request`);
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Redeem a one-time token (partner key auth).
|
|
2720
|
+
*/
|
|
2721
|
+
async redeemOTT(body) {
|
|
2722
|
+
return this.http.post("/partner-keys/ott/redeem", body);
|
|
2723
|
+
}
|
|
2724
|
+
/**
|
|
2725
|
+
* Update OTT configuration for a partner key.
|
|
2726
|
+
*/
|
|
2727
|
+
async updateOTTConfig(keyId, config) {
|
|
2728
|
+
return this.http.patch(`/partner-keys/${keyId}/ott-config`, config);
|
|
2729
|
+
}
|
|
2730
|
+
/**
|
|
2731
|
+
* Get OTT configuration for a partner key.
|
|
2732
|
+
*/
|
|
2733
|
+
async getOTTConfig(keyId) {
|
|
2734
|
+
return this.http.get(`/partner-keys/${keyId}/ott-config`);
|
|
2735
|
+
}
|
|
2736
|
+
};
|
|
2737
|
+
|
|
2636
2738
|
// src/client.ts
|
|
2637
2739
|
var DocumentsResource = class {
|
|
2638
2740
|
constructor(http) {
|
|
@@ -2932,6 +3034,8 @@ var ProofChain = class _ProofChain {
|
|
|
2932
3034
|
this.fanpassLeaderboard = new FanpassLeaderboardClient(this.http);
|
|
2933
3035
|
this.notifications = new NotificationsClient(this.http);
|
|
2934
3036
|
this.credentials = new CredentialsClient(this.http);
|
|
3037
|
+
this.nft = new NftClient(this.http);
|
|
3038
|
+
this.partnerKeys = new PartnerKeysClient(this.http);
|
|
2935
3039
|
}
|
|
2936
3040
|
/**
|
|
2937
3041
|
* Create a client for end-user JWT authentication (PWA/frontend use).
|
|
@@ -3275,8 +3379,10 @@ var EndUserIngestionClient = class {
|
|
|
3275
3379
|
FanpassLeaderboardClient,
|
|
3276
3380
|
IngestionClient,
|
|
3277
3381
|
NetworkError,
|
|
3382
|
+
NftClient,
|
|
3278
3383
|
NotFoundError,
|
|
3279
3384
|
NotificationsClient,
|
|
3385
|
+
PartnerKeysClient,
|
|
3280
3386
|
PassportClient,
|
|
3281
3387
|
ProofChain,
|
|
3282
3388
|
ProofChainError,
|
package/dist/index.mjs
CHANGED
|
@@ -2576,6 +2576,106 @@ var CredentialsClient = class {
|
|
|
2576
2576
|
}
|
|
2577
2577
|
};
|
|
2578
2578
|
|
|
2579
|
+
// src/nft.ts
|
|
2580
|
+
var NftClient = class {
|
|
2581
|
+
constructor(http) {
|
|
2582
|
+
this.http = http;
|
|
2583
|
+
}
|
|
2584
|
+
/**
|
|
2585
|
+
* Mint an NFT and send it to a wallet address.
|
|
2586
|
+
*/
|
|
2587
|
+
async mint(request) {
|
|
2588
|
+
const formData = new FormData();
|
|
2589
|
+
formData.append("recipient_address", request.recipientAddress);
|
|
2590
|
+
formData.append("name", request.name);
|
|
2591
|
+
if (request.image) {
|
|
2592
|
+
let blob;
|
|
2593
|
+
if (request.image instanceof Blob) {
|
|
2594
|
+
blob = request.image;
|
|
2595
|
+
} else if (request.image instanceof ArrayBuffer) {
|
|
2596
|
+
blob = new Blob([request.image]);
|
|
2597
|
+
} else {
|
|
2598
|
+
blob = new Blob([request.image]);
|
|
2599
|
+
}
|
|
2600
|
+
formData.append("image", blob, request.imageFilename || "image.png");
|
|
2601
|
+
}
|
|
2602
|
+
if (request.imageUrl) {
|
|
2603
|
+
formData.append("image_url", request.imageUrl);
|
|
2604
|
+
}
|
|
2605
|
+
if (request.recipientUserId) {
|
|
2606
|
+
formData.append("recipient_user_id", request.recipientUserId);
|
|
2607
|
+
}
|
|
2608
|
+
if (request.description) {
|
|
2609
|
+
formData.append("description", request.description);
|
|
2610
|
+
}
|
|
2611
|
+
if (request.soulbound !== void 0) {
|
|
2612
|
+
formData.append("soulbound", String(request.soulbound));
|
|
2613
|
+
}
|
|
2614
|
+
if (request.validityDays !== void 0) {
|
|
2615
|
+
formData.append("validity_days", String(request.validityDays));
|
|
2616
|
+
}
|
|
2617
|
+
if (request.network) {
|
|
2618
|
+
formData.append("network", request.network);
|
|
2619
|
+
}
|
|
2620
|
+
if (request.contractAddress) {
|
|
2621
|
+
formData.append("contract_address", request.contractAddress);
|
|
2622
|
+
}
|
|
2623
|
+
if (request.metadata) {
|
|
2624
|
+
formData.append("metadata", JSON.stringify(request.metadata));
|
|
2625
|
+
}
|
|
2626
|
+
return this.http.requestMultipart("/nft/mint", formData);
|
|
2627
|
+
}
|
|
2628
|
+
/**
|
|
2629
|
+
* List NFT mints for the current tenant.
|
|
2630
|
+
*/
|
|
2631
|
+
async list(options = {}) {
|
|
2632
|
+
return this.http.get("/nft/mints", {
|
|
2633
|
+
recipient_address: options.recipientAddress,
|
|
2634
|
+
network: options.network,
|
|
2635
|
+
status: options.status,
|
|
2636
|
+
limit: options.limit,
|
|
2637
|
+
offset: options.offset
|
|
2638
|
+
});
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
* Get a single NFT mint by ID.
|
|
2642
|
+
*/
|
|
2643
|
+
async get(mintId) {
|
|
2644
|
+
return this.http.get(`/nft/mints/${mintId}`);
|
|
2645
|
+
}
|
|
2646
|
+
};
|
|
2647
|
+
|
|
2648
|
+
// src/partner-keys.ts
|
|
2649
|
+
var PartnerKeysClient = class {
|
|
2650
|
+
constructor(http) {
|
|
2651
|
+
this.http = http;
|
|
2652
|
+
}
|
|
2653
|
+
/**
|
|
2654
|
+
* Request a one-time token for a partner key (end-user JWKS auth).
|
|
2655
|
+
*/
|
|
2656
|
+
async requestOTT(keyId) {
|
|
2657
|
+
return this.http.post(`/partner-keys/${keyId}/ott/request`);
|
|
2658
|
+
}
|
|
2659
|
+
/**
|
|
2660
|
+
* Redeem a one-time token (partner key auth).
|
|
2661
|
+
*/
|
|
2662
|
+
async redeemOTT(body) {
|
|
2663
|
+
return this.http.post("/partner-keys/ott/redeem", body);
|
|
2664
|
+
}
|
|
2665
|
+
/**
|
|
2666
|
+
* Update OTT configuration for a partner key.
|
|
2667
|
+
*/
|
|
2668
|
+
async updateOTTConfig(keyId, config) {
|
|
2669
|
+
return this.http.patch(`/partner-keys/${keyId}/ott-config`, config);
|
|
2670
|
+
}
|
|
2671
|
+
/**
|
|
2672
|
+
* Get OTT configuration for a partner key.
|
|
2673
|
+
*/
|
|
2674
|
+
async getOTTConfig(keyId) {
|
|
2675
|
+
return this.http.get(`/partner-keys/${keyId}/ott-config`);
|
|
2676
|
+
}
|
|
2677
|
+
};
|
|
2678
|
+
|
|
2579
2679
|
// src/client.ts
|
|
2580
2680
|
var DocumentsResource = class {
|
|
2581
2681
|
constructor(http) {
|
|
@@ -2875,6 +2975,8 @@ var ProofChain = class _ProofChain {
|
|
|
2875
2975
|
this.fanpassLeaderboard = new FanpassLeaderboardClient(this.http);
|
|
2876
2976
|
this.notifications = new NotificationsClient(this.http);
|
|
2877
2977
|
this.credentials = new CredentialsClient(this.http);
|
|
2978
|
+
this.nft = new NftClient(this.http);
|
|
2979
|
+
this.partnerKeys = new PartnerKeysClient(this.http);
|
|
2878
2980
|
}
|
|
2879
2981
|
/**
|
|
2880
2982
|
* Create a client for end-user JWT authentication (PWA/frontend use).
|
|
@@ -3217,8 +3319,10 @@ export {
|
|
|
3217
3319
|
FanpassLeaderboardClient,
|
|
3218
3320
|
IngestionClient,
|
|
3219
3321
|
NetworkError,
|
|
3322
|
+
NftClient,
|
|
3220
3323
|
NotFoundError,
|
|
3221
3324
|
NotificationsClient,
|
|
3325
|
+
PartnerKeysClient,
|
|
3222
3326
|
PassportClient,
|
|
3223
3327
|
ProofChain,
|
|
3224
3328
|
ProofChainError,
|
package/package.json
CHANGED