@medialane/sdk 0.126.0 → 0.128.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/{services-CkUqZ75g.d.cts → errors-CO99guAf.d.cts} +59 -2
- package/dist/{services-4Z16tkFa.d.ts → errors-De9avg1S.d.ts} +59 -2
- package/dist/index.cjs +30 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +29 -7
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +20 -5
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +3 -53
- package/dist/starknet/index.d.ts +3 -53
- package/dist/starknet/index.js +20 -6
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bi as ResolvedConfig, bq as TxResult, aD as CreatePopCollectionParams, ao as ClaimConditions, az as CreateDropParams, aI as CreateTicketParams, b2 as MintTicketsParams, aB as CreateMembershipParams, b1 as MintMembershipsParams, aG as CreateSponsorshipOfferParams, bf as ProposeSponsorshipParams, l as ApiClient, a$ as MedialaneConfig, b0 as MedialaneErrorCode, b7 as OrderDetails, R as ResolvedFeeConfig, F as ApiIntentCreated, by as SealedOwner, bz as ReceiptProviderLike, bA as WalletExecutor, bB as ExecutedTransaction, bC as PasskeyOwner } from '../errors-CO99guAf.cjs';
|
|
2
|
+
export { bD as CreatedOwner, bE as OwnerSigner, ba as PasskeyCancelledError, bF as PasskeyConfig, bs as UserFacingError, bG as createPasskeyOwner } from '../errors-CO99guAf.cjs';
|
|
2
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
3
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
|
|
4
5
|
import 'zod';
|
|
@@ -7962,31 +7963,6 @@ declare function sealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, privateKeyHex
|
|
|
7962
7963
|
declare function unsealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, ciphertext: BufferSource): Promise<string>;
|
|
7963
7964
|
declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [string, string];
|
|
7964
7965
|
|
|
7965
|
-
interface SealedOwner {
|
|
7966
|
-
credentialId: string;
|
|
7967
|
-
ownerPubKey: string;
|
|
7968
|
-
address: string;
|
|
7969
|
-
iv: string;
|
|
7970
|
-
ciphertext: string;
|
|
7971
|
-
}
|
|
7972
|
-
interface OwnerSigner {
|
|
7973
|
-
address: string;
|
|
7974
|
-
signTypedData(typedData: TypedData): Promise<string[]>;
|
|
7975
|
-
}
|
|
7976
|
-
interface ExecutedTransaction {
|
|
7977
|
-
transactionHash: string;
|
|
7978
|
-
}
|
|
7979
|
-
interface WalletExecutor {
|
|
7980
|
-
execute(input: {
|
|
7981
|
-
userAddress: string;
|
|
7982
|
-
privateKeyHex: string;
|
|
7983
|
-
calls: Call[];
|
|
7984
|
-
}): Promise<ExecutedTransaction>;
|
|
7985
|
-
}
|
|
7986
|
-
interface ReceiptProviderLike {
|
|
7987
|
-
getClassHashAt(address: string): Promise<unknown>;
|
|
7988
|
-
}
|
|
7989
|
-
|
|
7990
7966
|
interface OwnerStore {
|
|
7991
7967
|
load(): SealedOwner | null;
|
|
7992
7968
|
loadAddress(): string | null;
|
|
@@ -8041,32 +8017,6 @@ interface SelfFundConsent {
|
|
|
8041
8017
|
}
|
|
8042
8018
|
declare function createSelfFundConsent(estimateFee: (address: string, calls: Call[]) => Promise<SelfFundFeeEstimate>): SelfFundConsent;
|
|
8043
8019
|
|
|
8044
|
-
declare class PasskeyCancelledError extends Error {
|
|
8045
|
-
constructor(message?: string);
|
|
8046
|
-
}
|
|
8047
|
-
interface PasskeyConfig {
|
|
8048
|
-
appName: string;
|
|
8049
|
-
relyingPartyName: string;
|
|
8050
|
-
relyingPartyId: () => string;
|
|
8051
|
-
prfSalt: Uint8Array<ArrayBuffer>;
|
|
8052
|
-
hkdfInfo: Uint8Array<ArrayBuffer>;
|
|
8053
|
-
passkeyUser: () => Promise<PublicKeyCredentialUserEntity>;
|
|
8054
|
-
knownCredentials: () => PublicKeyCredentialDescriptor[];
|
|
8055
|
-
credentials?: CredentialsContainer;
|
|
8056
|
-
randomBytes?: (length: number) => Uint8Array<ArrayBuffer>;
|
|
8057
|
-
}
|
|
8058
|
-
interface CreatedOwner {
|
|
8059
|
-
sealed: SealedOwner;
|
|
8060
|
-
privateKeyHex: string;
|
|
8061
|
-
}
|
|
8062
|
-
interface PasskeyOwner {
|
|
8063
|
-
createOwnerKey(): Promise<CreatedOwner>;
|
|
8064
|
-
unlockOwnerKey(sealed: SealedOwner): Promise<string>;
|
|
8065
|
-
sealImportedOwnerKey(privateKeyInput: string): Promise<SealedOwner>;
|
|
8066
|
-
walletAddressForPrivateKey(privateKeyInput: string): string;
|
|
8067
|
-
}
|
|
8068
|
-
declare function createPasskeyOwner(config: PasskeyConfig): PasskeyOwner;
|
|
8069
|
-
|
|
8070
8020
|
interface SelfFundedDeps {
|
|
8071
8021
|
provider: () => ProviderInterface;
|
|
8072
8022
|
}
|
|
@@ -8176,4 +8126,4 @@ declare function createMediaWallet(config: MediaWalletConfig): MediaWallet;
|
|
|
8176
8126
|
|
|
8177
8127
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8178
8128
|
|
|
8179
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams,
|
|
8129
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, type DeployingServiceId, type DeploymentDeps, type DeploymentResult, type DeploymentStep, type DeviceEntry, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, ExecutedTransaction, type FeeSurface, type GuardianInfo, type GuardianStatus, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidPairingPayloadError, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, type MediaWallet, type MediaWalletConfig, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, type OwnerStore, POPCollectionABI, POPFactoryABI, type PairingPayload, type ParsedAdminHeaders, PasskeyOwner, PopService, type ReceiptLike, type ReceiptProvider, ReceiptProviderLike, type RecoveryAction, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, SealedOwner, type SelfFundConsent, type SelfFundConsentHandler, type SelfFundFeeEstimate, type SelfFundedDeps, type SiwsSigner, SponsoredCallRejectedError, type SponsoredDeps, type SponsoredExecuteConfig, type SponsoredExecuteResult, type SponsorshipFailureCode, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, WalletExecutor, accountFor, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, createMediaWallet, createOwnerStore, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, encodeAdminHeaders, encodeByteArray, encodePairingPayload, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isRecoveryKeyForWallet, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, userMayPayInstead, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bi as ResolvedConfig, bq as TxResult, aD as CreatePopCollectionParams, ao as ClaimConditions, az as CreateDropParams, aI as CreateTicketParams, b2 as MintTicketsParams, aB as CreateMembershipParams, b1 as MintMembershipsParams, aG as CreateSponsorshipOfferParams, bf as ProposeSponsorshipParams, l as ApiClient, a$ as MedialaneConfig, b0 as MedialaneErrorCode, b7 as OrderDetails, R as ResolvedFeeConfig, F as ApiIntentCreated, by as SealedOwner, bz as ReceiptProviderLike, bA as WalletExecutor, bB as ExecutedTransaction, bC as PasskeyOwner } from '../errors-De9avg1S.js';
|
|
2
|
+
export { bD as CreatedOwner, bE as OwnerSigner, ba as PasskeyCancelledError, bF as PasskeyConfig, bs as UserFacingError, bG as createPasskeyOwner } from '../errors-De9avg1S.js';
|
|
2
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
3
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
|
|
4
5
|
import 'zod';
|
|
@@ -7962,31 +7963,6 @@ declare function sealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, privateKeyHex
|
|
|
7962
7963
|
declare function unsealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, ciphertext: BufferSource): Promise<string>;
|
|
7963
7964
|
declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [string, string];
|
|
7964
7965
|
|
|
7965
|
-
interface SealedOwner {
|
|
7966
|
-
credentialId: string;
|
|
7967
|
-
ownerPubKey: string;
|
|
7968
|
-
address: string;
|
|
7969
|
-
iv: string;
|
|
7970
|
-
ciphertext: string;
|
|
7971
|
-
}
|
|
7972
|
-
interface OwnerSigner {
|
|
7973
|
-
address: string;
|
|
7974
|
-
signTypedData(typedData: TypedData): Promise<string[]>;
|
|
7975
|
-
}
|
|
7976
|
-
interface ExecutedTransaction {
|
|
7977
|
-
transactionHash: string;
|
|
7978
|
-
}
|
|
7979
|
-
interface WalletExecutor {
|
|
7980
|
-
execute(input: {
|
|
7981
|
-
userAddress: string;
|
|
7982
|
-
privateKeyHex: string;
|
|
7983
|
-
calls: Call[];
|
|
7984
|
-
}): Promise<ExecutedTransaction>;
|
|
7985
|
-
}
|
|
7986
|
-
interface ReceiptProviderLike {
|
|
7987
|
-
getClassHashAt(address: string): Promise<unknown>;
|
|
7988
|
-
}
|
|
7989
|
-
|
|
7990
7966
|
interface OwnerStore {
|
|
7991
7967
|
load(): SealedOwner | null;
|
|
7992
7968
|
loadAddress(): string | null;
|
|
@@ -8041,32 +8017,6 @@ interface SelfFundConsent {
|
|
|
8041
8017
|
}
|
|
8042
8018
|
declare function createSelfFundConsent(estimateFee: (address: string, calls: Call[]) => Promise<SelfFundFeeEstimate>): SelfFundConsent;
|
|
8043
8019
|
|
|
8044
|
-
declare class PasskeyCancelledError extends Error {
|
|
8045
|
-
constructor(message?: string);
|
|
8046
|
-
}
|
|
8047
|
-
interface PasskeyConfig {
|
|
8048
|
-
appName: string;
|
|
8049
|
-
relyingPartyName: string;
|
|
8050
|
-
relyingPartyId: () => string;
|
|
8051
|
-
prfSalt: Uint8Array<ArrayBuffer>;
|
|
8052
|
-
hkdfInfo: Uint8Array<ArrayBuffer>;
|
|
8053
|
-
passkeyUser: () => Promise<PublicKeyCredentialUserEntity>;
|
|
8054
|
-
knownCredentials: () => PublicKeyCredentialDescriptor[];
|
|
8055
|
-
credentials?: CredentialsContainer;
|
|
8056
|
-
randomBytes?: (length: number) => Uint8Array<ArrayBuffer>;
|
|
8057
|
-
}
|
|
8058
|
-
interface CreatedOwner {
|
|
8059
|
-
sealed: SealedOwner;
|
|
8060
|
-
privateKeyHex: string;
|
|
8061
|
-
}
|
|
8062
|
-
interface PasskeyOwner {
|
|
8063
|
-
createOwnerKey(): Promise<CreatedOwner>;
|
|
8064
|
-
unlockOwnerKey(sealed: SealedOwner): Promise<string>;
|
|
8065
|
-
sealImportedOwnerKey(privateKeyInput: string): Promise<SealedOwner>;
|
|
8066
|
-
walletAddressForPrivateKey(privateKeyInput: string): string;
|
|
8067
|
-
}
|
|
8068
|
-
declare function createPasskeyOwner(config: PasskeyConfig): PasskeyOwner;
|
|
8069
|
-
|
|
8070
8020
|
interface SelfFundedDeps {
|
|
8071
8021
|
provider: () => ProviderInterface;
|
|
8072
8022
|
}
|
|
@@ -8176,4 +8126,4 @@ declare function createMediaWallet(config: MediaWalletConfig): MediaWallet;
|
|
|
8176
8126
|
|
|
8177
8127
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8178
8128
|
|
|
8179
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams,
|
|
8129
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, type DeployingServiceId, type DeploymentDeps, type DeploymentResult, type DeploymentStep, type DeviceEntry, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, ExecutedTransaction, type FeeSurface, type GuardianInfo, type GuardianStatus, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidPairingPayloadError, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, type MediaWallet, type MediaWalletConfig, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, type OwnerStore, POPCollectionABI, POPFactoryABI, type PairingPayload, type ParsedAdminHeaders, PasskeyOwner, PopService, type ReceiptLike, type ReceiptProvider, ReceiptProviderLike, type RecoveryAction, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, SealedOwner, type SelfFundConsent, type SelfFundConsentHandler, type SelfFundFeeEstimate, type SelfFundedDeps, type SiwsSigner, SponsoredCallRejectedError, type SponsoredDeps, type SponsoredExecuteConfig, type SponsoredExecuteResult, type SponsorshipFailureCode, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, WalletExecutor, accountFor, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, createMediaWallet, createOwnerStore, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, encodeAdminHeaders, encodeByteArray, encodePairingPayload, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isRecoveryKeyForWallet, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, userMayPayInstead, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
package/dist/starknet/index.js
CHANGED
|
@@ -246,11 +246,12 @@ function deriveErrorCode(status) {
|
|
|
246
246
|
return "UNKNOWN";
|
|
247
247
|
}
|
|
248
248
|
var MedialaneApiError = class extends Error {
|
|
249
|
-
constructor(status, message, retryAfterMs, details) {
|
|
249
|
+
constructor(status, message, retryAfterMs, details, isAuthored = false) {
|
|
250
250
|
super(message);
|
|
251
251
|
this.status = status;
|
|
252
252
|
this.retryAfterMs = retryAfterMs;
|
|
253
253
|
this.details = details;
|
|
254
|
+
this.isAuthored = isAuthored;
|
|
254
255
|
this.name = "MedialaneApiError";
|
|
255
256
|
this.code = deriveErrorCode(status);
|
|
256
257
|
}
|
|
@@ -289,9 +290,13 @@ var ApiClient = class {
|
|
|
289
290
|
const text = await response.text().catch(() => response.statusText);
|
|
290
291
|
let message = text;
|
|
291
292
|
let details;
|
|
293
|
+
let isAuthored = false;
|
|
292
294
|
try {
|
|
293
295
|
const body = JSON.parse(text);
|
|
294
|
-
if (body.error
|
|
296
|
+
if (typeof body.error === "string" && body.error.trim() !== "") {
|
|
297
|
+
message = body.error;
|
|
298
|
+
isAuthored = true;
|
|
299
|
+
}
|
|
295
300
|
details = body;
|
|
296
301
|
} catch {
|
|
297
302
|
}
|
|
@@ -299,7 +304,8 @@ var ApiClient = class {
|
|
|
299
304
|
response.status,
|
|
300
305
|
message,
|
|
301
306
|
parseRetryAfter(response.headers.get("retry-after")),
|
|
302
|
-
details
|
|
307
|
+
details,
|
|
308
|
+
isAuthored
|
|
303
309
|
);
|
|
304
310
|
}
|
|
305
311
|
return response;
|
|
@@ -11614,6 +11620,14 @@ async function requestSiwsToken({
|
|
|
11614
11620
|
return token;
|
|
11615
11621
|
}
|
|
11616
11622
|
|
|
11623
|
+
// src/errors.ts
|
|
11624
|
+
var UserFacingError = class extends Error {
|
|
11625
|
+
constructor(message) {
|
|
11626
|
+
super(message);
|
|
11627
|
+
this.name = "UserFacingError";
|
|
11628
|
+
}
|
|
11629
|
+
};
|
|
11630
|
+
|
|
11617
11631
|
// src/starknet/services/executeIntent.ts
|
|
11618
11632
|
async function confirmIntentBestEffort(client, intentId, txHash) {
|
|
11619
11633
|
await client.api.confirmIntent(intentId, txHash).catch(() => {
|
|
@@ -11643,14 +11657,14 @@ async function assertTransactionSucceeded(provider, txHash, retryDelaysMs = RECE
|
|
|
11643
11657
|
const receipt = await provider.getTransactionReceipt(txHash);
|
|
11644
11658
|
const status = receipt.execution_status ?? receipt.status;
|
|
11645
11659
|
if (status === "REVERTED" || status === "REJECTED") {
|
|
11646
|
-
throw new
|
|
11660
|
+
throw new UserFacingError("Transaction was submitted but reverted onchain. Please check your balance and try again.");
|
|
11647
11661
|
}
|
|
11648
11662
|
if (status) return receipt;
|
|
11649
11663
|
} catch (err) {
|
|
11650
11664
|
if (err instanceof Error && err.message.includes("reverted onchain")) throw err;
|
|
11651
11665
|
}
|
|
11652
11666
|
}
|
|
11653
|
-
throw new
|
|
11667
|
+
throw new UserFacingError("Verification timed out. Check your account for the transaction status.");
|
|
11654
11668
|
}
|
|
11655
11669
|
async function executeIntent(provider, signer, client, intent, opts = {}) {
|
|
11656
11670
|
let calls;
|
|
@@ -12883,6 +12897,6 @@ function createMediaWallet(config) {
|
|
|
12883
12897
|
};
|
|
12884
12898
|
}
|
|
12885
12899
|
|
|
12886
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidPairingPayloadError, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PasskeyCancelledError, PopService, SUGGESTED_DEFAULT_PRICE, SponsoredCallRejectedError, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, accountFor, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, createMediaWallet, createOwnerStore, createPasskeyOwner, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, encodeAdminHeaders, encodeByteArray, encodePairingPayload, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isRecoveryKeyForWallet, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, userMayPayInstead, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
|
12900
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidPairingPayloadError, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PasskeyCancelledError, PopService, SUGGESTED_DEFAULT_PRICE, SponsoredCallRejectedError, SponsorshipService, StarknetVenue, TicketService, UserFacingError, VALIDATED_EKUBO_PARAMS, accountFor, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, createMediaWallet, createOwnerStore, createPasskeyOwner, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, encodeAdminHeaders, encodeByteArray, encodePairingPayload, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isRecoveryKeyForWallet, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, userMayPayInstead, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
|
12887
12901
|
//# sourceMappingURL=index.js.map
|
|
12888
12902
|
//# sourceMappingURL=index.js.map
|