@medialane/sdk 0.130.0 → 0.131.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.
@@ -647,12 +647,9 @@ var ApiClient = class {
647
647
  registerBusinessProvisioning(params) {
648
648
  return this.post(
649
649
  "/v1/business/provisioning",
650
- params
650
+ { chain: params.chain ?? "STARKNET", recipientScheme: params.recipientScheme, recipientValue: params.recipientValue }
651
651
  );
652
652
  }
653
- completeBusinessProvisioning(id) {
654
- return this.post(`/v1/business/provisioning/${id}/complete`, {});
655
- }
656
653
  getCollectionProfile(contractAddress) {
657
654
  return this.request(
658
655
  `/v1/collections/${this.addr(contractAddress)}/profile`,
@@ -749,11 +746,28 @@ var ApiClient = class {
749
746
  headers: this.bearer(siwsToken)
750
747
  });
751
748
  }
752
- async checkEmailExists(email) {
753
- const { exists } = await this.get(
749
+ async checkEmail(email) {
750
+ const body = await this.get(
754
751
  `/v1/auth/email/exists?email=${encodeURIComponent(email)}`
755
752
  );
756
- return exists;
753
+ return { exists: body.exists, walletWaiting: body.walletWaiting === true };
754
+ }
755
+ async requestEmailCode(email) {
756
+ await this.post("/v1/auth/email/request-code", { email });
757
+ }
758
+ async registerEmailAccount(email) {
759
+ await this.post("/v1/auth/email/register-account", { email });
760
+ }
761
+ async verifyEmailCode(email, code) {
762
+ const body = await this.post("/v1/auth/email/verify-code", { email, code });
763
+ return { token: body.token, waitingWallets: body.waitingWallets ?? [] };
764
+ }
765
+ claimWallet(params) {
766
+ return this.post("/v1/users/me/claim-wallet", params);
767
+ }
768
+ async getSessionWallet() {
769
+ const body = await this.post("/v1/users/me/wallet", {});
770
+ return body.walletAddress ?? null;
757
771
  }
758
772
  getMyWallet(siwsToken) {
759
773
  return this.request(