@tetsuo-ai/marketplace-react 0.4.1 → 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 +56 -0
- package/README.md +93 -47
- package/dist/chunk-7NKRSPPN.js +227 -0
- package/dist/chunk-7NKRSPPN.js.map +1 -0
- package/dist/{chunk-JVXGNW3Q.js → chunk-CDDHUFMG.js} +6 -5
- 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-XLA7DARS.js → chunk-RG5JZ6JL.js} +159 -36
- package/dist/chunk-RG5JZ6JL.js.map +1 -0
- package/dist/components/index.cjs +158 -1594
- 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 +656 -509
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +63 -29
- package/dist/hooks/index.d.ts +63 -29
- package/dist/hooks/index.js +619 -196
- package/dist/hooks/index.js.map +1 -1
- package/dist/{index-CmVz0OOm.d.ts → index-BAyr1ODZ.d.ts} +28 -3
- package/dist/{index-DAZzhuO4.d.cts → index-C20NVU7_.d.cts} +28 -3
- package/dist/index.cjs +284 -1833
- 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-DPt3SfYz.d.cts → useAgentTrackRecord-Ch7gHTFj.d.cts} +1 -1
- package/dist/{useAgentTrackRecord-DPt3SfYz.d.ts → useAgentTrackRecord-Ch7gHTFj.d.ts} +1 -1
- package/package.json +6 -3
- package/src/components/HireCheckoutModal.tsx +5 -2
- package/src/hooks/index.ts +1 -0
- package/src/hooks/internal.ts +178 -24
- package/src/hooks/useAgentTrackRecord.ts +5 -2
- package/src/hooks/useCompletionBond.ts +56 -21
- 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 +4 -1
- 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 +3 -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 +27 -1
- package/dist/chunk-JVXGNW3Q.js.map +0 -1
- package/dist/chunk-ON6XR4XO.js +0 -128
- package/dist/chunk-ON6XR4XO.js.map +0 -1
- package/dist/chunk-XLA7DARS.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, 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-
|
|
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';
|
|
4
4
|
import { Address, TransactionSigner, Rpc, GetProgramAccountsApi } from '@solana/kit';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -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
|
/**
|
|
@@ -182,6 +200,13 @@ interface AgencContextValue {
|
|
|
182
200
|
* queries stay with the read transport.
|
|
183
201
|
*/
|
|
184
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;
|
|
185
210
|
/**
|
|
186
211
|
* The configured hosted-indexer base URL (`config.indexer.baseUrl`), or
|
|
187
212
|
* `null` when reads run over gPA/queryTransport. Earnings hooks prefer it
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, ButtonHTMLAttributes, HTMLAttributes, RefObject } from 'react';
|
|
2
|
-
import { ListActiveListingsOptions, DecodedProgramAccount, ServiceListing, IndexerListing, IndexerHire, IndexerAgentTrackRecord, MarketplaceClient, 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-
|
|
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';
|
|
4
4
|
import { Address, TransactionSigner, Rpc, GetProgramAccountsApi } from '@solana/kit';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -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
|
/**
|
|
@@ -182,6 +200,13 @@ interface AgencContextValue {
|
|
|
182
200
|
* queries stay with the read transport.
|
|
183
201
|
*/
|
|
184
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;
|
|
185
210
|
/**
|
|
186
211
|
* The configured hosted-indexer base URL (`config.indexer.baseUrl`), or
|
|
187
212
|
* `null` when reads run over gPA/queryTransport. Earnings hooks prefer it
|