@capxul/sdk 2.0.2 → 2.1.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/dist/{create-capxul-client-DZh_Ymsf.mjs → create-capxul-client-CMUq5w10.mjs} +2844 -2529
- package/dist/{create-capxul-client-BixUOzdC.d.mts → create-capxul-client-DmV6qEq4.d.mts} +75 -124
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -3
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.mjs +1 -1
- package/dist/{signer-CeH3ULzn.d.mts → signer-Bj4F-RwT.d.mts} +9 -11
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as CapxulErrorDetails, A as CountryCode, B as PermissionAssignmentId, C as AllowedOrigin, D as AuthUserId, E as AuthSession, F as EpochMs, G as SessionToken, H as Profile, I as Money, J as WeiAmount, K as SmartAccount, L as MovementId, M as DocumentHash, N as DurationMs, O as BlockNumber, P as Email, Q as CapxulErrorCode, R as OrgId, S as AllowanceKey, T as AppId, U as PublishableKey, V as PermissionId, W as RoleKey, Z as CapxulError, d as CapxulResult, et as Failure, f as Profile$1, g as AuthCachePort, j as CurrencyCode, k as ChainId, m as SmartAccount$1, n as CapxulSigner, o as AccountProviderSource, p as Session$1, q as TxHash, s as AccountRequirement, tt as FailureMode, v as CachedJwt, w as AnonymousDistinctId, x as Address$1, y as Account$1, z as PaymentCommandId } from "./signer-
|
|
1
|
+
import { $ as CapxulErrorDetails, A as CountryCode, B as PermissionAssignmentId, C as AllowedOrigin, D as AuthUserId, E as AuthSession, F as EpochMs, G as SessionToken, H as Profile, I as Money, J as WeiAmount, K as SmartAccount, L as MovementId, M as DocumentHash, N as DurationMs, O as BlockNumber, P as Email, Q as CapxulErrorCode, R as OrgId, S as AllowanceKey, T as AppId, U as PublishableKey, V as PermissionId, W as RoleKey, Z as CapxulError, d as CapxulResult, et as Failure, f as Profile$1, g as AuthCachePort, j as CurrencyCode, k as ChainId, m as SmartAccount$1, n as CapxulSigner, o as AccountProviderSource, p as Session$1, q as TxHash, s as AccountRequirement, tt as FailureMode, v as CachedJwt, w as AnonymousDistinctId, x as Address$1, y as Account$1, z as PaymentCommandId } from "./signer-Bj4F-RwT.mjs";
|
|
2
2
|
import { Address, Hex } from "viem";
|
|
3
3
|
import { Context, Effect, Layer, Schema, Scope, Tracer } from "effect";
|
|
4
4
|
import { FunctionReference } from "convex/server";
|
|
@@ -63,7 +63,7 @@ interface Session {
|
|
|
63
63
|
readonly email: string;
|
|
64
64
|
readonly authUserId: string;
|
|
65
65
|
}
|
|
66
|
-
/**
|
|
66
|
+
/** The initial account state is counterfactual
|
|
67
67
|
* and signerless; `deploy` is the separate claim step that needs a signer. */
|
|
68
68
|
type AccountStep = "wallet" | "identity" | "provision" | "deploy";
|
|
69
69
|
/** org-lifecycle.ts:7-11, verbatim. */
|
|
@@ -152,7 +152,7 @@ type IdentityState = {
|
|
|
152
152
|
readonly phase: "faulted";
|
|
153
153
|
readonly failure: Failure;
|
|
154
154
|
/** Non-null exactly when an OTP entry is resumable — the incumbent's
|
|
155
|
-
* `email !== null && otpRequestedAt !== null` pair
|
|
155
|
+
* `email !== null && otpRequestedAt !== null` pair,
|
|
156
156
|
* made structural. */
|
|
157
157
|
readonly resume: {
|
|
158
158
|
readonly email: string;
|
|
@@ -331,7 +331,7 @@ type TelemetryEvent = {
|
|
|
331
331
|
* a present `unknown` is loud), and sync v2 never synthesizes an artifact for
|
|
332
332
|
* it.
|
|
333
333
|
*/
|
|
334
|
-
declare const CAPXUL_ENVS: readonly ["development", "
|
|
334
|
+
declare const CAPXUL_ENVS: readonly ["development", "staging", "production", "unknown"];
|
|
335
335
|
type CapxulEnv = (typeof CAPXUL_ENVS)[number];
|
|
336
336
|
interface TelemetryIdentifyInput {
|
|
337
337
|
readonly distinctId: string;
|
|
@@ -349,14 +349,17 @@ interface TelemetryGroupInput {
|
|
|
349
349
|
declare const EngineeringTelemetryBootstrapPolicy: Schema.Struct<{
|
|
350
350
|
readonly host: Schema.refine<string, Schema.String>;
|
|
351
351
|
readonly projectToken: Schema.refine<string, Schema.String>;
|
|
352
|
-
readonly capxulEnv: Schema.Union<readonly [Schema.Literal<"development">, Schema.Literal<"
|
|
352
|
+
readonly capxulEnv: Schema.Union<readonly [Schema.Literal<"development">, Schema.Literal<"staging">, Schema.Literal<"production">]>;
|
|
353
353
|
}>;
|
|
354
354
|
type EngineeringTelemetryBootstrapPolicyV1 = Schema.Schema.Type<typeof EngineeringTelemetryBootstrapPolicy>;
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region ../wire/src/status.d.ts
|
|
357
|
-
/** The closed
|
|
358
|
-
declare const
|
|
359
|
-
type
|
|
357
|
+
/** The closed Payment status authority. */
|
|
358
|
+
declare const PAYMENT_STATUSES: readonly ["pending", "settling", "scheduled", "streaming", "pending_claim", "settled", "cancelled", "failed"];
|
|
359
|
+
type PaymentStatus$1 = (typeof PAYMENT_STATUSES)[number];
|
|
360
|
+
/** The payment direction relative to the current actor. */
|
|
361
|
+
declare const PAYMENT_DIRECTIONS: readonly ["in", "out", "self"];
|
|
362
|
+
type PaymentDirection$1 = (typeof PAYMENT_DIRECTIONS)[number];
|
|
360
363
|
/** What a payment is FOR. Pairs with `PAYMENT_DOCUMENT_KINDS`. */
|
|
361
364
|
declare const PAYMENT_TYPES: readonly ["unspecified", "invoice", "payroll", "reimbursement"];
|
|
362
365
|
type PaymentType$1 = (typeof PAYMENT_TYPES)[number];
|
|
@@ -466,7 +469,7 @@ declare const LineItem: Schema.Struct<{
|
|
|
466
469
|
type AttachablePaymentDocumentEnvelopeV1 = Schema.Schema.Type<typeof AttachablePaymentDocumentEnvelope>;
|
|
467
470
|
type LineItemV1 = Schema.Schema.Type<typeof LineItem>;
|
|
468
471
|
//#endregion
|
|
469
|
-
//#region ../wire/src/
|
|
472
|
+
//#region ../wire/src/money.d.ts
|
|
470
473
|
declare const MovementAnnotationSchema: Schema.Struct<{
|
|
471
474
|
readonly movementId: Schema.Codec<MovementId, string, never, never>;
|
|
472
475
|
readonly actor: Schema.Union<readonly [Schema.Struct<{
|
|
@@ -681,14 +684,10 @@ type Unsubscribe = () => void;
|
|
|
681
684
|
* - `error` · a failed snapshot carrying a typed error (defaults to
|
|
682
685
|
* `CapxulError`)
|
|
683
686
|
*
|
|
684
|
-
* The
|
|
685
|
-
* `ConvexCallPort` contract); subsequent snapshots carry `ok` or `error`
|
|
686
|
-
* per the underlying transport.
|
|
687
|
+
* The first snapshot is `loading`. Later snapshots carry `ok` or `error`.
|
|
687
688
|
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
* substrate port that owns `subscribe` (#1145 re-homed it from the former
|
|
691
|
-
* `ports/subscription.ts`, which was never a port).
|
|
689
|
+
* Domain ports do not expose reactive callback methods. `ConvexCallPort` owns
|
|
690
|
+
* the `subscribe` method.
|
|
692
691
|
*
|
|
693
692
|
* @internal-use
|
|
694
693
|
*/
|
|
@@ -719,7 +718,7 @@ interface ConvexCallPort {
|
|
|
719
718
|
* Substrate-level reactive transport over Convex's `onUpdate`.
|
|
720
719
|
*
|
|
721
720
|
* @internal-use — substrate only; see `ports/subscription.ts`. Domain
|
|
722
|
-
* ports do not expose reactive callback methods to consumers
|
|
721
|
+
* ports do not expose reactive callback methods to consumers.
|
|
723
722
|
*/
|
|
724
723
|
subscribe<TArgs extends Record<string, unknown>, TOutput>(fn: FunctionReference<"query", "public", TArgs, TOutput>, args: TArgs, callback: (snapshot: Snapshot<TOutput>) => void): Effect.Effect<Unsubscribe, ConvexCallError>;
|
|
725
724
|
}
|
|
@@ -771,19 +770,7 @@ interface IdentityPort {
|
|
|
771
770
|
}
|
|
772
771
|
//#endregion
|
|
773
772
|
//#region src/ports/smart-account.d.ts
|
|
774
|
-
/**
|
|
775
|
-
* Configuration for a Safe deployment: the chain + RPC endpoint +
|
|
776
|
-
* gas-sponsorship policy. `receiptTimeoutMs` is optional; the deploying
|
|
777
|
-
* adapter applies a default when omitted.
|
|
778
|
-
*
|
|
779
|
-
* #1145 (DEMOLITION §D4): re-homed here from the deleted
|
|
780
|
-
* `ports/safe-deployment.ts`. The SafeDeploymentPort itself was fakes-only
|
|
781
|
-
* plus one e2e adapter; the real Safe lifecycle is backend-orchestrated
|
|
782
|
-
* through this port. Only the two data shapes below survive on the SDK
|
|
783
|
-
* surface — `SafeDeploymentConfig` parameterises the org-deploy seam
|
|
784
|
-
* (`orgDeploymentConfig`), `SafeDeploymentEvidence` is the payload of
|
|
785
|
-
* `confirmDeployment`.
|
|
786
|
-
*/
|
|
773
|
+
/** Safe deployment configuration for the Organization setup adapter. */
|
|
787
774
|
type SafeDeploymentConfig = {
|
|
788
775
|
readonly chainId: ChainId;
|
|
789
776
|
readonly rpcUrl: string;
|
|
@@ -910,7 +897,7 @@ declare class AccountReadError extends AccountReadError_base<{
|
|
|
910
897
|
readonly details?: CapxulErrorDetails;
|
|
911
898
|
}> {}
|
|
912
899
|
/**
|
|
913
|
-
*
|
|
900
|
+
* The Account money read joins the `accounts` row with a
|
|
914
901
|
* live RPC `balanceOf` pull; the adapter lifts wire integers to `Money`.
|
|
915
902
|
*/
|
|
916
903
|
interface AccountReadPort {
|
|
@@ -919,15 +906,7 @@ interface AccountReadPort {
|
|
|
919
906
|
}
|
|
920
907
|
//#endregion
|
|
921
908
|
//#region src/flows/types.d.ts
|
|
922
|
-
/**
|
|
923
|
-
* The full port bundle that `assembleCapxulClient` consumes.
|
|
924
|
-
* (Was 13 before #1145 / DEMOLITION §D4 deleted the credentials, env and
|
|
925
|
-
* transport ports — built by `production.ts`, read by nobody.)
|
|
926
|
-
*
|
|
927
|
-
* The identity actor receives this bundle through `BootIdentityFlowInput` and
|
|
928
|
-
* uses only the existing ports needed by each work lane. Other domain flows
|
|
929
|
-
* retain their own narrowed inputs.
|
|
930
|
-
*/
|
|
909
|
+
/** The runtime port bundle that `assembleCapxulClient` uses. */
|
|
931
910
|
interface FlowPorts {
|
|
932
911
|
readonly authClient: AuthClientPort;
|
|
933
912
|
readonly authCache: AuthCachePort;
|
|
@@ -1226,7 +1205,8 @@ interface PaymentMoney {
|
|
|
1226
1205
|
readonly value: string;
|
|
1227
1206
|
readonly decimals: number;
|
|
1228
1207
|
}
|
|
1229
|
-
type PaymentStatus =
|
|
1208
|
+
type PaymentStatus = PaymentStatus$1;
|
|
1209
|
+
type PaymentDirection = PaymentDirection$1;
|
|
1230
1210
|
type PaymentType = PaymentType$1;
|
|
1231
1211
|
type PaymentDocumentKind = PaymentDocumentKind$1;
|
|
1232
1212
|
interface PaymentDocumentRef {
|
|
@@ -1252,6 +1232,12 @@ interface Payment {
|
|
|
1252
1232
|
readonly status: PaymentStatus;
|
|
1253
1233
|
readonly amount: PaymentMoney;
|
|
1254
1234
|
readonly paymentType: PaymentType;
|
|
1235
|
+
readonly direction: PaymentDirection;
|
|
1236
|
+
readonly counterpartyLabel: string;
|
|
1237
|
+
readonly receipt: {
|
|
1238
|
+
readonly chainId: number;
|
|
1239
|
+
readonly transactionHash: string;
|
|
1240
|
+
} | null;
|
|
1255
1241
|
readonly recipient: {
|
|
1256
1242
|
readonly kind: "handle" | "email" | "payee" | "capxulUserId" | "me" | "org" | "external_address";
|
|
1257
1243
|
readonly label: string;
|
|
@@ -1265,8 +1251,6 @@ interface Payment {
|
|
|
1265
1251
|
readonly updatedAt: number;
|
|
1266
1252
|
}
|
|
1267
1253
|
interface PaymentsPayInput {
|
|
1268
|
-
/** Stable idempotency key for caller retries. Omit only for a one-shot payment. */
|
|
1269
|
-
readonly requestKey?: string;
|
|
1270
1254
|
readonly actor?: ActorReference;
|
|
1271
1255
|
readonly to: TargetReference;
|
|
1272
1256
|
readonly amount: PaymentMoney;
|
|
@@ -1282,7 +1266,7 @@ interface PaymentsPayInput {
|
|
|
1282
1266
|
/** Full EIP-712 document envelope; hashed + stored, committed on-chain. */
|
|
1283
1267
|
readonly document?: AttachablePaymentDocumentEnvelopeV1;
|
|
1284
1268
|
/**
|
|
1285
|
-
*
|
|
1269
|
+
* Payment timing. Omitted means `instant`.
|
|
1286
1270
|
* A `scheduled`/`stream` clause turns the payment into a Commitment
|
|
1287
1271
|
* (escrow-vest-claim) backed by `CapxulPayments.createCommitment`.
|
|
1288
1272
|
*/
|
|
@@ -1294,6 +1278,8 @@ interface PaymentsPayInput {
|
|
|
1294
1278
|
*/
|
|
1295
1279
|
readonly lineItems?: readonly LineItemV1[];
|
|
1296
1280
|
}
|
|
1281
|
+
/** Return one stable fingerprint for one JSON payment intent. */
|
|
1282
|
+
declare function fingerprintPaymentIntent(intent: unknown): Promise<string>;
|
|
1297
1283
|
type DestinationKind = "bank_account" | "mobile_money" | "external_account";
|
|
1298
1284
|
type DestinationRail = {
|
|
1299
1285
|
readonly kind: "bank";
|
|
@@ -1388,6 +1374,7 @@ interface ActivityListParams {
|
|
|
1388
1374
|
type ActivityReference = {
|
|
1389
1375
|
readonly kind: "payment";
|
|
1390
1376
|
readonly id: string;
|
|
1377
|
+
readonly actor?: ActorReference;
|
|
1391
1378
|
} | {
|
|
1392
1379
|
readonly kind: "movement";
|
|
1393
1380
|
readonly id: string;
|
|
@@ -1398,6 +1385,12 @@ type ActivityItem = {
|
|
|
1398
1385
|
readonly ledgerKind: "Payment" | "Payout" | "Deposit";
|
|
1399
1386
|
readonly status: PaymentStatus;
|
|
1400
1387
|
readonly amount: PaymentMoney;
|
|
1388
|
+
readonly direction: PaymentDirection;
|
|
1389
|
+
readonly counterpartyLabel: string;
|
|
1390
|
+
readonly receipt: {
|
|
1391
|
+
readonly chainId: number;
|
|
1392
|
+
readonly transactionHash: string;
|
|
1393
|
+
} | null;
|
|
1401
1394
|
readonly createdAt: number;
|
|
1402
1395
|
readonly updatedAt: number;
|
|
1403
1396
|
} | {
|
|
@@ -1523,10 +1516,8 @@ interface PaymentDocumentRender {
|
|
|
1523
1516
|
readonly html: string;
|
|
1524
1517
|
}
|
|
1525
1518
|
/**
|
|
1526
|
-
* The
|
|
1527
|
-
*
|
|
1528
|
-
* `chainId` / `safeAddress`. Host-execution + on-chain evidence live on the
|
|
1529
|
-
* `_internal` channel below; an external builder never touches custody substrate.
|
|
1519
|
+
* The public Payments surface uses product-level methods. A settled receipt can
|
|
1520
|
+
* include `chainId` and `transactionHash`. Internal custody fields stay private.
|
|
1530
1521
|
*/
|
|
1531
1522
|
interface PaymentsMethods {
|
|
1532
1523
|
pay(input: PaymentsPayInput, options?: {
|
|
@@ -1740,8 +1731,8 @@ type AccountStatus = {
|
|
|
1740
1731
|
* here has those two own-keys and nothing else).
|
|
1741
1732
|
*
|
|
1742
1733
|
* Per `packages/sdk/docs/architecture.md`, the
|
|
1743
|
-
* `AccountStatus` discriminant
|
|
1744
|
-
*
|
|
1734
|
+
* `AccountStatus` discriminant includes variants that are returned only by
|
|
1735
|
+
* `getStatus` (for example, `accountPrepared`). It is the durable
|
|
1745
1736
|
* shape consumers depend on. Sibling #161 will extend `ensureReady` to
|
|
1746
1737
|
* advance the ladder past `accountProviderReady` and from
|
|
1747
1738
|
* `accountPrepared` to `accountReady(deployed)`; until then, the type
|
|
@@ -1794,7 +1785,7 @@ interface AccountsMethods {
|
|
|
1794
1785
|
/**
|
|
1795
1786
|
* Faucet surface (dev-only). Deliberately OFF the public `AccountsMethods`;
|
|
1796
1787
|
* reachable only via `client._internal.accounts` (production-surface-policy.md).
|
|
1797
|
-
* The reference CLI uses it
|
|
1788
|
+
* The reference CLI uses it only in the test environment. Consumers do not see `fund`.
|
|
1798
1789
|
*/
|
|
1799
1790
|
interface AccountsFaucetMethods {
|
|
1800
1791
|
fund(amount: Money, options?: {
|
|
@@ -1840,12 +1831,7 @@ declare class OrgError extends OrgError_base<{
|
|
|
1840
1831
|
readonly cause: unknown;
|
|
1841
1832
|
readonly details?: CapxulErrorDetails;
|
|
1842
1833
|
}> {}
|
|
1843
|
-
/**
|
|
1844
|
-
* Live org seam. `createOrg` runs the SDK-orchestrated deploy (D10) and returns
|
|
1845
|
-
* the created `OrgView` (its treasury is the real M2 `Account` over the Org
|
|
1846
|
-
* Safe — $0 at creation, D3). `readTreasury` pulls the org's Account via RPC
|
|
1847
|
-
* `balanceOf` (D3). `listOrgs` lists the orgs the authenticated user belongs to.
|
|
1848
|
-
*/
|
|
1834
|
+
/** The live Organization port creates, reads, and lists Organizations. */
|
|
1849
1835
|
interface OrgPort {
|
|
1850
1836
|
createOrg(input: CreateOrgPortInput): Effect.Effect<OrgView, OrgError, never>;
|
|
1851
1837
|
readTreasury(input: ReadOrgTreasuryInput): Effect.Effect<Account$1, OrgError, never>;
|
|
@@ -1906,12 +1892,10 @@ interface OrganizationPaymentItemInput {
|
|
|
1906
1892
|
}
|
|
1907
1893
|
interface OrganizationPaymentInput extends OrganizationPaymentItemInput {
|
|
1908
1894
|
readonly permissionId: string;
|
|
1909
|
-
readonly requestKey: string;
|
|
1910
1895
|
readonly lineage?: PaymentCommandLineage;
|
|
1911
1896
|
}
|
|
1912
1897
|
interface OrganizationPaymentBatchInput {
|
|
1913
1898
|
readonly permissionId: string;
|
|
1914
|
-
readonly requestKey: string;
|
|
1915
1899
|
readonly items: readonly OrganizationPaymentItemInput[];
|
|
1916
1900
|
readonly lineage?: PaymentCommandLineage;
|
|
1917
1901
|
}
|
|
@@ -1925,27 +1909,15 @@ interface OrganizationPaymentsMethods {
|
|
|
1925
1909
|
}
|
|
1926
1910
|
//#endregion
|
|
1927
1911
|
//#region src/surface/org.d.ts
|
|
1928
|
-
/**
|
|
1929
|
-
* A member's lifecycle status (D9 — unified `Member` with status
|
|
1930
|
-
* `pending | active | revoked | expired`). `pending` = invited (incl. a
|
|
1931
|
-
* non-user emailed into existence) but not yet a provisioned member with an
|
|
1932
|
-
* on-chain grant; `active` = on-chain role granted; `revoked` = offboarded
|
|
1933
|
-
* (on-chain REVOKE fired); `expired` = pending invitation timed out.
|
|
1934
|
-
*/
|
|
1912
|
+
/** The membership state for one Organization member. */
|
|
1935
1913
|
type MemberStatus = "pending" | "pending_safe" | "pending_grant" | "active" | "revoked" | "expired";
|
|
1936
|
-
/**
|
|
1937
|
-
* One Org you belong to (canon §C1 "Org list" — name, role, balance).
|
|
1938
|
-
* `role` is the member's role label within THIS org. `treasury` is the M2
|
|
1939
|
-
* `Account` over the Org Safe (D3). `handle` is the globally-unique,
|
|
1940
|
-
* normalized org handle (D10a). Pure record of brand-typed fields — not a
|
|
1941
|
-
* brand.
|
|
1942
|
-
*/
|
|
1914
|
+
/** One Organization that the current user can access. */
|
|
1943
1915
|
type OrgView = {
|
|
1944
1916
|
readonly id: OrgId;
|
|
1945
1917
|
readonly name: string;
|
|
1946
1918
|
readonly handle: string;
|
|
1947
1919
|
readonly safeAddress: Address$1; /** The viewing member's own role label within this org. */
|
|
1948
|
-
readonly role: string; /** The
|
|
1920
|
+
readonly role: string; /** The Organization treasury Account. */
|
|
1949
1921
|
readonly treasury: Account$1; /** #1064: onboarding-collected description + size bucket; null when unset. */
|
|
1950
1922
|
readonly bio: string | null;
|
|
1951
1923
|
readonly size: string | null; /** #1061 / ADR-0014: logo serving URL resolved at read time; null when unset. */
|
|
@@ -1967,38 +1939,28 @@ interface OrganizationAuditLogItem {
|
|
|
1967
1939
|
readonly metadata?: Record<string, unknown>;
|
|
1968
1940
|
}
|
|
1969
1941
|
/**
|
|
1970
|
-
* One member
|
|
1971
|
-
* `personalSafeAddress` is the member-identity key (D7 — Safe-as-identity); it
|
|
1942
|
+
* One Organization member. `personalSafeAddress` is the member identity key. It
|
|
1972
1943
|
* is `null` while the member is still `pending` (emailed into existence but not
|
|
1973
|
-
* yet provisioned a personal Safe). `email` is the universal entry point
|
|
1944
|
+
* yet provisioned a personal Safe). `email` is the universal entry point.
|
|
1974
1945
|
*/
|
|
1975
1946
|
type MemberView = {
|
|
1976
1947
|
readonly orgId: OrgId;
|
|
1977
1948
|
readonly email: Email;
|
|
1978
|
-
readonly name: string | null; /** Member
|
|
1979
|
-
readonly personalSafeAddress: Address$1 | null; /** The member
|
|
1949
|
+
readonly name: string | null; /** Member identity key. `null` until the invitee provisions a Safe. */
|
|
1950
|
+
readonly personalSafeAddress: Address$1 | null; /** The member role label maps to the on-chain `roleKey`. */
|
|
1980
1951
|
readonly role: string;
|
|
1981
1952
|
readonly roleKey: RoleKey | null;
|
|
1982
1953
|
readonly status: MemberStatus;
|
|
1983
1954
|
readonly grantTxHash: string | null;
|
|
1984
1955
|
readonly revokeTxHash: string | null;
|
|
1985
1956
|
};
|
|
1986
|
-
/**
|
|
1987
|
-
* A role's on-chain Level-1 spend cap (D4/D5 — physically enforced via Zodiac
|
|
1988
|
-
* Roles + Allowance). `perTx` / `perDay` are `Money`; `toRecipients` scopes the
|
|
1989
|
-
* allowed recipient set. Omitting a field means "unbounded on that axis"
|
|
1990
|
-
* (the Owner role).
|
|
1991
|
-
*/
|
|
1957
|
+
/** A role spend cap that Zodiac Roles and Allowance enforce on-chain. */
|
|
1992
1958
|
type RoleSpendCap = {
|
|
1993
1959
|
readonly perTx?: Money;
|
|
1994
1960
|
readonly perDay?: Money;
|
|
1995
1961
|
readonly toRecipients?: "anyone" | readonly Address$1[];
|
|
1996
1962
|
};
|
|
1997
|
-
/**
|
|
1998
|
-
* The Capxul-owned Role DSL definition (D4). `label` becomes the sticky
|
|
1999
|
-
* bytes32 `roleKey` on-chain. `spend` compiles to Level-1 on-chain Zodiac
|
|
2000
|
-
* conditions. Management flags compile to off-chain guards.
|
|
2001
|
-
*/
|
|
1963
|
+
/** A Capxul Role definition. */
|
|
2002
1964
|
type RoleDefinition = {
|
|
2003
1965
|
readonly label: string;
|
|
2004
1966
|
readonly spend?: RoleSpendCap;
|
|
@@ -2006,7 +1968,7 @@ type RoleDefinition = {
|
|
|
2006
1968
|
readonly canManageRoles?: boolean;
|
|
2007
1969
|
};
|
|
2008
1970
|
/**
|
|
2009
|
-
* One role seeded on an
|
|
1971
|
+
* One role seeded on an Organization.
|
|
2010
1972
|
* `roleKey` is the on-chain bytes32 role key derived from the label. `definition`
|
|
2011
1973
|
* is the full Role DSL entry.
|
|
2012
1974
|
*/
|
|
@@ -2016,13 +1978,13 @@ type RoleView = {
|
|
|
2016
1978
|
readonly roleKey: RoleKey;
|
|
2017
1979
|
readonly definition: RoleDefinition;
|
|
2018
1980
|
};
|
|
2019
|
-
/** Built-in role templates
|
|
1981
|
+
/** Built-in role templates for a new Organization. */
|
|
2020
1982
|
type OrgTemplate = "Solo" | "Startup" | "Custom";
|
|
2021
1983
|
/**
|
|
2022
|
-
* Input to `capxul.createOrg
|
|
2023
|
-
* `handle` is the globally
|
|
2024
|
-
* `template` seeds the initial role set
|
|
2025
|
-
*
|
|
1984
|
+
* Input to `capxul.createOrg`. `name` is the display name.
|
|
1985
|
+
* `handle` is the globally unique normalized handle (`^[a-z0-9-]{3,32}$`).
|
|
1986
|
+
* `template` seeds the initial role set. `country` is stored without validation.
|
|
1987
|
+
* For `template: "Custom"`, `roles` carries the authored
|
|
2026
1988
|
* `RoleDefinition[]`.
|
|
2027
1989
|
*/
|
|
2028
1990
|
type CreateOrgInput = {
|
|
@@ -2033,10 +1995,10 @@ type CreateOrgInput = {
|
|
|
2033
1995
|
readonly roles?: readonly RoleDefinition[];
|
|
2034
1996
|
};
|
|
2035
1997
|
/**
|
|
2036
|
-
* Input to `org(orgId).invite
|
|
2037
|
-
*
|
|
1998
|
+
* Input to `org(orgId).invite`. Email is the universal entry point.
|
|
1999
|
+
* An address that is not yet a Capxul user creates a `pending`
|
|
2038
2000
|
* membership that resolves on sign-in. `role` is invitation metadata. It does
|
|
2039
|
-
* not grant an
|
|
2001
|
+
* not grant an on-chain Permission.
|
|
2040
2002
|
*/
|
|
2041
2003
|
type InviteMemberInput = {
|
|
2042
2004
|
readonly email: string;
|
|
@@ -2049,12 +2011,7 @@ type ResendInviteTokenInput = {
|
|
|
2049
2011
|
type DetectPendingOrgInvitationsResult = {
|
|
2050
2012
|
readonly matched: readonly OrgId[];
|
|
2051
2013
|
};
|
|
2052
|
-
/**
|
|
2053
|
-
* Entity-scoped Org method bundle, returned by `capxul.org(orgId)`. Every
|
|
2054
|
-
* method names the entity implicitly via the closed-over `orgId` (D13 — no
|
|
2055
|
-
* stateful active context). `treasury()` returns the real M2 `Account` over
|
|
2056
|
-
* the Org Safe (D3).
|
|
2057
|
-
*/
|
|
2014
|
+
/** Organization methods for one `orgId`. */
|
|
2058
2015
|
interface OrgScopedMethods extends ActorRelationshipMethods {
|
|
2059
2016
|
/** Observe the durable, leak-safe lifecycle for this Organization only. */
|
|
2060
2017
|
getLifecycle(options?: {
|
|
@@ -2064,7 +2021,7 @@ interface OrgScopedMethods extends ActorRelationshipMethods {
|
|
|
2064
2021
|
retrySetup(options?: {
|
|
2065
2022
|
readonly signal?: AbortSignal;
|
|
2066
2023
|
}): Promise<CapxulResult<OrgLifecycle>>;
|
|
2067
|
-
/** The
|
|
2024
|
+
/** The Organization treasury Account. */
|
|
2068
2025
|
treasury(options?: {
|
|
2069
2026
|
readonly signal?: AbortSignal;
|
|
2070
2027
|
}): Promise<CapxulResult<Account$1>>;
|
|
@@ -2104,14 +2061,14 @@ type OrgsMethod = {
|
|
|
2104
2061
|
};
|
|
2105
2062
|
/**
|
|
2106
2063
|
* Top-level Org method bundle, exposed at `client.org` / `client.orgs` /
|
|
2107
|
-
* `client.createOrg`. `org(orgId)` resolves the entity-scoped bundle
|
|
2064
|
+
* `client.createOrg`. `org(orgId)` resolves the entity-scoped bundle.
|
|
2108
2065
|
*/
|
|
2109
2066
|
interface OrgMethods {
|
|
2110
2067
|
createOrg(input: CreateOrgInput, options?: {
|
|
2111
2068
|
readonly signal?: AbortSignal;
|
|
2112
2069
|
}): Promise<CapxulResult<OrgView>>;
|
|
2113
2070
|
readonly orgs: OrgsMethod;
|
|
2114
|
-
/** Resolve the entity-scoped bundle for a specific
|
|
2071
|
+
/** Resolve the entity-scoped bundle for a specific Organization. */
|
|
2115
2072
|
org(orgId: OrgId): OrgScopedMethods;
|
|
2116
2073
|
}
|
|
2117
2074
|
//#endregion
|
|
@@ -2253,19 +2210,14 @@ interface IdentityRuntime {
|
|
|
2253
2210
|
readonly ok: false;
|
|
2254
2211
|
readonly reason: CapxulErrorCode;
|
|
2255
2212
|
}>;
|
|
2256
|
-
/** @internal
|
|
2213
|
+
/** @internal Optional facade bridge for consumer test doubles. */
|
|
2257
2214
|
readonly runFacade?: <T>(verb: IdentityFacadeVerb, controls: InvocationControls | undefined, run: (controls: InvocationControls) => Promise<T>) => Promise<T>;
|
|
2258
2215
|
}
|
|
2259
2216
|
interface CapxulClient {
|
|
2260
2217
|
readonly auth: AuthMethods;
|
|
2261
2218
|
readonly smartAccount: SmartAccountMethods;
|
|
2262
2219
|
readonly identity: IdentityMethods;
|
|
2263
|
-
/**
|
|
2264
|
-
* Liveness surface (#1149 proof lane): `health(nonce)` round-trips a nonce
|
|
2265
|
-
* through the configured deployment. The only method here that is useful
|
|
2266
|
-
* before sign-in, and the only one whose whole point is that the answer
|
|
2267
|
-
* came from the backend rather than from this process.
|
|
2268
|
-
*/
|
|
2220
|
+
/** `health(nonce)` returns the nonce from the configured deployment. Use it to verify backend liveness before sign-in. */
|
|
2269
2221
|
readonly system: SystemMethods;
|
|
2270
2222
|
/**
|
|
2271
2223
|
* Consumer-facing account readiness surface (issue #159 · AC1+AC3).
|
|
@@ -2274,7 +2226,7 @@ interface CapxulClient {
|
|
|
2274
2226
|
*/
|
|
2275
2227
|
readonly account: AccountMethods;
|
|
2276
2228
|
/**
|
|
2277
|
-
* Consumer-facing
|
|
2229
|
+
* Consumer-facing Account money read.
|
|
2278
2230
|
* Returns `{ balance, available }` as `Money` — never wei or token units.
|
|
2279
2231
|
*/
|
|
2280
2232
|
readonly accounts: AccountsMethods;
|
|
@@ -2285,7 +2237,7 @@ interface CapxulClient {
|
|
|
2285
2237
|
readonly targets: TargetsMethods;
|
|
2286
2238
|
readonly destinations: DestinationsMethods;
|
|
2287
2239
|
/**
|
|
2288
|
-
* Direct Payments surface
|
|
2240
|
+
* Direct Payments surface. `pay` records a validated-recipient
|
|
2289
2241
|
* payment; `list`/`get` read the ledger; `markSettled` is the host-execution
|
|
2290
2242
|
* callback.
|
|
2291
2243
|
*/
|
|
@@ -2293,18 +2245,18 @@ interface CapxulClient {
|
|
|
2293
2245
|
readonly activity: ActivityMethods;
|
|
2294
2246
|
readonly holdings: HoldingsMethods;
|
|
2295
2247
|
readonly offramp: OfframpMethods;
|
|
2296
|
-
/** Payment document
|
|
2248
|
+
/** Re-derive a Payment document EIP-712 hash. */
|
|
2297
2249
|
readonly paymentDocuments: PaymentDocumentsMethods;
|
|
2298
2250
|
/**
|
|
2299
2251
|
* Media surface (#1061 / ADR-0014): profile-image + org-logo upload/record.
|
|
2300
2252
|
*/
|
|
2301
2253
|
readonly media: MediaMethods;
|
|
2302
2254
|
/**
|
|
2303
|
-
* Organization domain surface
|
|
2255
|
+
* Organization domain surface.
|
|
2304
2256
|
* `createOrg(input)` creates an Org; `orgs()` lists the Orgs you belong to;
|
|
2305
2257
|
* `org(orgId)` resolves the entity-scoped bundle (treasury / members / roles,
|
|
2306
2258
|
* invitations, Permissions, and payments). Explicit entity scoping —
|
|
2307
|
-
*
|
|
2259
|
+
* It has no stateful active context.
|
|
2308
2260
|
*/
|
|
2309
2261
|
readonly createOrg: OrgMethods["createOrg"];
|
|
2310
2262
|
readonly orgs: OrgMethods["orgs"];
|
|
@@ -2381,15 +2333,14 @@ interface CreateCapxulClientInput {
|
|
|
2381
2333
|
*/
|
|
2382
2334
|
readonly signer?: CapxulSigner;
|
|
2383
2335
|
/**
|
|
2384
|
-
* Optional live
|
|
2385
|
-
* D3 RPC treasury). When supplied, `client.createOrg` / `org(id).treasury`
|
|
2336
|
+
* Optional live Organization deployment. When supplied, `client.createOrg` and `org(id).treasury`
|
|
2386
2337
|
* run the live path (real deploy + on-chain balance); when omitted, the
|
|
2387
2338
|
* hermetic `$0` path runs (a fresh Org has no on-chain funds). The adapter
|
|
2388
2339
|
* that CONSTRUCTS this port (deployer key + RPC + authenticated Convex seam)
|
|
2389
2340
|
* is wired by the CLI deploy-stack; the factory only threads it through.
|
|
2390
2341
|
*/
|
|
2391
2342
|
readonly orgDeploymentPort?: OrgPort;
|
|
2392
|
-
/**
|
|
2343
|
+
/** Preferred Organization deployment data port. */
|
|
2393
2344
|
readonly orgPort?: OrgPort;
|
|
2394
2345
|
/**
|
|
2395
2346
|
* Internal Organization lifecycle capability. The Core SDK owns its
|
|
@@ -2404,4 +2355,4 @@ interface CreateCapxulClientInput {
|
|
|
2404
2355
|
};
|
|
2405
2356
|
}
|
|
2406
2357
|
//#endregion
|
|
2407
|
-
export { InboxMethods as $,
|
|
2358
|
+
export { InboxMethods as $, OrgLifecycle as $t, OrganizationPaymentsMethods as A, PaymentDocumentRef as At, AccountMethods as B, RecipientResolution as Bt, ResendInviteTokenInput as C, OfframpQuoteInput as Ct, OrganizationPaymentBatchInput as D, Payment as Dt, RoleView as E, PayeesMethods as Et, PermissionOptions as F, PaymentStatus as Ft, ActorRequestIssueInput as G, TargetsMethods as Gt, ActorProfileMethods as H, Ref$1 as Ht, PermissionReplaceInput as I, PaymentTiming as It, AddressBookEntry as J, AccountSetupStep as Jt, ActorRequestsMethods as K, fingerprintPaymentIntent as Kt, PermissionRevokeInput as L, PaymentType as Lt, PermissionChangeInput as M, PaymentDocumentVerification as Mt, PermissionCreateInput as N, PaymentDocumentsMethods as Nt, OrganizationPaymentInput as O, PaymentDirection as Ot, PermissionMethods as P, PaymentMoney as Pt, InboxItem as Q, AuthMethods as Qt, PermissionReadResult as R, PaymentsMethods as Rt, OrganizationAuditLogItem as S, OfframpQuote as St, RoleSpendCap as T, Payee as Tt, ActorRelationshipMethods as U, ResolvedTarget as Ut, ActorProfile as V, RecipientResolutionKind as Vt, ActorRequest as W, TargetReference as Wt, AddressBookMethods as X, IdentityMethods as Xt, AddressBookLabelInput as Y, isSettingUpLifecycle as Yt, InboxApproveInput as Z, SmartAccountMethods as Zt, OrgMethods as _, StateLabel as _n, FinancialOpsMethods as _t, IdentityRuntimeSendResult as a, SubmittedPermissionExecution as an, ActivityPage as at, OrgView as b, InvocationControls as bn, MeProfile as bt, SystemHealth as c, TelemetryGroupInput as cn, DepositInstructions as ct, CurrentUserMethods as d, CAPXUL_PAYMENTS_V2_ADDRESS as dn, DestinationKind as dt, OrgSetupStep as en, ActivityAnnotationInput as et, CreateOrgInput as f, Destination$1 as fn, DestinationListInput as ft, MemberView as g, Readiness as gn, DestinationsMethods as gt, MemberStatus as h, OrgLane as hn, DestinationRemoveInput as ht, IdentityRuntime as i, Permission as in, ActivityMethods as it, PermissionAssignInput as j, PaymentDocumentRender as jt, OrganizationPaymentItemInput as k, PaymentDocumentKind as kt, MediaMethods as l, TelemetryIdentifyInput as ln, Destination as lt, InviteMemberInput as m, IdentityState as mn, DestinationRail as mt, CreateCapxulClientInput as n, CurrentHoldings as nn, ActivityItem as nt, HoldingsMethods as o, CapxulEnv as on, ActivityReference as ot, DetectPendingOrgInvitationsResult as p, IdentityEvent as pn, DestinationPayload as pt, AddressBookAddInput as q, AccountLifecycle as qt, IdentityProfileDetails as r, MovementAnnotation as rn, ActivityListParams as rt, SystemMethods as s, TelemetryEvent as sn, ActorReference as st, CapxulClient as t, WireObservationContext as tn, ActivityDetail as tt, CurrentUserContext as u, TelemetryPort as un, DestinationAddInput as ut, OrgScopedMethods as v, destination as vn, HandlesMethods as vt, RoleDefinition as w, OfframpStatus as wt, OrganizationAccount as x, OfframpMethods as xt, OrgTemplate as y, IdentityTransition as yn, MeMethods as yt, AccountsMethods as z, PaymentsPayInput as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as CapxulErrorDetails, A as CountryCode, D as AuthUserId, E as AuthSession, I as Money, Q as CapxulErrorCode, R as OrgId, W as RoleKey, X as toCountryCode, Y as toAddress, Z as CapxulError, a as AccountProvider, b as AccountId, c as Eip1193Provider, d as CapxulResult, f as Profile, i as injectedWalletSigner, l as eip1193AccountProvider, m as SmartAccount, n as CapxulSigner, nt as isCapxulError, o as AccountProviderSource, p as Session, r as Eip1193RequestProvider, s as AccountRequirement, t as CapxulDigestSigner, tt as FailureMode, u as localPrivateKeyAccountProvider, x as Address, y as Account } from "./signer-
|
|
2
|
-
import { $ as InboxMethods, $t as
|
|
1
|
+
import { $ as CapxulErrorDetails, A as CountryCode, D as AuthUserId, E as AuthSession, I as Money, Q as CapxulErrorCode, R as OrgId, W as RoleKey, X as toCountryCode, Y as toAddress, Z as CapxulError, a as AccountProvider, b as AccountId, c as Eip1193Provider, d as CapxulResult, f as Profile, i as injectedWalletSigner, l as eip1193AccountProvider, m as SmartAccount, n as CapxulSigner, nt as isCapxulError, o as AccountProviderSource, p as Session, r as Eip1193RequestProvider, s as AccountRequirement, t as CapxulDigestSigner, tt as FailureMode, u as localPrivateKeyAccountProvider, x as Address, y as Account } from "./signer-Bj4F-RwT.mjs";
|
|
2
|
+
import { $ as InboxMethods, $t as OrgLifecycle, A as OrganizationPaymentsMethods, At as PaymentDocumentRef, B as AccountMethods, Bt as RecipientResolution, C as ResendInviteTokenInput, Ct as OfframpQuoteInput, D as OrganizationPaymentBatchInput, Dt as Payment, E as RoleView, Et as PayeesMethods, F as PermissionOptions, Ft as PaymentStatus, G as ActorRequestIssueInput, Gt as TargetsMethods, H as ActorProfileMethods, Ht as Ref, I as PermissionReplaceInput, It as PaymentTiming, J as AddressBookEntry, Jt as AccountSetupStep, K as ActorRequestsMethods, Kt as fingerprintPaymentIntent, L as PermissionRevokeInput, Lt as PaymentType, M as PermissionChangeInput, Mt as PaymentDocumentVerification, N as PermissionCreateInput, Nt as PaymentDocumentsMethods, O as OrganizationPaymentInput, Ot as PaymentDirection, P as PermissionMethods, Pt as PaymentMoney, Q as InboxItem, Qt as AuthMethods, R as PermissionReadResult, Rt as PaymentsMethods, S as OrganizationAuditLogItem, St as OfframpQuote, T as RoleSpendCap, Tt as Payee, U as ActorRelationshipMethods, Ut as ResolvedTarget, V as ActorProfile, Vt as RecipientResolutionKind, W as ActorRequest, Wt as TargetReference, X as AddressBookMethods, Xt as IdentityMethods, Y as AddressBookLabelInput, Yt as isSettingUpLifecycle, Z as InboxApproveInput, Zt as SmartAccountMethods, _ as OrgMethods, _n as StateLabel, _t as FinancialOpsMethods, a as IdentityRuntimeSendResult, an as SubmittedPermissionExecution, at as ActivityPage, b as OrgView, bn as InvocationControls, bt as MeProfile, c as SystemHealth, ct as DepositInstructions, d as CurrentUserMethods, dn as CAPXUL_PAYMENTS_V2_ADDRESS, dt as DestinationKind, en as OrgSetupStep, et as ActivityAnnotationInput, f as CreateOrgInput, fn as Destination$1, ft as DestinationListInput, g as MemberView, gn as Readiness, gt as DestinationsMethods, h as MemberStatus, hn as OrgLane, ht as DestinationRemoveInput, i as IdentityRuntime, in as Permission, it as ActivityMethods, j as PermissionAssignInput, jt as PaymentDocumentRender, k as OrganizationPaymentItemInput, kt as PaymentDocumentKind, l as MediaMethods, lt as Destination, m as InviteMemberInput, mn as IdentityState, mt as DestinationRail, n as CreateCapxulClientInput, nn as CurrentHoldings, nt as ActivityItem, o as HoldingsMethods, on as CapxulEnv, ot as ActivityReference, p as DetectPendingOrgInvitationsResult, pn as IdentityEvent, pt as DestinationPayload, q as AddressBookAddInput, qt as AccountLifecycle, r as IdentityProfileDetails, rn as MovementAnnotation, rt as ActivityListParams, s as SystemMethods, st as ActorReference, t as CapxulClient, tn as WireObservationContext, tt as ActivityDetail, u as CurrentUserContext, un as TelemetryPort, ut as DestinationAddInput, v as OrgScopedMethods, vn as destination, vt as HandlesMethods, w as RoleDefinition, wt as OfframpStatus, x as OrganizationAccount, xt as OfframpMethods, y as OrgTemplate, yn as IdentityTransition, yt as MeMethods, z as AccountsMethods, zt as PaymentsPayInput } from "./create-capxul-client-DmV6qEq4.mjs";
|
|
3
3
|
import { Hex } from "viem";
|
|
4
4
|
import { Context, Effect, Layer } from "effect";
|
|
5
5
|
import { FunctionReference } from "convex/server";
|
|
@@ -207,4 +207,4 @@ declare function captureException(telemetry: TelemetryPort, error: unknown, cont
|
|
|
207
207
|
*/
|
|
208
208
|
declare function captureExceptionSync(telemetry: TelemetryPort, error: unknown, context?: HandledErrorReportContext): void;
|
|
209
209
|
//#endregion
|
|
210
|
-
export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupStep, type AccountsMethods, type ActivityAnnotationInput, type ActivityDetail, type ActivityItem, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActivityReference, type ActorProfile, type ActorProfileMethods, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type AuthMethods, type AuthSession, type AuthUserId, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulResult, type CapxulSigner, 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, type Eip1193Provider, type Eip1193RequestProvider, type FinancialOpsMethods, type HandledErrorReportContext, type HandlesMethods, 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 MovementAnnotation, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgId, type OrgLane, type OrgLifecycle, type OrgMethods, type OrgScopedMethods, type OrgSetupStep, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, type Payee, type PayeesMethods, type Payment, type PaymentDocumentKind, type PaymentDocumentRef, type PaymentDocumentRender, type PaymentDocumentVerification, type PaymentDocumentsMethods, type PaymentMoney, type PaymentStatus, type PaymentTiming, type PaymentType, type PaymentsMethods, type PaymentsPayInput, type Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Readiness, type RecipientResolution, type RecipientResolutionKind, type Ref, type ResendInviteTokenInput, type ResolvedTarget, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type SdkFailureObservation, type Session, type SmartAccount, type SmartAccountMethods, type StateLabel, type SubmittedPermissionExecution, type SystemHealth, type SystemMethods, type TargetReference, type TargetsMethods, type TelemetryPort, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, injectedWalletSigner, isCapxulError, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, postHogObservability, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress };
|
|
210
|
+
export { type Account, type AccountId, type AccountLifecycle, type AccountMethods, type AccountProvider, type AccountProviderSource, type AccountRequirement, type AccountSetupStep, type AccountsMethods, type ActivityAnnotationInput, type ActivityDetail, type ActivityItem, type ActivityListParams, type ActivityMethods, type ActivityPage, type ActivityReference, type ActorProfile, type ActorProfileMethods, type ActorReference, type ActorRelationshipMethods, type ActorRequest, type ActorRequestIssueInput, type ActorRequestsMethods, type Address, type AddressBookAddInput, type AddressBookEntry, type AddressBookLabelInput, type AddressBookMethods, type AuthMethods, type AuthSession, type AuthUserId, CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, type CapxulClient, type CapxulClientInput, type CapxulDigestSigner, CapxulError, type CapxulErrorCode, type CapxulErrorDetails, type CapxulResult, type CapxulSigner, 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, type Eip1193Provider, type Eip1193RequestProvider, type FinancialOpsMethods, type HandledErrorReportContext, type HandlesMethods, 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 MovementAnnotation, type ObservationAdapter, type ObservationContext, type ObservationDelivery, type OfframpMethods, type OfframpQuote, type OfframpQuoteInput, type OfframpStatus, type OpenfortEmbeddedSignerInput, type OpenfortEmbeddedWalletApi, type OpenfortEmbeddedWalletPort, type OrgId, type OrgLane, type OrgLifecycle, type OrgMethods, type OrgScopedMethods, type OrgSetupStep, type OrgTemplate, type OrgView, type OrganizationAccount, type OrganizationAuditLogItem, type OrganizationPaymentBatchInput, type OrganizationPaymentInput, type OrganizationPaymentItemInput, type OrganizationPaymentsMethods, type Payee, type PayeesMethods, type Payment, 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 Permission, type PermissionAssignInput, type PermissionChangeInput, type PermissionCreateInput, type PermissionMethods, type PermissionOptions, type PermissionReadResult, type PermissionReplaceInput, type PermissionRevokeInput, type PostHogObservabilityClient, type PostHogObservabilityOptions, type Profile, type Readiness, type RecipientResolution, type RecipientResolutionKind, type Ref, type ResendInviteTokenInput, type ResolvedTarget, type RoleDefinition, type RoleKey, type RoleSpendCap, type RoleView, type SdkFailureObservation, type Session, type SmartAccount, type SmartAccountMethods, type StateLabel, type SubmittedPermissionExecution, type SystemHealth, type SystemMethods, type TargetReference, type TargetsMethods, type TelemetryPort, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, injectedWalletSigner, isCapxulError, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, postHogObservability, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as OBSERVATION_CONTEXT_HEADER, B as captureException, C as bootstrapErrorFromCapxul, D as fingerprintPaymentIntent, E as version, F as EngineeringTelemetryBootstrapPolicy, H as CAPXUL_PAYMENTS_V2_ADDRESS, I as isSettingUpLifecycle, K as destination, L as formatTraceparent, M as sanitizeObservationContext, N as CAPXUL_FUNCTIONS, O as toWei, P as BootstrapEnvelope, R as copyInvocationObservation, S as BootstrapPortTag, T as AuthClientPortTag, U as normalizeBindingEmail, V as captureExceptionSync, W as BASE_SEPOLIA_CHAIN_ID, _ as identityErrorFromCapxul, a as observeFailedResult, b as ClockError, c as PostHogTelemetryLayer, d as SmartAccountPortTag, f as smartAccountErrorFromCapxul, g as IdentityPortTag, h as wireChainId, i as observationContextProps, j as encodeObservationContextHeader, k as fromWei, l as TelemetryPortTag, m as accountReadErrorFromCapxul, n as postHogProductTelemetry, o as postHogFailureObservation, p as AccountReadPortTag, r as CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, s as detectAuthCacheAdapter, t as assembleCapxulClient, v as ConvexCallPortTag, w as authClientPortFromPromiseAdapter, x as ClockPortTag, y as convexCallErrorFromCapxul, z as readInvocationObservation } from "./create-capxul-client-CMUq5w10.mjs";
|
|
2
2
|
import { A as toSessionToken, C as toEpochMs, D as toOrgId, E as toKycTier, F as isCapxulError, M as CapxulError, O as toPublishableKey, P as Errors, S as toEmail, T as toJwtToken, _ as toAuthUserId, b as toCurrencyCode, h as toAllowedOrigin, j as decodeConvexError, k as toRoleKey, m as toAddress, o as AuthCachePortTag, p as toAccountId, v as toChainId, w as toEpochSeconds, x as toDurationMs, y as toCountryCode } from "./InMemoryAuthCacheAdapter-Rc8tCtml.mjs";
|
|
3
3
|
import { keccak256, recoverAddress, stringToHex } from "viem";
|
|
4
4
|
import { Cause, Context, Data, Effect, Exit, Layer, Result, SchemaIssue, SchemaParser, Scope, Tracer } from "effect";
|
|
@@ -329,7 +329,6 @@ const postHogOtlpEndpoints = (host) => {
|
|
|
329
329
|
};
|
|
330
330
|
const ENGINEERING_CAPXUL_ENVS = new Set([
|
|
331
331
|
"development",
|
|
332
|
-
"e2e",
|
|
333
332
|
"staging",
|
|
334
333
|
"production"
|
|
335
334
|
]);
|
|
@@ -2913,4 +2912,4 @@ async function createCapxulClient(input) {
|
|
|
2913
2912
|
return createCapxulClient$1(input);
|
|
2914
2913
|
}
|
|
2915
2914
|
//#endregion
|
|
2916
|
-
export { CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CapxulError, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, injectedWalletSigner, isCapxulError, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, postHogObservability, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress };
|
|
2915
|
+
export { CAPXUL_PAYMENTS_V2_ADDRESS, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT, CapxulError, captureException, captureExceptionSync, createCapxulClient, deriveDevPrivateKey, devPrivateKeySigner, eip1193AccountProvider, embeddedSigner, fingerprintPaymentIntent, injectedWalletSigner, isCapxulError, isSettingUpLifecycle, localPrivateKeyAccountProvider, openfortEmbeddedSigner, openfortEmbeddedSignerFromWallet, openfortEmbeddedWalletPort, postHogObservability, destination as resolveIdentityDestination, toCountryCode, toAddress as toEvmAddress };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as AuthSession, _ as AuthCachePortTag, g as AuthCachePort, h as AuthCacheError, n as CapxulSigner, v as CachedJwt } from "../signer-
|
|
1
|
+
import { E as AuthSession, _ as AuthCachePortTag, g as AuthCachePort, h as AuthCacheError, n as CapxulSigner, v as CachedJwt } from "../signer-Bj4F-RwT.mjs";
|
|
2
2
|
import { Hex } from "viem";
|
|
3
3
|
import { Effect, FileSystem, Layer, Path } from "effect";
|
|
4
4
|
|
|
@@ -31,7 +31,7 @@ interface DetectNodeAuthCacheAdapterOptions {
|
|
|
31
31
|
/**
|
|
32
32
|
* Node `CapxulSigner` backed by a raw private key. Signs the EIP-712 `SafeOp`
|
|
33
33
|
* digest the backend returns for a prepared deployment UserOperation. The
|
|
34
|
-
* reference CLI builds this from `DEPLOYER_PRIVATE_KEY` for
|
|
34
|
+
* The reference CLI builds this from `DEPLOYER_PRIVATE_KEY` for live tests.
|
|
35
35
|
*/
|
|
36
36
|
declare function localPrivateKeySigner(input: {
|
|
37
37
|
readonly privateKey: Hex;
|
package/dist/node/index.mjs
CHANGED
|
@@ -107,7 +107,7 @@ function toAuthCacheError(operation, cause) {
|
|
|
107
107
|
/**
|
|
108
108
|
* Node `CapxulSigner` backed by a raw private key. Signs the EIP-712 `SafeOp`
|
|
109
109
|
* digest the backend returns for a prepared deployment UserOperation. The
|
|
110
|
-
* reference CLI builds this from `DEPLOYER_PRIVATE_KEY` for
|
|
110
|
+
* The reference CLI builds this from `DEPLOYER_PRIVATE_KEY` for live tests.
|
|
111
111
|
*/
|
|
112
112
|
function localPrivateKeySigner(input) {
|
|
113
113
|
const account = privateKeyToAccount(input.privateKey);
|