@medialane/sdk 0.125.1 → 0.127.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/index.cjs +21 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/{services-4Z16tkFa.d.ts → services-9dR1FQF_.d.ts} +55 -2
- package/dist/{services-CkUqZ75g.d.cts → services-CzBHF_gq.d.cts} +55 -2
- package/dist/starknet/index.cjs +10 -9
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +3 -55
- package/dist/starknet/index.d.ts +3 -55
- package/dist/starknet/index.js +10 -9
- 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, bx as SealedOwner, by as ReceiptProviderLike, bz as WalletExecutor, bA as ExecutedTransaction, bB as PasskeyOwner } from '../services-CzBHF_gq.cjs';
|
|
2
|
+
export { bC as CreatedOwner, bD as OwnerSigner, ba as PasskeyCancelledError, bE as PasskeyConfig, bF as createPasskeyOwner } from '../services-CzBHF_gq.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';
|
|
@@ -7878,7 +7879,6 @@ interface TypedDataSigner {
|
|
|
7878
7879
|
interface SponsoredExecuteConfig {
|
|
7879
7880
|
proxyUrl: string;
|
|
7880
7881
|
fetchImpl?: typeof fetch;
|
|
7881
|
-
identityToken?: string;
|
|
7882
7882
|
}
|
|
7883
7883
|
type SponsoredExecuteResult = {
|
|
7884
7884
|
status: "sponsored";
|
|
@@ -7963,31 +7963,6 @@ declare function sealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, privateKeyHex
|
|
|
7963
7963
|
declare function unsealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, ciphertext: BufferSource): Promise<string>;
|
|
7964
7964
|
declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [string, string];
|
|
7965
7965
|
|
|
7966
|
-
interface SealedOwner {
|
|
7967
|
-
credentialId: string;
|
|
7968
|
-
ownerPubKey: string;
|
|
7969
|
-
address: string;
|
|
7970
|
-
iv: string;
|
|
7971
|
-
ciphertext: string;
|
|
7972
|
-
}
|
|
7973
|
-
interface OwnerSigner {
|
|
7974
|
-
address: string;
|
|
7975
|
-
signTypedData(typedData: TypedData): Promise<string[]>;
|
|
7976
|
-
}
|
|
7977
|
-
interface ExecutedTransaction {
|
|
7978
|
-
transactionHash: string;
|
|
7979
|
-
}
|
|
7980
|
-
interface WalletExecutor {
|
|
7981
|
-
execute(input: {
|
|
7982
|
-
userAddress: string;
|
|
7983
|
-
privateKeyHex: string;
|
|
7984
|
-
calls: Call[];
|
|
7985
|
-
}): Promise<ExecutedTransaction>;
|
|
7986
|
-
}
|
|
7987
|
-
interface ReceiptProviderLike {
|
|
7988
|
-
getClassHashAt(address: string): Promise<unknown>;
|
|
7989
|
-
}
|
|
7990
|
-
|
|
7991
7966
|
interface OwnerStore {
|
|
7992
7967
|
load(): SealedOwner | null;
|
|
7993
7968
|
loadAddress(): string | null;
|
|
@@ -8042,32 +8017,6 @@ interface SelfFundConsent {
|
|
|
8042
8017
|
}
|
|
8043
8018
|
declare function createSelfFundConsent(estimateFee: (address: string, calls: Call[]) => Promise<SelfFundFeeEstimate>): SelfFundConsent;
|
|
8044
8019
|
|
|
8045
|
-
declare class PasskeyCancelledError extends Error {
|
|
8046
|
-
constructor(message?: string);
|
|
8047
|
-
}
|
|
8048
|
-
interface PasskeyConfig {
|
|
8049
|
-
appName: string;
|
|
8050
|
-
relyingPartyName: string;
|
|
8051
|
-
relyingPartyId: () => string;
|
|
8052
|
-
prfSalt: Uint8Array<ArrayBuffer>;
|
|
8053
|
-
hkdfInfo: Uint8Array<ArrayBuffer>;
|
|
8054
|
-
passkeyUser: () => Promise<PublicKeyCredentialUserEntity>;
|
|
8055
|
-
knownCredentials: () => PublicKeyCredentialDescriptor[];
|
|
8056
|
-
credentials?: CredentialsContainer;
|
|
8057
|
-
randomBytes?: (length: number) => Uint8Array<ArrayBuffer>;
|
|
8058
|
-
}
|
|
8059
|
-
interface CreatedOwner {
|
|
8060
|
-
sealed: SealedOwner;
|
|
8061
|
-
privateKeyHex: string;
|
|
8062
|
-
}
|
|
8063
|
-
interface PasskeyOwner {
|
|
8064
|
-
createOwnerKey(): Promise<CreatedOwner>;
|
|
8065
|
-
unlockOwnerKey(sealed: SealedOwner): Promise<string>;
|
|
8066
|
-
sealImportedOwnerKey(privateKeyInput: string): Promise<SealedOwner>;
|
|
8067
|
-
walletAddressForPrivateKey(privateKeyInput: string): string;
|
|
8068
|
-
}
|
|
8069
|
-
declare function createPasskeyOwner(config: PasskeyConfig): PasskeyOwner;
|
|
8070
|
-
|
|
8071
8020
|
interface SelfFundedDeps {
|
|
8072
8021
|
provider: () => ProviderInterface;
|
|
8073
8022
|
}
|
|
@@ -8079,7 +8028,6 @@ interface SponsoredDeps extends SelfFundedDeps {
|
|
|
8079
8028
|
consent: SelfFundConsent;
|
|
8080
8029
|
fetchImpl?: typeof fetch;
|
|
8081
8030
|
fallback?: WalletExecutor;
|
|
8082
|
-
identityToken?: () => string | null;
|
|
8083
8031
|
}
|
|
8084
8032
|
declare function sponsoredExecutor(deps: SponsoredDeps): WalletExecutor;
|
|
8085
8033
|
|
|
@@ -8178,4 +8126,4 @@ declare function createMediaWallet(config: MediaWalletConfig): MediaWallet;
|
|
|
8178
8126
|
|
|
8179
8127
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8180
8128
|
|
|
8181
|
-
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, bx as SealedOwner, by as ReceiptProviderLike, bz as WalletExecutor, bA as ExecutedTransaction, bB as PasskeyOwner } from '../services-9dR1FQF_.js';
|
|
2
|
+
export { bC as CreatedOwner, bD as OwnerSigner, ba as PasskeyCancelledError, bE as PasskeyConfig, bF as createPasskeyOwner } from '../services-9dR1FQF_.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';
|
|
@@ -7878,7 +7879,6 @@ interface TypedDataSigner {
|
|
|
7878
7879
|
interface SponsoredExecuteConfig {
|
|
7879
7880
|
proxyUrl: string;
|
|
7880
7881
|
fetchImpl?: typeof fetch;
|
|
7881
|
-
identityToken?: string;
|
|
7882
7882
|
}
|
|
7883
7883
|
type SponsoredExecuteResult = {
|
|
7884
7884
|
status: "sponsored";
|
|
@@ -7963,31 +7963,6 @@ declare function sealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, privateKeyHex
|
|
|
7963
7963
|
declare function unsealPrivateKey(aesKey: CryptoKey, iv: Uint8Array, ciphertext: BufferSource): Promise<string>;
|
|
7964
7964
|
declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [string, string];
|
|
7965
7965
|
|
|
7966
|
-
interface SealedOwner {
|
|
7967
|
-
credentialId: string;
|
|
7968
|
-
ownerPubKey: string;
|
|
7969
|
-
address: string;
|
|
7970
|
-
iv: string;
|
|
7971
|
-
ciphertext: string;
|
|
7972
|
-
}
|
|
7973
|
-
interface OwnerSigner {
|
|
7974
|
-
address: string;
|
|
7975
|
-
signTypedData(typedData: TypedData): Promise<string[]>;
|
|
7976
|
-
}
|
|
7977
|
-
interface ExecutedTransaction {
|
|
7978
|
-
transactionHash: string;
|
|
7979
|
-
}
|
|
7980
|
-
interface WalletExecutor {
|
|
7981
|
-
execute(input: {
|
|
7982
|
-
userAddress: string;
|
|
7983
|
-
privateKeyHex: string;
|
|
7984
|
-
calls: Call[];
|
|
7985
|
-
}): Promise<ExecutedTransaction>;
|
|
7986
|
-
}
|
|
7987
|
-
interface ReceiptProviderLike {
|
|
7988
|
-
getClassHashAt(address: string): Promise<unknown>;
|
|
7989
|
-
}
|
|
7990
|
-
|
|
7991
7966
|
interface OwnerStore {
|
|
7992
7967
|
load(): SealedOwner | null;
|
|
7993
7968
|
loadAddress(): string | null;
|
|
@@ -8042,32 +8017,6 @@ interface SelfFundConsent {
|
|
|
8042
8017
|
}
|
|
8043
8018
|
declare function createSelfFundConsent(estimateFee: (address: string, calls: Call[]) => Promise<SelfFundFeeEstimate>): SelfFundConsent;
|
|
8044
8019
|
|
|
8045
|
-
declare class PasskeyCancelledError extends Error {
|
|
8046
|
-
constructor(message?: string);
|
|
8047
|
-
}
|
|
8048
|
-
interface PasskeyConfig {
|
|
8049
|
-
appName: string;
|
|
8050
|
-
relyingPartyName: string;
|
|
8051
|
-
relyingPartyId: () => string;
|
|
8052
|
-
prfSalt: Uint8Array<ArrayBuffer>;
|
|
8053
|
-
hkdfInfo: Uint8Array<ArrayBuffer>;
|
|
8054
|
-
passkeyUser: () => Promise<PublicKeyCredentialUserEntity>;
|
|
8055
|
-
knownCredentials: () => PublicKeyCredentialDescriptor[];
|
|
8056
|
-
credentials?: CredentialsContainer;
|
|
8057
|
-
randomBytes?: (length: number) => Uint8Array<ArrayBuffer>;
|
|
8058
|
-
}
|
|
8059
|
-
interface CreatedOwner {
|
|
8060
|
-
sealed: SealedOwner;
|
|
8061
|
-
privateKeyHex: string;
|
|
8062
|
-
}
|
|
8063
|
-
interface PasskeyOwner {
|
|
8064
|
-
createOwnerKey(): Promise<CreatedOwner>;
|
|
8065
|
-
unlockOwnerKey(sealed: SealedOwner): Promise<string>;
|
|
8066
|
-
sealImportedOwnerKey(privateKeyInput: string): Promise<SealedOwner>;
|
|
8067
|
-
walletAddressForPrivateKey(privateKeyInput: string): string;
|
|
8068
|
-
}
|
|
8069
|
-
declare function createPasskeyOwner(config: PasskeyConfig): PasskeyOwner;
|
|
8070
|
-
|
|
8071
8020
|
interface SelfFundedDeps {
|
|
8072
8021
|
provider: () => ProviderInterface;
|
|
8073
8022
|
}
|
|
@@ -8079,7 +8028,6 @@ interface SponsoredDeps extends SelfFundedDeps {
|
|
|
8079
8028
|
consent: SelfFundConsent;
|
|
8080
8029
|
fetchImpl?: typeof fetch;
|
|
8081
8030
|
fallback?: WalletExecutor;
|
|
8082
|
-
identityToken?: () => string | null;
|
|
8083
8031
|
}
|
|
8084
8032
|
declare function sponsoredExecutor(deps: SponsoredDeps): WalletExecutor;
|
|
8085
8033
|
|
|
@@ -8178,4 +8126,4 @@ declare function createMediaWallet(config: MediaWalletConfig): MediaWallet;
|
|
|
8178
8126
|
|
|
8179
8127
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8180
8128
|
|
|
8181
|
-
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;
|
|
@@ -12038,7 +12044,6 @@ async function executeSponsored(config, signer, calls) {
|
|
|
12038
12044
|
const doFetch = config.fetchImpl ?? fetch;
|
|
12039
12045
|
const base = config.proxyUrl.replace(/\/$/, "");
|
|
12040
12046
|
const headers = { "Content-Type": "application/json" };
|
|
12041
|
-
if (config.identityToken) headers.Authorization = `Bearer ${config.identityToken}`;
|
|
12042
12047
|
const buildRes = await doFetch(`${base}/build`, {
|
|
12043
12048
|
method: "POST",
|
|
12044
12049
|
headers,
|
|
@@ -12636,11 +12641,7 @@ function sponsoredExecutor(deps) {
|
|
|
12636
12641
|
async execute(input) {
|
|
12637
12642
|
const { userAddress, privateKeyHex, calls } = input;
|
|
12638
12643
|
const result = await executeSponsored(
|
|
12639
|
-
{
|
|
12640
|
-
proxyUrl: deps.proxyUrl,
|
|
12641
|
-
fetchImpl: deps.fetchImpl,
|
|
12642
|
-
identityToken: deps.identityToken?.() ?? void 0
|
|
12643
|
-
},
|
|
12644
|
+
{ proxyUrl: deps.proxyUrl, fetchImpl: deps.fetchImpl },
|
|
12644
12645
|
{
|
|
12645
12646
|
address: userAddress,
|
|
12646
12647
|
signTypedData: async (data) => signWithPrivateKey(privateKeyHex, typedData.getMessageHash(data, userAddress))
|