@universal-everything/sdk-core 1.4.0-dev.02ce9e1 → 1.4.0-dev.03fce44

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
@@ -860,6 +860,36 @@ declare class WalletKitClient {
860
860
  store: "apple";
861
861
  signedTransaction: string;
862
862
  }): Promise<StoreTransactionResult>;
863
+ /**
864
+ * Merge the caller's account with the account of a Universal Profile the
865
+ * user signs in with now — "Already have a relayer account?" and linking
866
+ * the Privy, extension and mobile-app logins. Pass a fresh UP sign-in
867
+ * (`getNonce` → SIWE message whose Address is the profile → signature),
868
+ * the `POST /v1/auth/login` body. The account with a subscription (else
869
+ * the older one) survives; the other account's id keeps working as an
870
+ * alias. Call it with a Privy (email/social) session (`403
871
+ * privy_login_required` otherwise) and sign with the profile's primary
872
+ * key, the one it was created with (`403 primary_controller_required`;
873
+ * `primary_controller_unknown` when the relayer can't tell which key that
874
+ * is). `merged: false` =
875
+ * the profile already shared the caller's account (or had none yet and
876
+ * just joined it). `warning: "two_subscriptions"` = both accounts had a
877
+ * live subscription and the merged account now holds both. `401` = bad
878
+ * proof, `409 merge_not_allowed` = a developer account.
879
+ */
880
+ mergeAccounts(proof: {
881
+ message: string;
882
+ signature: string;
883
+ chainId?: number;
884
+ }): Promise<{
885
+ accountId: string;
886
+ merged: boolean;
887
+ /** The profile wasn't registered with the relayer and was added
888
+ * (`false` + `addError` when adding it failed; the logins are linked). */
889
+ added?: boolean;
890
+ addError?: string;
891
+ warning?: "two_subscriptions";
892
+ }>;
863
893
  /**
864
894
  * Stripe Customer Portal URL for the caller's own Stripe subscription.
865
895
  * Rejects with `manage_in_store` (409) for an Apple / Google subscription
package/dist/index.js CHANGED
@@ -257,6 +257,26 @@ var WalletKitClient = class {
257
257
  async claimSubscription(input) {
258
258
  return this.#request("POST", "/v1/subscriptions/claim", input);
259
259
  }
260
+ /**
261
+ * Merge the caller's account with the account of a Universal Profile the
262
+ * user signs in with now — "Already have a relayer account?" and linking
263
+ * the Privy, extension and mobile-app logins. Pass a fresh UP sign-in
264
+ * (`getNonce` → SIWE message whose Address is the profile → signature),
265
+ * the `POST /v1/auth/login` body. The account with a subscription (else
266
+ * the older one) survives; the other account's id keeps working as an
267
+ * alias. Call it with a Privy (email/social) session (`403
268
+ * privy_login_required` otherwise) and sign with the profile's primary
269
+ * key, the one it was created with (`403 primary_controller_required`;
270
+ * `primary_controller_unknown` when the relayer can't tell which key that
271
+ * is). `merged: false` =
272
+ * the profile already shared the caller's account (or had none yet and
273
+ * just joined it). `warning: "two_subscriptions"` = both accounts had a
274
+ * live subscription and the merged account now holds both. `401` = bad
275
+ * proof, `409 merge_not_allowed` = a developer account.
276
+ */
277
+ async mergeAccounts(proof) {
278
+ return this.#request("POST", "/v1/accounts/merge", proof);
279
+ }
260
280
  /**
261
281
  * Stripe Customer Portal URL for the caller's own Stripe subscription.
262
282
  * Rejects with `manage_in_store` (409) for an Apple / Google subscription
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universal-everything/sdk-core",
3
- "version": "1.4.0-dev.02ce9e1",
3
+ "version": "1.4.0-dev.03fce44",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/universal-everything/universal-relayer.git",