@medialane/sdk 0.142.0 → 0.143.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 { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner, b$ as CreatedOwner } from '../errors-BRCRmVep.cjs';
2
- export { c0 as InvalidRecoveryKeyError, c1 as OwnerSigner, by as PasskeyCancelledError, c2 as PasskeyConfig, c3 as RecoveryKey, bQ as UserFacingError, c4 as createPasskeyOwner, c5 as encodeRecoveryKey, c6 as parseRecoveryKey } from '../errors-BRCRmVep.cjs';
1
+ import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner, b$ as CreatedOwner } from '../errors-SGwgtvtF.cjs';
2
+ export { c0 as InvalidRecoveryKeyError, c1 as OwnerSigner, by as PasskeyCancelledError, c2 as PasskeyConfig, c3 as RecoveryKey, bQ as UserFacingError, c4 as createPasskeyOwner, c5 as encodeRecoveryKey, c6 as parseRecoveryKey } from '../errors-SGwgtvtF.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';
@@ -8059,6 +8059,7 @@ declare function describeRecoveryAction(escape: EscapeInfo): RecoveryAction;
8059
8059
 
8060
8060
  declare function normalizeWalletAddress(address: string): string;
8061
8061
  declare function isValidStarknetAddress(address: string): boolean;
8062
+ /** Whether a contract is deployed at the address. Throws when the read itself fails, so a failed read is never "not deployed". */
8062
8063
  declare function isDeployed(provider: ReceiptProviderLike, address: string): Promise<boolean>;
8063
8064
 
8064
8065
  interface SelfFundFeeEstimate {
@@ -1,5 +1,5 @@
1
- import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner, b$ as CreatedOwner } from '../errors-DP-VnOWP.js';
2
- export { c0 as InvalidRecoveryKeyError, c1 as OwnerSigner, by as PasskeyCancelledError, c2 as PasskeyConfig, c3 as RecoveryKey, bQ as UserFacingError, c4 as createPasskeyOwner, c5 as encodeRecoveryKey, c6 as parseRecoveryKey } from '../errors-DP-VnOWP.js';
1
+ import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner, b$ as CreatedOwner } from '../errors-DUiebYFo.js';
2
+ export { c0 as InvalidRecoveryKeyError, c1 as OwnerSigner, by as PasskeyCancelledError, c2 as PasskeyConfig, c3 as RecoveryKey, bQ as UserFacingError, c4 as createPasskeyOwner, c5 as encodeRecoveryKey, c6 as parseRecoveryKey } from '../errors-DUiebYFo.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';
@@ -8059,6 +8059,7 @@ declare function describeRecoveryAction(escape: EscapeInfo): RecoveryAction;
8059
8059
 
8060
8060
  declare function normalizeWalletAddress(address: string): string;
8061
8061
  declare function isValidStarknetAddress(address: string): boolean;
8062
+ /** Whether a contract is deployed at the address. Throws when the read itself fails, so a failed read is never "not deployed". */
8062
8063
  declare function isDeployed(provider: ReceiptProviderLike, address: string): Promise<boolean>;
8063
8064
 
8064
8065
  interface SelfFundFeeEstimate {
@@ -644,7 +644,7 @@ var ApiClient = class {
644
644
  registerBusinessProvisioning(params) {
645
645
  return this.post(
646
646
  "/v1/business/provisioning",
647
- { chain: params.chain ?? "STARKNET", recipientScheme: params.recipientScheme, recipientValue: params.recipientValue }
647
+ { chain: params.chain ?? "STARKNET", email: params.email }
648
648
  );
649
649
  }
650
650
  getCollectionProfile(contractAddress) {
@@ -12463,7 +12463,7 @@ function ownerAliveCalldata(proof) {
12463
12463
  function buildChangeOwnersCall(accountAddress, removeOwnerPubkey, addOwnerPubkey, ownerAlive) {
12464
12464
  if (!ownerAlive) {
12465
12465
  throw new Error(
12466
- "Handing an account over removes the signing owner, so the account requires an owner-alive proof from the incoming owner. Sign ownerAliveTypedData with the new owner key and pass it here."
12466
+ "Replacing the signing owner requires an owner-alive proof from the new owner. Sign ownerAliveTypedData with the new owner key and pass it here."
12467
12467
  );
12468
12468
  }
12469
12469
  return changeOwners(
@@ -12775,12 +12775,14 @@ function isValidStarknetAddress(address) {
12775
12775
  return false;
12776
12776
  }
12777
12777
  }
12778
+ var CONTRACT_NOT_FOUND = 20;
12778
12779
  async function isDeployed(provider, address) {
12779
12780
  try {
12780
12781
  await provider.getClassHashAt(normalizeWalletAddress(address));
12781
12782
  return true;
12782
- } catch {
12783
- return false;
12783
+ } catch (err) {
12784
+ if (err?.code === CONTRACT_NOT_FOUND) return false;
12785
+ throw err;
12784
12786
  }
12785
12787
  }
12786
12788
 
@@ -13029,7 +13031,7 @@ async function waitUntilDeployed(provider, address, timeoutMs = 9e4, sleep2 = (m
13029
13031
  const deadline = Date.now() + timeoutMs;
13030
13032
  let wait = 1e3;
13031
13033
  for (; ; ) {
13032
- if (await isDeployed(provider, address)) return;
13034
+ if (await isDeployed(provider, address).catch(() => false)) return;
13033
13035
  if (Date.now() >= deadline) {
13034
13036
  throw new Error(
13035
13037
  "Your wallet was submitted but has not appeared on Starknet yet. Please try again in a moment."