@capxul/sdk 4.1.4 → 4.2.0-rc.10
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/dist/{signer-C0hZ6Kiy.d.mts → OAuthBearerAuthClient-C-ip-z8M.d.mts} +30 -6
- package/dist/{clock-C2AUlq1V.mjs → OAuthBearerAuthClient-IB2W1Fzj.mjs} +630 -52
- package/dist/capxul-source.json +11 -0
- package/dist/index.d.mts +65 -51
- package/dist/index.mjs +144 -3505
- package/dist/node/index.d.mts +2 -3
- package/dist/node/index.mjs +1 -2
- package/dist/{create-capxul-client-B3ET402J.mjs → production-BndbwuVx.mjs} +7717 -2966
- package/dist/{observation-Bhdq9-l6.d.mts → production-Du4Vc7YD.d.mts} +248 -34
- package/dist/testing/index.d.mts +82 -2
- package/dist/testing/index.mjs +101 -4
- package/package.json +5 -5
- package/dist/OAuthBearerAuthClient-BHvDR8_0.mjs +0 -211
- package/dist/OAuthBearerAuthClient-D-DLYlKj.d.mts +0 -19
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context, Effect } from "effect";
|
|
2
1
|
import { Account, Address, Hex } from "viem";
|
|
2
|
+
import { Context, Effect } from "effect";
|
|
3
3
|
//#region ../errors/src/chain-cause.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Why an operation failed — the one flat vocabulary. The first four are the
|
|
@@ -257,10 +257,6 @@ declare const Errors: {
|
|
|
257
257
|
}) => CapxulError;
|
|
258
258
|
};
|
|
259
259
|
//#endregion
|
|
260
|
-
//#region ../config/src/capxul-payments-v2.d.ts
|
|
261
|
-
/** Immutable CapxulPaymentsV2 deployment on Base Sepolia. */
|
|
262
|
-
declare const CAPXUL_PAYMENTS_V2_ADDRESS: Address;
|
|
263
|
-
//#endregion
|
|
264
260
|
//#region ../types/src/brand.d.ts
|
|
265
261
|
/**
|
|
266
262
|
* Nominal type helper. `Brand<T, B>` is structurally a `T` at runtime but
|
|
@@ -275,6 +271,13 @@ type Brand<T, B extends string> = T & {
|
|
|
275
271
|
//#endregion
|
|
276
272
|
//#region ../types/src/index.d.ts
|
|
277
273
|
type Address$1 = Brand<string, "Address">;
|
|
274
|
+
/** Canonical ERC-20 CAIP-19 identity. Currency is not asset identity. */
|
|
275
|
+
type AssetId = Brand<string, "AssetId">;
|
|
276
|
+
/** One asset quantity in major units. Registry metadata supplies precision. */
|
|
277
|
+
type AssetAmount = {
|
|
278
|
+
readonly asset: AssetId;
|
|
279
|
+
readonly value: string;
|
|
280
|
+
};
|
|
278
281
|
type Email = Brand<string, "Email">;
|
|
279
282
|
type TesterKind = "human" | "e2e" | "agent";
|
|
280
283
|
type Profile$1 = {
|
|
@@ -375,6 +378,10 @@ declare function toPartyId(raw: unknown): PartyId;
|
|
|
375
378
|
declare function toHandle(raw: unknown): Handle;
|
|
376
379
|
declare function toCountryCode(raw: unknown): CountryCode;
|
|
377
380
|
//#endregion
|
|
381
|
+
//#region ../config/src/capxul-payments-v2.d.ts
|
|
382
|
+
/** Immutable CapxulPaymentsV2 deployment on Base Sepolia. */
|
|
383
|
+
declare const CAPXUL_PAYMENTS_V2_ADDRESS: Address;
|
|
384
|
+
//#endregion
|
|
378
385
|
//#region src/ports/auth-cache.d.ts
|
|
379
386
|
/**
|
|
380
387
|
* AuthCachePort stores the user session and the cached
|
|
@@ -601,4 +608,21 @@ interface Eip1193RequestProvider {
|
|
|
601
608
|
*/
|
|
602
609
|
declare function injectedWalletSigner(provider: Eip1193RequestProvider): CapxulSigner;
|
|
603
610
|
//#endregion
|
|
604
|
-
|
|
611
|
+
//#region src/adapters/auth-client/OAuthBearerAuthClient.d.ts
|
|
612
|
+
interface OAuthBearerAuthClientInput {
|
|
613
|
+
/** The exchange endpoint: `{authBaseUrl}/api/auth/agent/exchange`. */
|
|
614
|
+
readonly exchangeUrl: string;
|
|
615
|
+
/** The shared secret the exchange endpoint checks. The caller holds it. */
|
|
616
|
+
readonly exchangeSecret: string;
|
|
617
|
+
/** The agent's OAuth access token. */
|
|
618
|
+
readonly accessToken: string;
|
|
619
|
+
readonly fetch?: typeof fetch;
|
|
620
|
+
readonly clock?: ClockPort;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* `AuthClientPort` over the backend agent-token exchange. Build one per OAuth
|
|
624
|
+
* access token and hand it to `createCapxulClient({ authClient })`.
|
|
625
|
+
*/
|
|
626
|
+
declare function oauthBearerAuthClient(input: OAuthBearerAuthClientInput): AuthClientPort;
|
|
627
|
+
//#endregion
|
|
628
|
+
export { PayrollGroupId as $, AllowanceKey as A, ChainId as B, AuthCachePort as C, ChainCause as Ct, Account$1 as D, RevertSummary as Dt, CAPXUL_PAYMENTS_V2_ADDRESS as E, FailureMode as Et, AssetId as F, EVM_ADDRESS_RE as G, CurrencyCode as H, AuthSession as I, Handle as J, Email as K, AuthUserId as L, AnonymousDistinctId as M, AppId as N, AccountId as O, AssetAmount as P, PaymentCommandId as Q, BlockNumber as R, AuthCacheError as S, CHAIN_UPSTREAMS as St, CachedJwt as T, FAILURE_MODES as Tt, DocumentHash as U, CountryCode as V, DurationMs as W, OrgId as X, Money as Y, PartyId as Z, Session as _, CapxulErrorCode as _t, Eip1193RequestProvider as a, RoleKey as at, AuthClientPort as b, Failure as bt, injectedWalletSigner as c, TesterKind as ct, AccountRequirement as d, toAddress as dt, PayrollRunId as et, Eip1193Provider as f, toCountryCode as ft, Profile as g, CapxulError as gt, CapxulResult as h, CAPXUL_ERROR_CODES as ht, CapxulSigner as i, PublishableKey as it, AllowedOrigin as j, Address$1 as k, AccountProvider as l, TxHash as lt, localPrivateKeyAccountProvider as m, toPartyId as mt, oauthBearerAuthClient as n, PermissionId as nt, SignerStatus as o, SessionToken as ot, eip1193AccountProvider as p, toHandle as pt, EpochMs as q, CapxulDigestSigner as r, Profile$1 as rt, SignerStatusStore as s, SmartAccount$1 as st, OAuthBearerAuthClientInput as t, PermissionAssignmentId as tt, AccountProviderSource as u, WeiAmount as ut, SmartAccount as v, CapxulErrorDetails as vt, AuthCachePortTag as w, ChainUpstream as wt, CanSendOtpStatus as x, isCapxulError as xt, ClockPort as y, Errors as yt, BudgetId as z };
|