@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.
@@ -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
- export { PublishableKey as $, AppId as A, EVM_ADDRESS_RE as B, CachedJwt as C, RevertSummary as Ct, AllowanceKey as D, Address$1 as E, ChainId as F, OrgId as G, EpochMs as H, CountryCode as I, PayrollGroupId as J, PartyId as K, CurrencyCode as L, AuthUserId as M, BlockNumber as N, AllowedOrigin as O, BudgetId as P, Profile$1 as Q, DocumentHash as R, AuthCachePortTag as S, FailureMode as St, AccountId as T, Handle as U, Email as V, Money as W, PermissionAssignmentId as X, PayrollRunId as Y, PermissionId as Z, ClockPort as _, isCapxulError as _t, SignerStatusStore as a, WeiAmount as at, AuthCacheError as b, ChainUpstream as bt, AccountProviderSource as c, toHandle as ct, eip1193AccountProvider as d, CAPXUL_ERROR_CODES as dt, RoleKey as et, localPrivateKeyAccountProvider as f, CapxulError as ft, SmartAccount as g, Failure as gt, Session as h, Errors as ht, SignerStatus as i, TxHash as it, AuthSession as j, AnonymousDistinctId as k, AccountRequirement as l, toPartyId as lt, Profile as m, CapxulErrorDetails as mt, CapxulSigner as n, SmartAccount$1 as nt, injectedWalletSigner as o, toAddress as ot, CapxulResult as p, CapxulErrorCode as pt, PaymentCommandId as q, Eip1193RequestProvider as r, TesterKind as rt, AccountProvider as s, toCountryCode as st, CapxulDigestSigner as t, SessionToken as tt, Eip1193Provider as u, CAPXUL_PAYMENTS_V2_ADDRESS as ut, AuthClientPort as v, CHAIN_UPSTREAMS as vt, Account$1 as w, AuthCachePort as x, FAILURE_MODES as xt, CanSendOtpStatus as y, ChainCause as yt, DurationMs as z };
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 };