@capxul/sdk 4.20.0-beta.4 → 4.20.0-beta.6

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as PayrollGroupId, B as ChainId, Ct as ChainCause, D as Account, Dt as RevertSummary, E as CAPXUL_PAYMENTS_V2_ADDRESS, Et as FailureMode, F as AssetId, G as EVM_ADDRESS_RE, H as CurrencyCode, I as AuthSession, J as Handle, L as AuthUserId, O as AccountId, P as AssetAmount, St as CHAIN_UPSTREAMS, Tt as FAILURE_MODES, V as CountryCode, X as OrgId, Y as Money, Z as PartyId, _ as Session, _t as CapxulErrorCode, a as Eip1193RequestProvider, at as RoleKey, c as injectedWalletSigner, ct as TesterKind, d as AccountRequirement, dt as toAddress, et as PayrollRunId, f as Eip1193Provider, ft as toCountryCode, g as Profile, gt as CapxulError, h as CapxulResult, ht as CAPXUL_ERROR_CODES, i as CapxulSigner, k as Address, l as AccountProvider, m as localPrivateKeyAccountProvider, mt as toPartyId, o as SignerStatus, p as eip1193AccountProvider, pt as toHandle, r as CapxulDigestSigner, s as SignerStatusStore, u as AccountProviderSource, v as SmartAccount, vt as CapxulErrorDetails, wt as ChainUpstream, xt as isCapxulError, yt as Errors, z as BudgetId } from "./OAuthBearerAuthClient-C-ip-z8M.mjs";
2
- import { $ as OrganizationPaymentBatchInput, $n as RequestStatus, $t as Destination, A as OrgScopedMethods, An as Ref, At as AddressBookAddInput, B as AuthorizeRunOptions, Bn as SmartAccountMethods, Bt as ActivityFilter, C as CurrentUserMethods, Cn as PaymentMoney, Ct as AccountMethods, D as MemberStatus, Dn as PaymentsMethods, Dt as ActorRequest, E as InviteMemberInput, En as PaymentType, Et as ActorRelationshipMethods, F as ResendInviteTokenInput, Fn as AccountLifecycle, Ft as InboxItem, G as PayrollGroupsMethods, Gn as ActorRef, Gt as ActivityPage, H as PayrollGroup, Hn as OrgLifecycle, Ht as ActivityKind, I as RoleDefinition, In as AccountSetupStep, It as InboxMethods, J as PayrollRun, Jn as SubmittedPermissionExecution, Jt as ActivitySummary, K as PayrollMethods, Kn as CurrentHoldings, Kt as ActivityRange, L as RoleSpendCap, Ln as isSettingUpLifecycle, Lt as ActivityAnnotation, M as OrgView, Mn as TargetReference, Mt as AddressBookLabelInput, N as OrganizationAccount, Nn as TargetsMethods, Nt as AddressBookMethods, O as MemberView, On as PaymentsPayInput, Ot as ActorRequestIssueInput, P as OrganizationAuditLogItem, Pn as fingerprintPaymentIntent, Pt as InboxApproveInput, Q as PayrollTermsUnit, Qn as PaymentStatus$1, Qt as DepositInstructions, R as RoleView, Rn as CompleteProfileInput, Rt as ActivityAnnotationInput, S as CurrentUserContext, Sn as PaymentDocumentsMethods, St as ReadyAccountLifecycle, T as DetectPendingOrgInvitationsResult, Tn as PaymentTiming, Tt as ActorProfileMethods, U as PayrollGroupInput, Un as OrgSetupStep, Ut as ActivityListParams, V as PayrollEngagementTerms, Vn as AuthMethods, Vt as ActivityItem, W as PayrollGroupMember, Wn as PayoutAddress, Wt as ActivityMethods, X as PayrollRunStatus, Xn as PAYMENT_DIRECTIONS, Xt as ActivitySummaryTotal, Y as PayrollRunItemInput, Yn as InboxStatus, Yt as ActivitySummaryParams, Z as PayrollRuns, Zn as PAYMENT_STATUSES, Zt as ActorReference, _ as HoldingsMethods, _n as PaymentDirection, _t as OnboardingMethods, a as ObservationContext, an as DestinationRemoveInput, ar as IdentityEvent, at as PermissionCreateInput, b as SystemHealth, bn as PaymentDocumentRender, bt as PersonOnboarding, c as HostObservability, cn as MeMethods, cr as Readiness, ct as PermissionReplaceInput, d as postHogObservability, dn as OfframpMethods, dr as isClaimed, dt as Budget, en as DestinationAddInput, et as OrganizationPaymentInput, f as CapxulClient, fn as OfframpQuote, fr as isRestoring, ft as OrgMe, g as IdentityRuntimeSendResult, gn as PaymentActivityEvidence, gt as CompletedPersonProfile, h as IdentityRuntime, hn as Payment, ht as AccountsMethods, i as ObservationAdapter, in as DestinationRail, ir as Destination$1, it as PermissionChangeInput, j as OrgTemplate, jn as ResolvedTarget, jt as AddressBookEntry, k as OrgMethods, kn as RecipientResolution, kt as ActorRequestsMethods, l as PostHogObservabilityClient, ln as MeProfile, lr as StateLabel, lt as PermissionRevokeInput, m as IdentityProfileDetails, mn as OfframpStatus, mr as InvocationControls, mt as OrgMeOptions, nn as DestinationListInput, nt as OrganizationPaymentsMethods, o as ObservationDelivery, on as DestinationsMethods, or as IdentityState, ot as PermissionMethods, p as CreateCapxulClientInput, pn as OfframpQuoteInput, pr as IdentityTransition, pt as OrgMeMethod, q as PayrollOptions, qn as Permission, qt as ActivityReference, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as DestinationPayload, rr as TelemetryPort, rt as PermissionAssignInput, s as SdkFailureObservation, sn as FinancialOpsMethods, sr as OrgLane, st as PermissionOptions, t as CapxulClientInput, tn as DestinationKind, tt as OrganizationPaymentItemInput, u as PostHogObservabilityOptions, un as MovementActivityEvidence, ur as destination, ut as PermissionReadResult, v as Holding, vn as PaymentDocumentKind, vt as OrganizationOnboarding, w as CreateOrgInput, wn as PaymentStatus, wt as ActorProfile, x as MediaMethods, xn as PaymentDocumentVerification, xt as PersonOnboardingInput, y as SystemMethods, yn as PaymentDocumentRef, yt as OrganizationOnboardingInput, z as AuthorizeRunInput, zn as IdentityMethods, zt as ActivityDetail } from "./production-CJwxgI8u.mjs";
1
+ import { $ as OrgId, A as Address, At as FAILURE_MODES, B as BudgetId, Ct as CapxulErrorDetails, D as Account, Dt as CHAIN_UPSTREAMS, E as CAPXUL_PAYMENTS_V2_ADDRESS, Et as isCapxulError, F as AssetAmount, G as CurrencyCode, I as AssetId, J as EVM_ADDRESS_RE, L as AuthSession, Mt as RevertSummary, O as AccountId, Ot as ChainCause, Q as Money, R as AuthUserId, St as CapxulErrorCode, V as ChainId, W as CountryCode, Z as Handle, _ as Session, _t as toHandle, a as Eip1193RequestProvider, bt as CAPXUL_ERROR_CODES, c as injectedWalletSigner, ct as RoleKey, d as AccountRequirement, dt as TesterKind, et as PartyId, f as Eip1193Provider, g as Profile, gt as toCountryCode, h as CapxulResult, ht as toAddress, i as CapxulSigner, jt as FailureMode, kt as ChainUpstream, l as AccountProvider, m as localPrivateKeyAccountProvider, mt as toAccountId, nt as PayrollGroupId, o as SignerStatus, p as eip1193AccountProvider, r as CapxulDigestSigner, rt as PayrollRunId, s as SignerStatusStore, u as AccountProviderSource, v as SmartAccount, vt as toOrgId, wt as Errors, xt as CapxulError, yt as toPartyId } from "./OAuthBearerAuthClient-B7Nbepmu.mjs";
2
+ import { $ as PayrollRun, $n as CurrentPolicy, $t as ActivityRange, A as InviteMemberInput, An as PaymentTiming, At as AccountMethods, B as OrganizationAuditLogItem, Bn as AccountLifecycle, Bt as AddressBookMethods, C as SystemHealth, Cn as PaymentActivityEvidence, Cr as StateLabel, Ct as OrganizationOnboarding, D as AssignmentProjection, Dn as PaymentDocumentsMethods, Dr as IdentityTransition, Dt as PersonOnboarding, E as CurrentUserMethods, En as PaymentDocumentRef, Er as isRestoring, Et as OrganizationOnboardingState, F as OrgScopedMethods, Fn as Ref, Ft as ActorRequestIssueInput, G as AuthorizeRunOptions, Gn as SmartAccountMethods, Gt as ActivityAnnotationInput, H as RoleDefinition, Hn as isSettingUpLifecycle, Ht as InboxItem, I as OrgTemplate, In as ResolvedTarget, It as ActorRequestsMethods, J as PayrollGroupInput, Jn as ClientRequests, Jt as ActivityItem, K as PayrollEngagementTerms, Kn as AuthMethods, Kt as ActivityDetail, L as OrgView, Ln as TargetReference, Lt as AddressBookAddInput, M as MemberStatus, Mn as PaymentsMethods, Mt as ActorProfileMethods, N as MemberView, Nn as PaymentsPayInput, Nt as ActorRelationshipMethods, O as CreateOrgInput, On as PaymentMoney, Or as InvocationControls, Ot as PersonOnboardingInput, P as OrgMethods, Pn as RecipientResolution, Pt as ActorRequest, Q as PayrollOptions, Qn as AuthorityRef, Qt as ActivityPage, R as OrganizationAccess, Rn as TargetsMethods, Rt as AddressBookEntry, S as SystemMethods, Sn as Payment, Sr as Readiness, St as OnboardingMethods, T as CurrentUserContext, Tn as PaymentDocumentKind, Tr as isClaimed, Tt as OrganizationOnboardingOptions, U as RoleView, Un as CompleteProfileInput, Ut as InboxMethods, V as ResendInviteTokenInput, Vn as AccountSetupStep, Vt as InboxApproveInput, W as AuthorizeRunInput, Wn as IdentityMethods, Wt as ActivityAnnotation, X as PayrollGroupsMethods, Xn as OrgSetupStep, Xt as ActivityListParams, Y as PayrollGroupMember, Yn as OrgLifecycle, Yt as ActivityKind, Z as PayrollMethods, Zn as PayoutAddress, Zt as ActivityMethods, _ as CreateCapxulClientInput, _n as MovementActivityEvidence, _r as TelemetryPort, _t as OrgMe, a as ObservationContext, an as DepositInstructions, ar as ActorRef, at as OrganizationPaymentInput, b as IdentityRuntimeSendResult, bn as OfframpQuoteInput, br as IdentityState, bt as AccountsMethods, c as HostObservability, cn as DestinationKind, cr as SubmittedPermissionExecution, ct as PermissionAssignInput, d as postHogObservability, dn as DestinationRail, dr as PAYMENT_STATUSES, dt as PermissionMethods, en as ActivityReference, er as ClientRequestView, et as PayrollRunItemInput, f as OpenfortBrowserAuth, fn as DestinationRemoveInput, fr as PaymentStatus$1, ft as PermissionOptions, g as CapxulClient, gn as MeProfile, gt as Budget, h as createOpenfortBrowserSigner, hn as MeMethods, ht as PermissionReadResult, i as ObservationAdapter, in as ActorReference, ir as PaymentDocumentVerification, it as OrganizationPaymentBatchInput, j as MemberIdentityProjection, jn as PaymentType, jt as ActorProfile, k as DetectPendingOrgInvitationsResult, kn as PaymentStatus, kt as ReadyAccountLifecycle, l as PostHogObservabilityClient, ln as DestinationListInput, lr as InboxStatus, lt as PermissionChangeInput, m as OpenfortBrowserSignerBootstrap, mn as FinancialOpsMethods, mt as PermissionRevokeInput, nn as ActivitySummaryParams, nr as PaymentDocumentReadRef, nt as PayrollRuns, o as ObservationDelivery, on as Destination, or as CurrentHoldings, ot as OrganizationPaymentItemInput, p as OpenfortBrowserSigner, pn as DestinationsMethods, pr as RequestStatus, pt as PermissionReplaceInput, q as PayrollGroup, qn as AccountSetupPolicy, qt as ActivityFilter, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, rn as ActivitySummaryTotal, rr as PaymentDocumentRender, rt as PayrollTermsUnit, s as SdkFailureObservation, sn as DestinationAddInput, sr as Permission, st as OrganizationPaymentsMethods, t as CapxulClientInput, tn as ActivitySummary, tr as PaymentDocumentDownload, tt as PayrollRunStatus, u as PostHogObservabilityOptions, un as DestinationPayload, ur as PAYMENT_DIRECTIONS, ut as PermissionCreateInput, v as IdentityProfileDetails, vn as OfframpMethods, vr as Destination$1, vt as OrgMeMethod, w as MediaMethods, wn as PaymentDirection, wr as destination, wt as OrganizationOnboardingInput, x as HoldingsMethods, xn as OfframpStatus, xr as OrgLane, xt as CompletedPersonProfile, y as IdentityRuntime, yn as OfframpQuote, yr as IdentityEvent, yt as OrgMeOptions, z as OrganizationAccount, zn as fingerprintPaymentIntent, zt as AddressBookLabelInput } from "./production-pLe7MsUo.mjs";
3
3
  import { Hex } from "viem";
4
4
  import { Effect, Layer } from "effect";
5
5
  //#region ../errors/src/index.d.ts
@@ -8,14 +8,13 @@ declare const HANDLE_RE: RegExp;
8
8
  //#endregion
9
9
  //#region ../config/src/tokens.d.ts
10
10
  /**
11
- * Where a registry row's liquidity comes from. `settlement` is the tier the
12
- * exact-transfer path and the Movement scanner read;
13
- * `synthetic-test-liquidity` marks an owned fixture whose balances and rates
14
- * are authored inputs, never market or provider data. Every row states its
15
- * tier, so a row that reaches a caller through the registry always carries
16
- * that fact with it.
11
+ * Where a registry row's liquidity comes from. `synthetic-test-liquidity`
12
+ * marks an owned fixture whose balances and rates are authored inputs, never
13
+ * market or provider data.
14
+ * Admission which rows a treasury read returns is `CONFIGURED_MONEY_ASSETS`,
15
+ * not this field; an owned fixture is a settlement asset.
17
16
  */
18
- type AssetSource = "settlement" | "synthetic-test-liquidity";
17
+ type AssetSource = "synthetic-test-liquidity";
19
18
  /** Canonical metadata. A missing peg does not imply a missing market price. */
20
19
  interface AssetMetadata {
21
20
  readonly assetId: AssetId;
@@ -27,6 +26,14 @@ interface AssetMetadata {
27
26
  readonly deploymentStartBlock: number;
28
27
  readonly source: AssetSource;
29
28
  }
29
+ /** Public AssetIds for the admitted Base Sepolia test assets. */
30
+ declare const TOKENS: Readonly<{
31
+ BASE_SEPOLIA: Readonly<{
32
+ CAPXUL_TEST_USDC: AssetId;
33
+ CAPXUL_TEST_USDT: AssetId;
34
+ CAPXUL_TEST_WETH: AssetId;
35
+ }>;
36
+ }>;
30
37
  //#endregion
31
38
  //#region ../observability/src/operations.d.ts
32
39
  declare const CAPXUL_OPERATIONS: {
@@ -98,6 +105,26 @@ declare const CAPXUL_OPERATIONS: {
98
105
  readonly createOrg: "createOrg";
99
106
  readonly orgs: "orgs";
100
107
  };
108
+ /** AUTH A3 (#2073): the SDK facade over the native continuation endpoints. */
109
+ readonly clientRequests: {
110
+ readonly decide: "clientRequests.decide";
111
+ readonly read: "clientRequests.read";
112
+ };
113
+ /** AUTH A2 (#2072): the native client authorization issuer and its browser
114
+ * continuation. One name per durable transition the endpoints can fail on. */
115
+ readonly clientAuthorization: {
116
+ readonly acceptRequest: "clientAuthorization.acceptRequest";
117
+ readonly cancelRequest: "clientAuthorization.cancelRequest";
118
+ readonly consumeRequest: "clientAuthorization.consumeRequest";
119
+ readonly denyRequest: "clientAuthorization.denyRequest";
120
+ readonly invalidateContext: "clientAuthorization.invalidateContext";
121
+ readonly markConsented: "clientAuthorization.markConsented";
122
+ readonly readMetadata: "clientAuthorization.readMetadata";
123
+ readonly revokeGrant: "clientAuthorization.revokeGrant";
124
+ readonly rotateGrant: "clientAuthorization.rotateGrant";
125
+ readonly startRequest: "clientAuthorization.startRequest";
126
+ readonly sweepExpired: "clientAuthorization.sweepExpired";
127
+ };
101
128
  readonly credentials: {
102
129
  readonly bootstrapClient: "credentials.bootstrapClient";
103
130
  readonly mintQuickstartKey: "credentials.mintQuickstartKey";
@@ -137,7 +164,6 @@ declare const CAPXUL_OPERATIONS: {
137
164
  };
138
165
  readonly holdings: {
139
166
  readonly current: "holdings.current";
140
- readonly primary: "holdings.primary";
141
167
  };
142
168
  readonly indexer: {
143
169
  readonly reconcile: "indexer.reconcile";
@@ -339,6 +365,7 @@ declare const CAPXUL_OPERATIONS: {
339
365
  readonly submitExecution: "payments.submitExecution";
340
366
  };
341
367
  readonly paymentDocuments: {
368
+ readonly get: "paymentDocuments.get";
342
369
  readonly render: "paymentDocuments.render";
343
370
  readonly verify: "paymentDocuments.verify";
344
371
  };
@@ -495,10 +522,13 @@ declare function isMoneyParseError(value: AssetAmount | Money | MoneyParseError)
495
522
  declare function parseMoney(input: string, asset: Pick<Money, "currency" | "decimals">): Money | MoneyParseError;
496
523
  //#endregion
497
524
  //#region src/domain/money/asset-amount.d.ts
525
+ /** Exact scaling. This rejects excess precision instead of rounding it. */
526
+ declare function toRaw(amount: AssetAmount, asset: AssetMetadata): bigint;
498
527
  declare function parseAssetAmount(input: string, asset: AssetMetadata): AssetAmount | MoneyParseError;
499
528
  /** Display the full quantity. Only fiat formatting rounds for display. */
500
529
  declare function formatAssetAmount(amount: AssetAmount): string;
501
530
  declare function assetSymbolFor(asset: AssetId): string;
531
+ declare function requireAsset(id: AssetId): AssetMetadata;
502
532
  //#endregion
503
533
  //#region src/domain/money/valuation.d.ts
504
534
  interface Rate {
@@ -508,14 +538,34 @@ interface Rate {
508
538
  }
509
539
  /** Fiat balances use their currency directly, never an invented token identity. */
510
540
  type RateSource = (source: AssetMetadata | CurrencyCode, into: CurrencyCode) => Rate | null;
511
- declare const PEG_RATES: RateSource;
512
541
  interface Valuation<T extends AssetAmount | Money = AssetAmount | Money> {
513
542
  readonly total: Money | null;
514
543
  readonly counted: readonly T[];
515
544
  readonly unrated: readonly T[];
516
545
  }
517
546
  /** Sum exact fixed-point values. Missing rates never contribute zero. */
518
- declare function valueIn<T extends AssetAmount | Money>(amounts: readonly T[], displayCurrency: CurrencyCode, rates?: RateSource): Valuation<T>;
547
+ declare function valueIn<T extends AssetAmount | Money>(amounts: readonly T[], displayCurrency: CurrencyCode, rates: RateSource): Valuation<T>;
548
+ /** Value all Activity buckets. Compute net before display rounding. */
549
+ declare function valueActivitySummary(totals: readonly ActivitySummaryTotal[], displayCurrency?: CurrencyCode, rates?: RateSource): {
550
+ moneyIn: Money | null;
551
+ moneyOut: Money | null;
552
+ pending: Money | null;
553
+ net: Money | null;
554
+ unrated: ActivitySummaryTotal[];
555
+ };
556
+ //#endregion
557
+ //#region src/domain/money/account-positions.d.ts
558
+ /**
559
+ * The fiat currency a position is denominated in: the registry peg of its
560
+ * asset, or `null` when that asset carries no peg (ADR-0028 R3/R4).
561
+ *
562
+ * A consumer must denominate a token amount in the position's OWN peg. The
563
+ * Account's `available.currency` is the display currency of a multi-asset
564
+ * VALUATION (ADR-0028 R6). It is `"USD"` for every Account regardless of what
565
+ * is held, so reading it as a position's denomination labels a token with the
566
+ * headline's fiat — the false identity this cut removes.
567
+ */
568
+ declare function positionPeg(asset: AssetId): CurrencyCode | null;
519
569
  //#endregion
520
570
  //#region src/domain/money/format-money.d.ts
521
571
  /**
@@ -650,4 +700,4 @@ declare function captureException(telemetry: TelemetryPort, error: unknown, cont
650
700
  */
651
701
  declare function captureExceptionSync(telemetry: TelemetryPort, error: unknown, context?: HandledErrorReportContext): void;
652
702
  //#endregion
653
- export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupStep, type AccountsMethods, type ActivityAnnotation, type ActivityAnnotationInput, type ActivityDetail, type ActivityFilter, type ActivityItem, type ActivityKind, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActivityPhase, type ActivityRange, type ActivityReference, type ActivitySummary, type ActivitySummaryParams, type ActivitySummaryTotal, type ActorProfile, type ActorProfileMethods, type ActorRef, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type AssetAmount, type AssetId, type AssetMetadata, type AuthMethods, type AuthSession, type AuthUserId, type AuthorizeRunInput, type AuthorizeRunOptions, type Budget, type BudgetId, CAPXUL_ERROR_CODES, CAPXUL_OPERATIONS, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CHAIN_UPSTREAMS, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulOperation, type CapxulResult, type CapxulSigner, type ChainCause, type ChainUpstream, type CompleteProfileInput, type CompletedPersonProfile, type CountryCode, type CreateCapxulClientInput, type CreateOrgInput, type CurrentHoldings, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DetectPendingOrgInvitationsResult, type DevPrivateKeySignerInput, EVM_ADDRESS_RE, type Eip1193Provider, type Eip1193RequestProvider, Errors, FAILURE_MODES, type FailureMode, type FinancialOpsMethods, HANDLE_RE, type Handle, type HandledErrorReportContext, type Holding, type HoldingsMethods, type HostObservability, type Destination$1 as IdentityDestination, type IdentityEvent, type IdentityMethods, type IdentityProfileDetails, type IdentityRuntime, type IdentityRuntimeSendResult, type IdentityState, type IdentityTransition, type InboxApproveInput, type InboxItem, type InboxMethods, type InviteMemberInput, type InvocationControls, type MeMethods, type MeProfile, type MediaMethods, type MemberStatus, type MemberView, type Money, type MoneyParseError, type MoneyParseErrorReason, type MovementActivityEvidence, type NormalizedCapxulOperation, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgId, type OrgLane, type OrgLifecycle, type OrgMe, type OrgMeMethod, type OrgMeOptions, type OrgMethods, type OrgScopedMethods, type OrgSetupStep, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type OrganizationOnboarding, type OrganizationOnboardingInput, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, PEG_RATES, type PartyId, type Payment, type PaymentActivityEvidence, type PaymentDirection, type PaymentDocumentKind, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentMoney, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PayoutAddress, type PayrollEngagementTerms, type PayrollGroup, type PayrollGroupId, type PayrollGroupInput, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunId, type PayrollRunItemInput, type PayrollRunStatus, type PayrollRuns, type PayrollTermsUnit, type Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PersonOnboarding, type PersonOnboardingInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Rate, type RateSource, type Readiness, type ReadyAccountLifecycle, type RecipientResolution, type Ref, type ResendInviteTokenInput, type ResolvedTarget, type RevertSummary, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type SdkFailureObservation, type Session, type SignerStatus, type SignerStatusStore, type SmartAccount, type SmartAccountMethods, type StateLabel, type SubmittedPermissionExecution, type SystemHealth, type SystemMethods, type TargetReference, type TargetsMethods, type TelemetryPort, type TesterKind, type Valuation, assetSymbolFor, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatAssetAmount, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseAssetAmount, parseMoney, paymentPhase, postHogObservability, requestPhase, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress, toHandle, toPartyId, valueIn };
703
+ export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupPolicy, type AccountSetupStep, type AccountsMethods, type ActivityAnnotation, type ActivityAnnotationInput, type ActivityDetail, type ActivityFilter, type ActivityItem, type ActivityKind, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActivityPhase, type ActivityRange, type ActivityReference, type ActivitySummary, type ActivitySummaryParams, type ActivitySummaryTotal, type ActorProfile, type ActorProfileMethods, type ActorRef, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type AssetAmount, type AssetId, type AssetMetadata, type AssignmentProjection, type AuthMethods, type AuthSession, type AuthUserId, type AuthorityRef, type AuthorizeRunInput, type AuthorizeRunOptions, type Budget, type BudgetId, CAPXUL_ERROR_CODES, CAPXUL_OPERATIONS, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CHAIN_UPSTREAMS, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulOperation, type CapxulResult, type CapxulSigner, type ChainCause, type ChainUpstream, type ClientRequestView, type ClientRequests, type CompleteProfileInput, type CompletedPersonProfile, type CountryCode, type CreateCapxulClientInput, type CreateOrgInput, type CurrentHoldings, type CurrentPolicy, type CurrentUserContext, type CurrentUserMethods, type DepositInstructions, type Destination, type DestinationAddInput, type DestinationKind, type DestinationListInput, type DestinationPayload, type DestinationRail, type DestinationRemoveInput, type DestinationsMethods, type DetectPendingOrgInvitationsResult, type DevPrivateKeySignerInput, EVM_ADDRESS_RE, type Eip1193Provider, type Eip1193RequestProvider, Errors, FAILURE_MODES, type FailureMode, type FinancialOpsMethods, HANDLE_RE, type Handle, type HandledErrorReportContext, type HoldingsMethods, type HostObservability, type Destination$1 as IdentityDestination, type IdentityEvent, type IdentityMethods, type IdentityProfileDetails, type IdentityRuntime, type IdentityRuntimeSendResult, type IdentityState, type IdentityTransition, type InboxApproveInput, type InboxItem, type InboxMethods, type InviteMemberInput, type InvocationControls, type MeMethods, type MeProfile, type MediaMethods, type MemberIdentityProjection, type MemberStatus, type MemberView, type Money, type MoneyParseError, type MoneyParseErrorReason, type MovementActivityEvidence, type NormalizedCapxulOperation, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OnboardingMethods, type OpenfortBrowserAuth, type OpenfortBrowserSigner, type OpenfortBrowserSignerBootstrap, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgId, type OrgLane, type OrgLifecycle, type OrgMe, type OrgMeMethod, type OrgMeOptions, type OrgMethods, type OrgScopedMethods, type OrgSetupStep, type OrgTemplate, type OrgView, type OrganizationAccess, type OrganizationAccount, type OrganizationAuditLogItem, type OrganizationOnboarding, type OrganizationOnboardingInput, type OrganizationOnboardingOptions, type OrganizationOnboardingState, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, type PartyId, type Payment, type PaymentActivityEvidence, type PaymentDirection, type PaymentDocumentDownload, type PaymentDocumentKind, type PaymentDocumentReadRef, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentMoney, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type PayoutAddress, type PayrollEngagementTerms, type PayrollGroup, type PayrollGroupId, type PayrollGroupInput, type PayrollGroupMember, type PayrollGroupsMethods, type PayrollMethods, type PayrollOptions, type PayrollRun, type PayrollRunId, type PayrollRunItemInput, type PayrollRunStatus, type PayrollRuns, type PayrollTermsUnit, type Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PersonOnboarding, type PersonOnboardingInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Rate, type RateSource, type Readiness, type ReadyAccountLifecycle, type RecipientResolution, type Ref, type ResendInviteTokenInput, type ResolvedTarget, type RevertSummary, type RoleDefinition, type RoleKey, type RoleView, type SdkFailureObservation, type Session, type SignerStatus, type SignerStatusStore, type SmartAccount, type SmartAccountMethods, type StateLabel, type SubmittedPermissionExecution, type SystemHealth, type SystemMethods, TOKENS, type TargetReference, type TargetsMethods, type TelemetryPort, type TesterKind, type Valuation, assetSymbolFor, captureException, captureExceptionSync, createCapxulClient, createOpenfortBrowserSigner, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatAssetAmount, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseAssetAmount, parseMoney, paymentPhase, positionPeg, postHogObservability, requestPhase, requireAsset, destination as resolveIdentityDestination, toAccountId, toCountryCode, toAddress as toEvmAddress, toHandle, toOrgId, toPartyId, toRaw, valueActivitySummary, valueIn };
package/dist/index.mjs CHANGED
@@ -1,6 +1,5 @@
1
- import { A as signerFailure, B as isRestoring, C as normalizeExceptionErrorKind, E as safeExceptionLabel, F as CAPXUL_OPERATIONS, I as isCapxulOperation, L as normalizeCapxulOperation, M as PAYMENT_DIRECTIONS, N as PAYMENT_STATUSES, O as isSettingUpLifecycle, R as destination, S as SDK_VERSION, T as projectSdkException, _ as fingerprintPaymentIntent, b as failureDetail, d as embeddedSigner, f as openfortEmbeddedSigner, g as devPrivateKeySigner, h as deriveDevPrivateKey, j as resolveFailureMode, k as injectedWalletSigner, m as openfortEmbeddedWalletPort, p as openfortEmbeddedSignerFromWallet, r as postHogObservability, t as createCapxulClient$1, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as isClaimed } from "./production-BMfmzwHq.mjs";
2
- import { $ as toPartyId, I as toAddress, N as assetIdFor, P as currencySymbolFor, U as toCountryCode, W as toCurrencyCode, Y as toHandle, _t as FAILURE_MODES, b as configuredMoneyAssetById, dt as CAPXUL_ERROR_CODES, ft as CapxulError, g as CAPXUL_PAYMENTS_V2_ADDRESS, gt as CHAIN_UPSTREAMS, ht as isCapxulError, k as EVM_ADDRESS_RE, lt as HANDLE_RE, mt as Errors } from "./OAuthBearerAuthClient-DWkofxdZ.mjs";
3
- import { formatUnits } from "viem";
1
+ import { A as resolveFailureMode, B as valueIn, C as normalizeExceptionErrorKind, D as isSettingUpLifecycle, E as safeExceptionLabel, F as isCapxulOperation, G as requireAsset, H as assetSymbolFor, I as normalizeCapxulOperation, J as parseMoney, K as toRaw, M as PAYMENT_STATUSES, O as injectedWalletSigner, P as CAPXUL_OPERATIONS, R as positionPeg, S as SDK_VERSION, T as projectSdkException, U as formatAssetAmount, W as parseAssetAmount, X as isClaimed, Y as destination, Z as isRestoring, _ as openfortEmbeddedWalletPort, b as failureDetail, d as deriveDevPrivateKey, f as devPrivateKeySigner, g as openfortEmbeddedSignerFromWallet, h as openfortEmbeddedSigner, j as PAYMENT_DIRECTIONS, k as signerFailure, m as embeddedSigner, p as createOpenfortBrowserSigner, q as isMoneyParseError, r as postHogObservability, t as createCapxulClient$1, v as fingerprintPaymentIntent, w as normalizeExceptionOperation, x as EXCEPTION_MESSAGE, y as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, z as valueActivitySummary } from "./production-B4NzzuUb.mjs";
2
+ import { K as toCountryCode, L as currencySymbolFor, M as EVM_ADDRESS_RE, Q as toHandle, R as toAccountId, S as TOKENS, St as FAILURE_MODES, _t as CapxulError, bt as isCapxulError, gt as CAPXUL_ERROR_CODES, m as CAPXUL_PAYMENTS_V2_ADDRESS, mt as HANDLE_RE, nt as toPartyId, q as toCurrencyCode, tt as toOrgId, xt as CHAIN_UPSTREAMS, yt as Errors, z as toAddress } from "./OAuthBearerAuthClient-5ujCTtKE.mjs";
4
3
  import { Effect } from "effect";
5
4
  import { privateKeyToAccount } from "viem/accounts";
6
5
  //#region src/domain/activity/phase.ts
@@ -86,153 +85,6 @@ function inboxPhase(status) {
86
85
  }
87
86
  }
88
87
  //#endregion
89
- //#region src/domain/money/parse-money.ts
90
- /**
91
- * ADR-0023 R1: the reason is a closed code and the ONLY failure vocabulary —
92
- * the consuming app maps each code to its own sentence. The SDK ships no
93
- * English for user-text failure.
94
- */
95
- function isMoneyParseError(value) {
96
- return "kind" in value;
97
- }
98
- const AMOUNT_PATTERN = /^(?:\d{1,3}(?:,\d{3})+|\d+)(?:\.\d+)?$/;
99
- const ZERO_PATTERN = /^0+(?:\.0+)?$/;
100
- function parseMoney(input, asset) {
101
- const parsed = parseDecimalInput(input, asset.decimals, 24);
102
- return "kind" in parsed ? parsed : {
103
- currency: asset.currency,
104
- value: parsed.value,
105
- decimals: asset.decimals
106
- };
107
- }
108
- /** Shared input grammar. Callers retain their own amount size limits. */
109
- function parseDecimalInput(input, decimals, maximumLength) {
110
- if (!Number.isInteger(decimals) || decimals < 0) throw Errors.invalidInput("asset.decimals", "must be a non-negative integer");
111
- const value = input.trim();
112
- if (value.length === 0) return {
113
- kind: "error",
114
- reason: "required"
115
- };
116
- if (value.length > maximumLength) return {
117
- kind: "error",
118
- reason: "too-long"
119
- };
120
- const negative = value.startsWith("-");
121
- const unsigned = negative ? value.slice(1) : value;
122
- if (!AMOUNT_PATTERN.test(unsigned)) return {
123
- kind: "error",
124
- reason: "invalid-format"
125
- };
126
- if (negative) return {
127
- kind: "error",
128
- reason: "non-positive"
129
- };
130
- const normalized = unsigned.replaceAll(",", "");
131
- const fraction = normalized.split(".")[1];
132
- if (fraction !== void 0 && fraction.length > decimals) return {
133
- kind: "error",
134
- reason: "too-many-decimals"
135
- };
136
- if (ZERO_PATTERN.test(normalized)) return {
137
- kind: "error",
138
- reason: "non-positive"
139
- };
140
- return { value: normalized };
141
- }
142
- //#endregion
143
- //#region src/domain/money/asset-amount.ts
144
- /** Exact scaling. This rejects excess precision instead of rounding it. */
145
- function toRaw(amount, asset) {
146
- validateMetadata(asset);
147
- if (amount.asset !== asset.assetId) throw Errors.invalidInput("amount.asset", "must match the selected asset on its chain");
148
- return decimalToRaw(amount.value, asset.decimals);
149
- }
150
- function parseAssetAmount(input, asset) {
151
- validateMetadata(asset);
152
- const parsed = parseDecimalInput(input, asset.decimals, 100);
153
- return "kind" in parsed ? parsed : {
154
- asset: asset.assetId,
155
- value: parsed.value.replace(/^0+(?=\d)/, "")
156
- };
157
- }
158
- /** Display the full quantity. Only fiat formatting rounds for display. */
159
- function formatAssetAmount(amount) {
160
- const asset = requireAsset(amount.asset);
161
- const [integer = "0", fraction] = formatUnits(toRaw(amount, asset), asset.decimals).split(".");
162
- return `${integer.replace(/\B(?=(\d{3})+(?!\d))/g, ",")}${fraction === void 0 ? "" : `.${fraction}`} ${asset.symbol}`;
163
- }
164
- function assetSymbolFor(asset) {
165
- return requireAsset(asset).symbol;
166
- }
167
- function requireAsset(id) {
168
- const asset = configuredMoneyAssetById(id);
169
- if (asset === null) throw Errors.invalidInput("amount.asset", "is not a registered asset");
170
- return asset;
171
- }
172
- function decimalToRaw(value, decimals) {
173
- validatePrecision(decimals);
174
- if (!/^\d+(?:\.\d+)?$/.test(value) || value.trim() !== value || value.length > 512) throw Errors.invalidInput("amount.value", "must be a non-negative decimal string of at most 512 characters");
175
- const [integer = "0", fraction = ""] = value.split(".");
176
- if (fraction.length > decimals) throw Errors.invalidInput("amount.value", "fraction exceeds asset precision");
177
- return BigInt(integer) * 10n ** BigInt(decimals) + BigInt(fraction.padEnd(decimals, "0") || "0");
178
- }
179
- function validatePrecision(decimals) {
180
- if (!Number.isInteger(decimals) || decimals < 0 || decimals > 255) throw Errors.invalidInput("decimals", "must be an integer from 0 to 255");
181
- }
182
- function validateMetadata(asset) {
183
- validatePrecision(asset.decimals);
184
- if (asset.assetId !== assetIdFor(asset.chainId, asset.tokenAddress)) throw Errors.invalidInput("amount.asset", "metadata must match its chain and token");
185
- }
186
- //#endregion
187
- //#region src/domain/money/valuation.ts
188
- const PEG_RATES = (source, into) => (typeof source === "string" ? source : source.peg) === into ? {
189
- value: "1",
190
- decimals: 0
191
- } : null;
192
- /** Sum exact fixed-point values. Missing rates never contribute zero. */
193
- function valueIn(amounts, displayCurrency, rates = PEG_RATES) {
194
- const currency = toCurrencyCode(displayCurrency);
195
- const counted = [];
196
- const unrated = [];
197
- let sum = 0n;
198
- let scale = 0;
199
- for (const amount of amounts) {
200
- let source;
201
- let raw;
202
- let decimals;
203
- if ("asset" in amount) {
204
- source = requireAsset(amount.asset);
205
- raw = toRaw(amount, source);
206
- decimals = source.decimals;
207
- } else {
208
- source = toCurrencyCode(amount.currency);
209
- raw = decimalToRaw(amount.value, amount.decimals);
210
- decimals = amount.decimals;
211
- }
212
- const rate = rates(source, currency);
213
- if (rate === null) {
214
- unrated.push(amount);
215
- continue;
216
- }
217
- validatePrecision(rate.decimals);
218
- if (!/^\d+$/.test(rate.value) || rate.value.trim() !== rate.value || rate.value.length > 256 || BigInt(rate.value) <= 0n) throw Errors.invalidInput("rate.value", "must be a positive fixed-point integer");
219
- const termScale = decimals + rate.decimals;
220
- const nextScale = Math.max(scale, termScale);
221
- sum = sum * 10n ** BigInt(nextScale - scale) + raw * BigInt(rate.value) * 10n ** BigInt(nextScale - termScale);
222
- scale = nextScale;
223
- counted.push(amount);
224
- }
225
- return {
226
- total: counted.length === 0 ? null : {
227
- currency,
228
- value: formatUnits(sum, scale),
229
- decimals: scale
230
- },
231
- counted,
232
- unrated
233
- };
234
- }
235
- //#endregion
236
88
  //#region src/domain/money/format-money.ts
237
89
  function formatMoney(money, options = {}) {
238
90
  if (!Number.isInteger(money.decimals) || money.decimals < 0) throw Errors.invalidInput("money.decimals", "must be a non-negative integer");
@@ -496,4 +348,4 @@ function captureExceptionSync(telemetry, error, context) {
496
348
  } catch {}
497
349
  }
498
350
  //#endregion
499
- export { CAPXUL_ERROR_CODES, CAPXUL_OPERATIONS, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CHAIN_UPSTREAMS, CapxulError, EVM_ADDRESS_RE, Errors, FAILURE_MODES, HANDLE_RE, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, PEG_RATES, assetSymbolFor, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatAssetAmount, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseAssetAmount, parseMoney, paymentPhase, postHogObservability, requestPhase, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress, toHandle, toPartyId, valueIn };
351
+ export { CAPXUL_ERROR_CODES, CAPXUL_OPERATIONS, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CHAIN_UPSTREAMS, CapxulError, EVM_ADDRESS_RE, Errors, FAILURE_MODES, HANDLE_RE, PAYMENT_DIRECTIONS, PAYMENT_STATUSES, TOKENS, assetSymbolFor, captureException, captureExceptionSync, createCapxulClient, createOpenfortBrowserSigner, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, formatAssetAmount, formatMoney, inboxPhase, injectedWalletSigner, isCapxulError, isCapxulOperation, isClaimed, isMoneyParseError, isRestoring, isSettingUpLifecycle, localPrivateKeyAccountProvider, normalizeCapxulOperation, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, parseAssetAmount, parseMoney, paymentPhase, positionPeg, postHogObservability, requestPhase, requireAsset, destination as resolveIdentityDestination, toAccountId, toCountryCode, toAddress as toEvmAddress, toHandle, toOrgId, toPartyId, toRaw, valueActivitySummary, valueIn };
@@ -1,4 +1,4 @@
1
- import { C as AuthCachePort, I as AuthSession, S as AuthCacheError, T as CachedJwt, i as CapxulSigner, n as oauthBearerAuthClient, t as OAuthBearerAuthClientInput, w as AuthCachePortTag } from "../OAuthBearerAuthClient-C-ip-z8M.mjs";
1
+ import { C as AuthCachePort, L as AuthSession, S as AuthCacheError, T as CachedJwt, i as CapxulSigner, n as oauthBearerAuthClient, t as OAuthBearerAuthClientInput, w as AuthCachePortTag } from "../OAuthBearerAuthClient-B7Nbepmu.mjs";
2
2
  import { Hex } from "viem";
3
3
  import { Effect, FileSystem, Layer, Path } from "effect";
4
4
  //#region src/adapters/auth-cache/FileSystemAuthCacheAdapter.d.ts
@@ -1,4 +1,4 @@
1
- import { I as toAddress, a as parseAuthSession, c as AuthCachePortTag, i as BrowserAuthCacheAdapter, o as parseCachedJwt, r as InMemoryAuthCacheAdapter, s as AuthCacheError, t as oauthBearerAuthClient } from "../OAuthBearerAuthClient-DWkofxdZ.mjs";
1
+ import { a as parseAuthSession, c as AuthCachePortTag, i as BrowserAuthCacheAdapter, o as parseCachedJwt, r as InMemoryAuthCacheAdapter, s as AuthCacheError, t as oauthBearerAuthClient, z as toAddress } from "../OAuthBearerAuthClient-5ujCTtKE.mjs";
2
2
  import { Effect, FileSystem, Layer, Path } from "effect";
3
3
  import { privateKeyToAccount } from "viem/accounts";
4
4
  import * as os from "node:os";