@universal-everything/sdk-core 1.1.0-dev.5673e05 → 1.1.0-dev.6819996

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.ts CHANGED
@@ -139,6 +139,8 @@ type Profile = {
139
139
  status?: ProfileStatus;
140
140
  defaultControllerId: string | null;
141
141
  controllers: ControllerSummary[];
142
+ /** The owner-level deploy-time controller (lowercase) or `null` = unknown. */
143
+ generatingController: string | null;
142
144
  createdAt: string;
143
145
  };
144
146
  /**
@@ -157,6 +159,12 @@ type ChainStatus = {
157
159
  profileId: string;
158
160
  chainId: number;
159
161
  status: ProfileStatus;
162
+ /**
163
+ * The owner-level controller the LSP23 deploy granted (lowercase), or
164
+ * `null` = unknown. Clients compare it with their own keystore to tell a
165
+ * *created* profile from an *Imported* (secondary-key) one.
166
+ */
167
+ generatingController: string | null;
160
168
  label: string | null;
161
169
  defaultControllerId: string | null;
162
170
  controllers: ControllerSummary[];
@@ -172,8 +180,83 @@ type ChainStatus = {
172
180
  * `getProfileByAddress`. Address is the natural primary key once a UP
173
181
  * may live on multiple chains (handoff G1).
174
182
  */
183
+ /** A subscription currently covering an identity. */
184
+ type CoveredBy = {
185
+ subscriptionId: string;
186
+ /**
187
+ * `self` = owned by the caller's account. `other` (a foreign covering
188
+ * subscription) is reserved for R2's explicit membership — the server only
189
+ * emits `self` today.
190
+ */
191
+ owner: "self" | "other";
192
+ tier: string;
193
+ status: string;
194
+ source: string;
195
+ };
196
+ /**
197
+ * Server-side extend verdict — ADVISORY. `reason` reports the ownership and
198
+ * capacity gates the extend route enforces for this session; target-dependent
199
+ * gates (chain availability, tier chain allow-list, LSP23 package / factory /
200
+ * deployability) come from `extend-targets` and at submit, so `null` means
201
+ * "no ownership or capacity refusal", not "extend will succeed". Whether THIS
202
+ * device can extend (holds the generating key) is the client's call from
203
+ * `generatingController`.
204
+ */
205
+ type ExtendVerdictReason = "not_active" | "held_by_another_login" | "subscription_required" | "cross_chain_cap_reached" | "capacity_unknown";
206
+ type ExtendVerdict = {
207
+ /**
208
+ * Chains the identity is live on (active / pending), across every login of
209
+ * the holder account — NOT candidate targets; those come from
210
+ * `GET /v1/profiles/:id/extend-targets`, whose occupancy check is scoped to
211
+ * the calling login.
212
+ */
213
+ chains: number[];
214
+ reason: ExtendVerdictReason | null;
215
+ };
216
+ /** One entry of `GET /v1/subscriptions` — a subscription of the caller's account. */
217
+ type SubscriptionSummary = {
218
+ subscriptionId: string;
219
+ /** Always `self` today; `other` (a subscription that only covers one of your profiles) arrives with explicit membership. */
220
+ owner: "self" | "other";
221
+ tier: string;
222
+ status: string;
223
+ /** `active` or `trialing`. */
224
+ live: boolean;
225
+ source: "stripe" | "apple" | "google" | "admin";
226
+ currentPeriodEnd: string | null;
227
+ /** Where Manage goes: `stripe` ⇒ {@link RelayerClient.createPortalSession}; `apple` / `google` ⇒ the store; `admin` ⇒ nothing. */
228
+ manage: {
229
+ kind: "stripe" | "apple" | "google" | "admin";
230
+ };
231
+ };
232
+ /** `GET /v1/me` — the authenticated login and its account context. */
233
+ type Me = {
234
+ subject: string;
235
+ isAdmin: boolean;
236
+ /** The login's personal account (null only before provisioning). */
237
+ accountId: string | null;
238
+ /** This login's own tier — what the cross-chain cap resolves from. */
239
+ tier: string;
240
+ /**
241
+ * The account's effective tier (best tier across its login subjects) —
242
+ * what gas coverage resolves from. Differs from `tier` only on legacy
243
+ * multi-login accounts.
244
+ */
245
+ accountTier: string;
246
+ };
175
247
  type ProfileWithChains = {
176
248
  address: Hex;
249
+ /**
250
+ * Identity-level generating controller: the value every chain row agrees
251
+ * on; `null` when unknown or when the rows disagree.
252
+ */
253
+ generatingController: string | null;
254
+ /**
255
+ * Present on the `/v1/profiles` mount; omitted on the sig-auth
256
+ * `/v1/relayer/profiles` mirror.
257
+ */
258
+ coveredBy?: CoveredBy[];
259
+ extend: ExtendVerdict;
177
260
  chains: ChainStatus[];
178
261
  };
179
262
  type QuotaSnapshot = {
@@ -459,10 +542,7 @@ declare class TierError extends WalletKitError {
459
542
  declare class WalletKitClient {
460
543
  #private;
461
544
  constructor(config: WalletKitClientConfig);
462
- me(): Promise<{
463
- subject: string;
464
- isAdmin: boolean;
465
- }>;
545
+ me(): Promise<Me>;
466
546
  listWallets(): Promise<Wallet[]>;
467
547
  getWallet(walletId: string): Promise<Wallet>;
468
548
  createWallet(input?: {
@@ -518,6 +598,23 @@ declare class WalletKitClient {
518
598
  * default (`source === null`) when they have no paid subscription.
519
599
  */
520
600
  getSubscription(): Promise<SubscriptionResponse>;
601
+ /**
602
+ * Every subscription of the caller's account, live ones first — what the
603
+ * dashboard's account / subscription dropdown renders.
604
+ */
605
+ listSubscriptions(): Promise<{
606
+ subscriptions: SubscriptionSummary[];
607
+ }>;
608
+ /**
609
+ * Stripe Customer Portal URL for the caller's own Stripe subscription.
610
+ * Rejects with `manage_in_store` (409) for an Apple / Google subscription
611
+ * and `no_subscription` (404) when there is nothing to manage.
612
+ */
613
+ createPortalSession(opts?: {
614
+ returnOrigin?: string;
615
+ }): Promise<{
616
+ url: string;
617
+ }>;
521
618
  /**
522
619
  * Start a Stripe Checkout for a tier and return the created session
523
620
  * `{ id, url }`. In a browser this ALSO navigates to `url` by default
@@ -559,4 +656,4 @@ declare class IdentityError extends Error {
559
656
  constructor(code: IdentityErrorCode, message: string);
560
657
  }
561
658
 
562
- export { type ChainStatus, type CheckoutSession, type ControlProof, type ControllerSummary, type DeployProfileInput, type DeployProfileMultiChainResponse, type DeployProfileResponse, type DeployProfileSingleChainResponse, type DeployQueueStatus, type ExportCompleteResponse, type ExportRequestInput, type ExportRequestResponse, type ExportedKey, type FreeDefaultSnapshot, type Hex, IdentityError, type IdentityErrorCode, type IdentityProvider, type ImportBeginResponse, type ImportCompleteInput, type ImportCompleteResponse, type IpfsUploadTokenResponse, KeyCustodyError, type KeyCustodyErrorCode, type KeyCustodyOpContext, type KeyCustodyProvider, type NonceResponse, type OpContext, type OpenCheckoutInput, type Profile, type ProfileStatus, type ProfileWithChains, type QuotaSnapshot, type RelaySponsoredInput, type RelaySponsoredResponse, type SignLsp25Input, type SignLsp25Response, type SignMessageResponse, type SignTransactionInput, type SignTransactionResponse, type SignTxRequest, type Subject, type SubscriptionResponse, type SubscriptionSnapshot, TIER_ERROR_CODES, TierError, type VerifiedToken, type VerifyOptions, type Wallet, type WalletInfo, WalletKitClient, type WalletKitClientConfig, WalletKitError, createWalletKitClient };
659
+ export { type ChainStatus, type CheckoutSession, type ControlProof, type ControllerSummary, type CoveredBy, type DeployProfileInput, type DeployProfileMultiChainResponse, type DeployProfileResponse, type DeployProfileSingleChainResponse, type DeployQueueStatus, type ExportCompleteResponse, type ExportRequestInput, type ExportRequestResponse, type ExportedKey, type ExtendVerdict, type ExtendVerdictReason, type FreeDefaultSnapshot, type Hex, IdentityError, type IdentityErrorCode, type IdentityProvider, type ImportBeginResponse, type ImportCompleteInput, type ImportCompleteResponse, type IpfsUploadTokenResponse, KeyCustodyError, type KeyCustodyErrorCode, type KeyCustodyOpContext, type KeyCustodyProvider, type Me, type NonceResponse, type OpContext, type OpenCheckoutInput, type Profile, type ProfileStatus, type ProfileWithChains, type QuotaSnapshot, type RelaySponsoredInput, type RelaySponsoredResponse, type SignLsp25Input, type SignLsp25Response, type SignMessageResponse, type SignTransactionInput, type SignTransactionResponse, type SignTxRequest, type Subject, type SubscriptionResponse, type SubscriptionSnapshot, type SubscriptionSummary, TIER_ERROR_CODES, TierError, type VerifiedToken, type VerifyOptions, type Wallet, type WalletInfo, WalletKitClient, type WalletKitClientConfig, WalletKitError, createWalletKitClient };
package/dist/index.js CHANGED
@@ -170,6 +170,21 @@ var WalletKitClient = class {
170
170
  async getSubscription() {
171
171
  return this.#request("GET", "/v1/billing/subscription");
172
172
  }
173
+ /**
174
+ * Every subscription of the caller's account, live ones first — what the
175
+ * dashboard's account / subscription dropdown renders.
176
+ */
177
+ async listSubscriptions() {
178
+ return this.#request("GET", "/v1/subscriptions");
179
+ }
180
+ /**
181
+ * Stripe Customer Portal URL for the caller's own Stripe subscription.
182
+ * Rejects with `manage_in_store` (409) for an Apple / Google subscription
183
+ * and `no_subscription` (404) when there is nothing to manage.
184
+ */
185
+ async createPortalSession(opts) {
186
+ return this.#request("POST", "/v1/billing/portal-session", opts ?? {});
187
+ }
173
188
  /**
174
189
  * Start a Stripe Checkout for a tier and return the created session
175
190
  * `{ id, url }`. In a browser this ALSO navigates to `url` by default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-everything/sdk-core",
3
- "version": "1.1.0-dev.5673e05",
3
+ "version": "1.1.0-dev.6819996",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/universal-everything/universal-relayer.git",