@medialane/sdk 0.130.0 → 0.132.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.
@@ -1,5 +1,5 @@
1
- import { bn as ResolvedConfig, bv as TxResult, aI as CreatePopCollectionParams, at as ClaimConditions, aE as CreateDropParams, aN as CreateTicketParams, b7 as MintTicketsParams, aG as CreateMembershipParams, b6 as MintMembershipsParams, aL as CreateSponsorshipOfferParams, bk as ProposeSponsorshipParams, l as ApiClient, b4 as MedialaneConfig, b5 as MedialaneErrorCode, bc as OrderDetails, R as ResolvedFeeConfig, F as ApiFundingIntent, E as ApiFundingInstructions, I as ApiFundingSubmit, K as ApiIntentCreated, bD as SealedOwner, bE as ReceiptProviderLike, bF as WalletExecutor, bG as ExecutedTransaction, bH as PasskeyOwner } from '../errors-C_zqe9TI.cjs';
2
- export { bI as CreatedOwner, bJ as OwnerSigner, bf as PasskeyCancelledError, bK as PasskeyConfig, bx as UserFacingError, bL as createPasskeyOwner } from '../errors-C_zqe9TI.cjs';
1
+ import { bn as ResolvedConfig, bv as TxResult, aI as CreatePopCollectionParams, at as ClaimConditions, aE as CreateDropParams, aN as CreateTicketParams, b7 as MintTicketsParams, aG as CreateMembershipParams, b6 as MintMembershipsParams, aL as CreateSponsorshipOfferParams, bk as ProposeSponsorshipParams, l as ApiClient, b4 as MedialaneConfig, b5 as MedialaneErrorCode, bc as OrderDetails, R as ResolvedFeeConfig, F as ApiFundingIntent, E as ApiFundingInstructions, I as ApiFundingSubmit, K as ApiIntentCreated, bD as SealedOwner, bE as ReceiptProviderLike, bF as WalletExecutor, bG as ExecutedTransaction, bH as PasskeyOwner } from '../errors-JkeKc3cu.cjs';
2
+ export { bI as CreatedOwner, bJ as OwnerSigner, bf as PasskeyCancelledError, bK as PasskeyConfig, bx as UserFacingError, bL as createPasskeyOwner } from '../errors-JkeKc3cu.cjs';
3
3
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
4
4
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
5
5
  import 'zod';
@@ -1,5 +1,5 @@
1
- import { bn as ResolvedConfig, bv as TxResult, aI as CreatePopCollectionParams, at as ClaimConditions, aE as CreateDropParams, aN as CreateTicketParams, b7 as MintTicketsParams, aG as CreateMembershipParams, b6 as MintMembershipsParams, aL as CreateSponsorshipOfferParams, bk as ProposeSponsorshipParams, l as ApiClient, b4 as MedialaneConfig, b5 as MedialaneErrorCode, bc as OrderDetails, R as ResolvedFeeConfig, F as ApiFundingIntent, E as ApiFundingInstructions, I as ApiFundingSubmit, K as ApiIntentCreated, bD as SealedOwner, bE as ReceiptProviderLike, bF as WalletExecutor, bG as ExecutedTransaction, bH as PasskeyOwner } from '../errors-Dc-g0mMr.js';
2
- export { bI as CreatedOwner, bJ as OwnerSigner, bf as PasskeyCancelledError, bK as PasskeyConfig, bx as UserFacingError, bL as createPasskeyOwner } from '../errors-Dc-g0mMr.js';
1
+ import { bn as ResolvedConfig, bv as TxResult, aI as CreatePopCollectionParams, at as ClaimConditions, aE as CreateDropParams, aN as CreateTicketParams, b7 as MintTicketsParams, aG as CreateMembershipParams, b6 as MintMembershipsParams, aL as CreateSponsorshipOfferParams, bk as ProposeSponsorshipParams, l as ApiClient, b4 as MedialaneConfig, b5 as MedialaneErrorCode, bc as OrderDetails, R as ResolvedFeeConfig, F as ApiFundingIntent, E as ApiFundingInstructions, I as ApiFundingSubmit, K as ApiIntentCreated, bD as SealedOwner, bE as ReceiptProviderLike, bF as WalletExecutor, bG as ExecutedTransaction, bH as PasskeyOwner } from '../errors-HTG0DcWa.js';
2
+ export { bI as CreatedOwner, bJ as OwnerSigner, bf as PasskeyCancelledError, bK as PasskeyConfig, bx as UserFacingError, bL as createPasskeyOwner } from '../errors-HTG0DcWa.js';
3
3
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
4
4
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
5
5
  import 'zod';
@@ -645,12 +645,9 @@ var ApiClient = class {
645
645
  registerBusinessProvisioning(params) {
646
646
  return this.post(
647
647
  "/v1/business/provisioning",
648
- params
648
+ { chain: params.chain ?? "STARKNET", recipientScheme: params.recipientScheme, recipientValue: params.recipientValue }
649
649
  );
650
650
  }
651
- completeBusinessProvisioning(id) {
652
- return this.post(`/v1/business/provisioning/${id}/complete`, {});
653
- }
654
651
  getCollectionProfile(contractAddress) {
655
652
  return this.request(
656
653
  `/v1/collections/${this.addr(contractAddress)}/profile`,
@@ -747,11 +744,28 @@ var ApiClient = class {
747
744
  headers: this.bearer(siwsToken)
748
745
  });
749
746
  }
750
- async checkEmailExists(email) {
751
- const { exists } = await this.get(
747
+ async checkEmail(email) {
748
+ const body = await this.get(
752
749
  `/v1/auth/email/exists?email=${encodeURIComponent(email)}`
753
750
  );
754
- return exists;
751
+ return { exists: body.exists, walletWaiting: body.walletWaiting === true };
752
+ }
753
+ async requestEmailCode(email) {
754
+ await this.post("/v1/auth/email/request-code", { email });
755
+ }
756
+ async registerEmailAccount(email) {
757
+ await this.post("/v1/auth/email/register-account", { email });
758
+ }
759
+ async verifyEmailCode(email, code) {
760
+ const body = await this.post("/v1/auth/email/verify-code", { email, code });
761
+ return { token: body.token, waitingWallets: body.waitingWallets ?? [] };
762
+ }
763
+ claimWallet(params) {
764
+ return this.post("/v1/users/me/claim-wallet", params);
765
+ }
766
+ async getSessionWallet() {
767
+ const body = await this.post("/v1/users/me/wallet", {});
768
+ return body.walletAddress ?? null;
755
769
  }
756
770
  getMyWallet(siwsToken) {
757
771
  return this.request(