@tetsuo-ai/marketplace-react 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/README.md +93 -47
- package/dist/chunk-7NKRSPPN.js +227 -0
- package/dist/chunk-7NKRSPPN.js.map +1 -0
- package/dist/{chunk-BNILOX3O.js → chunk-CDDHUFMG.js} +38 -6
- package/dist/chunk-CDDHUFMG.js.map +1 -0
- package/dist/chunk-FIDFPM5A.cjs +40 -0
- package/dist/chunk-FIDFPM5A.cjs.map +1 -0
- package/dist/chunk-IJKWKY4H.cjs +1370 -0
- package/dist/chunk-IJKWKY4H.cjs.map +1 -0
- package/dist/chunk-JTSG5FGC.cjs +397 -0
- package/dist/chunk-JTSG5FGC.cjs.map +1 -0
- package/dist/chunk-ONC6L3IX.cjs +97 -0
- package/dist/chunk-ONC6L3IX.cjs.map +1 -0
- package/dist/chunk-R76EUYDI.cjs +233 -0
- package/dist/chunk-R76EUYDI.cjs.map +1 -0
- package/dist/chunk-RG5JZ6JL.js +378 -0
- package/dist/chunk-RG5JZ6JL.js.map +1 -0
- package/dist/components/index.cjs +158 -1513
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +2 -2
- package/dist/hooks/index.cjs +693 -457
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +109 -28
- package/dist/hooks/index.d.ts +109 -28
- package/dist/hooks/index.js +659 -178
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-DQ3Xovkq.d.ts → index-BAyr1ODZ.d.ts} +76 -6
- package/dist/{index-UxuvIlmD.d.cts → index-C20NVU7_.d.cts} +76 -6
- package/dist/index.cjs +284 -1752
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +64 -4
- package/dist/index.js.map +1 -1
- package/dist/signers/index.cjs +22 -161
- package/dist/signers/index.cjs.map +1 -1
- package/dist/signers/index.d.cts +16 -11
- package/dist/signers/index.d.ts +16 -11
- package/dist/signers/index.js +1 -1
- package/dist/testing/index.d.cts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/theme/agenc-tailwind-preset.cjs +134 -108
- package/dist/{types-jvISR6bc.d.cts → types-B10rndEI.d.cts} +16 -7
- package/dist/{types-jvISR6bc.d.ts → types-B10rndEI.d.ts} +16 -7
- package/dist/{useAgentTrackRecord-BCvRHYM2.d.cts → useAgentTrackRecord-Ch7gHTFj.d.cts} +40 -3
- package/dist/{useAgentTrackRecord-BCvRHYM2.d.ts → useAgentTrackRecord-Ch7gHTFj.d.ts} +40 -3
- package/package.json +6 -3
- package/src/components/GuaranteedBadge.tsx +73 -0
- package/src/components/HireCheckoutModal.tsx +5 -2
- package/src/components/index.ts +4 -0
- package/src/components/strings.ts +8 -0
- package/src/hooks/index.ts +14 -0
- package/src/hooks/internal.ts +179 -22
- package/src/hooks/useAgentTrackRecord.ts +5 -2
- package/src/hooks/useCompletionBond.ts +191 -0
- package/src/hooks/useDispute.ts +46 -9
- package/src/hooks/useHire.ts +113 -23
- package/src/hooks/useHumanlessHireFlow.ts +335 -115
- package/src/hooks/useListing.ts +2 -2
- package/src/hooks/useListings.ts +2 -2
- package/src/hooks/useRateHire.ts +32 -5
- package/src/hooks/useReferrerEarnings.ts +4 -1
- package/src/hooks/useSubmissionReview.ts +95 -32
- package/src/hooks/useTaskActivation.ts +51 -9
- package/src/hooks/useTaskGuarantee.ts +123 -0
- package/src/hooks/useTaskLifecycle.ts +104 -24
- package/src/hooks/useTaskStatus.ts +121 -26
- package/src/hooks/useTaskWork.ts +76 -12
- package/src/hooks/useWalletSigner.ts +11 -16
- package/src/index.ts +5 -0
- package/src/provider/AgencProvider.tsx +95 -3
- package/src/provider/referrer.ts +1 -1
- package/src/signers/README.md +13 -7
- package/src/signers/index.ts +6 -1
- package/src/signers/strings.ts +13 -1
- package/src/signers/types.ts +16 -5
- package/src/signers/wallet-account.ts +115 -29
- package/src/signers/wallet-adapter.ts +38 -4
- package/src/theme/agenc-tailwind-preset.cjs +134 -108
- package/src/types.ts +32 -3
- package/dist/chunk-BNILOX3O.js.map +0 -1
- package/dist/chunk-BTAVED7S.js +0 -226
- package/dist/chunk-BTAVED7S.js.map +0 -1
- package/dist/chunk-ON6XR4XO.js +0 -128
- package/dist/chunk-ON6XR4XO.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ProgramAccountsTransport, CreateIndexerClientOptions, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
|
|
2
|
+
import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ModerationAccountReadRpc, ProgramAccountsTransport, CreateIndexerClientOptions, TaskGuarantee, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
|
|
3
|
+
import { T as TaskGuaranteeReader, f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-Ch7gHTFj.js';
|
|
3
4
|
import { Address, TransactionSigner, Rpc, GetProgramAccountsApi } from '@solana/kit';
|
|
4
|
-
import { f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-BCvRHYM2.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Shared types for `@tetsuo-ai/marketplace-react`.
|
|
@@ -114,7 +114,7 @@ interface ValidatedReferrerConfig {
|
|
|
114
114
|
* The runtime answer to "can a referral fee actually be charged on this
|
|
115
115
|
* cluster?". Returned by `resolveReferrerCapability()`.
|
|
116
116
|
*
|
|
117
|
-
* Referrer settlement is live on the full
|
|
117
|
+
* Referrer settlement is live on the full protocol surface. `live` is true
|
|
118
118
|
* when a validated provider referrer is configured. Aggregated earnings remain a
|
|
119
119
|
* separate indexer-gated read surface.
|
|
120
120
|
*/
|
|
@@ -136,6 +136,15 @@ interface ReferrerCapability {
|
|
|
136
136
|
interface AgencProviderConfig {
|
|
137
137
|
/** Target cluster; drives default RPC/indexer endpoint resolution. */
|
|
138
138
|
network?: AgencNetwork;
|
|
139
|
+
/**
|
|
140
|
+
* Stable identity for an opaque/custom deployment. It is folded into every
|
|
141
|
+
* TanStack Query key in addition to the resolved network and endpoints.
|
|
142
|
+
* Supply this when `client`, `queryTransport`, or hook-level readers point at
|
|
143
|
+
* a deployment whose identity cannot be derived from public URLs. Use the
|
|
144
|
+
* same value during SSR/hydration and across reloads that share persisted
|
|
145
|
+
* query state; never place credentials in it.
|
|
146
|
+
*/
|
|
147
|
+
cacheNamespace?: string;
|
|
139
148
|
/** HTTP RPC endpoint. Overrides the network default. */
|
|
140
149
|
rpcUrl?: string;
|
|
141
150
|
/** WebSocket RPC endpoint (for subscriptions). Overrides the network default. */
|
|
@@ -152,6 +161,13 @@ interface AgencProviderConfig {
|
|
|
152
161
|
* `startLocalMarketplace().client` plugs in for hook e2e.
|
|
153
162
|
*/
|
|
154
163
|
client?: MarketplaceClient;
|
|
164
|
+
/**
|
|
165
|
+
* Explicit account-read RPC for funded hire/activation orchestration,
|
|
166
|
+
* including moderation-account resolution and finalized reconciliation.
|
|
167
|
+
* It wins over `rpcUrl`. Supply this alongside a custom `client` when that
|
|
168
|
+
* client is not backed by the provider network's HTTP endpoint.
|
|
169
|
+
*/
|
|
170
|
+
orchestrationRpc?: ModerationAccountReadRpc;
|
|
155
171
|
/**
|
|
156
172
|
* Pre-built read transport override slot (tests/mocks/SSR fixtures). Wins over
|
|
157
173
|
* `indexer`/`rpc` resolution.
|
|
@@ -165,6 +181,8 @@ interface AgencProviderConfig {
|
|
|
165
181
|
interface AgencContextValue {
|
|
166
182
|
/** Resolved target network. */
|
|
167
183
|
network: AgencNetwork;
|
|
184
|
+
/** Stable deployment identity included in every query key and invalidation. */
|
|
185
|
+
cacheNamespace: string;
|
|
168
186
|
/** The unified read transport (indexer-first, gPA fallback). */
|
|
169
187
|
read: ReadTransport;
|
|
170
188
|
/**
|
|
@@ -174,11 +192,21 @@ interface AgencContextValue {
|
|
|
174
192
|
client: MarketplaceClient | null;
|
|
175
193
|
/**
|
|
176
194
|
* The resolved HTTP RPC endpoint (config override or the network default),
|
|
177
|
-
* or `null` when none resolves. Hooks use it for
|
|
195
|
+
* or `null` when none resolves. Hooks use it for targeted per-task reads —
|
|
178
196
|
* e.g. resolving the WP-A1 `moderation_attestor` roster account during
|
|
179
|
-
* activation
|
|
197
|
+
* activation, and the `useTaskGuarantee` completion-bond read (a
|
|
198
|
+
* task-scoped `getProgramAccounts` with no single-account equivalent; the
|
|
199
|
+
* RPC must allow gPA, and an injected reader seam bypasses it). LIST
|
|
200
|
+
* queries stay with the read transport.
|
|
180
201
|
*/
|
|
181
202
|
rpcUrl: string | null;
|
|
203
|
+
/** Explicit account-read seam used by funded orchestration, or `null`. */
|
|
204
|
+
orchestrationRpc: ModerationAccountReadRpc | null;
|
|
205
|
+
/**
|
|
206
|
+
* HTTP RPC used by funded orchestration. A network default is used only for
|
|
207
|
+
* a provider-built client; a custom client receives no implicit endpoint.
|
|
208
|
+
*/
|
|
209
|
+
orchestrationRpcUrl: string | null;
|
|
182
210
|
/**
|
|
183
211
|
* The configured hosted-indexer base URL (`config.indexer.baseUrl`), or
|
|
184
212
|
* `null` when reads run over gPA/queryTransport. Earnings hooks prefer it
|
|
@@ -438,6 +466,46 @@ interface VerifiedBadgeProps extends ThemableProps {
|
|
|
438
466
|
*/
|
|
439
467
|
declare function VerifiedBadge({ verified, unstyled, className, }: VerifiedBadgeProps): ReactNode;
|
|
440
468
|
|
|
469
|
+
/**
|
|
470
|
+
* `<GuaranteedBadge task={...} />` — the Guaranteed Hire badge (WP-H3).
|
|
471
|
+
*
|
|
472
|
+
* Renders NOTHING unless the task is guaranteed (a live worker completion
|
|
473
|
+
* bond: the worker staked 25% of the reward on passing review). When it is,
|
|
474
|
+
* shows a small success-tone badge with plain-English copy; the full detail
|
|
475
|
+
* sentence rides on `title`/`aria-label`.
|
|
476
|
+
*
|
|
477
|
+
* Connected by default: given `task`, it reads through {@link useTaskGuarantee}
|
|
478
|
+
* (provider `rpcUrl` gPA read, or the `guaranteeReader` seam). Pass a
|
|
479
|
+
* pre-resolved `guarantee` to use it presentationally (no read at all) — an
|
|
480
|
+
* explicit `guarantee` (including `null`) wins over the `task` read.
|
|
481
|
+
*
|
|
482
|
+
* HONEST BOUNDARY (phase 1): the copy says the buyer is refunded and the
|
|
483
|
+
* worker FORFEITS the bond — it deliberately does NOT promise the buyer the
|
|
484
|
+
* bond itself, because a forfeited bond pays the protocol treasury until
|
|
485
|
+
* phase 2 redirects it to the harmed party. Keep host copy within that line.
|
|
486
|
+
*
|
|
487
|
+
* @module components/GuaranteedBadge
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
/** Props for {@link GuaranteedBadge}. */
|
|
491
|
+
interface GuaranteedBadgeProps extends ThemableProps {
|
|
492
|
+
/** The Task PDA to read the guarantee for (connected mode). */
|
|
493
|
+
task?: Address | string | null;
|
|
494
|
+
/**
|
|
495
|
+
* Pre-resolved guarantee state (presentational mode — overrides the `task`
|
|
496
|
+
* read entirely; pass `null` for a known-unguaranteed task).
|
|
497
|
+
*/
|
|
498
|
+
guarantee?: TaskGuarantee | null;
|
|
499
|
+
/** Injected reader seam forwarded to {@link useTaskGuarantee} (tests/litesvm). */
|
|
500
|
+
guaranteeReader?: TaskGuaranteeReader;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Show that a task's result is backed by the worker's 25% completion bond.
|
|
504
|
+
* Renders nothing while loading, on read errors, and for unguaranteed tasks —
|
|
505
|
+
* the badge only ever ASSERTS a live guarantee, never its absence.
|
|
506
|
+
*/
|
|
507
|
+
declare function GuaranteedBadge({ task, guarantee, guaranteeReader, unstyled, className, }: GuaranteedBadgeProps): ReactNode;
|
|
508
|
+
|
|
441
509
|
/**
|
|
442
510
|
* Component-layer string catalog (PLAN_2 A3).
|
|
443
511
|
*
|
|
@@ -533,6 +601,8 @@ declare const EN_COMPONENT_STRINGS: {
|
|
|
533
601
|
readonly "components.provider.verifiedDomainLabel": "Verified domain {domain}";
|
|
534
602
|
readonly "components.provider.claimedDomain": "Claims: {domain}";
|
|
535
603
|
readonly "components.provider.claimedDomainLabel": "Claimed domain {domain} (not verified on-chain)";
|
|
604
|
+
readonly "components.guarantee.badge": "Guaranteed — worker has 25% at stake";
|
|
605
|
+
readonly "components.guarantee.detail": "Worker has 25% at stake — if the result fails review you're refunded and the worker forfeits the bond.";
|
|
536
606
|
readonly "components.poweredBy.label": "Powered by AgenC";
|
|
537
607
|
readonly "components.poweredBy.trustLink": "Learn how this works";
|
|
538
608
|
};
|
|
@@ -1269,4 +1339,4 @@ interface PoweredByAgenCProps extends ThemableProps {
|
|
|
1269
1339
|
*/
|
|
1270
1340
|
declare function PoweredByAgenC({ href, newTab, label, unstyled, className, }: PoweredByAgenCProps): ReactNode;
|
|
1271
1341
|
|
|
1272
|
-
export {
|
|
1342
|
+
export { Spinner as $, type AgencProviderConfig as A, Badge as B, type CreateReadTransportConfig as C, DEFAULT_TRUST_HREF as D, EN_COMPONENT_STRINGS as E, ListingGrid as F, type GpaReadSource as G, HireButton as H, type IndexerConfig as I, type ListingGridProps as J, type ModalProps as K, ListingCard as L, Modal as M, ModerationBadge as N, type ModerationBadgeProps as O, type ModerationState as P, PoweredByAgenC as Q, type ReferrerCapability as R, type PoweredByAgenCProps as S, ProviderCard as T, type ProviderCardProps as U, type ValidatedReferrerConfig as V, type ReadListingResult as W, ReferrerDisclosure as X, type ReferrerDisclosureProps as Y, ReviewPanel as Z, type ReviewPanelProps as _, type AgencContextValue as a, type SpinnerProps as a0, type StateKind as a1, StateMessage as a2, type StateMessageProps as a3, type StringCatalog as a4, type StringId as a5, type StringVars as a6, TaskTimeline as a7, type TaskTimelineProps as a8, type ThemableProps as a9, type TranslateOptions as aa, UNVERIFIED as ab, type UseAgentVerificationOptions as ac, type UseAgentVerificationResult as ad, VerifiedBadge as ae, type VerifiedBadgeProps as af, agentVerificationReaderFromRpc as ag, cx as ah, decodeListingCategory as ai, decodeListingName as aj, decodeListingTags as ak, elementClass as al, evaluateAgentVerification as am, formatPriceSol as an, formatRate as ao, formatSol as ap, moderationStateOf as aq, rootClass as ar, t as as, tc as at, toHex as au, truncateAddress as av, useAgentVerification as aw, useFocusTrap as ax, type ReferrerConfig as b, type AgencNetwork as c, type ReadTransport as d, type AgentVerificationReader as e, type AgentVerificationReaderOptions as f, type AgentVerificationResult as g, type AgentVerificationRpc as h, type BadgeProps as i, type BadgeTone as j, Button as k, type ButtonProps as l, type ButtonVariant as m, COMPONENT_CATALOG as n, type ComponentStringId as o, DisputeBanner as p, type DisputeBannerProps as q, EN_STRINGS as r, GuaranteedBadge as s, type GuaranteedBadgeProps as t, type HireButtonProps as u, type HireCheckoutListing as v, HireCheckoutModal as w, type HireCheckoutModalProps as x, type ListingCardData as y, type ListingCardProps as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ProgramAccountsTransport, CreateIndexerClientOptions, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
|
|
2
|
+
import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, ModerationAccountReadRpc, ProgramAccountsTransport, CreateIndexerClientOptions, TaskGuarantee, TaskStatus, fetchMaybeAgentVerification, AgentVerification } from '@tetsuo-ai/marketplace-sdk';
|
|
3
|
+
import { T as TaskGuaranteeReader, f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-Ch7gHTFj.cjs';
|
|
3
4
|
import { Address, TransactionSigner, Rpc, GetProgramAccountsApi } from '@solana/kit';
|
|
4
|
-
import { f as HireStatus, b as AnyHireInput, i as ReviewStatus, c as DisputeStatus, a as AgentTrackRecord } from './useAgentTrackRecord-BCvRHYM2.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Shared types for `@tetsuo-ai/marketplace-react`.
|
|
@@ -114,7 +114,7 @@ interface ValidatedReferrerConfig {
|
|
|
114
114
|
* The runtime answer to "can a referral fee actually be charged on this
|
|
115
115
|
* cluster?". Returned by `resolveReferrerCapability()`.
|
|
116
116
|
*
|
|
117
|
-
* Referrer settlement is live on the full
|
|
117
|
+
* Referrer settlement is live on the full protocol surface. `live` is true
|
|
118
118
|
* when a validated provider referrer is configured. Aggregated earnings remain a
|
|
119
119
|
* separate indexer-gated read surface.
|
|
120
120
|
*/
|
|
@@ -136,6 +136,15 @@ interface ReferrerCapability {
|
|
|
136
136
|
interface AgencProviderConfig {
|
|
137
137
|
/** Target cluster; drives default RPC/indexer endpoint resolution. */
|
|
138
138
|
network?: AgencNetwork;
|
|
139
|
+
/**
|
|
140
|
+
* Stable identity for an opaque/custom deployment. It is folded into every
|
|
141
|
+
* TanStack Query key in addition to the resolved network and endpoints.
|
|
142
|
+
* Supply this when `client`, `queryTransport`, or hook-level readers point at
|
|
143
|
+
* a deployment whose identity cannot be derived from public URLs. Use the
|
|
144
|
+
* same value during SSR/hydration and across reloads that share persisted
|
|
145
|
+
* query state; never place credentials in it.
|
|
146
|
+
*/
|
|
147
|
+
cacheNamespace?: string;
|
|
139
148
|
/** HTTP RPC endpoint. Overrides the network default. */
|
|
140
149
|
rpcUrl?: string;
|
|
141
150
|
/** WebSocket RPC endpoint (for subscriptions). Overrides the network default. */
|
|
@@ -152,6 +161,13 @@ interface AgencProviderConfig {
|
|
|
152
161
|
* `startLocalMarketplace().client` plugs in for hook e2e.
|
|
153
162
|
*/
|
|
154
163
|
client?: MarketplaceClient;
|
|
164
|
+
/**
|
|
165
|
+
* Explicit account-read RPC for funded hire/activation orchestration,
|
|
166
|
+
* including moderation-account resolution and finalized reconciliation.
|
|
167
|
+
* It wins over `rpcUrl`. Supply this alongside a custom `client` when that
|
|
168
|
+
* client is not backed by the provider network's HTTP endpoint.
|
|
169
|
+
*/
|
|
170
|
+
orchestrationRpc?: ModerationAccountReadRpc;
|
|
155
171
|
/**
|
|
156
172
|
* Pre-built read transport override slot (tests/mocks/SSR fixtures). Wins over
|
|
157
173
|
* `indexer`/`rpc` resolution.
|
|
@@ -165,6 +181,8 @@ interface AgencProviderConfig {
|
|
|
165
181
|
interface AgencContextValue {
|
|
166
182
|
/** Resolved target network. */
|
|
167
183
|
network: AgencNetwork;
|
|
184
|
+
/** Stable deployment identity included in every query key and invalidation. */
|
|
185
|
+
cacheNamespace: string;
|
|
168
186
|
/** The unified read transport (indexer-first, gPA fallback). */
|
|
169
187
|
read: ReadTransport;
|
|
170
188
|
/**
|
|
@@ -174,11 +192,21 @@ interface AgencContextValue {
|
|
|
174
192
|
client: MarketplaceClient | null;
|
|
175
193
|
/**
|
|
176
194
|
* The resolved HTTP RPC endpoint (config override or the network default),
|
|
177
|
-
* or `null` when none resolves. Hooks use it for
|
|
195
|
+
* or `null` when none resolves. Hooks use it for targeted per-task reads —
|
|
178
196
|
* e.g. resolving the WP-A1 `moderation_attestor` roster account during
|
|
179
|
-
* activation
|
|
197
|
+
* activation, and the `useTaskGuarantee` completion-bond read (a
|
|
198
|
+
* task-scoped `getProgramAccounts` with no single-account equivalent; the
|
|
199
|
+
* RPC must allow gPA, and an injected reader seam bypasses it). LIST
|
|
200
|
+
* queries stay with the read transport.
|
|
180
201
|
*/
|
|
181
202
|
rpcUrl: string | null;
|
|
203
|
+
/** Explicit account-read seam used by funded orchestration, or `null`. */
|
|
204
|
+
orchestrationRpc: ModerationAccountReadRpc | null;
|
|
205
|
+
/**
|
|
206
|
+
* HTTP RPC used by funded orchestration. A network default is used only for
|
|
207
|
+
* a provider-built client; a custom client receives no implicit endpoint.
|
|
208
|
+
*/
|
|
209
|
+
orchestrationRpcUrl: string | null;
|
|
182
210
|
/**
|
|
183
211
|
* The configured hosted-indexer base URL (`config.indexer.baseUrl`), or
|
|
184
212
|
* `null` when reads run over gPA/queryTransport. Earnings hooks prefer it
|
|
@@ -438,6 +466,46 @@ interface VerifiedBadgeProps extends ThemableProps {
|
|
|
438
466
|
*/
|
|
439
467
|
declare function VerifiedBadge({ verified, unstyled, className, }: VerifiedBadgeProps): ReactNode;
|
|
440
468
|
|
|
469
|
+
/**
|
|
470
|
+
* `<GuaranteedBadge task={...} />` — the Guaranteed Hire badge (WP-H3).
|
|
471
|
+
*
|
|
472
|
+
* Renders NOTHING unless the task is guaranteed (a live worker completion
|
|
473
|
+
* bond: the worker staked 25% of the reward on passing review). When it is,
|
|
474
|
+
* shows a small success-tone badge with plain-English copy; the full detail
|
|
475
|
+
* sentence rides on `title`/`aria-label`.
|
|
476
|
+
*
|
|
477
|
+
* Connected by default: given `task`, it reads through {@link useTaskGuarantee}
|
|
478
|
+
* (provider `rpcUrl` gPA read, or the `guaranteeReader` seam). Pass a
|
|
479
|
+
* pre-resolved `guarantee` to use it presentationally (no read at all) — an
|
|
480
|
+
* explicit `guarantee` (including `null`) wins over the `task` read.
|
|
481
|
+
*
|
|
482
|
+
* HONEST BOUNDARY (phase 1): the copy says the buyer is refunded and the
|
|
483
|
+
* worker FORFEITS the bond — it deliberately does NOT promise the buyer the
|
|
484
|
+
* bond itself, because a forfeited bond pays the protocol treasury until
|
|
485
|
+
* phase 2 redirects it to the harmed party. Keep host copy within that line.
|
|
486
|
+
*
|
|
487
|
+
* @module components/GuaranteedBadge
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
/** Props for {@link GuaranteedBadge}. */
|
|
491
|
+
interface GuaranteedBadgeProps extends ThemableProps {
|
|
492
|
+
/** The Task PDA to read the guarantee for (connected mode). */
|
|
493
|
+
task?: Address | string | null;
|
|
494
|
+
/**
|
|
495
|
+
* Pre-resolved guarantee state (presentational mode — overrides the `task`
|
|
496
|
+
* read entirely; pass `null` for a known-unguaranteed task).
|
|
497
|
+
*/
|
|
498
|
+
guarantee?: TaskGuarantee | null;
|
|
499
|
+
/** Injected reader seam forwarded to {@link useTaskGuarantee} (tests/litesvm). */
|
|
500
|
+
guaranteeReader?: TaskGuaranteeReader;
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* Show that a task's result is backed by the worker's 25% completion bond.
|
|
504
|
+
* Renders nothing while loading, on read errors, and for unguaranteed tasks —
|
|
505
|
+
* the badge only ever ASSERTS a live guarantee, never its absence.
|
|
506
|
+
*/
|
|
507
|
+
declare function GuaranteedBadge({ task, guarantee, guaranteeReader, unstyled, className, }: GuaranteedBadgeProps): ReactNode;
|
|
508
|
+
|
|
441
509
|
/**
|
|
442
510
|
* Component-layer string catalog (PLAN_2 A3).
|
|
443
511
|
*
|
|
@@ -533,6 +601,8 @@ declare const EN_COMPONENT_STRINGS: {
|
|
|
533
601
|
readonly "components.provider.verifiedDomainLabel": "Verified domain {domain}";
|
|
534
602
|
readonly "components.provider.claimedDomain": "Claims: {domain}";
|
|
535
603
|
readonly "components.provider.claimedDomainLabel": "Claimed domain {domain} (not verified on-chain)";
|
|
604
|
+
readonly "components.guarantee.badge": "Guaranteed — worker has 25% at stake";
|
|
605
|
+
readonly "components.guarantee.detail": "Worker has 25% at stake — if the result fails review you're refunded and the worker forfeits the bond.";
|
|
536
606
|
readonly "components.poweredBy.label": "Powered by AgenC";
|
|
537
607
|
readonly "components.poweredBy.trustLink": "Learn how this works";
|
|
538
608
|
};
|
|
@@ -1269,4 +1339,4 @@ interface PoweredByAgenCProps extends ThemableProps {
|
|
|
1269
1339
|
*/
|
|
1270
1340
|
declare function PoweredByAgenC({ href, newTab, label, unstyled, className, }: PoweredByAgenCProps): ReactNode;
|
|
1271
1341
|
|
|
1272
|
-
export {
|
|
1342
|
+
export { Spinner as $, type AgencProviderConfig as A, Badge as B, type CreateReadTransportConfig as C, DEFAULT_TRUST_HREF as D, EN_COMPONENT_STRINGS as E, ListingGrid as F, type GpaReadSource as G, HireButton as H, type IndexerConfig as I, type ListingGridProps as J, type ModalProps as K, ListingCard as L, Modal as M, ModerationBadge as N, type ModerationBadgeProps as O, type ModerationState as P, PoweredByAgenC as Q, type ReferrerCapability as R, type PoweredByAgenCProps as S, ProviderCard as T, type ProviderCardProps as U, type ValidatedReferrerConfig as V, type ReadListingResult as W, ReferrerDisclosure as X, type ReferrerDisclosureProps as Y, ReviewPanel as Z, type ReviewPanelProps as _, type AgencContextValue as a, type SpinnerProps as a0, type StateKind as a1, StateMessage as a2, type StateMessageProps as a3, type StringCatalog as a4, type StringId as a5, type StringVars as a6, TaskTimeline as a7, type TaskTimelineProps as a8, type ThemableProps as a9, type TranslateOptions as aa, UNVERIFIED as ab, type UseAgentVerificationOptions as ac, type UseAgentVerificationResult as ad, VerifiedBadge as ae, type VerifiedBadgeProps as af, agentVerificationReaderFromRpc as ag, cx as ah, decodeListingCategory as ai, decodeListingName as aj, decodeListingTags as ak, elementClass as al, evaluateAgentVerification as am, formatPriceSol as an, formatRate as ao, formatSol as ap, moderationStateOf as aq, rootClass as ar, t as as, tc as at, toHex as au, truncateAddress as av, useAgentVerification as aw, useFocusTrap as ax, type ReferrerConfig as b, type AgencNetwork as c, type ReadTransport as d, type AgentVerificationReader as e, type AgentVerificationReaderOptions as f, type AgentVerificationResult as g, type AgentVerificationRpc as h, type BadgeProps as i, type BadgeTone as j, Button as k, type ButtonProps as l, type ButtonVariant as m, COMPONENT_CATALOG as n, type ComponentStringId as o, DisputeBanner as p, type DisputeBannerProps as q, EN_STRINGS as r, GuaranteedBadge as s, type GuaranteedBadgeProps as t, type HireButtonProps as u, type HireCheckoutListing as v, HireCheckoutModal as w, type HireCheckoutModalProps as x, type ListingCardData as y, type ListingCardProps as z };
|