@goodz-core/sdk 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,252 @@
1
+ import { X as TransportConfig } from '../transport-BOlScYEv.js';
2
+
3
+ /**
4
+ * @goodz-core/sdk — Exchange API Type Definitions
5
+ *
6
+ * Hand-crafted types mirroring the GoodZ.Exchange MCP tool surface.
7
+ * Covers marketplace listings, auctions, WTB, P2P trades, watchlist,
8
+ * and market data.
9
+ *
10
+ * All prices are in Z-coin (1 Z-coin = $0.10 USD).
11
+ *
12
+ * @module
13
+ */
14
+ type ListingType = "fixed_price" | "auction";
15
+ type ListingCondition = "mint" | "near_mint" | "excellent" | "good" | "fair" | "poor";
16
+ type CompensationDirection = "initiator_pays" | "receiver_pays";
17
+ interface ExchangeBrowseMarketplaceInput {
18
+ listingType?: ListingType;
19
+ limit?: number;
20
+ offset?: number;
21
+ }
22
+ interface ExchangeListing {
23
+ id: number;
24
+ coreInstanceId: number;
25
+ coreGoodzId: number | null;
26
+ listingType: ListingType;
27
+ priceZcoin: number | null;
28
+ startPriceZcoin: number | null;
29
+ buyNowPriceZcoin: number | null;
30
+ currentBidZcoin: number | null;
31
+ condition: ListingCondition | null;
32
+ description: string | null;
33
+ sellerId: number;
34
+ status: string;
35
+ auctionEndsAt: string | null;
36
+ createdAt: string;
37
+ }
38
+ interface ExchangeGetListingDetailInput {
39
+ listingId: number;
40
+ }
41
+ interface ExchangeCreateListingInput {
42
+ coreInstanceId: number;
43
+ coreGoodzId?: number;
44
+ listingType: ListingType;
45
+ /** Price in Z-coin (required for fixed_price) */
46
+ priceZcoin?: number;
47
+ /** Starting price in Z-coin (required for auction) */
48
+ startPriceZcoin?: number;
49
+ /** Buy-now price in Z-coin (optional for auction) */
50
+ buyNowPriceZcoin?: number;
51
+ /** Minimum bid increment in Z-coin */
52
+ minBidIncrementZcoin?: number;
53
+ /** ISO 8601 date string (required for auction) */
54
+ auctionEndsAt?: string;
55
+ condition?: ListingCondition;
56
+ /** Item description (max 2000 chars) */
57
+ description?: string;
58
+ }
59
+ interface ExchangeCreateListingOutput {
60
+ listingId: number;
61
+ status: string;
62
+ }
63
+ interface ExchangeCancelListingInput {
64
+ listingId: number;
65
+ }
66
+ interface ExchangeBuyListingInput {
67
+ listingId: number;
68
+ }
69
+ interface ExchangeBuyListingOutput {
70
+ success: boolean;
71
+ tradeId: number;
72
+ priceZcoin: number;
73
+ platformFee: number;
74
+ sellerProceeds: number;
75
+ }
76
+ interface ExchangePlaceBidInput {
77
+ listingId: number;
78
+ /** Bid amount in Z-coin */
79
+ amountZcoin: number;
80
+ }
81
+ interface ExchangePlaceBidOutput {
82
+ bidId: number;
83
+ amountZcoin: number;
84
+ isWinning: boolean;
85
+ /** If bid meets buy-now price, immediate purchase result */
86
+ immediatePurchase?: ExchangeBuyListingOutput;
87
+ }
88
+ interface ExchangeGetBidsInput {
89
+ listingId: number;
90
+ }
91
+ interface ExchangeBid {
92
+ id: number;
93
+ bidderId: number;
94
+ amountZcoin: number;
95
+ createdAt: string;
96
+ isWinning: boolean;
97
+ }
98
+ interface ExchangeCreateWtbInput {
99
+ title: string;
100
+ coreGoodzId?: number;
101
+ /** Maximum price in Z-coin */
102
+ maxPriceZcoin: number;
103
+ conditionMin?: ListingCondition;
104
+ description?: string;
105
+ }
106
+ interface ExchangeWtb {
107
+ id: number;
108
+ title: string;
109
+ coreGoodzId: number | null;
110
+ maxPriceZcoin: number;
111
+ conditionMin: ListingCondition | null;
112
+ description: string | null;
113
+ buyerId: number;
114
+ status: string;
115
+ createdAt: string;
116
+ }
117
+ interface ExchangeFulfillWtbInput {
118
+ wtbId: number;
119
+ coreGoodzId: number;
120
+ coreInstanceId: number;
121
+ /** Price in Z-coin (must be <= WTB max) */
122
+ priceZcoin: number;
123
+ }
124
+ interface ExchangeFulfillWtbOutput {
125
+ success: boolean;
126
+ tradeId: number;
127
+ priceZcoin: number;
128
+ platformFee: number;
129
+ sellerProceeds: number;
130
+ }
131
+ interface ExchangeCancelWtbInput {
132
+ wtbId: number;
133
+ }
134
+ interface ExchangeTradeItem {
135
+ coreInstanceId: number;
136
+ coreGoodzId?: number;
137
+ }
138
+ interface ExchangeProposeTradeInput {
139
+ receiverId: number;
140
+ initiatorItems: ExchangeTradeItem[];
141
+ receiverItems: ExchangeTradeItem[];
142
+ /** Z-coin compensation amount */
143
+ compensationZcoin?: number;
144
+ compensationDirection?: CompensationDirection;
145
+ message?: string;
146
+ }
147
+ interface ExchangeTradeProposal {
148
+ tradeId: number;
149
+ initiatorId: number;
150
+ receiverId: number;
151
+ status: string;
152
+ initiatorItems: ExchangeTradeItem[];
153
+ receiverItems: ExchangeTradeItem[];
154
+ compensationZcoin: number | null;
155
+ compensationDirection: CompensationDirection | null;
156
+ message: string | null;
157
+ createdAt: string;
158
+ }
159
+ interface ExchangeRespondToTradeInput {
160
+ tradeId: number;
161
+ accept: boolean;
162
+ }
163
+ interface ExchangeRespondToTradeOutput {
164
+ success: boolean;
165
+ tradeId: number;
166
+ status: "accepted" | "rejected";
167
+ }
168
+ interface ExchangeAddToWatchlistInput {
169
+ coreGoodzId?: number;
170
+ listingId?: number;
171
+ notifyOnPriceDrop?: boolean;
172
+ targetPriceZcoin?: number;
173
+ }
174
+ interface ExchangeWatchlistItem {
175
+ id: number;
176
+ coreGoodzId: number | null;
177
+ listingId: number | null;
178
+ targetPriceZcoin: number | null;
179
+ notifyOnPriceDrop: boolean;
180
+ createdAt: string;
181
+ }
182
+ interface ExchangeRemoveFromWatchlistInput {
183
+ watchlistId: number;
184
+ }
185
+ interface ExchangeGetMarketDataInput {
186
+ coreGoodzId: number;
187
+ limit?: number;
188
+ }
189
+ interface ExchangePricePoint {
190
+ priceZcoin: number;
191
+ timestamp: string;
192
+ type: "sale" | "listing";
193
+ }
194
+ interface ExchangeMarketData {
195
+ coreGoodzId: number;
196
+ currentFloorZcoin: number | null;
197
+ avgSalePriceZcoin: number | null;
198
+ totalVolume: number;
199
+ priceHistory: ExchangePricePoint[];
200
+ }
201
+
202
+ /**
203
+ * @goodz-core/sdk — Exchange Namespace
204
+ *
205
+ * Provides typed access to GoodZ.Exchange MCP tools:
206
+ * marketplace listings, auctions, WTB, P2P trades,
207
+ * watchlist, and market data.
208
+ *
209
+ * All prices are in Z-coin (1 Z-coin = $0.10 USD).
210
+ *
211
+ * @module
212
+ */
213
+
214
+ interface ExchangeNamespace {
215
+ /** Browse active marketplace listings. */
216
+ browseMarketplace(input?: ExchangeBrowseMarketplaceInput): Promise<ExchangeListing[]>;
217
+ /** Get detailed info about a specific listing. */
218
+ getListingDetail(input: ExchangeGetListingDetailInput): Promise<ExchangeListing>;
219
+ /** Create a new listing (fixed_price or auction). Core locks the instance atomically. */
220
+ createListing(input: ExchangeCreateListingInput): Promise<ExchangeCreateListingOutput>;
221
+ /** Cancel an active listing. Core unlocks the instance. */
222
+ cancelListing(input: ExchangeCancelListingInput): Promise<any>;
223
+ /** Buy a fixed-price listing. Z-coin debit + ownership transfer via Core settlement. */
224
+ buyListing(input: ExchangeBuyListingInput): Promise<ExchangeBuyListingOutput>;
225
+ /** Place a bid on an auction. If bid meets buy-now price, immediate purchase is executed. */
226
+ placeBid(input: ExchangePlaceBidInput): Promise<ExchangePlaceBidOutput>;
227
+ /** Get all bids for an auction listing (highest first). */
228
+ getBids(input: ExchangeGetBidsInput): Promise<ExchangeBid[]>;
229
+ /** Create a WTB request — announce what you're looking for. */
230
+ createWtb(input: ExchangeCreateWtbInput): Promise<ExchangeWtb>;
231
+ /** Fulfill a WTB request by offering your item. Settlement via Core. */
232
+ fulfillWtb(input: ExchangeFulfillWtbInput): Promise<ExchangeFulfillWtbOutput>;
233
+ /** Cancel your own WTB request. */
234
+ cancelWtb(input: ExchangeCancelWtbInput): Promise<any>;
235
+ /** Propose a trade/swap with another user. Optional Z-coin compensation. */
236
+ proposeTrade(input: ExchangeProposeTradeInput): Promise<ExchangeTradeProposal>;
237
+ /** Accept or reject a trade proposal. If accepted, all items transfer via Core. */
238
+ respondToTrade(input: ExchangeRespondToTradeInput): Promise<ExchangeRespondToTradeOutput>;
239
+ /** Get your watchlist. */
240
+ getWatchlist(): Promise<ExchangeWatchlistItem[]>;
241
+ /** Add a GoodZ or listing to your watchlist. */
242
+ addToWatchlist(input: ExchangeAddToWatchlistInput): Promise<ExchangeWatchlistItem>;
243
+ /** Remove an item from your watchlist. */
244
+ removeFromWatchlist(input: ExchangeRemoveFromWatchlistInput): Promise<any>;
245
+ /** Get market data: price history, floor price, volume, trends. */
246
+ getMarketData(input: ExchangeGetMarketDataInput): Promise<ExchangeMarketData>;
247
+ /** Call a raw MCP tool by name. Escape hatch for tools not yet in the typed API. */
248
+ rawTool<T = any>(toolName: string, args?: Record<string, any>): Promise<T>;
249
+ }
250
+ declare function createExchangeNamespace(transport: TransportConfig): ExchangeNamespace;
251
+
252
+ export { type CompensationDirection, type ExchangeAddToWatchlistInput, type ExchangeBid, type ExchangeBrowseMarketplaceInput, type ExchangeBuyListingInput, type ExchangeBuyListingOutput, type ExchangeCancelListingInput, type ExchangeCancelWtbInput, type ExchangeCreateListingInput, type ExchangeCreateListingOutput, type ExchangeCreateWtbInput, type ExchangeFulfillWtbInput, type ExchangeFulfillWtbOutput, type ExchangeGetBidsInput, type ExchangeGetListingDetailInput, type ExchangeGetMarketDataInput, type ExchangeListing, type ExchangeMarketData, type ExchangeNamespace, type ExchangePlaceBidInput, type ExchangePlaceBidOutput, type ExchangePricePoint, type ExchangeProposeTradeInput, type ExchangeRemoveFromWatchlistInput, type ExchangeRespondToTradeInput, type ExchangeRespondToTradeOutput, type ExchangeTradeItem, type ExchangeTradeProposal, type ExchangeWatchlistItem, type ExchangeWtb, type ListingCondition, type ListingType, createExchangeNamespace };
@@ -0,0 +1,4 @@
1
+ export { createExchangeNamespace } from '../chunk-OUKZ2PRD.js';
2
+ import '../chunk-4SU7SU7K.js';
3
+ //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/dist/index.d.ts CHANGED
@@ -1,21 +1,51 @@
1
- export { AuthGetOAuthAppInfoInput, AuthNamespace, AuthOAuthAppInfo, AuthUser, CardGetInput, CardListBySeriesInput, CollectibleGetCardProfileInput, CollectibleGetInstanceByIdInput, CollectibleGetPublicInstanceInput, CollectibleGetPublicInstancesBatchInput, CollectibleGetShellImageUrlInput, CollectibleNamespace, FranchiseGetInput, GoodZApiError, GoodZApiFieldError, GoodZClient, GoodZClientConfig, GoodZErrorV2, InventoryConfirmOwnershipInput, InventoryConfirmOwnershipOutput, InventoryGetUserInventoryInput, InventoryGrantMintAuthInput, InventoryMintInput, InventoryMintOutput, InventoryNamespace, InventoryTransferByCardInput, InventoryTransferByCardOutput, InventoryTransferHistoryInput, InventoryTransferInput, InventoryTransferOutput, IpNamespace, PurchaseChannel, SaleType, SeriesGetInput, SeriesListByFranchiseInput, TransferReason, UserGetPublicProfileByIdInput, UserGetPublicProfileInput, UserNamespace, UserPublicProfile, ZcoinChargeUserInput, ZcoinChargeUserOutput, ZcoinCommercialTransferInput, ZcoinCommercialTransferOutput, ZcoinCreateDepositOrderInput, ZcoinCreateDepositOrderOutput, ZcoinCreateDirectPurchaseOrderInput, ZcoinCreateDirectPurchaseOrderOutput, ZcoinDepositPackage, ZcoinGetDepositPackagesInput, ZcoinGetDepositStatusInput, ZcoinGetDepositStatusOutput, ZcoinGetMyBalanceOutput, ZcoinGetMyHistoryInput, ZcoinMintAndChargeInput, ZcoinMintAndChargeOutput, ZcoinNamespace, ZcoinTxType, createGoodZClient, createUserClient } from './core/index.js';
1
+ export { AuthNamespace, CollectibleNamespace, GoodZClient, GoodZClientConfig, InventoryNamespace, IpNamespace, UserNamespace, ZcoinNamespace, createGoodZClient, createUserClient } from './core/index.js';
2
+ export { A as AuthGetOAuthAppInfoInput, a as AuthOAuthAppInfo, b as AuthUser, C as CardGetInput, c as CardListBySeriesInput, d as CollectibleGetCardProfileInput, e as CollectibleGetInstanceByIdInput, f as CollectibleGetPublicInstanceInput, g as CollectibleGetPublicInstancesBatchInput, h as CollectibleGetShellImageUrlInput, F as FranchiseGetInput, G as GoodZApiError, i as GoodZApiFieldError, j as GoodZErrorV2, I as InventoryConfirmOwnershipInput, k as InventoryConfirmOwnershipOutput, l as InventoryGetUserInventoryInput, m as InventoryGrantMintAuthInput, n as InventoryMintInput, o as InventoryMintOutput, p as InventoryTransferByCardInput, q as InventoryTransferByCardOutput, r as InventoryTransferHistoryInput, s as InventoryTransferInput, t as InventoryTransferOutput, P as PurchaseChannel, S as SaleType, u as SeriesGetInput, v as SeriesListByFranchiseInput, T as TransferReason, U as UserGetPublicProfileByIdInput, w as UserGetPublicProfileInput, x as UserPublicProfile, Z as ZcoinChargeUserInput, y as ZcoinChargeUserOutput, z as ZcoinCommercialTransferInput, B as ZcoinCommercialTransferOutput, D as ZcoinCreateDepositOrderInput, E as ZcoinCreateDepositOrderOutput, H as ZcoinCreateDirectPurchaseOrderInput, J as ZcoinCreateDirectPurchaseOrderOutput, K as ZcoinDepositPackage, L as ZcoinGetDepositPackagesInput, M as ZcoinGetDepositStatusInput, N as ZcoinGetDepositStatusOutput, O as ZcoinGetMyBalanceOutput, Q as ZcoinGetMyHistoryInput, R as ZcoinMintAndChargeInput, V as ZcoinMintAndChargeOutput, W as ZcoinTxType } from './transport-BOlScYEv.js';
3
+ export { AuthorizationMode, CampaignStatus, CommerceActivateCampaignInput, CommerceBatch, CommerceBatchTier, CommerceBrowseWholesaleInput, CommerceCampaign, CommerceCampaignItem, CommerceCreateBatchInput, CommerceCreateGachaPoolInput, CommerceCreateShopInput, CommerceDeleteWebhookInput, CommerceDrawResult, CommerceEndCampaignInput, CommerceExecutePurchaseInput, CommerceGachaItem, CommerceGachaPool, CommerceGetAuthUrlInput, CommerceGetCampaignInfoInput, CommerceGetCampaignItemsInput, CommerceGetMyOrdersInput, CommerceGetSettlementReportInput, CommerceGetShopDashboardInput, CommerceGetShopsByBlueprintInput, CommerceLaunchCampaignInput, CommerceListMyAppsInput, CommerceManageInventoryInput, CommerceMintToInventoryInput, CommerceNamespace, CommerceOrder, CommercePauseCampaignInput, CommercePityConfig, CommerceProcureBatchInput, CommercePublishToWholesaleInput, CommerceRedeemPhysicalInput, CommerceRegisterAppInput, CommerceRegisterInstancesInput, CommerceRegisterWebhookInput, CommerceSearchMarketplaceInput, CommerceShop, CommerceShopDashboard, CommerceTestWebhookInput, CommerceUpdateAppInput, CommerceUpdateCampaignInput, CommerceWebhook, CommerceWholesaleListing, IntegrationMode, SaleMode } from './commerce/index.js';
4
+ export { CompensationDirection, ExchangeAddToWatchlistInput, ExchangeBid, ExchangeBrowseMarketplaceInput, ExchangeBuyListingInput, ExchangeBuyListingOutput, ExchangeCancelListingInput, ExchangeCancelWtbInput, ExchangeCreateListingInput, ExchangeCreateListingOutput, ExchangeCreateWtbInput, ExchangeFulfillWtbInput, ExchangeFulfillWtbOutput, ExchangeGetBidsInput, ExchangeGetListingDetailInput, ExchangeGetMarketDataInput, ExchangeListing, ExchangeMarketData, ExchangeNamespace, ExchangePlaceBidInput, ExchangePlaceBidOutput, ExchangePricePoint, ExchangeProposeTradeInput, ExchangeRemoveFromWatchlistInput, ExchangeRespondToTradeInput, ExchangeRespondToTradeOutput, ExchangeTradeItem, ExchangeTradeProposal, ExchangeWatchlistItem, ExchangeWtb, ListingCondition, ListingType } from './exchange/index.js';
5
+ export { AliveBuildContextInput, AliveChatResponse, AliveClassifiedIntent, AliveClassifyIntentInput, AliveContext, AliveForgetMemoryInput, AliveGetIntimacyInput, AliveIntimacy, AliveMemory, AliveNamespace, AliveRecallMemoriesInput, AliveSendMessageInput, AliveStoreMemoryInput, AliveUpdateIntimacyInput, IntentCategory, MemoryType, MoodState } from './alive/index.js';
2
6
  export { OAuthUrlConfig, TokenManager, TokenManagerConfig, TokenPair, buildAuthorizationUrl, exchangeCode } from './auth/index.js';
3
7
  export { ZCOIN_PRECISION, formatZcoin, formatZcoinWithSymbol, toDisplay, toHundredths } from './zcoin-utils.js';
8
+ export { FORM_FACTORS, FormFactorKey, FormFactorSpec, GoodZCardFocus, GoodZCardFocusProps, getAspectRatioCSS, getFormFactorSpec } from './ui/index.js';
9
+ import 'react/jsx-runtime';
10
+ import 'react';
4
11
 
5
12
  /**
6
- * @goodz-core/sdk — Official SDK for GoodZ.Core
13
+ * @goodz-core/sdk — Official SDK for the GoodZ Ecosystem
14
+ *
15
+ * One package, all services. Stripe-style unified client.
16
+ *
17
+ * ```ts
18
+ * import { createGoodZClient } from "@goodz-core/sdk";
19
+ *
20
+ * const goodz = createGoodZClient({ accessToken: "..." });
21
+ *
22
+ * // Core
23
+ * await goodz.zcoin.getMyBalance();
24
+ * await goodz.inventory.mint({ ... });
25
+ *
26
+ * // Commerce
27
+ * await goodz.commerce.createShop({ name: "My Shop" });
28
+ * await goodz.commerce.executePurchase({ campaignId: 1, quantity: 1 });
29
+ *
30
+ * // Exchange
31
+ * await goodz.exchange.createListing({ ... });
32
+ * await goodz.exchange.getMarketData({ coreGoodzId: 42 });
33
+ *
34
+ * // Alive
35
+ * await goodz.alive.sendMessage({ instanceId: 1, userId: 1, message: "Hello!" });
36
+ * ```
7
37
  *
8
- * This is the main entry point that re-exports all submodules.
9
38
  * For tree-shaking, prefer importing from specific subpaths:
10
39
  *
11
40
  * ```ts
12
41
  * import { createGoodZClient } from "@goodz-core/sdk/core";
13
42
  * import { TokenManager } from "@goodz-core/sdk/auth";
43
+ * import { GoodZCardFocus } from "@goodz-core/sdk/ui";
14
44
  * ```
15
45
  *
16
46
  * @module
17
47
  */
18
48
 
19
- declare const SDK_VERSION = "0.1.0";
49
+ declare const SDK_VERSION = "0.3.0";
20
50
 
21
51
  export { SDK_VERSION };
package/dist/index.js CHANGED
@@ -1,9 +1,14 @@
1
- export { GoodZApiError, createGoodZClient, createUserClient } from './chunk-G7NKU6PT.js';
1
+ export { createGoodZClient, createUserClient } from './chunk-7O6UN2D2.js';
2
2
  export { TokenManager, buildAuthorizationUrl, exchangeCode } from './chunk-EUKUN4JF.js';
3
3
  export { ZCOIN_PRECISION, formatZcoin, formatZcoinWithSymbol, toDisplay, toHundredths } from './chunk-2ZETOE2X.js';
4
+ export { FORM_FACTORS, GoodZCardFocus, getAspectRatioCSS, getFormFactorSpec } from './chunk-K6IFJWLB.js';
5
+ import './chunk-MUZDYQ67.js';
6
+ import './chunk-OUKZ2PRD.js';
7
+ import './chunk-JAVMQXJM.js';
8
+ export { GoodZApiError } from './chunk-4SU7SU7K.js';
4
9
 
5
10
  // src/index.ts
6
- var SDK_VERSION = "0.1.0";
11
+ var SDK_VERSION = "0.3.0";
7
12
 
8
13
  export { SDK_VERSION };
9
14
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAoDO,IAAM,WAAA,GAAc","file":"index.js","sourcesContent":["/**\n * @goodz-core/sdk — Official SDK for GoodZ.Core\n *\n * This is the main entry point that re-exports all submodules.\n * For tree-shaking, prefer importing from specific subpaths:\n *\n * ```ts\n * import { createGoodZClient } from \"@goodz-core/sdk/core\";\n * import { TokenManager } from \"@goodz-core/sdk/auth\";\n * ```\n *\n * @module\n */\n\n// Core client\nexport {\n createGoodZClient,\n createUserClient,\n GoodZApiError,\n type GoodZClient,\n type GoodZClientConfig,\n type ZcoinNamespace,\n type InventoryNamespace,\n type CollectibleNamespace,\n type UserNamespace,\n type AuthNamespace,\n type IpNamespace,\n} from \"./core/index\";\n\n// All API types\nexport type * from \"./types\";\n\n// Auth helpers\nexport {\n TokenManager,\n buildAuthorizationUrl,\n exchangeCode,\n type TokenManagerConfig,\n type TokenPair,\n type OAuthUrlConfig,\n} from \"./auth/index\";\n\n// Z-coin utilities\nexport {\n ZCOIN_PRECISION,\n toHundredths,\n toDisplay,\n formatZcoin,\n formatZcoinWithSymbol,\n} from \"./zcoin-utils\";\n\n// SDK version\nexport const SDK_VERSION = \"0.1.0\";\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAqGO,IAAM,WAAA,GAAc","file":"index.js","sourcesContent":["/**\n * @goodz-core/sdk — Official SDK for the GoodZ Ecosystem\n *\n * One package, all services. Stripe-style unified client.\n *\n * ```ts\n * import { createGoodZClient } from \"@goodz-core/sdk\";\n *\n * const goodz = createGoodZClient({ accessToken: \"...\" });\n *\n * // Core\n * await goodz.zcoin.getMyBalance();\n * await goodz.inventory.mint({ ... });\n *\n * // Commerce\n * await goodz.commerce.createShop({ name: \"My Shop\" });\n * await goodz.commerce.executePurchase({ campaignId: 1, quantity: 1 });\n *\n * // Exchange\n * await goodz.exchange.createListing({ ... });\n * await goodz.exchange.getMarketData({ coreGoodzId: 42 });\n *\n * // Alive\n * await goodz.alive.sendMessage({ instanceId: 1, userId: 1, message: \"Hello!\" });\n * ```\n *\n * For tree-shaking, prefer importing from specific subpaths:\n *\n * ```ts\n * import { createGoodZClient } from \"@goodz-core/sdk/core\";\n * import { TokenManager } from \"@goodz-core/sdk/auth\";\n * import { GoodZCardFocus } from \"@goodz-core/sdk/ui\";\n * ```\n *\n * @module\n */\n\n// Core client (includes all namespace types)\nexport {\n createGoodZClient,\n createUserClient,\n GoodZApiError,\n type GoodZClient,\n type GoodZClientConfig,\n // Core namespaces\n type ZcoinNamespace,\n type InventoryNamespace,\n type CollectibleNamespace,\n type UserNamespace,\n type AuthNamespace,\n type IpNamespace,\n // Sub-site namespaces\n type CommerceNamespace,\n type ExchangeNamespace,\n type AliveNamespace,\n} from \"./core/index\";\n\n// All API types — Core\nexport type * from \"./types\";\n\n// All API types — Commerce\nexport type * from \"./types-commerce\";\n\n// All API types — Exchange\nexport type * from \"./types-exchange\";\n\n// All API types — Alive\nexport type * from \"./types-alive\";\n\n// Auth helpers\nexport {\n TokenManager,\n buildAuthorizationUrl,\n exchangeCode,\n type TokenManagerConfig,\n type TokenPair,\n type OAuthUrlConfig,\n} from \"./auth/index\";\n\n// Z-coin utilities\nexport {\n ZCOIN_PRECISION,\n toHundredths,\n toDisplay,\n formatZcoin,\n formatZcoinWithSymbol,\n} from \"./zcoin-utils\";\n\n// UI components (React 18+)\n// Note: Import from \"@goodz-core/sdk/ui\" for tree-shaking\nexport {\n GoodZCardFocus,\n type GoodZCardFocusProps,\n type FormFactorKey,\n type FormFactorSpec,\n FORM_FACTORS,\n getFormFactorSpec,\n getAspectRatioCSS,\n} from \"./ui/index\";\n\n// SDK version\nexport const SDK_VERSION = \"0.3.0\";\n"]}