@tetsuo-ai/marketplace-react 0.3.1 → 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/CHANGELOG.md +35 -0
- package/dist/{chunk-D2TDU3TJ.js → chunk-AKPPKMQ2.js} +3 -3
- package/dist/{chunk-D2TDU3TJ.js.map → chunk-AKPPKMQ2.js.map} +1 -1
- package/dist/{chunk-WJUVTFJ7.js → chunk-BNILOX3O.js} +4 -4
- package/dist/{chunk-WJUVTFJ7.js.map → chunk-BNILOX3O.js.map} +1 -1
- package/dist/{chunk-FAIRTAIB.js → chunk-BTAVED7S.js} +88 -5
- package/dist/chunk-BTAVED7S.js.map +1 -0
- package/dist/{chunk-ECU7HGO3.js → chunk-H6PJIDQR.js} +4 -3
- package/dist/chunk-H6PJIDQR.js.map +1 -0
- package/dist/{chunk-MNJ2EQDJ.js → chunk-ON6XR4XO.js} +3 -3
- package/dist/{chunk-MNJ2EQDJ.js.map → chunk-ON6XR4XO.js.map} +1 -1
- package/dist/components/index.cjs +57 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +3 -3
- package/dist/hooks/index.cjs +159 -48
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +20 -9
- package/dist/hooks/index.d.ts +20 -9
- package/dist/hooks/index.js +80 -53
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-DGq7M4mo.d.ts → index-DQ3Xovkq.d.ts} +8 -1
- package/dist/{index-CrEAPlme.d.cts → index-UxuvIlmD.d.cts} +8 -1
- package/dist/index.cjs +57 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/signers/index.cjs +2 -1
- package/dist/signers/index.cjs.map +1 -1
- package/dist/signers/index.js +2 -2
- package/package.json +2 -2
- package/src/hooks/moderation-attestor.ts +176 -57
- package/src/hooks/useHire.ts +27 -0
- package/src/hooks/useHumanlessHireFlow.ts +74 -17
- package/src/hooks/useReferrerEarnings.ts +73 -38
- package/src/hooks/useTaskActivation.ts +19 -13
- package/src/provider/AgencProvider.tsx +1 -0
- package/src/strings/index.ts +3 -1
- package/src/types.ts +6 -0
- package/dist/chunk-ECU7HGO3.js.map +0 -1
- package/dist/chunk-FAIRTAIB.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @tetsuo-ai/marketplace-react
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes (breaking — the P1.2 open-roster flag-day cutover)
|
|
6
|
+
|
|
7
|
+
- Rebuild on `@tetsuo-ai/marketplace-sdk@^0.8.0` (peer): hire and activation
|
|
8
|
+
inputs now REQUIRE the P1.2 `moderator` — the pubkey whose attestation the
|
|
9
|
+
gate consumes, read from your attestation service (e.g. attest.agenc.ag
|
|
10
|
+
`GET /v1/info` → `moderator`). `HumanlessHireFlowModerationResult` gains a
|
|
11
|
+
required `moderator` field (the flow's activation consumes the record of
|
|
12
|
+
whoever signed the moderation), validated fail-closed like the hash/URI.
|
|
13
|
+
- The hooks resolve the gate MECHANICS automatically (the trust decision
|
|
14
|
+
stays the caller's): `useHire`, `useHumanlessHireFlow`, and
|
|
15
|
+
`useTaskActivation` attach the `["moderation_attestor", moderator]` roster
|
|
16
|
+
entry when the named moderator is a registered attestor — only after
|
|
17
|
+
verifying the entry exists on-chain (attaching an uninitialized PDA fails
|
|
18
|
+
the gate harder than the authority branch) — and point the gate at the
|
|
19
|
+
FROZEN pre-P1.2 record when no v2 record exists but a legacy record by the
|
|
20
|
+
same moderator does (grace window). Caller-supplied `moderationAttestor` /
|
|
21
|
+
`moderatorIsAttestor` / record overrides win over resolution.
|
|
22
|
+
- `resolveActivationModerationAttestor` (internal) is replaced by
|
|
23
|
+
`resolveActivationModerationAccounts` + `resolveHireListingModerationAccounts`.
|
|
24
|
+
|
|
25
|
+
## 0.3.2
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- `useReferrerEarnings` is LIVE: it now fetches the deployed P3.8 explorer
|
|
30
|
+
endpoint (`GET /api/explorer/referrers/:wallet/hires`) instead of returning
|
|
31
|
+
the gated zero state. The endpoint base resolves from
|
|
32
|
+
`config.indexer.baseUrl`, else the hosted per-network default (mainnet:
|
|
33
|
+
`https://api.agenc.ag`); when no base resolves the documented not-live zero
|
|
34
|
+
state is returned with no network request, and a failed fetch surfaces as
|
|
35
|
+
`error` with zero totals — earnings are never fabricated. The provider
|
|
36
|
+
context now also exposes `indexerBaseUrl`.
|
|
37
|
+
|
|
3
38
|
## 0.3.1
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t } from './chunk-
|
|
1
|
+
import { t } from './chunk-H6PJIDQR.js';
|
|
2
2
|
import { isAddress, address } from '@solana/kit';
|
|
3
3
|
import { createIndexerClient, getServiceListingDecoder, listActiveListings } from '@tetsuo-ai/marketplace-sdk';
|
|
4
4
|
|
|
@@ -90,5 +90,5 @@ function createReadTransport(config) {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
export { ReadTransportUnsupportedError, createReadTransport };
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
93
|
+
//# sourceMappingURL=chunk-AKPPKMQ2.js.map
|
|
94
|
+
//# sourceMappingURL=chunk-AKPPKMQ2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/transport/index.ts"],"names":["gpaListActiveListings"],"mappings":";;;;AAwCO,IAAM,6BAAA,GAAN,cAA4C,KAAA,CAAM;AAAA;AAAA,EAE9C,SAAA;AAAA,EACT,YAAY,SAAA,EAAmB;AAC7B,IAAA,KAAA;AAAA,MACE,mBA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MAAA,CAAO,OAAA,EAAS,MAAA,CAAO,oBAAoB,CAAA;AAAA,EACzE;AACA,EAAA,IAAI,MAAA,CAAO,GAAA,EAAK,OAAO,gBAAA,CAAiB,OAAO,GAAG,CAAA;AAClD,EAAA,MAAM,IAAI,KAAA,CAAM,CAAA,CAAE,wBAAwB,CAAC,CAAA;AAC7C","file":"chunk-AKPPKMQ2.js","sourcesContent":["/**\n * The read-transport abstraction — indexer-first with RPC/gPA fallback.\n *\n * `createReadTransport({ indexer?, rpc?, queryTransport? })` returns one\n * {@link ReadTransport}. When an indexer `baseUrl` is set it routes through the\n * SDK's `createIndexerClient` (the scale path); otherwise it falls back to the\n * SDK's gPA `listActiveListings` / account fetch (the trustless path). The two\n * backends return parity shapes BY SDK DESIGN, so callers never branch on which\n * one is live.\n *\n * `queryTransport` is a full override slot — pass a mock/pre-built transport\n * (tests, SSR fixtures) and it is used verbatim.\n *\n * SSR-safe: no `window`/`document` and no Node built-ins at module scope; the\n * SDK's indexer client is browser-safe (fetch + kit codecs only).\n *\n * @module transport\n */\nimport { address, isAddress } from \"@solana/kit\";\nimport {\n createIndexerClient,\n getServiceListingDecoder,\n listActiveListings as gpaListActiveListings,\n type IndexerClient,\n} from \"@tetsuo-ai/marketplace-sdk\";\nimport { t } from \"../strings/index.js\";\nimport type {\n Address,\n CreateReadTransportConfig,\n GpaReadSource,\n IndexerConfig,\n ReadListingResult,\n ReadTransport,\n} from \"../types.js\";\nimport type { CreateIndexerClientOptions } from \"@tetsuo-ai/marketplace-sdk\";\n\n/**\n * Thrown when a gPA-fallback transport is asked for an indexer-only capability\n * (aggregated hires / track record have no trustless gPA equivalent).\n */\nexport class ReadTransportUnsupportedError extends Error {\n /** The unsupported operation name. */\n readonly operation: string;\n constructor(operation: string) {\n super(\n `Read operation \"${operation}\" requires the indexer backend; the gPA ` +\n `fallback has no trustless equivalent. Configure an indexer baseUrl on ` +\n `<AgencProvider> to use it.`,\n );\n this.name = \"ReadTransportUnsupportedError\";\n this.operation = operation;\n }\n}\n\n/** Coerce a string|Address PDA into a kit Address (validates base58). */\nfunction toAddress(pda: Address | string): Address {\n if (typeof pda !== \"string\") return pda;\n if (!isAddress(pda)) {\n throw new TypeError(`Not a valid base58 Solana address: ${pda}`);\n }\n return address(pda);\n}\n\n/** Build the indexer-backed read transport. */\nfunction indexerReadTransport(\n config: IndexerConfig,\n indexerClientOptions?: Partial<CreateIndexerClientOptions>,\n): ReadTransport {\n const client: IndexerClient = createIndexerClient({\n baseUrl: config.baseUrl,\n apiKey: config.apiKey,\n ...(indexerClientOptions ?? {}),\n });\n return {\n kind: \"indexer\",\n listActiveListings: (options) => client.listActiveListings(options),\n async getListing(pda): Promise<ReadListingResult> {\n const listing = await client.getListing(pda);\n const account = getServiceListingDecoder().decode(\n base64ToBytes(listing.accountData),\n );\n return {\n address: toAddress(listing.pda),\n account,\n indexer: listing,\n };\n },\n listingHires: (pda) => client.listingHires(pda),\n agentTrackRecord: (pda) => client.agentTrackRecord(pda),\n };\n}\n\n/** Build the gPA-fallback read transport over a kit RPC / ProgramAccountsTransport. */\nfunction gpaReadTransport(rpc: GpaReadSource): ReadTransport {\n return {\n kind: \"gpa\",\n listActiveListings: (options) => gpaListActiveListings(rpc, options),\n async getListing(pda): Promise<ReadListingResult> {\n // No single-account decode helper crosses the transport seam here, so we\n // scope the active-listings query down to the one PDA. (The indexer path\n // is the efficient one; this fallback is the trustless escape hatch.)\n const target = toAddress(pda);\n const all = await gpaListActiveListings(rpc, {});\n const hit = all.find((entry) => entry.address === target);\n if (hit === undefined) {\n throw new Error(\n `Listing ${pda} not found among active listings via the gPA ` +\n `fallback (it may be inactive, or your RPC restricts ` +\n `getProgramAccounts — use an indexer baseUrl for single-listing ` +\n `lookups).`,\n );\n }\n return { address: hit.address, account: hit.account };\n },\n listingHires() {\n return Promise.reject(new ReadTransportUnsupportedError(\"listingHires\"));\n },\n agentTrackRecord() {\n return Promise.reject(\n new ReadTransportUnsupportedError(\"agentTrackRecord\"),\n );\n },\n };\n}\n\n/** Browser-safe base64 → bytes (atob in browsers, Buffer in Node). */\nfunction base64ToBytes(b64: string): Uint8Array {\n if (typeof atob === \"function\") {\n const binary = atob(b64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i += 1) {\n bytes[i] = binary.charCodeAt(i);\n }\n return bytes;\n }\n // Node fallback — Buffer is always present there.\n return Uint8Array.from(Buffer.from(b64, \"base64\"));\n}\n\n/**\n * Create the unified read transport.\n *\n * Resolution order:\n * 1. `queryTransport` override (wins — tests/mocks/SSR fixtures);\n * 2. `indexer.baseUrl` present → indexer-first transport;\n * 3. `rpc` present → gPA fallback transport;\n * 4. nothing configured → throws a descriptive error.\n *\n * @param config - See {@link CreateReadTransportConfig}.\n * @returns A {@link ReadTransport}.\n * @throws Error when no read source is configured.\n */\nexport function createReadTransport(\n config: CreateReadTransportConfig,\n): ReadTransport {\n if (config.queryTransport) return config.queryTransport;\n if (config.indexer?.baseUrl) {\n return indexerReadTransport(config.indexer, config.indexerClientOptions);\n }\n if (config.rpc) return gpaReadTransport(config.rpc);\n throw new Error(t(\"transport.noReadSource\"));\n}\n\nexport type { ReadTransport } from \"../types.js\";\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useAgencContext, useHire, useWalletSigner } from './chunk-
|
|
2
|
-
import { EN_STRINGS, t } from './chunk-
|
|
1
|
+
import { useAgencContext, useHire, useWalletSigner } from './chunk-BTAVED7S.js';
|
|
2
|
+
import { EN_STRINGS, t } from './chunk-H6PJIDQR.js';
|
|
3
3
|
import { TaskStatus, values, findAgentVerificationPda, fetchMaybeAgentVerification } from '@tetsuo-ai/marketplace-sdk';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { useEffect, useRef, useId, useState, useCallback } from 'react';
|
|
@@ -1290,5 +1290,5 @@ function PoweredByAgenC({
|
|
|
1290
1290
|
}
|
|
1291
1291
|
|
|
1292
1292
|
export { AGENC_THEME_CLASS, AGENC_TOKENS_CSS_PATH, Badge, Button, COMPONENT_CATALOG, DEFAULT_TRUST_HREF, DisputeBanner, EN_COMPONENT_STRINGS, HireButton, HireCheckoutModal, ListingCard, ListingGrid, Modal, ModerationBadge, PoweredByAgenC, ProviderCard, ReferrerDisclosure, ReviewPanel, Spinner, StateMessage, TaskTimeline, UNVERIFIED, VerifiedBadge, agencThemeStyleTag, agentVerificationReaderFromRpc, cx, decodeListingCategory, decodeListingName, decodeListingTags, elementClass, evaluateAgentVerification, formatPriceSol, formatRate, formatSol, moderationStateOf, resolveThemeClassName, rootClass, tc, toHex, truncateAddress, useAgentVerification, useFocusTrap };
|
|
1293
|
-
//# sourceMappingURL=chunk-
|
|
1294
|
-
//# sourceMappingURL=chunk-
|
|
1293
|
+
//# sourceMappingURL=chunk-BNILOX3O.js.map
|
|
1294
|
+
//# sourceMappingURL=chunk-BNILOX3O.js.map
|