@capxul/sdk 3.2.0 → 4.0.1
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/README.md +2 -2
- package/dist/{OAuthBearerAuthClient-8F_kyVP5.mjs → OAuthBearerAuthClient-BHvDR8_0.mjs} +1 -1
- package/dist/{OAuthBearerAuthClient-CsOgeeZa.d.mts → OAuthBearerAuthClient-D-DLYlKj.d.mts} +1 -1
- package/dist/{clock-CWpcQlLy.mjs → clock-C2AUlq1V.mjs} +34 -1
- package/dist/{create-capxul-client-BCq08ppe.mjs → create-capxul-client-5Bk0PS0R.mjs} +1047 -552
- package/dist/index.d.mts +21 -20
- package/dist/index.mjs +44 -9
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.mjs +2 -2
- package/dist/{observation-B76zFxd6.d.mts → observation-DtzTdv20.d.mts} +75 -71
- package/dist/{signer-DOqb8M1Y.d.mts → signer-C0hZ6Kiy.d.mts} +9 -2
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +6 -6
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as PublishableKey, A as AppId, D as AllowanceKey, E as Address$1, F as ChainId, G as OrgId, H as EpochMs, I as CountryCode, J as PayrollGroupId, K as PartyId, L as CurrencyCode, M as AuthUserId, N as BlockNumber, O as AllowedOrigin, P as BudgetId, Q as Profile, R as DocumentHash, St as FailureMode, V as Email, W as Money, X as PermissionAssignmentId, Y as PayrollRunId, Z as PermissionId, _ as ClockPort, a as SignerStatusStore, at as WeiAmount, c as AccountProviderSource, et as RoleKey, ft as CapxulError, g as SmartAccount$1, gt as Failure, h as Session$1, it as TxHash, j as AuthSession, k as AnonymousDistinctId, l as AccountRequirement, m as Profile$1, mt as CapxulErrorDetails, n as CapxulSigner, nt as SmartAccount, p as CapxulResult, pt as CapxulErrorCode, q as PaymentCommandId, rt as TesterKind, tt as SessionToken, v as AuthClientPort, w as Account$1, x as AuthCachePort, y as CanSendOtpStatus, z as DurationMs } from "./signer-C0hZ6Kiy.mjs";
|
|
2
2
|
import { Context, Effect, Layer, Schema, Scope, Tracer } from "effect";
|
|
3
3
|
import { Hex } from "viem";
|
|
4
4
|
import { FunctionReference } from "convex/server";
|
|
@@ -279,7 +279,7 @@ interface TelemetryPort {
|
|
|
279
279
|
}
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region ../observability/src/index.d.ts
|
|
282
|
-
declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "chain_upstream_fallback", "bundler_error", "receipt_pending", "operation_retried", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "payment_verification_retry", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident"];
|
|
282
|
+
declare const TELEMETRY_EVENT_NAMES: readonly ["auth_otp_requested", "auth_otp_delivered", "auth_otp_expired", "auth_verified", "auth_failed", "auth_signed_out", "onboarding_intent_selected", "onboarding_profile_submitted", "onboarding_organization_submitted", "onboarding_dashboard_reached", "provisioning_safe_created", "provisioning_safe_confirmed", "bootstrap_resolved", "bootstrap_failed", "member_activation_started", "member_activation_ready", "member_activation_failed", "organization_creation_started", "organization_creation_ready", "organization_creation_failed", "chain_upstream_fallback", "bundler_error", "receipt_pending", "operation_retried", "account_balance_read", "account_balance_failed", "faucet_requested", "faucet_confirmed", "faucet_failed", "org_create_started", "org_safe_created", "org_safe_confirmed", "org_roles_seeded", "org_created", "org_create_failed", "org_invite_sent", "org_invite_accepted", "org_invite_expired", "payment_initiated", "payment_settled", "payment_failed", "payment_verification_retry", "payment_lifecycle_transition", "quick_pay_external_address_acknowledged", "deposit_initiated", "deposit_settled", "permission_mirror_verification", "movement_scan_window", "movement_scan_checkpoint", "movement_scan_incident"];
|
|
283
283
|
type TelemetryEventName = (typeof TELEMETRY_EVENT_NAMES)[number];
|
|
284
284
|
type TelemetryProps = Record<string, unknown>;
|
|
285
285
|
type TelemetryEvent = {
|
|
@@ -323,8 +323,10 @@ type EngineeringTelemetryBootstrapPolicyV1 = Schema.Schema.Type<typeof Engineeri
|
|
|
323
323
|
//#endregion
|
|
324
324
|
//#region ../wire/src/status.d.ts
|
|
325
325
|
/** The closed Payment status authority. */
|
|
326
|
-
declare const PAYMENT_STATUSES: readonly ["pending", "settling", "scheduled", "streaming", "pending_claim", "settled", "cancelled", "failed"];
|
|
326
|
+
declare const PAYMENT_STATUSES: readonly ["pending", "settling", "unresolved", "scheduled", "streaming", "pending_claim", "settled", "cancelled", "failed"];
|
|
327
327
|
type PaymentStatus$1 = (typeof PAYMENT_STATUSES)[number];
|
|
328
|
+
declare const PAYMENT_EXECUTION_STATUSES: readonly ["pending", "included", "dropped", "replaced", "expired", "unresolved", "superseded", "failed", "settled"];
|
|
329
|
+
type PaymentExecutionStatus = (typeof PAYMENT_EXECUTION_STATUSES)[number];
|
|
328
330
|
/** The payment direction relative to the current actor. */
|
|
329
331
|
declare const PAYMENT_DIRECTIONS: readonly ["in", "out", "self"];
|
|
330
332
|
type PaymentDirection$1 = (typeof PAYMENT_DIRECTIONS)[number];
|
|
@@ -722,8 +724,8 @@ type CompleteOnboardingIdentityInput = {
|
|
|
722
724
|
readonly displayName: string;
|
|
723
725
|
readonly country: CountryCode;
|
|
724
726
|
readonly withdrawalAddress?: Address$1;
|
|
725
|
-
/**
|
|
726
|
-
readonly
|
|
727
|
+
/** One globally unique Party handle. */
|
|
728
|
+
readonly handle: string;
|
|
727
729
|
};
|
|
728
730
|
declare const IdentityError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
729
731
|
readonly _tag: "IdentityError";
|
|
@@ -1020,21 +1022,21 @@ interface SmartAccountMethods {
|
|
|
1020
1022
|
interface CompleteProfileInput {
|
|
1021
1023
|
readonly displayName: string;
|
|
1022
1024
|
readonly country: string;
|
|
1023
|
-
readonly
|
|
1025
|
+
readonly handle: string;
|
|
1024
1026
|
}
|
|
1025
1027
|
interface IdentityMethods {
|
|
1026
1028
|
loadCurrent(options?: {
|
|
1027
1029
|
readonly signal?: AbortSignal;
|
|
1028
1030
|
}): Promise<CapxulResult<Profile$1 | null>>;
|
|
1029
|
-
/** Complete the Person profile. A normalized, globally unique
|
|
1031
|
+
/** Complete the Person profile. A normalized, globally unique handle is required. */
|
|
1030
1032
|
completeProfile(profile: CompleteProfileInput, options?: {
|
|
1031
1033
|
readonly signal?: AbortSignal;
|
|
1032
1034
|
}): Promise<CapxulResult<Profile$1>>;
|
|
1033
1035
|
/**
|
|
1034
|
-
* #1062: availability probe for the
|
|
1036
|
+
* #1062: availability probe for the handle the user is typing. Returns the
|
|
1035
1037
|
* canonical stored form so the UI can echo it.
|
|
1036
1038
|
*/
|
|
1037
|
-
|
|
1039
|
+
handleAvailable(handle: string, options?: {
|
|
1038
1040
|
readonly signal?: AbortSignal;
|
|
1039
1041
|
}): Promise<CapxulResult<{
|
|
1040
1042
|
readonly available: boolean;
|
|
@@ -1096,22 +1098,22 @@ type TargetReference = {
|
|
|
1096
1098
|
readonly kind: "email";
|
|
1097
1099
|
readonly email: string;
|
|
1098
1100
|
} | {
|
|
1099
|
-
readonly kind: "
|
|
1100
|
-
readonly
|
|
1101
|
-
} | {
|
|
1102
|
-
readonly kind: "payee";
|
|
1103
|
-
readonly id: string;
|
|
1101
|
+
readonly kind: "address";
|
|
1102
|
+
readonly address: Address$1;
|
|
1104
1103
|
} | {
|
|
1105
1104
|
readonly kind: "party";
|
|
1106
1105
|
readonly partyId: PartyId;
|
|
1107
|
-
} | {
|
|
1108
|
-
readonly kind: "destination";
|
|
1109
|
-
readonly id: string;
|
|
1110
1106
|
};
|
|
1111
1107
|
interface ResolvedTarget {
|
|
1112
1108
|
readonly reference: TargetReference;
|
|
1113
1109
|
readonly label: string;
|
|
1114
|
-
readonly
|
|
1110
|
+
readonly status: RecipientResolution["status"];
|
|
1111
|
+
readonly kind: "person" | "organization" | "external_address" | "unresolved";
|
|
1112
|
+
readonly safeAddress: Address$1;
|
|
1113
|
+
readonly isCapxulAccount: boolean;
|
|
1114
|
+
readonly partyId?: PartyId;
|
|
1115
|
+
readonly handle?: string;
|
|
1116
|
+
readonly requiresAcknowledgement?: true;
|
|
1115
1117
|
readonly capabilities: {
|
|
1116
1118
|
readonly canPay: boolean;
|
|
1117
1119
|
readonly canRequest: boolean;
|
|
@@ -1123,7 +1125,6 @@ interface TargetsMethods {
|
|
|
1123
1125
|
readonly signal?: AbortSignal;
|
|
1124
1126
|
}): Promise<CapxulResult<ResolvedTarget>>;
|
|
1125
1127
|
}
|
|
1126
|
-
type RecipientResolutionKind = "email" | "org" | "payee";
|
|
1127
1128
|
type Ref$1 = {
|
|
1128
1129
|
readonly kind: "handle";
|
|
1129
1130
|
readonly handle: string;
|
|
@@ -1131,14 +1132,8 @@ type Ref$1 = {
|
|
|
1131
1132
|
readonly kind: "email";
|
|
1132
1133
|
readonly email: string;
|
|
1133
1134
|
} | {
|
|
1134
|
-
readonly kind: "
|
|
1135
|
-
readonly
|
|
1136
|
-
} | {
|
|
1137
|
-
readonly kind: "capxulUserId";
|
|
1138
|
-
readonly capxulUserId: string;
|
|
1139
|
-
} | {
|
|
1140
|
-
readonly kind: "payeeId";
|
|
1141
|
-
readonly payeeId: string;
|
|
1135
|
+
readonly kind: "address";
|
|
1136
|
+
readonly address: Address$1;
|
|
1142
1137
|
} | {
|
|
1143
1138
|
readonly kind: "party";
|
|
1144
1139
|
readonly partyId: PartyId;
|
|
@@ -1157,24 +1152,19 @@ interface DepositInstructions {
|
|
|
1157
1152
|
readonly label: string;
|
|
1158
1153
|
}
|
|
1159
1154
|
interface RecipientResolution {
|
|
1160
|
-
readonly
|
|
1161
|
-
readonly
|
|
1155
|
+
readonly status: "known_party" | "new_email" | "external_address";
|
|
1156
|
+
readonly kind: "party" | "email" | "external_address";
|
|
1157
|
+
readonly locatorKind: Ref$1["kind"];
|
|
1158
|
+
readonly recipient: Ref$1;
|
|
1162
1159
|
readonly label: string;
|
|
1163
1160
|
readonly safeAddress: string;
|
|
1164
|
-
readonly
|
|
1165
|
-
readonly
|
|
1161
|
+
readonly isCapxulAccount: boolean;
|
|
1162
|
+
readonly partyId?: string;
|
|
1163
|
+
readonly partyKind?: "person" | "org";
|
|
1166
1164
|
readonly handle?: string;
|
|
1167
1165
|
readonly email?: string;
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
readonly payeeId: string;
|
|
1171
|
-
readonly label: string;
|
|
1172
|
-
readonly recipientRef: string;
|
|
1173
|
-
readonly handle: string | null;
|
|
1174
|
-
readonly destinationKind: "email" | "org" | "payeeHandle";
|
|
1175
|
-
readonly safeAddress: string;
|
|
1176
|
-
readonly createdAt: number;
|
|
1177
|
-
readonly updatedAt: number;
|
|
1166
|
+
readonly address?: string;
|
|
1167
|
+
readonly requiresAcknowledgement?: true;
|
|
1178
1168
|
}
|
|
1179
1169
|
interface MeMethods {
|
|
1180
1170
|
get(options?: {
|
|
@@ -1184,26 +1174,6 @@ interface MeMethods {
|
|
|
1184
1174
|
readonly signal?: AbortSignal;
|
|
1185
1175
|
}): Promise<CapxulResult<DepositInstructions>>;
|
|
1186
1176
|
}
|
|
1187
|
-
interface HandlesMethods {
|
|
1188
|
-
resolve(handle: string, options?: {
|
|
1189
|
-
readonly signal?: AbortSignal;
|
|
1190
|
-
}): Promise<CapxulResult<RecipientResolution>>;
|
|
1191
|
-
}
|
|
1192
|
-
interface PayeesMethods {
|
|
1193
|
-
create(input: {
|
|
1194
|
-
readonly label: string;
|
|
1195
|
-
readonly recipient: string;
|
|
1196
|
-
readonly handle?: string;
|
|
1197
|
-
}, options?: {
|
|
1198
|
-
readonly signal?: AbortSignal;
|
|
1199
|
-
}): Promise<CapxulResult<Payee>>;
|
|
1200
|
-
get(payeeId: string, options?: {
|
|
1201
|
-
readonly signal?: AbortSignal;
|
|
1202
|
-
}): Promise<CapxulResult<Payee | null>>;
|
|
1203
|
-
resolve(recipient: string, options?: {
|
|
1204
|
-
readonly signal?: AbortSignal;
|
|
1205
|
-
}): Promise<CapxulResult<RecipientResolution>>;
|
|
1206
|
-
}
|
|
1207
1177
|
interface PaymentMoney {
|
|
1208
1178
|
readonly currency: string;
|
|
1209
1179
|
readonly value: string;
|
|
@@ -1243,14 +1213,21 @@ interface Payment {
|
|
|
1243
1213
|
readonly transactionHash: string;
|
|
1244
1214
|
} | null;
|
|
1245
1215
|
readonly recipient: {
|
|
1246
|
-
readonly kind: "
|
|
1216
|
+
readonly kind: "party";
|
|
1217
|
+
readonly partyId: string;
|
|
1218
|
+
readonly label: string;
|
|
1219
|
+
} | {
|
|
1220
|
+
readonly kind: "external_address";
|
|
1247
1221
|
readonly label: string;
|
|
1248
|
-
readonly payeeId?: string;
|
|
1249
1222
|
};
|
|
1250
1223
|
readonly documents: readonly PaymentDocumentRef[];
|
|
1251
1224
|
readonly timing: PaymentTiming;
|
|
1252
1225
|
readonly released: PaymentMoney;
|
|
1253
1226
|
readonly availableToClaim: PaymentMoney;
|
|
1227
|
+
readonly execution?: {
|
|
1228
|
+
readonly status: PaymentExecutionStatus;
|
|
1229
|
+
readonly retryRequired: boolean;
|
|
1230
|
+
};
|
|
1254
1231
|
readonly createdAt: number;
|
|
1255
1232
|
readonly updatedAt: number;
|
|
1256
1233
|
}
|
|
@@ -1258,6 +1235,7 @@ interface PaymentsPayInput {
|
|
|
1258
1235
|
readonly actor?: ActorReference;
|
|
1259
1236
|
readonly to: TargetReference;
|
|
1260
1237
|
readonly amount: PaymentMoney;
|
|
1238
|
+
readonly externalAddressAcknowledged?: true;
|
|
1261
1239
|
/**
|
|
1262
1240
|
* How the payment is classified on the ledger. When a `document` is
|
|
1263
1241
|
* attached, the type derived from the document kind is AUTHORITATIVE
|
|
@@ -1471,6 +1449,9 @@ interface PaymentActivityEvidence {
|
|
|
1471
1449
|
readonly transactionHash: string;
|
|
1472
1450
|
readonly blockNumber: number;
|
|
1473
1451
|
readonly blockHash: string;
|
|
1452
|
+
readonly inclusion: "included";
|
|
1453
|
+
readonly verification: "verified";
|
|
1454
|
+
/** @deprecated Use `inclusion` and `verification`. */
|
|
1474
1455
|
readonly finality: "finalized";
|
|
1475
1456
|
readonly paymentEventLogIndex: number | null;
|
|
1476
1457
|
readonly transferLogIndex: number;
|
|
@@ -1491,6 +1472,9 @@ interface MovementActivityEvidence {
|
|
|
1491
1472
|
readonly transactionHash: string;
|
|
1492
1473
|
readonly blockNumber: number;
|
|
1493
1474
|
readonly blockHash: string;
|
|
1475
|
+
readonly inclusion: "included";
|
|
1476
|
+
readonly verification: "verified";
|
|
1477
|
+
/** @deprecated Use `inclusion` and `verification`. */
|
|
1494
1478
|
readonly canonicalState: "finalized";
|
|
1495
1479
|
readonly transferLogIndex: number;
|
|
1496
1480
|
readonly source: string;
|
|
@@ -1602,6 +1586,9 @@ interface PaymentsMethods {
|
|
|
1602
1586
|
pay(input: PaymentsPayInput, options?: {
|
|
1603
1587
|
readonly signal?: AbortSignal;
|
|
1604
1588
|
}): Promise<CapxulResult<Payment>>;
|
|
1589
|
+
retry(paymentId: string, options?: {
|
|
1590
|
+
readonly signal?: AbortSignal;
|
|
1591
|
+
}): Promise<CapxulResult<readonly Payment[]>>;
|
|
1605
1592
|
createCommitment(input: PaymentsPayInput & {
|
|
1606
1593
|
readonly timing: Exclude<PaymentTiming, {
|
|
1607
1594
|
readonly kind: "instant";
|
|
@@ -1643,8 +1630,6 @@ interface PaymentDocumentsMethods {
|
|
|
1643
1630
|
}
|
|
1644
1631
|
interface FinancialOpsMethods {
|
|
1645
1632
|
readonly me: MeMethods;
|
|
1646
|
-
readonly handles: HandlesMethods;
|
|
1647
|
-
readonly payees: PayeesMethods;
|
|
1648
1633
|
readonly targets: TargetsMethods;
|
|
1649
1634
|
readonly destinations: DestinationsMethods;
|
|
1650
1635
|
readonly payments: PaymentsMethods;
|
|
@@ -1879,18 +1864,31 @@ type PersonOnboardingInput = CompleteProfileInput;
|
|
|
1879
1864
|
type ReadyAccountLifecycle = Extract<AccountLifecycle, {
|
|
1880
1865
|
readonly status: "ready";
|
|
1881
1866
|
}>;
|
|
1882
|
-
type CompletedPersonProfile = Omit<Profile$1, "displayName" | "
|
|
1867
|
+
type CompletedPersonProfile = Omit<Profile$1, "displayName" | "handle"> & {
|
|
1883
1868
|
readonly displayName: string;
|
|
1884
|
-
readonly
|
|
1869
|
+
readonly handle: string;
|
|
1885
1870
|
};
|
|
1886
1871
|
interface PersonOnboarding {
|
|
1887
1872
|
readonly profile: CompletedPersonProfile;
|
|
1888
1873
|
readonly account: ReadyAccountLifecycle;
|
|
1889
1874
|
}
|
|
1875
|
+
interface OrganizationOnboardingInput {
|
|
1876
|
+
readonly name: string;
|
|
1877
|
+
readonly handle: string;
|
|
1878
|
+
readonly country: string;
|
|
1879
|
+
readonly bio?: string;
|
|
1880
|
+
readonly size?: string;
|
|
1881
|
+
}
|
|
1882
|
+
interface OrganizationOnboarding {
|
|
1883
|
+
readonly organizationId: string;
|
|
1884
|
+
}
|
|
1890
1885
|
interface OnboardingMethods {
|
|
1891
1886
|
completePerson(input: PersonOnboardingInput, options?: {
|
|
1892
1887
|
readonly signal?: AbortSignal;
|
|
1893
1888
|
}): Promise<CapxulResult<PersonOnboarding>>;
|
|
1889
|
+
completeOrganization(input: OrganizationOnboardingInput, options?: {
|
|
1890
|
+
readonly signal?: AbortSignal;
|
|
1891
|
+
}): Promise<CapxulResult<OrganizationOnboarding>>;
|
|
1894
1892
|
}
|
|
1895
1893
|
//#endregion
|
|
1896
1894
|
//#region src/surface/accounts.d.ts
|
|
@@ -2023,6 +2021,8 @@ type PermissionAssignInput = {
|
|
|
2023
2021
|
readonly requestKey: string;
|
|
2024
2022
|
readonly permissionId: string;
|
|
2025
2023
|
readonly accountId: string;
|
|
2024
|
+
/** Bind a staff activation to the invited Person at the backend authority boundary. */
|
|
2025
|
+
readonly expectedMemberEmail?: string;
|
|
2026
2026
|
};
|
|
2027
2027
|
type PermissionRevokeInput = {
|
|
2028
2028
|
readonly requestKey: string;
|
|
@@ -2045,6 +2045,7 @@ interface PermissionMethods {
|
|
|
2045
2045
|
interface OrganizationPaymentItemInput {
|
|
2046
2046
|
readonly to: Ref$1;
|
|
2047
2047
|
readonly amount: PaymentMoney;
|
|
2048
|
+
readonly externalAddressAcknowledged?: true;
|
|
2048
2049
|
readonly paymentType?: PaymentType;
|
|
2049
2050
|
readonly document?: AttachablePaymentDocumentEnvelopeV1;
|
|
2050
2051
|
}
|
|
@@ -2064,6 +2065,9 @@ interface OrganizationPaymentsMethods {
|
|
|
2064
2065
|
payBatch(input: OrganizationPaymentBatchInput, options?: {
|
|
2065
2066
|
readonly signal?: AbortSignal;
|
|
2066
2067
|
}): Promise<CapxulResult<readonly Payment[]>>;
|
|
2068
|
+
retry(paymentId: string, options?: {
|
|
2069
|
+
readonly signal?: AbortSignal;
|
|
2070
|
+
}): Promise<CapxulResult<readonly Payment[]>>;
|
|
2067
2071
|
}
|
|
2068
2072
|
//#endregion
|
|
2069
2073
|
//#region src/surface/payroll.d.ts
|
|
@@ -2202,6 +2206,7 @@ interface PayrollMethods {
|
|
|
2202
2206
|
type MemberStatus = "pending" | "pending_safe" | "pending_grant" | "active" | "revoked" | "expired";
|
|
2203
2207
|
/** One Organization that the current user can access. */
|
|
2204
2208
|
type OrgView = {
|
|
2209
|
+
readonly creationSource?: TesterKind;
|
|
2205
2210
|
readonly id: OrgId;
|
|
2206
2211
|
readonly name: string;
|
|
2207
2212
|
readonly handle: string;
|
|
@@ -2533,7 +2538,7 @@ type IdentityRuntimeSendResult = {
|
|
|
2533
2538
|
type IdentityProfileDetails = {
|
|
2534
2539
|
readonly displayName: string;
|
|
2535
2540
|
readonly country: string;
|
|
2536
|
-
readonly
|
|
2541
|
+
readonly handle: string;
|
|
2537
2542
|
};
|
|
2538
2543
|
interface IdentityRuntime {
|
|
2539
2544
|
readonly snapshot: () => IdentityState;
|
|
@@ -2570,8 +2575,6 @@ interface CapxulClient {
|
|
|
2570
2575
|
readonly accounts: AccountsMethods;
|
|
2571
2576
|
readonly currentUser: CurrentUserMethods;
|
|
2572
2577
|
readonly me: MeMethods;
|
|
2573
|
-
readonly handles: HandlesMethods;
|
|
2574
|
-
readonly payees: PayeesMethods;
|
|
2575
2578
|
readonly targets: TargetsMethods;
|
|
2576
2579
|
readonly destinations: DestinationsMethods;
|
|
2577
2580
|
/**
|
|
@@ -2631,6 +2634,7 @@ interface CapxulClient {
|
|
|
2631
2634
|
readonly organizationSetup: OrganizationSetupProofMethods;
|
|
2632
2635
|
/** Product telemetry projection for internal composition and test harnesses. */
|
|
2633
2636
|
readonly telemetry?: TelemetryPort;
|
|
2637
|
+
readonly captureExternalAddressAcknowledged: (address: string, organizationId?: string) => void;
|
|
2634
2638
|
readonly close?: () => Promise<void>;
|
|
2635
2639
|
};
|
|
2636
2640
|
}
|
|
@@ -2825,4 +2829,4 @@ interface ObservationAdapter {
|
|
|
2825
2829
|
/** Stable PostHog event used for typed failures that are expected product outcomes. */
|
|
2826
2830
|
declare const CAPXUL_SDK_EXPECTED_OUTCOME_EVENT = "capxul_sdk_expected_outcome";
|
|
2827
2831
|
//#endregion
|
|
2828
|
-
export { OrganizationPaymentsMethods as $,
|
|
2832
|
+
export { OrganizationPaymentsMethods as $, TelemetryPort as $n, DestinationListInput as $t, OrgView as A, TargetsMethods as An, AddressBookMethods as At, PayrollGroupInput as B, OrgSetupStep as Bn, ActivityListParams as Bt, DetectPendingOrgInvitationsResult as C, PaymentType as Cn, ActorRelationshipMethods as Ct, OrgMethods as D, Ref$1 as Dn, AddressBookAddInput as Dt, MemberView as E, RecipientResolution as En, ActorRequestsMethods as Et, RoleSpendCap as F, CompleteProfileInput as Fn, ActivityAnnotationInput as Ft, PayrollRun as G, InboxStatus as Gn, ActivitySummary as Gt, PayrollGroupsMethods as H, CurrentHoldings as Hn, ActivityPage as Ht, RoleView as I, IdentityMethods as In, ActivityDetail as It, PayrollRuns as J, PaymentStatus$1 as Jn, ActorReference as Jt, PayrollRunItemInput as K, PAYMENT_DIRECTIONS as Kn, ActivitySummaryParams as Kt, AuthorizeRunInput as L, SmartAccountMethods as Ln, ActivityFilter as Lt, OrganizationAuditLogItem as M, AccountLifecycle as Mn, InboxItem as Mt, ResendInviteTokenInput as N, AccountSetupStep as Nn, InboxMethods as Nt, OrgScopedMethods as O, ResolvedTarget as On, AddressBookEntry as Ot, RoleDefinition as P, isSettingUpLifecycle as Pn, ActivityAnnotation as Pt, OrganizationPaymentItemInput as Q, TelemetryIdentifyInput as Qn, DestinationKind as Qt, PayrollEngagementTerms as R, AuthMethods as Rn, ActivityItem as Rt, CreateOrgInput as S, PaymentTiming as Sn, ActorProfileMethods as St, MemberStatus as T, PaymentsPayInput as Tn, ActorRequestIssueInput as Tt, PayrollMethods as U, Permission as Un, ActivityRange as Ut, PayrollGroupMember as V, ActorRef as Vn, ActivityMethods as Vt, PayrollOptions as W, SubmittedPermissionExecution as Wn, ActivityReference as Wt, OrganizationPaymentBatchInput as X, TelemetryEvent as Xn, Destination as Xt, PayrollTermsUnit as Y, RequestStatus as Yn, DepositInstructions as Yt, OrganizationPaymentInput as Z, TelemetryGroupInput as Zn, DestinationAddInput as Zt, SystemMethods as _, PaymentDocumentRender as _n, PersonOnboarding as _t, SdkFailureObservation as a, MeMethods as an, StateLabel as ar, PermissionReplaceInput as at, CurrentUserContext as b, PaymentMoney as bn, AccountMethods as bt, PostHogObservabilityOptions as c, OfframpMethods as cn, isRestoring as cr, Budget as ct, CreateCapxulClientInput as d, OfframpStatus as dn, OrgMeOptions as dt, DestinationPayload as en, Destination$1 as er, PermissionAssignInput as et, IdentityProfileDetails as f, Payment as fn, AccountsMethods as ft, Holding as g, PaymentDocumentRef as gn, OrganizationOnboardingInput as gt, HoldingsMethods as h, PaymentDocumentKind as hn, OrganizationOnboarding as ht, ObservationDelivery as i, FinancialOpsMethods as in, Readiness as ir, PermissionOptions as it, OrganizationAccount as j, fingerprintPaymentIntent as jn, InboxApproveInput as jt, OrgTemplate as k, TargetReference as kn, AddressBookLabelInput as kt, postHogObservability as l, OfframpQuote as ln, IdentityTransition as lr, OrgMe as lt, IdentityRuntimeSendResult as m, PaymentDirection as mn, OnboardingMethods as mt, ObservationAdapter as n, DestinationRemoveInput as nn, IdentityState as nr, PermissionCreateInput as nt, HostObservability as o, MeProfile as on, destination as or, PermissionRevokeInput as ot, IdentityRuntime as p, PaymentActivityEvidence as pn, CompletedPersonProfile as pt, PayrollRunStatus as q, PAYMENT_STATUSES as qn, ActivitySummaryTotal as qt, ObservationContext as r, DestinationsMethods as rn, OrgLane as rr, PermissionMethods as rt, PostHogObservabilityClient as s, MovementActivityEvidence as sn, isClaimed as sr, PermissionReadResult as st, CAPXUL_SDK_EXPECTED_OUTCOME_EVENT as t, DestinationRail as tn, IdentityEvent as tr, PermissionChangeInput as tt, CapxulClient as u, OfframpQuoteInput as un, InvocationControls as ur, OrgMeMethod as ut, SystemHealth as v, PaymentDocumentVerification as vn, PersonOnboardingInput as vt, InviteMemberInput as w, PaymentsMethods as wn, ActorRequest as wt, CurrentUserMethods as x, PaymentStatus as xn, ActorProfile as xt, MediaMethods as y, PaymentDocumentsMethods as yn, ReadyAccountLifecycle as yt, PayrollGroup as z, OrgLifecycle as zn, ActivityKind as zt };
|
|
@@ -276,14 +276,16 @@ type Brand<T, B extends string> = T & {
|
|
|
276
276
|
//#region ../types/src/index.d.ts
|
|
277
277
|
type Address$1 = Brand<string, "Address">;
|
|
278
278
|
type Email = Brand<string, "Email">;
|
|
279
|
+
type TesterKind = "human" | "e2e" | "agent";
|
|
279
280
|
type Profile$1 = {
|
|
281
|
+
readonly testerKind?: TesterKind;
|
|
280
282
|
readonly authUserId: AuthUserId;
|
|
281
283
|
readonly email: Email;
|
|
282
284
|
readonly displayName: string | null;
|
|
283
285
|
readonly country: CountryCode | null;
|
|
284
286
|
readonly onboarded: boolean;
|
|
285
287
|
readonly withdrawalAddress: Address$1 | null;
|
|
286
|
-
readonly
|
|
288
|
+
readonly handle: Handle | null;
|
|
287
289
|
readonly imageUrl: string | null;
|
|
288
290
|
readonly kycTier: KycTier;
|
|
289
291
|
readonly createdAt: EpochMs;
|
|
@@ -312,6 +314,8 @@ type AuthUserId = Brand<string, "AuthUserId">;
|
|
|
312
314
|
type AnonymousDistinctId = Brand<string, "AnonymousDistinctId">;
|
|
313
315
|
type AccountId = Brand<string, "AccountId">;
|
|
314
316
|
type PartyId = Brand<string, "PartyId">;
|
|
317
|
+
/** One globally unique public name for a claimed person or Organization Party. */
|
|
318
|
+
type Handle = Brand<string, "Handle">;
|
|
315
319
|
type PermissionId = Brand<string, "PermissionId">;
|
|
316
320
|
type PermissionAssignmentId = Brand<string, "PermissionAssignmentId">;
|
|
317
321
|
type BudgetId = Brand<string, "BudgetId">;
|
|
@@ -343,6 +347,7 @@ type AuthSession = {
|
|
|
343
347
|
readonly token: SessionToken;
|
|
344
348
|
readonly expiresAt: EpochMs;
|
|
345
349
|
};
|
|
350
|
+
declare const EVM_ADDRESS_RE: RegExp;
|
|
346
351
|
declare const SUPPORTED_CURRENCIES: readonly [{
|
|
347
352
|
readonly code: "USD";
|
|
348
353
|
readonly symbol: "$";
|
|
@@ -366,6 +371,8 @@ declare const SUPPORTED_CURRENCIES: readonly [{
|
|
|
366
371
|
}];
|
|
367
372
|
type SupportedCurrencyCode = (typeof SUPPORTED_CURRENCIES)[number]["code"];
|
|
368
373
|
declare function toAddress(raw: unknown): Address$1;
|
|
374
|
+
declare function toPartyId(raw: unknown): PartyId;
|
|
375
|
+
declare function toHandle(raw: unknown): Handle;
|
|
369
376
|
declare function toCountryCode(raw: unknown): CountryCode;
|
|
370
377
|
//#endregion
|
|
371
378
|
//#region src/ports/auth-cache.d.ts
|
|
@@ -594,4 +601,4 @@ interface Eip1193RequestProvider {
|
|
|
594
601
|
*/
|
|
595
602
|
declare function injectedWalletSigner(provider: Eip1193RequestProvider): CapxulSigner;
|
|
596
603
|
//#endregion
|
|
597
|
-
export {
|
|
604
|
+
export { PublishableKey as $, AppId as A, EVM_ADDRESS_RE as B, CachedJwt as C, RevertSummary as Ct, AllowanceKey as D, Address$1 as E, ChainId as F, OrgId as G, EpochMs as H, CountryCode as I, PayrollGroupId as J, PartyId as K, CurrencyCode as L, AuthUserId as M, BlockNumber as N, AllowedOrigin as O, BudgetId as P, Profile$1 as Q, DocumentHash as R, AuthCachePortTag as S, FailureMode as St, AccountId as T, Handle as U, Email as V, Money as W, PermissionAssignmentId as X, PayrollRunId as Y, PermissionId as Z, ClockPort as _, isCapxulError as _t, SignerStatusStore as a, WeiAmount as at, AuthCacheError as b, ChainUpstream as bt, AccountProviderSource as c, toHandle as ct, eip1193AccountProvider as d, CAPXUL_ERROR_CODES as dt, RoleKey as et, localPrivateKeyAccountProvider as f, CapxulError as ft, SmartAccount as g, Failure as gt, Session as h, Errors as ht, SignerStatus as i, TxHash as it, AuthSession as j, AnonymousDistinctId as k, AccountRequirement as l, toPartyId as lt, Profile as m, CapxulErrorDetails as mt, CapxulSigner as n, SmartAccount$1 as nt, injectedWalletSigner as o, toAddress as ot, CapxulResult as p, CapxulErrorCode as pt, PaymentCommandId as q, Eip1193RequestProvider as r, TesterKind as rt, AccountProvider as s, toCountryCode as st, CapxulDigestSigner as t, SessionToken as tt, Eip1193Provider as u, CAPXUL_PAYMENTS_V2_ADDRESS as ut, AuthClientPort as v, CHAIN_UPSTREAMS as vt, Account$1 as w, AuthCachePort as x, FAILURE_MODES as xt, CanSendOtpStatus as y, ChainCause as yt, DurationMs as z };
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Qn as TelemetryIdentifyInput, Xn as TelemetryEvent, Zn as TelemetryGroupInput, lr as IdentityTransition, n as ObservationAdapter, u as CapxulClient } from "../observation-DtzTdv20.mjs";
|
|
2
2
|
import { Effect, Layer } from "effect";
|
|
3
3
|
//#region src/testing/telemetry/RecordingTelemetryAdapter.d.ts
|
|
4
4
|
type RecordingTelemetryOperation = {
|
package/dist/testing/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as fromWei, Z as redactTelemetryEvent, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, i as smartAccountErrorFromCapxul, m as convexCallErrorFromCapxul, o as accountReadErrorFromCapxul, t as assembleCapxulClient, u as wireChainId, v as toWei } from "../create-capxul-client-
|
|
2
|
-
import {
|
|
1
|
+
import { M as fromWei, Z as redactTelemetryEvent, f as identityErrorFromCapxul, g as bootstrapErrorFromCapxul, i as smartAccountErrorFromCapxul, m as convexCallErrorFromCapxul, o as accountReadErrorFromCapxul, t as assembleCapxulClient, u as wireChainId, v as toWei } from "../create-capxul-client-5Bk0PS0R.mjs";
|
|
2
|
+
import { $ as CapxulError, A as toAuthUserId, B as toJwtToken, D as toAddress, E as toAccountId, F as toDurationMs, I as toEmail, J as toSessionToken, K as toPublishableKey, L as toEpochMs, M as toChainId, N as toCountryCode, O as toAllowedOrigin, R as toEpochSeconds, V as toKycTier, _ as deriveCapxulSafeAddress, k as toAppId, n as InMemoryAuthCacheAdapter, t as readClockNow, tt as Errors, u as authClientPortFromPromiseAdapter, v as validateHandle, z as toHandle } from "../clock-C2AUlq1V.mjs";
|
|
3
3
|
import { Effect, Result, Semaphore } from "effect";
|
|
4
4
|
import { keccak256 } from "viem";
|
|
5
5
|
import { getFunctionName } from "convex/server";
|
|
@@ -506,7 +506,7 @@ var InMemoryIdentityAdapter = class {
|
|
|
506
506
|
country: input.country ?? null,
|
|
507
507
|
onboarded: false,
|
|
508
508
|
withdrawalAddress: null,
|
|
509
|
-
|
|
509
|
+
handle: null,
|
|
510
510
|
imageUrl: null,
|
|
511
511
|
kycTier: toKycTier(0),
|
|
512
512
|
createdAt: now,
|
|
@@ -531,7 +531,7 @@ var InMemoryIdentityAdapter = class {
|
|
|
531
531
|
country: input.country !== void 0 ? input.country : existing.country,
|
|
532
532
|
onboarded: existing.onboarded,
|
|
533
533
|
withdrawalAddress: existing.withdrawalAddress,
|
|
534
|
-
|
|
534
|
+
handle: existing.handle,
|
|
535
535
|
imageUrl: existing.imageUrl,
|
|
536
536
|
updatedAt: now
|
|
537
537
|
};
|
|
@@ -551,7 +551,7 @@ var InMemoryIdentityAdapter = class {
|
|
|
551
551
|
country: input.country,
|
|
552
552
|
onboarded: true,
|
|
553
553
|
withdrawalAddress: input.withdrawalAddress ?? existing?.withdrawalAddress ?? null,
|
|
554
|
-
|
|
554
|
+
handle: toHandle(validateHandle(input.handle)),
|
|
555
555
|
imageUrl: existing?.imageUrl ?? null,
|
|
556
556
|
kycTier: existing?.kycTier ?? toKycTier(0),
|
|
557
557
|
createdAt: existing?.createdAt ?? now,
|
|
@@ -576,7 +576,7 @@ function cloneProfile(profile) {
|
|
|
576
576
|
country: profile.country,
|
|
577
577
|
onboarded: profile.onboarded,
|
|
578
578
|
withdrawalAddress: profile.withdrawalAddress,
|
|
579
|
-
|
|
579
|
+
handle: profile.handle,
|
|
580
580
|
imageUrl: profile.imageUrl,
|
|
581
581
|
kycTier: profile.kycTier,
|
|
582
582
|
createdAt: profile.createdAt,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Xelmar-tech/infrastructure.git",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.0",
|
|
48
48
|
"vite-plus": "0.3.0",
|
|
49
49
|
"vitest": "4.1.11",
|
|
50
|
-
"@capxul/config": "0.
|
|
51
|
-
"@capxul/errors": "0.
|
|
52
|
-
"@capxul/observability": "3.2.0",
|
|
53
|
-
"@capxul/types": "0.2.3",
|
|
50
|
+
"@capxul/config": "0.3.0",
|
|
51
|
+
"@capxul/errors": "0.3.0",
|
|
54
52
|
"@capxul/typescript-config": "0.0.0",
|
|
55
|
-
"@capxul/wire": "0.
|
|
53
|
+
"@capxul/wire": "0.7.0",
|
|
54
|
+
"@capxul/types": "0.3.0",
|
|
55
|
+
"@capxul/observability": "4.0.1"
|
|
56
56
|
},
|
|
57
57
|
"_permissionlessPinReason": "permissionless.toSafeSmartAccount is pinned to 0.3.4 for live Safe deployment E2E. Counterfactual address fixtures captured 2026-05-17 in packages/backend/convex/_shared/__tests__/counterfactual.test.ts and packages/config/tests/safe.test.ts must be re-verified before upgrading.",
|
|
58
58
|
"scripts": {
|