@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.
- package/dist/{errors-iITqaALF.d.cts → errors-CMjZp66y.d.cts} +15 -20
- package/dist/{errors-ac8HvmsP.d.ts → errors-CtXjdRsL.d.ts} +15 -20
- package/dist/index.cjs +11 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +11 -9
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +2 -2
- package/dist/starknet/index.d.ts +2 -2
- package/dist/starknet/index.js +11 -9
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/starknet/index.cjs
CHANGED
|
@@ -745,10 +745,8 @@ var ApiClient = class {
|
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
747
|
async checkEmail(email) {
|
|
748
|
-
const body = await this.get(
|
|
749
|
-
|
|
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
|
-
|
|
761
|
-
return { waitingWallets: body.waitingWallets ?? [] };
|
|
758
|
+
await this.post("/v1/auth/email/verify-code", { email, code });
|
|
762
759
|
}
|
|
763
|
-
|
|
764
|
-
|
|
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
|
|
770
|
+
return body.walletAddress ? { walletAddress: body.walletAddress, needsKeySetup: body.needsKeySetup === true } : null;
|
|
769
771
|
}
|
|
770
772
|
getMyWallet(siwsToken) {
|
|
771
773
|
return this.request(
|