@medialane/sdk 0.171.0 → 0.172.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.
|
@@ -8645,6 +8645,11 @@ interface SponsoredExecuteConfig {
|
|
|
8645
8645
|
fetchImpl?: typeof fetch;
|
|
8646
8646
|
headers?: Record<string, string>;
|
|
8647
8647
|
}
|
|
8648
|
+
type SponsoredRequest = {
|
|
8649
|
+
intentIds: string[];
|
|
8650
|
+
} | {
|
|
8651
|
+
userAddress: string;
|
|
8652
|
+
};
|
|
8648
8653
|
type SponsoredExecuteResult = {
|
|
8649
8654
|
status: "sponsored";
|
|
8650
8655
|
transactionHash: string;
|
|
@@ -8656,7 +8661,7 @@ declare class SponsoredCallRejectedError extends Error {
|
|
|
8656
8661
|
}
|
|
8657
8662
|
type SponsorshipFailureCode = "sponsor_unavailable" | "credits_exhausted" | "account_not_deployed" | "not_executable" | "invalid_request" | "not_authorized" | "rate_limited" | "may_have_broadcast";
|
|
8658
8663
|
declare function allowsFallbackFunding(code: string | undefined, status: number, stage: "build" | "execute"): boolean;
|
|
8659
|
-
declare function executeSponsored(config: SponsoredExecuteConfig, signer: TypedDataSigner,
|
|
8664
|
+
declare function executeSponsored(config: SponsoredExecuteConfig, signer: TypedDataSigner, request: SponsoredRequest): Promise<SponsoredExecuteResult>;
|
|
8660
8665
|
|
|
8661
8666
|
declare function encodeByteArray(str: string): string[];
|
|
8662
8667
|
|
|
@@ -8912,4 +8917,4 @@ declare function claimSessionWallet(api: Pick<ApiClient, "setupWalletKey">, wall
|
|
|
8912
8917
|
|
|
8913
8918
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8914
8919
|
|
|
8915
|
-
export { type AddSupplyParams, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, type CreateCreatorCoinParams, CreateDropParams, CreatePopCollectionParams, CreatedOwner, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, DROP_MAX_CLAIM_QUANTITY, type DeployCollectionParams, type DeployingServiceId, type DeploymentCoordinator, type DeploymentDeps, type DeploymentResult, type DeploymentStep, type DeviceEntry, DropCollectionABI, DropFactoryABI, type DropMintCost, type DropMintState, type DropMintStateKind, type DropOnchain, DropService, DropTerms, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, ExecutedTransaction, type FeeSurface, type FundWithTransferOptions, type FundingApi, type FundingResult, type FundingStep, type FundingTransferCall, FundingTransferNotSentError, type FundingWallet, 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, PasskeyOwner, type PopAllowlist, type PopClaimInfo, type PopClaimLink, type PopClaimState, 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 SessionWallet, type SessionWalletClaimDeps, 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, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildCancelEscapeCall, buildCancellationTypedData, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildPopAllowlist, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, claimSessionWallet, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createDeploymentCoordinator, createMediaWallet, createOwnerStore, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, decodePopClaimFragment, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, dropCalls, dropClaimLinks, dropClaimedBy, dropMintCost, dropMintState, encodeByteArray, encodePairingPayload, encodePopClaimFragment, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, feeAmount, feeBps, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerConstructorCalldata, parseAccountAddress, parseCreatorCoinCreated, parsePairingPayload, popCalls, popClaimInfo, popClaimLinks, popClaimLinksCsv, popClaimState, popHasClaimed, priceToEkuboParams, readDrop, requestSiwsToken, sealPrivateKey, selfFundedExecutor, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractTerms as toDropContractTerms, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyPopProof, waitUntilDeployed };
|
|
8920
|
+
export { type AddSupplyParams, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, type CreateCreatorCoinParams, CreateDropParams, CreatePopCollectionParams, CreatedOwner, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, DROP_MAX_CLAIM_QUANTITY, type DeployCollectionParams, type DeployingServiceId, type DeploymentCoordinator, type DeploymentDeps, type DeploymentResult, type DeploymentStep, type DeviceEntry, DropCollectionABI, DropFactoryABI, type DropMintCost, type DropMintState, type DropMintStateKind, type DropOnchain, DropService, DropTerms, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, ExecutedTransaction, type FeeSurface, type FundWithTransferOptions, type FundingApi, type FundingResult, type FundingStep, type FundingTransferCall, FundingTransferNotSentError, type FundingWallet, 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, PasskeyOwner, type PopAllowlist, type PopClaimInfo, type PopClaimLink, type PopClaimState, 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 SessionWallet, type SessionWalletClaimDeps, type SiwsSigner, SponsoredCallRejectedError, type SponsoredDeps, type SponsoredExecuteConfig, type SponsoredExecuteResult, type SponsoredRequest, type SponsorshipFailureCode, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, WalletExecutor, accountFor, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildCancelEscapeCall, buildCancellationTypedData, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildPopAllowlist, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, claimSessionWallet, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createDeploymentCoordinator, createMediaWallet, createOwnerStore, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, decodePopClaimFragment, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, dropCalls, dropClaimLinks, dropClaimedBy, dropMintCost, dropMintState, encodeByteArray, encodePairingPayload, encodePopClaimFragment, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, feeAmount, feeBps, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerConstructorCalldata, parseAccountAddress, parseCreatorCoinCreated, parsePairingPayload, popCalls, popClaimInfo, popClaimLinks, popClaimLinksCsv, popClaimState, popHasClaimed, priceToEkuboParams, readDrop, requestSiwsToken, sealPrivateKey, selfFundedExecutor, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractTerms as toDropContractTerms, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyPopProof, waitUntilDeployed };
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -8645,6 +8645,11 @@ interface SponsoredExecuteConfig {
|
|
|
8645
8645
|
fetchImpl?: typeof fetch;
|
|
8646
8646
|
headers?: Record<string, string>;
|
|
8647
8647
|
}
|
|
8648
|
+
type SponsoredRequest = {
|
|
8649
|
+
intentIds: string[];
|
|
8650
|
+
} | {
|
|
8651
|
+
userAddress: string;
|
|
8652
|
+
};
|
|
8648
8653
|
type SponsoredExecuteResult = {
|
|
8649
8654
|
status: "sponsored";
|
|
8650
8655
|
transactionHash: string;
|
|
@@ -8656,7 +8661,7 @@ declare class SponsoredCallRejectedError extends Error {
|
|
|
8656
8661
|
}
|
|
8657
8662
|
type SponsorshipFailureCode = "sponsor_unavailable" | "credits_exhausted" | "account_not_deployed" | "not_executable" | "invalid_request" | "not_authorized" | "rate_limited" | "may_have_broadcast";
|
|
8658
8663
|
declare function allowsFallbackFunding(code: string | undefined, status: number, stage: "build" | "execute"): boolean;
|
|
8659
|
-
declare function executeSponsored(config: SponsoredExecuteConfig, signer: TypedDataSigner,
|
|
8664
|
+
declare function executeSponsored(config: SponsoredExecuteConfig, signer: TypedDataSigner, request: SponsoredRequest): Promise<SponsoredExecuteResult>;
|
|
8660
8665
|
|
|
8661
8666
|
declare function encodeByteArray(str: string): string[];
|
|
8662
8667
|
|
|
@@ -8912,4 +8917,4 @@ declare function claimSessionWallet(api: Pick<ApiClient, "setupWalletKey">, wall
|
|
|
8912
8917
|
|
|
8913
8918
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8914
8919
|
|
|
8915
|
-
export { type AddSupplyParams, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, type CreateCreatorCoinParams, CreateDropParams, CreatePopCollectionParams, CreatedOwner, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, DROP_MAX_CLAIM_QUANTITY, type DeployCollectionParams, type DeployingServiceId, type DeploymentCoordinator, type DeploymentDeps, type DeploymentResult, type DeploymentStep, type DeviceEntry, DropCollectionABI, DropFactoryABI, type DropMintCost, type DropMintState, type DropMintStateKind, type DropOnchain, DropService, DropTerms, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, ExecutedTransaction, type FeeSurface, type FundWithTransferOptions, type FundingApi, type FundingResult, type FundingStep, type FundingTransferCall, FundingTransferNotSentError, type FundingWallet, 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, PasskeyOwner, type PopAllowlist, type PopClaimInfo, type PopClaimLink, type PopClaimState, 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 SessionWallet, type SessionWalletClaimDeps, 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, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildCancelEscapeCall, buildCancellationTypedData, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildPopAllowlist, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, claimSessionWallet, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createDeploymentCoordinator, createMediaWallet, createOwnerStore, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, decodePopClaimFragment, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, dropCalls, dropClaimLinks, dropClaimedBy, dropMintCost, dropMintState, encodeByteArray, encodePairingPayload, encodePopClaimFragment, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, feeAmount, feeBps, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerConstructorCalldata, parseAccountAddress, parseCreatorCoinCreated, parsePairingPayload, popCalls, popClaimInfo, popClaimLinks, popClaimLinksCsv, popClaimState, popHasClaimed, priceToEkuboParams, readDrop, requestSiwsToken, sealPrivateKey, selfFundedExecutor, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractTerms as toDropContractTerms, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyPopProof, waitUntilDeployed };
|
|
8920
|
+
export { type AddSupplyParams, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, type CreateCreatorCoinParams, CreateDropParams, CreatePopCollectionParams, CreatedOwner, CreatorCoinFactoryABI, type CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, DROP_MAX_CLAIM_QUANTITY, type DeployCollectionParams, type DeployingServiceId, type DeploymentCoordinator, type DeploymentDeps, type DeploymentResult, type DeploymentStep, type DeviceEntry, DropCollectionABI, DropFactoryABI, type DropMintCost, type DropMintState, type DropMintStateKind, type DropOnchain, DropService, DropTerms, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, ExecutedTransaction, type FeeSurface, type FundWithTransferOptions, type FundingApi, type FundingResult, type FundingStep, type FundingTransferCall, FundingTransferNotSentError, type FundingWallet, 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, PasskeyOwner, type PopAllowlist, type PopClaimInfo, type PopClaimLink, type PopClaimState, 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 SessionWallet, type SessionWalletClaimDeps, type SiwsSigner, SponsoredCallRejectedError, type SponsoredDeps, type SponsoredExecuteConfig, type SponsoredExecuteResult, type SponsoredRequest, type SponsorshipFailureCode, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, WalletExecutor, accountFor, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildCancelEscapeCall, buildCancellationTypedData, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildPopAllowlist, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, canRemoveDevice, claimSessionWallet, toRaw as coinToRaw, completeDeployment, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createDeploymentCoordinator, createMediaWallet, createOwnerStore, createSelfFundConsent, decodeEscapeAndStatus, decodeGuardiansInfo, decodePopClaimFragment, deploySelfFunded, deploySponsored, deployedCollectionFromReceipt, deriveAesKey, deriveOwnerKeyPair, describeDevices, describeGuardianStatus, describeRecoveryAction, dropCalls, dropClaimLinks, dropClaimedBy, dropMintCost, dropMintState, encodeByteArray, encodePairingPayload, encodePopClaimFragment, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, feeAmount, feeBps, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerConstructorCalldata, parseAccountAddress, parseCreatorCoinCreated, parsePairingPayload, popCalls, popClaimInfo, popClaimLinks, popClaimLinksCsv, popClaimState, popHasClaimed, priceToEkuboParams, readDrop, requestSiwsToken, sealPrivateKey, selfFundedExecutor, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractTerms as toDropContractTerms, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyPopProof, waitUntilDeployed };
|
package/dist/starknet/index.js
CHANGED
|
@@ -12119,14 +12119,14 @@ async function failureOf(res, fallback) {
|
|
|
12119
12119
|
const body = await res.json().catch(() => null);
|
|
12120
12120
|
return { reason: body?.error || fallback, code: typeof body?.code === "string" ? body.code : void 0 };
|
|
12121
12121
|
}
|
|
12122
|
-
async function executeSponsored(config, signer,
|
|
12122
|
+
async function executeSponsored(config, signer, request) {
|
|
12123
12123
|
const doFetch = config.fetchImpl ?? fetch;
|
|
12124
12124
|
const base = config.proxyUrl.replace(/\/$/, "");
|
|
12125
12125
|
const headers = { "Content-Type": "application/json", ...config.headers };
|
|
12126
12126
|
const buildRes = await doFetch(`${base}/build`, {
|
|
12127
12127
|
method: "POST",
|
|
12128
12128
|
headers,
|
|
12129
|
-
body: JSON.stringify(
|
|
12129
|
+
body: JSON.stringify(request)
|
|
12130
12130
|
});
|
|
12131
12131
|
if (!buildRes.ok) {
|
|
12132
12132
|
const { reason, code } = await failureOf(buildRes, "We couldn't prepare this transaction.");
|
|
@@ -12138,7 +12138,7 @@ async function executeSponsored(config, signer, calls, intentIds) {
|
|
|
12138
12138
|
const executeRes = await doFetch(`${base}/execute`, {
|
|
12139
12139
|
method: "POST",
|
|
12140
12140
|
headers,
|
|
12141
|
-
body: JSON.stringify(
|
|
12141
|
+
body: JSON.stringify({ ...request, typedData, signature })
|
|
12142
12142
|
});
|
|
12143
12143
|
if (!executeRes.ok) {
|
|
12144
12144
|
const { reason, code } = await failureOf(executeRes, "We couldn't submit this transaction.");
|
|
@@ -12520,14 +12520,18 @@ function sponsoredExecutor(deps) {
|
|
|
12520
12520
|
return {
|
|
12521
12521
|
async execute(input) {
|
|
12522
12522
|
const { userAddress, privateKeyHex, calls, intentIds } = input;
|
|
12523
|
+
if (!intentIds?.length) {
|
|
12524
|
+
const consented2 = await deps.consent.request({ address: userAddress, calls });
|
|
12525
|
+
if (!consented2) throw new SponsoredCallRejectedError("This action can't be sponsored");
|
|
12526
|
+
return fallback.execute(input);
|
|
12527
|
+
}
|
|
12523
12528
|
const result = await executeSponsored(
|
|
12524
12529
|
{ proxyUrl: deps.proxyUrl, fetchImpl: deps.fetchImpl },
|
|
12525
12530
|
{
|
|
12526
12531
|
address: userAddress,
|
|
12527
12532
|
signTypedData: async (data) => signWithPrivateKey(privateKeyHex, typedData.getMessageHash(data, userAddress))
|
|
12528
12533
|
},
|
|
12529
|
-
|
|
12530
|
-
intentIds
|
|
12534
|
+
{ intentIds }
|
|
12531
12535
|
);
|
|
12532
12536
|
if (result.status === "sponsored") return { transactionHash: result.transactionHash };
|
|
12533
12537
|
const consented = await deps.consent.request({ address: userAddress, calls });
|