@capxul/sdk-react 0.1.0-alpha.9 → 0.2.0-alpha.3
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 +98 -0
- package/README.md +1 -1
- package/dist/index.cjs +449 -71
- package/dist/index.d.cts +143 -41
- package/dist/index.d.ts +143 -41
- package/dist/index.js +444 -74
- package/dist/proof/index.cjs +21 -13
- package/dist/proof/index.js +18 -10
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import * as _capxul_sdk from '@capxul/sdk';
|
|
3
|
-
import { HttpTransport, TransportState, BrowserCapxulConfig, AuthSessionStore, AccountId, OrganizationId, ApiKeyId, BalanceLedgerEntryId, ExternalAccountId, MemberId, Account, ApiKey, BalanceLedgerEntry, DocumentId, Document, ExternalAccount,
|
|
3
|
+
import { HttpTransport, TransportState, BrowserCapxulConfig, AuthSessionStore, AccountId, OrganizationId, ApiKeyId, BalanceLedgerEntryId, ExternalAccountId, MemberId, Account, ApiKey, BalanceLedgerEntry, DocumentId, Document, ExternalAccount, KycProfile, CapxulError as CapxulError$1, Member, OperationId, Operation, Organization, PaymentId, Payment, SafeId, Safe, SubAccountId, SubAccount, TokenTransfer, TransferId, Transfer, Treasury, VirtualAccountId, VirtualAccount, VirtualCardId, VirtualCard, WebhookEndpointId, WebhookEndpoint, WebhookEventId, WebhookEvent, WithdrawalId, Withdrawal, List, MembershipStatus, TokenTransfersListInput, TokenTransfersListPage, MemberInviteResponse, Session } from '@capxul/sdk';
|
|
4
4
|
export { AuthBootstrapFlowContext, AuthBootstrapFlowEvent, AuthFlowContext, AuthFlowEvent, BrowserCapxulConfig, OnboardingFlowContext, OnboardingFlowEvent, ProvisioningFlowContext, ProvisioningFlowEvent } from '@capxul/sdk';
|
|
5
|
-
import { QueryClient, UseQueryResult } from '@tanstack/react-query';
|
|
5
|
+
import { QueryClient, UseQueryResult, UseMutationResult } from '@tanstack/react-query';
|
|
6
6
|
import { CapxulClient } from '@capxul/sdk/client';
|
|
7
7
|
import { CapxulError } from '@capxul/sdk/errors';
|
|
8
|
+
import { Account as Account$1 } from 'viem';
|
|
8
9
|
import * as xstate from 'xstate';
|
|
9
10
|
|
|
10
11
|
type CapxulClientProviderProps = {
|
|
@@ -71,7 +72,7 @@ declare function useCapxulStatus(): TransportState;
|
|
|
71
72
|
* `useCapxulStatus()` can subscribe to its lifecycle state machine.
|
|
72
73
|
*
|
|
73
74
|
* The provider also builds a `ConvexReactClient`-backed data client
|
|
74
|
-
* for the `build-time-urls` arm and feeds it as `config.
|
|
75
|
+
* for the `build-time-urls` arm and feeds it as `config._data` so the
|
|
75
76
|
* SDK domain methods (`me.get`, `accounts.retrieve`, ...) and the
|
|
76
77
|
* React hooks built on top can run authenticated reads against live
|
|
77
78
|
* Convex. The auth lifecycle threads through the optional
|
|
@@ -164,12 +165,10 @@ type QueryResult<T> = {
|
|
|
164
165
|
/**
|
|
165
166
|
* Per-resource singular read hooks — 21 total.
|
|
166
167
|
*
|
|
167
|
-
* Catalogued in the reset hook proof matrix.
|
|
168
|
-
*
|
|
169
|
-
* `
|
|
170
|
-
*
|
|
171
|
-
* 30s `staleTime` matching the `CapxulProvider` default. The
|
|
172
|
-
* remaining 19 hooks plus `useOperation()` still return
|
|
168
|
+
* Catalogued in the reset hook proof matrix. TanStack Query-backed
|
|
169
|
+
* hooks return `UseQueryResult<T, CapxulError>` and route through
|
|
170
|
+
* public `@capxul/sdk` reads with a 30s `staleTime` matching the
|
|
171
|
+
* `CapxulProvider` default. Hooks not yet migrated still return
|
|
173
172
|
* `QueryResult<T>` per the reset transport contract — per-hook
|
|
174
173
|
* migration is the rollout pattern; later tasks lift each in turn.
|
|
175
174
|
* `useOperation()` routes through `operations.retrieve()` so harness
|
|
@@ -238,8 +237,8 @@ declare function useMe(): UseQueryResult<Account, CapxulError$1>;
|
|
|
238
237
|
* 1.8) — per-hook migration is the rollout pattern.
|
|
239
238
|
*/
|
|
240
239
|
declare function useAccount(accountId?: AccountId): QueryResult<Account>;
|
|
241
|
-
declare function useOrganization(
|
|
242
|
-
declare function useMember(
|
|
240
|
+
declare function useOrganization(organizationId: OrganizationId): UseQueryResult<Organization, CapxulError$1>;
|
|
241
|
+
declare function useMember(args: UseMemberArgs): UseQueryResult<Member, CapxulError$1>;
|
|
243
242
|
/**
|
|
244
243
|
* Live; status advances as the indexer reconciles the on-chain
|
|
245
244
|
* deployment. Consumers pattern-match on `data.status` via
|
|
@@ -251,13 +250,12 @@ declare function useMember(_args: UseMemberArgs): QueryResult<Member>;
|
|
|
251
250
|
* stub so onboarding can subscribe to Safe deploy progress.
|
|
252
251
|
*/
|
|
253
252
|
declare function useSafe(safeId: SafeId): QueryResult<Safe>;
|
|
254
|
-
declare function useTreasury(
|
|
253
|
+
declare function useTreasury(organizationId: OrganizationId): UseQueryResult<Treasury, CapxulError$1>;
|
|
255
254
|
/**
|
|
256
255
|
* Org-admin lens only — the hook NEVER returns `secret`.
|
|
257
256
|
*/
|
|
258
257
|
declare function useApiKey(_args: UseApiKeyArgs): QueryResult<ApiKey>;
|
|
259
258
|
declare function useKycProfile(_accountId: AccountId): QueryResult<KycProfile>;
|
|
260
|
-
declare function useKybProfile(_organizationId: OrganizationId): QueryResult<KybProfile>;
|
|
261
259
|
/**
|
|
262
260
|
* Withdrawals v1 W1 (#464) — wired through the SDK.
|
|
263
261
|
*
|
|
@@ -270,10 +268,22 @@ declare function useKybProfile(_organizationId: OrganizationId): QueryResult<Kyb
|
|
|
270
268
|
* differ but the wire shape is identical.
|
|
271
269
|
*/
|
|
272
270
|
declare function useExternalAccount(args: UseExternalAccountArgs): QueryResult<ExternalAccount>;
|
|
273
|
-
|
|
271
|
+
/**
|
|
272
|
+
* Funds v1 PR-2b (#421) — wired through `capxul.subAccounts.retrieve`.
|
|
273
|
+
*
|
|
274
|
+
* The top-level `subAccounts.retrieve` resolves to the same Convex
|
|
275
|
+
* query handler as `accounts.subAccounts.retrieve` /
|
|
276
|
+
* `organizations.subAccounts.retrieve`; visibility is gated server-side
|
|
277
|
+
* (canon §sub_account read contract — cross-scope reads surface as
|
|
278
|
+
* `NOT_FOUND` rather than a distinct permission code). The SDK has
|
|
279
|
+
* already branded the wire shape via `tryBrandSubAccount`, so the hook
|
|
280
|
+
* receives a fully-branded `SubAccount` (`SubAccountId`, `Money`,
|
|
281
|
+
* `TimestampIso`).
|
|
282
|
+
*/
|
|
283
|
+
declare function useSubAccount(subAccountId: SubAccountId): QueryResult<SubAccount>;
|
|
274
284
|
declare function useVirtualAccount(_virtualAccountId: VirtualAccountId): QueryResult<VirtualAccount>;
|
|
275
285
|
declare function useVirtualCard(_virtualCardId: VirtualCardId): QueryResult<VirtualCard>;
|
|
276
|
-
declare function usePayment(
|
|
286
|
+
declare function usePayment(paymentId: PaymentId): UseQueryResult<Payment, CapxulError$1>;
|
|
277
287
|
declare function useTransfer(_transferId: TransferId): QueryResult<Transfer>;
|
|
278
288
|
type UseTokenTransferArgs = {
|
|
279
289
|
readonly txHash: string;
|
|
@@ -295,7 +305,7 @@ declare function useTokenTransfer(args: UseTokenTransferArgs): QueryResult<Token
|
|
|
295
305
|
* Immutable once written; `live` semantically only for late
|
|
296
306
|
* `paymentId` / `transferId` attachment per Doc 02 §"balance_ledger".
|
|
297
307
|
*/
|
|
298
|
-
declare function useBalanceLedgerEntry(
|
|
308
|
+
declare function useBalanceLedgerEntry(args: UseBalanceLedgerEntryArgs): QueryResult<BalanceLedgerEntry>;
|
|
299
309
|
declare function useDocument(_documentId: DocumentId): QueryResult<Document>;
|
|
300
310
|
/**
|
|
301
311
|
* Withdrawals v1 slice 1 (#440) — wired through `capxul.withdrawals.retrieve`.
|
|
@@ -318,10 +328,10 @@ declare function useWebhookEvent(_eventId: WebhookEventId): QueryResult<WebhookE
|
|
|
318
328
|
/**
|
|
319
329
|
* Per-resource list read hooks — 17 total.
|
|
320
330
|
*
|
|
321
|
-
* Catalogued in Doc 08 §3.
|
|
322
|
-
* `
|
|
323
|
-
*
|
|
324
|
-
*
|
|
331
|
+
* Catalogued in Doc 08 §3. TanStack Query-backed hooks return
|
|
332
|
+
* `UseQueryResult<List<T>, CapxulError>` and route through public
|
|
333
|
+
* `@capxul/sdk` reads. Hooks not yet migrated still return
|
|
334
|
+
* `QueryResult<List<T>>` per CANON.md §4.29.
|
|
325
335
|
*
|
|
326
336
|
* Argument shapes follow sdk-surface.md §3b:
|
|
327
337
|
* - Cursor-paginated lists take `{ limit?, cursor? }` filters per
|
|
@@ -379,8 +389,11 @@ type OrgDocumentsFilters = OrgScopedFilters & {
|
|
|
379
389
|
* "My orgs" — returns every organization the authenticated caller
|
|
380
390
|
* is a member of, with the co-member lens per row.
|
|
381
391
|
*/
|
|
382
|
-
declare function useOrganizations():
|
|
383
|
-
|
|
392
|
+
declare function useOrganizations(filters?: PaginationFilters): UseQueryResult<List<Organization>, CapxulError$1>;
|
|
393
|
+
type MembersFilters = {
|
|
394
|
+
readonly status?: MembershipStatus | "all";
|
|
395
|
+
};
|
|
396
|
+
declare function useMembers(organizationId: OrganizationId, filters?: MembersFilters): UseQueryResult<List<Member>, CapxulError$1>;
|
|
384
397
|
/**
|
|
385
398
|
* Withdrawals v1 W1 (#464) — wired through the SDK.
|
|
386
399
|
*
|
|
@@ -392,14 +405,31 @@ declare function useMembers(_organizationId: OrganizationId): QueryResult<List<M
|
|
|
392
405
|
* `pending_verification` rows visible (D5).
|
|
393
406
|
*/
|
|
394
407
|
declare function useExternalAccounts(args: OwnerRef): QueryResult<List<ExternalAccount>>;
|
|
395
|
-
|
|
408
|
+
/**
|
|
409
|
+
* Funds v1 PR-2b (#421) — wired through the SDK.
|
|
410
|
+
*
|
|
411
|
+
* Branches on `args.ownerKind`: `account` scope reads through
|
|
412
|
+
* `capxul.accounts.subAccounts.list({ accountId })`; `organization`
|
|
413
|
+
* scope reads through `capxul.organizations.subAccounts.list({
|
|
414
|
+
* organizationId })`. Both resolve to the same Convex domain (server
|
|
415
|
+
* derives the writer scope per Pattern A — see `sdk.md`). The SDK
|
|
416
|
+
* has already branded each row via `tryBrandSubAccount`, so consumers
|
|
417
|
+
* receive `List<SubAccount>` with `SubAccountId`, `Money`, and
|
|
418
|
+
* `TimestampIso` in place.
|
|
419
|
+
*
|
|
420
|
+
* Note: `OwnerRef` admits only `"account" | "organization"`. A
|
|
421
|
+
* `sub_account` owner is a type error at the call site — not a runtime
|
|
422
|
+
* not-supported branch — because there is no `listChildSubAccounts`
|
|
423
|
+
* backend endpoint.
|
|
424
|
+
*/
|
|
425
|
+
declare function useSubAccounts(args: OwnerRef): QueryResult<List<SubAccount>>;
|
|
396
426
|
declare function useVirtualAccounts(_filters?: VirtualAccountsFilters): QueryResult<List<VirtualAccount>>;
|
|
397
427
|
declare function useVirtualCards(_filters?: VirtualCardsFilters): QueryResult<List<VirtualCard>>;
|
|
398
428
|
/**
|
|
399
429
|
* Personal-scope payments feed (cursor-paginated per §4.16). Org-scope
|
|
400
430
|
* payments live on `useOrgPayments` per §4.30 (Shape A).
|
|
401
431
|
*/
|
|
402
|
-
declare function usePayments(
|
|
432
|
+
declare function usePayments(filters?: PaymentsFilters): UseQueryResult<List<Payment>, CapxulError$1>;
|
|
403
433
|
declare function useOrgPayments(_args: OrgScopedFilters): QueryResult<List<Payment>>;
|
|
404
434
|
declare function useTransfers(_filters?: TransfersFilters): QueryResult<List<Transfer>>;
|
|
405
435
|
declare function useOrgTransfers(_args: OrgScopedFilters): QueryResult<List<Transfer>>;
|
|
@@ -418,7 +448,9 @@ declare function useTokenTransfers(filters?: TokenTransfersListInput): QueryResu
|
|
|
418
448
|
* Append-only per-owner balance-delta feed. Live for late
|
|
419
449
|
* `paymentId` / `transferId` attachment per Doc 02.
|
|
420
450
|
*/
|
|
421
|
-
declare function useBalanceLedger(
|
|
451
|
+
declare function useBalanceLedger(args: OwnerScopedFilters): QueryResult<List<BalanceLedgerEntry>>;
|
|
452
|
+
declare function useAccountBalanceLedger(accountId: AccountId, filters?: PaginationFilters): QueryResult<List<BalanceLedgerEntry>>;
|
|
453
|
+
declare function useOrgBalanceLedger(args: OrgScopedFilters): QueryResult<List<BalanceLedgerEntry>>;
|
|
422
454
|
/**
|
|
423
455
|
* Personal-scope documents. `filters.type` narrows the polymorphic
|
|
424
456
|
* `Document` union to a single variant (invoice, payroll_run,
|
|
@@ -445,6 +477,46 @@ declare function useApiKeys(_organizationId: OrganizationId): QueryResult<List<A
|
|
|
445
477
|
*/
|
|
446
478
|
declare function useWebhookEndpoints(): QueryResult<List<WebhookEndpoint>>;
|
|
447
479
|
|
|
480
|
+
/**
|
|
481
|
+
* Org-scoped member mutation hooks — TanStack `useMutation` wrappers.
|
|
482
|
+
*
|
|
483
|
+
* Slice 5 (#627): invite, accept, updateRole, revoke, remove, resend.
|
|
484
|
+
* Each hook returns the standard `{ mutate, mutateAsync, isPending, error, data }`
|
|
485
|
+
* shape so consumers can fire-and-forget or await + handle errors.
|
|
486
|
+
*/
|
|
487
|
+
|
|
488
|
+
type InviteMemberArgs = {
|
|
489
|
+
readonly organizationId: OrganizationId;
|
|
490
|
+
readonly email: string;
|
|
491
|
+
readonly role: Member["role"];
|
|
492
|
+
};
|
|
493
|
+
type AcceptInvitationArgs = {
|
|
494
|
+
readonly token: string;
|
|
495
|
+
};
|
|
496
|
+
type UpdateMemberRoleArgs = {
|
|
497
|
+
readonly organizationId: OrganizationId;
|
|
498
|
+
readonly memberId: MemberId;
|
|
499
|
+
readonly role: Member["role"];
|
|
500
|
+
};
|
|
501
|
+
type RevokeMemberArgs = {
|
|
502
|
+
readonly organizationId: OrganizationId;
|
|
503
|
+
readonly memberId: MemberId;
|
|
504
|
+
};
|
|
505
|
+
type RemoveMemberArgs = {
|
|
506
|
+
readonly organizationId: OrganizationId;
|
|
507
|
+
readonly memberId: MemberId;
|
|
508
|
+
};
|
|
509
|
+
type ResendInvitationArgs = {
|
|
510
|
+
readonly organizationId: OrganizationId;
|
|
511
|
+
readonly memberId: MemberId;
|
|
512
|
+
};
|
|
513
|
+
declare function useInviteMember(): UseMutationResult<MemberInviteResponse, CapxulError$1, InviteMemberArgs>;
|
|
514
|
+
declare function useAcceptInvitation(): UseMutationResult<Member, CapxulError$1, AcceptInvitationArgs>;
|
|
515
|
+
declare function useUpdateMemberRole(): UseMutationResult<Member, CapxulError$1, UpdateMemberRoleArgs>;
|
|
516
|
+
declare function useRevokeMember(): UseMutationResult<Member, CapxulError$1, RevokeMemberArgs>;
|
|
517
|
+
declare function useRemoveMember(): UseMutationResult<void, CapxulError$1, RemoveMemberArgs>;
|
|
518
|
+
declare function useResendInvitation(): UseMutationResult<MemberInviteResponse, CapxulError$1, ResendInvitationArgs>;
|
|
519
|
+
|
|
448
520
|
/**
|
|
449
521
|
* Lowercased, shape-validated email address. Brand prevents swapping
|
|
450
522
|
* with `phoneNumber`, `username`, or other string identifiers (per
|
|
@@ -465,10 +537,51 @@ type Username = string & {
|
|
|
465
537
|
readonly __capxulUsernameBrand: "Username";
|
|
466
538
|
};
|
|
467
539
|
|
|
540
|
+
type User = {
|
|
541
|
+
readonly account: Account;
|
|
542
|
+
readonly username: Username;
|
|
543
|
+
readonly safe: Safe;
|
|
544
|
+
readonly session: Session;
|
|
545
|
+
};
|
|
546
|
+
type AuthState = "idle" | "sendingOtp" | "awaitingOtp" | "bootstrapping" | "authenticated" | "error";
|
|
547
|
+
type UseAuthResult = {
|
|
548
|
+
readonly state: AuthState;
|
|
549
|
+
readonly user: User | null;
|
|
550
|
+
readonly error: Error | null;
|
|
551
|
+
readonly signIn: (email: string) => Promise<void>;
|
|
552
|
+
readonly verifyOtp: (email: string, otp: string) => Promise<Session>;
|
|
553
|
+
readonly signOut: () => Promise<void>;
|
|
554
|
+
};
|
|
555
|
+
type UseAuthOptions = {
|
|
556
|
+
/** Optional external signer to use during bootstrap instead of auto-provisioning. */
|
|
557
|
+
readonly signer?: Account$1;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Canonical auth hook — replaces `useAuthFlow` and `useAuthBootstrapFlow`.
|
|
561
|
+
*
|
|
562
|
+
* Reactive state (`state`, `user`, `error`) is suitable for UI
|
|
563
|
+
* observers; `signIn`, `verifyOtp`, and `signOut` return promises so
|
|
564
|
+
* the reference CLI can drive the flow imperatively.
|
|
565
|
+
*
|
|
566
|
+
* Auto-provisions a fresh local-private-key signer via
|
|
567
|
+
* `SignerProvisioner` when the backend signals `bootstrap_required`.
|
|
568
|
+
* Pass an optional `signer` to override auto-provisioning (used by
|
|
569
|
+
* test harnesses that pre-build a deterministic actor).
|
|
570
|
+
*/
|
|
571
|
+
declare function useAuth(options?: UseAuthOptions): UseAuthResult;
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* @deprecated Use `useAuth()` instead. `useAuthFlow` will be removed
|
|
575
|
+
* in a future release.
|
|
576
|
+
*/
|
|
468
577
|
declare function useAuthFlow(): {
|
|
469
578
|
readonly snapshot: xstate.MachineSnapshot<any, any, any, any, any, any, any, any>;
|
|
470
579
|
readonly send: (event: any) => void;
|
|
471
580
|
};
|
|
581
|
+
/**
|
|
582
|
+
* @deprecated Use `useAuth()` instead. `useAuthBootstrapFlow` will be
|
|
583
|
+
* removed in a future release.
|
|
584
|
+
*/
|
|
472
585
|
declare function useAuthBootstrapFlow(): {
|
|
473
586
|
readonly snapshot: xstate.MachineSnapshot<_capxul_sdk.AuthBootstrapFlowContext, {
|
|
474
587
|
readonly type: "ENTER_EMAIL";
|
|
@@ -483,9 +596,6 @@ declare function useAuthBootstrapFlow(): {
|
|
|
483
596
|
} | {
|
|
484
597
|
readonly type: "ENTER_USERNAME";
|
|
485
598
|
readonly username: Username;
|
|
486
|
-
} | {
|
|
487
|
-
readonly type: "ENTER_SIGNER_PROVIDER";
|
|
488
|
-
readonly signerProvider: _capxul_sdk.LocalPrivateKeySignerProvider;
|
|
489
599
|
} | {
|
|
490
600
|
readonly type: "COMPLETE_BOOTSTRAP";
|
|
491
601
|
} | {
|
|
@@ -498,7 +608,6 @@ declare function useAuthBootstrapFlow(): {
|
|
|
498
608
|
[x: string]: xstate.ActorRefFromLogic<xstate.PromiseActorLogic<void, void, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<_capxul_sdk.CompleteBootstrapResult, {
|
|
499
609
|
bootstrapToken: _capxul_sdk.AuthBootstrapToken;
|
|
500
610
|
username: Username;
|
|
501
|
-
signerProvider: _capxul_sdk.LocalPrivateKeySignerProvider;
|
|
502
611
|
}, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<void, {
|
|
503
612
|
email: Email;
|
|
504
613
|
}, xstate.EventObject>> | xstate.ActorRefFromLogic<xstate.PromiseActorLogic<_capxul_sdk.VerifyOtpResult, {
|
|
@@ -532,9 +641,6 @@ declare function useAuthBootstrapFlow(): {
|
|
|
532
641
|
} | {
|
|
533
642
|
readonly type: "ENTER_USERNAME";
|
|
534
643
|
readonly username: Username;
|
|
535
|
-
} | {
|
|
536
|
-
readonly type: "ENTER_SIGNER_PROVIDER";
|
|
537
|
-
readonly signerProvider: _capxul_sdk.LocalPrivateKeySignerProvider;
|
|
538
644
|
} | {
|
|
539
645
|
readonly type: "COMPLETE_BOOTSTRAP";
|
|
540
646
|
} | {
|
|
@@ -591,8 +697,6 @@ type CapxulConnectorSession = {
|
|
|
591
697
|
readonly connectorId: string;
|
|
592
698
|
readonly connectorKind: CapxulConnectorKind;
|
|
593
699
|
readonly signerAddress: string;
|
|
594
|
-
readonly safeAddress?: string;
|
|
595
|
-
readonly signerProvider?: LocalPrivateKeySignerProvider;
|
|
596
700
|
};
|
|
597
701
|
type CapxulConnector = {
|
|
598
702
|
readonly id: string;
|
|
@@ -608,7 +712,6 @@ type InjectedConnectorOptions = {
|
|
|
608
712
|
};
|
|
609
713
|
type LocalPrivateKeyConnectorOptions = {
|
|
610
714
|
readonly privateKey: `0x${string}`;
|
|
611
|
-
readonly safeAddress: string;
|
|
612
715
|
readonly id?: string;
|
|
613
716
|
readonly name?: string;
|
|
614
717
|
};
|
|
@@ -625,14 +728,13 @@ declare function injectedConnector(options?: InjectedConnectorOptions): CapxulCo
|
|
|
625
728
|
/**
|
|
626
729
|
* Resolve a signer from a local private key (dev / e2e harness path).
|
|
627
730
|
*
|
|
628
|
-
* Validates the private key shape (`0x` + 64 hex chars)
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
* key with no I/O.
|
|
731
|
+
* Validates the private key shape (`0x` + 64 hex chars) synchronously
|
|
732
|
+
* at factory time so misconfig surfaces before any UI flow advances.
|
|
733
|
+
* Per-call `connect()` is pure computation — `privateKeyToAccount`
|
|
734
|
+
* derives the address from the key with no I/O.
|
|
633
735
|
*
|
|
634
736
|
* Throws `Errors.invalidInput(...)` on bad inputs.
|
|
635
737
|
*/
|
|
636
738
|
declare function localPrivateKeyConnector(options: LocalPrivateKeyConnectorOptions): CapxulConnector;
|
|
637
739
|
|
|
638
|
-
export { CapxulClientProvider, type CapxulClientProviderProps, type CapxulConnector, type CapxulConnectorKind, type CapxulConnectorSession, CapxulProvider, type CapxulProviderProps, CapxulTransportProvider, type CapxulTransportProviderProps, type DocumentsFilters, type InjectedConnectorOptions, type LocalPrivateKeyConnectorOptions, type OrgDocumentsFilters, type OrgScopedFilters, type OwnerRef, type OwnerScopedFilters, type PaginationFilters, type PaymentsFilters, type QueryResult, type TransfersFilters, type UseApiKeyArgs, type UseBalanceLedgerEntryArgs, type UseExternalAccountArgs, type UseMemberArgs, type UseTokenTransferArgs, type VirtualAccountsFilters, type VirtualCardsFilters, type WithdrawalsFilters, createCapxulConfig, injectedConnector, localPrivateKeyConnector, useAccount, useApiKey, useApiKeys, useAuthBootstrapFlow, useAuthFlow, useBalanceLedger, useBalanceLedgerEntry, useCapxul, useCapxulStatus, useDocument, useDocuments, useExternalAccount, useExternalAccounts,
|
|
740
|
+
export { type AuthState, CapxulClientProvider, type CapxulClientProviderProps, type CapxulConnector, type CapxulConnectorKind, type CapxulConnectorSession, CapxulProvider, type CapxulProviderProps, CapxulTransportProvider, type CapxulTransportProviderProps, type DocumentsFilters, type InjectedConnectorOptions, type LocalPrivateKeyConnectorOptions, type OrgDocumentsFilters, type OrgScopedFilters, type OwnerRef, type OwnerScopedFilters, type PaginationFilters, type PaymentsFilters, type QueryResult, type TransfersFilters, type UseApiKeyArgs, type UseAuthOptions, type UseAuthResult, type UseBalanceLedgerEntryArgs, type UseExternalAccountArgs, type UseMemberArgs, type UseTokenTransferArgs, type User, type VirtualAccountsFilters, type VirtualCardsFilters, type WithdrawalsFilters, createCapxulConfig, injectedConnector, localPrivateKeyConnector, useAcceptInvitation, useAccount, useAccountBalanceLedger, useApiKey, useApiKeys, useAuth, useAuthBootstrapFlow, useAuthFlow, useBalanceLedger, useBalanceLedgerEntry, useCapxul, useCapxulStatus, useDocument, useDocuments, useExternalAccount, useExternalAccounts, useInviteMember, useKycProfile, useMe, useMember, useMembers, useOnboardingFlow, useOperation, useOrgBalanceLedger, useOrgDocuments, useOrgPayments, useOrgTransfers, useOrgWithdrawals, useOrganization, useOrganizations, usePayment, usePayments, useProvisioningFlow, useRemoveMember, useResendInvitation, useRevokeMember, useSafe, useSubAccount, useSubAccounts, useTokenTransfer, useTokenTransfers, useTransfer, useTransfers, useTreasury, useUpdateMemberRole, useVirtualAccount, useVirtualAccounts, useVirtualCard, useVirtualCards, useWebhookEndpoint, useWebhookEndpoints, useWebhookEvent, useWithdrawal, useWithdrawals };
|