@medialane/sdk 0.138.0 → 0.139.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.
@@ -745,10 +745,8 @@ var ApiClient = class {
745
745
  });
746
746
  }
747
747
  async checkEmail(email) {
748
- const body = await this.get(
749
- `/v1/auth/email/exists?email=${encodeURIComponent(email)}`
750
- );
751
- return { exists: body.exists, walletWaiting: body.walletWaiting === true };
748
+ const body = await this.get(`/v1/auth/email/exists?email=${encodeURIComponent(email)}`);
749
+ return { exists: body.exists };
752
750
  }
753
751
  async requestEmailCode(email) {
754
752
  await this.post("/v1/auth/email/request-code", { email });
@@ -757,15 +755,19 @@ var ApiClient = class {
757
755
  await this.post("/v1/auth/email/register-account", { email });
758
756
  }
759
757
  async verifyEmailCode(email, code) {
760
- const body = await this.post("/v1/auth/email/verify-code", { email, code });
761
- return { waitingWallets: body.waitingWallets ?? [] };
758
+ await this.post("/v1/auth/email/verify-code", { email, code });
762
759
  }
763
- claimWallet(params) {
764
- return this.post("/v1/users/me/claim-wallet", params);
760
+ /**
761
+ * Makes the passkey the only owner of the session account's wallet. `signature` is the passkey's owner-alive
762
+ * proof for the wallet. Answers 409 when the wallet is already set up.
763
+ */
764
+ setupWalletKey(params) {
765
+ return this.post("/v1/users/me/wallet/key", params);
765
766
  }
767
+ /** The session account's wallet, and whether its passkey still has to be set up (`setupWalletKey`). */
766
768
  async getSessionWallet() {
767
769
  const body = await this.post("/v1/users/me/wallet", {});
768
- return body.walletAddress ?? null;
770
+ return body.walletAddress ? { walletAddress: body.walletAddress, needsKeySetup: body.needsKeySetup === true } : null;
769
771
  }
770
772
  getMyWallet(siwsToken) {
771
773
  return this.request(