@medialane/sdk 0.101.1 → 0.103.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.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{services-DnNPohyZ.d.ts → services-CtdateUS.d.ts} +15 -2
- package/dist/{services-DzFMDXse.d.cts → services-DhcDmDVP.d.cts} +15 -2
- package/dist/starknet/index.cjs +56 -0
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +17 -2
- package/dist/starknet/index.d.ts +17 -2
- package/dist/starknet/index.js +53 -1
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -817,6 +817,19 @@ interface ApiCollectionProfile {
|
|
|
817
817
|
updatedBy: string | null;
|
|
818
818
|
updatedAt: string;
|
|
819
819
|
}
|
|
820
|
+
interface UpdateCollectionProfileInput {
|
|
821
|
+
displayName?: string | null;
|
|
822
|
+
description?: string | null;
|
|
823
|
+
image?: string | null;
|
|
824
|
+
bannerImage?: string | null;
|
|
825
|
+
websiteUrl?: string | null;
|
|
826
|
+
twitterUrl?: string | null;
|
|
827
|
+
discordUrl?: string | null;
|
|
828
|
+
telegramUrl?: string | null;
|
|
829
|
+
gatedContentTitle?: string | null;
|
|
830
|
+
gatedContentUrl?: string | null;
|
|
831
|
+
gatedContentType?: "VIDEO" | "STREAM" | "AUDIO" | "DOCUMENT" | "LINK" | null;
|
|
832
|
+
}
|
|
820
833
|
interface ApiCollectionSlugClaim {
|
|
821
834
|
id: string;
|
|
822
835
|
slug: string;
|
|
@@ -1094,7 +1107,7 @@ declare class ApiClient {
|
|
|
1094
1107
|
}>>;
|
|
1095
1108
|
completeBusinessProvisioning(id: string): Promise<ApiResponse<ApiBusinessProvisioning>>;
|
|
1096
1109
|
getCollectionProfile(contractAddress: string): Promise<ApiCollectionProfile | null>;
|
|
1097
|
-
updateCollectionProfile(contractAddress: string, data:
|
|
1110
|
+
updateCollectionProfile(contractAddress: string, data: UpdateCollectionProfileInput, siwsToken: string): Promise<ApiCollectionProfile>;
|
|
1098
1111
|
getWalletActivity(address: string, chain?: "STARKNET"): Promise<ApiResponse<ApiWalletActivity[]>>;
|
|
1099
1112
|
getGatedContent(contractAddress: string, siwsToken: string): Promise<{
|
|
1100
1113
|
title: string;
|
|
@@ -1302,4 +1315,4 @@ interface ProposeSponsorshipParams {
|
|
|
1302
1315
|
royaltyBps: bigint | string;
|
|
1303
1316
|
}
|
|
1304
1317
|
|
|
1305
|
-
export { type ApiRewardsConfig as $, type AcceptSponsorshipBidIntentParams as A, type ApiIntent as B, type ApiIntentCreated as C, type ApiKeyStatus as D, type ApiMeta as E, type ApiMetadataSignedUrl as F, type ApiMetadataUpload as G, type ApiOrder as H, type ApiOrderConsideration as I, type ApiOrderOffer as J, type ApiOrderPrice as K, type ApiOrderTokenMeta as L, type ApiOrderTxHash as M, type ApiOrdersQuery as N, type ApiPointEvent as O, type ApiPortalKey as P, type ApiPortalKeyCreated as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a, type OpenLicense as a$, type ApiRewardsLeaderboardEntry as a0, type ApiRewardsLevel as a1, type ApiSearchCollectionResult as a2, type ApiSearchCreatorResult as a3, type ApiSearchResult as a4, type ApiSearchTokenResult as a5, type ApiToken as a6, type ApiTokenBalance as a7, type ApiTokenMetadata as a8, type ApiUsageDay as a9, type CreateSponsorshipOfferIntentParams as aA, type CreateSponsorshipOfferParams as aB, type CreateSponsorshipProposalIntentParams as aC, type CreateTicketParams as aD, type CreateTierIntentParams as aE, type CreateWebhookParams as aF, type DropMintStatus as aG, type EnforcementDeclaration as aH, type FactoryFamilyServiceId as aI, type FeeConfig as aJ, FeeConfigSchema as aK, type FulfillOrderIntentParams as aL, type IPType as aM, type IntentCall as aN, type IntentStatus as aO, type IntentType as aP, type IpAttribute as aQ, type IpNftMetadata as aR, type LaunchCoinIntentParams as aS, type MakeOfferIntentParams as aT, MedialaneApiError as aU, type MedialaneConfig as aV, type MedialaneErrorCode as aW, type MintMembershipsParams as aX, type MintTicketsParams as aY, OPEN_LICENSES as aZ, type OfferItem as a_, type ApiUserRewards as aa, type ApiUserWallet as ab, type ApiWalletActivity as ac, type ApiWebhookCreated as ad, type ApiWebhookEndpoint as ae, type AutoRemixOfferParams as af, type CancelOrderIntentParams as ag, type ChainFilter as ah, type CheckoutIntentItem as ai, type ClaimConditions as aj, type CollectionServiceId as ak, type CollectionSort as al, type CollectionTokensSort as am, type ConfirmRemixOfferParams as an, type ConfirmSelfRemixParams as ao, type ConsiderationItem as ap, type CreateCheckoutIntentParams as aq, type CreateCoinIntentParams as ar, type CreateCollectionIntentParams as as, type CreateCounterOfferIntentParams as at, type CreateDropParams as au, type CreateListingIntentParams as av, type CreateMembershipParams as aw, type CreateMintIntentParams as ax, type CreatePopCollectionParams as ay, type CreateRemixOfferParams as az, type AcceptSponsorshipProposalIntentParams as b, type Order as b0, type OrderDetails as b1, type OrderParameters as b2, type OrderStatus as b3, type PlaceSponsorshipBidIntentParams as b4, type PopBatchEligibilityItem as b5, type PopClaimStatus as b6, type PopEventType as b7, type ProposeSponsorshipParams as b8, type RejectSponsorshipProposalIntentParams as b9, type RemixOfferStatus as ba, type ResolvedConfig as bb, type RetractSponsorshipBidIntentParams as bc, type RetryOptions as bd, type ServiceEventDeclaration as be, type SetSponsorshipOfferOpenIntentParams as bf, type SortOrder as bg, type TenantPlan as bh, type TierServiceId as bi, type TxResult as bj, type
|
|
1318
|
+
export { type ApiRewardsConfig as $, type AcceptSponsorshipBidIntentParams as A, type ApiIntent as B, type ApiIntentCreated as C, type ApiKeyStatus as D, type ApiMeta as E, type ApiMetadataSignedUrl as F, type ApiMetadataUpload as G, type ApiOrder as H, type ApiOrderConsideration as I, type ApiOrderOffer as J, type ApiOrderPrice as K, type ApiOrderTokenMeta as L, type ApiOrderTxHash as M, type ApiOrdersQuery as N, type ApiPointEvent as O, type ApiPortalKey as P, type ApiPortalKeyCreated as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a, type OpenLicense as a$, type ApiRewardsLeaderboardEntry as a0, type ApiRewardsLevel as a1, type ApiSearchCollectionResult as a2, type ApiSearchCreatorResult as a3, type ApiSearchResult as a4, type ApiSearchTokenResult as a5, type ApiToken as a6, type ApiTokenBalance as a7, type ApiTokenMetadata as a8, type ApiUsageDay as a9, type CreateSponsorshipOfferIntentParams as aA, type CreateSponsorshipOfferParams as aB, type CreateSponsorshipProposalIntentParams as aC, type CreateTicketParams as aD, type CreateTierIntentParams as aE, type CreateWebhookParams as aF, type DropMintStatus as aG, type EnforcementDeclaration as aH, type FactoryFamilyServiceId as aI, type FeeConfig as aJ, FeeConfigSchema as aK, type FulfillOrderIntentParams as aL, type IPType as aM, type IntentCall as aN, type IntentStatus as aO, type IntentType as aP, type IpAttribute as aQ, type IpNftMetadata as aR, type LaunchCoinIntentParams as aS, type MakeOfferIntentParams as aT, MedialaneApiError as aU, type MedialaneConfig as aV, type MedialaneErrorCode as aW, type MintMembershipsParams as aX, type MintTicketsParams as aY, OPEN_LICENSES as aZ, type OfferItem as a_, type ApiUserRewards as aa, type ApiUserWallet as ab, type ApiWalletActivity as ac, type ApiWebhookCreated as ad, type ApiWebhookEndpoint as ae, type AutoRemixOfferParams as af, type CancelOrderIntentParams as ag, type ChainFilter as ah, type CheckoutIntentItem as ai, type ClaimConditions as aj, type CollectionServiceId as ak, type CollectionSort as al, type CollectionTokensSort as am, type ConfirmRemixOfferParams as an, type ConfirmSelfRemixParams as ao, type ConsiderationItem as ap, type CreateCheckoutIntentParams as aq, type CreateCoinIntentParams as ar, type CreateCollectionIntentParams as as, type CreateCounterOfferIntentParams as at, type CreateDropParams as au, type CreateListingIntentParams as av, type CreateMembershipParams as aw, type CreateMintIntentParams as ax, type CreatePopCollectionParams as ay, type CreateRemixOfferParams as az, type AcceptSponsorshipProposalIntentParams as b, type Order as b0, type OrderDetails as b1, type OrderParameters as b2, type OrderStatus as b3, type PlaceSponsorshipBidIntentParams as b4, type PopBatchEligibilityItem as b5, type PopClaimStatus as b6, type PopEventType as b7, type ProposeSponsorshipParams as b8, type RejectSponsorshipProposalIntentParams as b9, type RemixOfferStatus as ba, type ResolvedConfig as bb, type RetractSponsorshipBidIntentParams as bc, type RetryOptions as bd, type ServiceEventDeclaration as be, type SetSponsorshipOfferOpenIntentParams as bf, type SortOrder as bg, type TenantPlan as bh, type TierServiceId as bi, type TxResult as bj, type UpdateCollectionProfileInput as bk, type WebhookEventType as bl, type WebhookStatus as bm, type WithdrawSponsorshipProposalIntentParams as bn, resolveConfig as bo, resolveFeeConfig as bp, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
|
|
@@ -817,6 +817,19 @@ interface ApiCollectionProfile {
|
|
|
817
817
|
updatedBy: string | null;
|
|
818
818
|
updatedAt: string;
|
|
819
819
|
}
|
|
820
|
+
interface UpdateCollectionProfileInput {
|
|
821
|
+
displayName?: string | null;
|
|
822
|
+
description?: string | null;
|
|
823
|
+
image?: string | null;
|
|
824
|
+
bannerImage?: string | null;
|
|
825
|
+
websiteUrl?: string | null;
|
|
826
|
+
twitterUrl?: string | null;
|
|
827
|
+
discordUrl?: string | null;
|
|
828
|
+
telegramUrl?: string | null;
|
|
829
|
+
gatedContentTitle?: string | null;
|
|
830
|
+
gatedContentUrl?: string | null;
|
|
831
|
+
gatedContentType?: "VIDEO" | "STREAM" | "AUDIO" | "DOCUMENT" | "LINK" | null;
|
|
832
|
+
}
|
|
820
833
|
interface ApiCollectionSlugClaim {
|
|
821
834
|
id: string;
|
|
822
835
|
slug: string;
|
|
@@ -1094,7 +1107,7 @@ declare class ApiClient {
|
|
|
1094
1107
|
}>>;
|
|
1095
1108
|
completeBusinessProvisioning(id: string): Promise<ApiResponse<ApiBusinessProvisioning>>;
|
|
1096
1109
|
getCollectionProfile(contractAddress: string): Promise<ApiCollectionProfile | null>;
|
|
1097
|
-
updateCollectionProfile(contractAddress: string, data:
|
|
1110
|
+
updateCollectionProfile(contractAddress: string, data: UpdateCollectionProfileInput, siwsToken: string): Promise<ApiCollectionProfile>;
|
|
1098
1111
|
getWalletActivity(address: string, chain?: "STARKNET"): Promise<ApiResponse<ApiWalletActivity[]>>;
|
|
1099
1112
|
getGatedContent(contractAddress: string, siwsToken: string): Promise<{
|
|
1100
1113
|
title: string;
|
|
@@ -1302,4 +1315,4 @@ interface ProposeSponsorshipParams {
|
|
|
1302
1315
|
royaltyBps: bigint | string;
|
|
1303
1316
|
}
|
|
1304
1317
|
|
|
1305
|
-
export { type ApiRewardsConfig as $, type AcceptSponsorshipBidIntentParams as A, type ApiIntent as B, type ApiIntentCreated as C, type ApiKeyStatus as D, type ApiMeta as E, type ApiMetadataSignedUrl as F, type ApiMetadataUpload as G, type ApiOrder as H, type ApiOrderConsideration as I, type ApiOrderOffer as J, type ApiOrderPrice as K, type ApiOrderTokenMeta as L, type ApiOrderTxHash as M, type ApiOrdersQuery as N, type ApiPointEvent as O, type ApiPortalKey as P, type ApiPortalKeyCreated as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a, type OpenLicense as a$, type ApiRewardsLeaderboardEntry as a0, type ApiRewardsLevel as a1, type ApiSearchCollectionResult as a2, type ApiSearchCreatorResult as a3, type ApiSearchResult as a4, type ApiSearchTokenResult as a5, type ApiToken as a6, type ApiTokenBalance as a7, type ApiTokenMetadata as a8, type ApiUsageDay as a9, type CreateSponsorshipOfferIntentParams as aA, type CreateSponsorshipOfferParams as aB, type CreateSponsorshipProposalIntentParams as aC, type CreateTicketParams as aD, type CreateTierIntentParams as aE, type CreateWebhookParams as aF, type DropMintStatus as aG, type EnforcementDeclaration as aH, type FactoryFamilyServiceId as aI, type FeeConfig as aJ, FeeConfigSchema as aK, type FulfillOrderIntentParams as aL, type IPType as aM, type IntentCall as aN, type IntentStatus as aO, type IntentType as aP, type IpAttribute as aQ, type IpNftMetadata as aR, type LaunchCoinIntentParams as aS, type MakeOfferIntentParams as aT, MedialaneApiError as aU, type MedialaneConfig as aV, type MedialaneErrorCode as aW, type MintMembershipsParams as aX, type MintTicketsParams as aY, OPEN_LICENSES as aZ, type OfferItem as a_, type ApiUserRewards as aa, type ApiUserWallet as ab, type ApiWalletActivity as ac, type ApiWebhookCreated as ad, type ApiWebhookEndpoint as ae, type AutoRemixOfferParams as af, type CancelOrderIntentParams as ag, type ChainFilter as ah, type CheckoutIntentItem as ai, type ClaimConditions as aj, type CollectionServiceId as ak, type CollectionSort as al, type CollectionTokensSort as am, type ConfirmRemixOfferParams as an, type ConfirmSelfRemixParams as ao, type ConsiderationItem as ap, type CreateCheckoutIntentParams as aq, type CreateCoinIntentParams as ar, type CreateCollectionIntentParams as as, type CreateCounterOfferIntentParams as at, type CreateDropParams as au, type CreateListingIntentParams as av, type CreateMembershipParams as aw, type CreateMintIntentParams as ax, type CreatePopCollectionParams as ay, type CreateRemixOfferParams as az, type AcceptSponsorshipProposalIntentParams as b, type Order as b0, type OrderDetails as b1, type OrderParameters as b2, type OrderStatus as b3, type PlaceSponsorshipBidIntentParams as b4, type PopBatchEligibilityItem as b5, type PopClaimStatus as b6, type PopEventType as b7, type ProposeSponsorshipParams as b8, type RejectSponsorshipProposalIntentParams as b9, type RemixOfferStatus as ba, type ResolvedConfig as bb, type RetractSponsorshipBidIntentParams as bc, type RetryOptions as bd, type ServiceEventDeclaration as be, type SetSponsorshipOfferOpenIntentParams as bf, type SortOrder as bg, type TenantPlan as bh, type TierServiceId as bi, type TxResult as bj, type
|
|
1318
|
+
export { type ApiRewardsConfig as $, type AcceptSponsorshipBidIntentParams as A, type ApiIntent as B, type ApiIntentCreated as C, type ApiKeyStatus as D, type ApiMeta as E, type ApiMetadataSignedUrl as F, type ApiMetadataUpload as G, type ApiOrder as H, type ApiOrderConsideration as I, type ApiOrderOffer as J, type ApiOrderPrice as K, type ApiOrderTokenMeta as L, type ApiOrderTxHash as M, type ApiOrdersQuery as N, type ApiPointEvent as O, type ApiPortalKey as P, type ApiPortalKeyCreated as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPortalMe as T, type ApiPublicRemix as U, type ApiRemixOffer as V, type ApiRemixOfferPrice as W, type ApiRemixOffersQuery as X, type ApiResponse as Y, type ApiRewardsBadge as Z, type ApiRewardsBatchEntry as _, type ServiceCapability as a, type OpenLicense as a$, type ApiRewardsLeaderboardEntry as a0, type ApiRewardsLevel as a1, type ApiSearchCollectionResult as a2, type ApiSearchCreatorResult as a3, type ApiSearchResult as a4, type ApiSearchTokenResult as a5, type ApiToken as a6, type ApiTokenBalance as a7, type ApiTokenMetadata as a8, type ApiUsageDay as a9, type CreateSponsorshipOfferIntentParams as aA, type CreateSponsorshipOfferParams as aB, type CreateSponsorshipProposalIntentParams as aC, type CreateTicketParams as aD, type CreateTierIntentParams as aE, type CreateWebhookParams as aF, type DropMintStatus as aG, type EnforcementDeclaration as aH, type FactoryFamilyServiceId as aI, type FeeConfig as aJ, FeeConfigSchema as aK, type FulfillOrderIntentParams as aL, type IPType as aM, type IntentCall as aN, type IntentStatus as aO, type IntentType as aP, type IpAttribute as aQ, type IpNftMetadata as aR, type LaunchCoinIntentParams as aS, type MakeOfferIntentParams as aT, MedialaneApiError as aU, type MedialaneConfig as aV, type MedialaneErrorCode as aW, type MintMembershipsParams as aX, type MintTicketsParams as aY, OPEN_LICENSES as aZ, type OfferItem as a_, type ApiUserRewards as aa, type ApiUserWallet as ab, type ApiWalletActivity as ac, type ApiWebhookCreated as ad, type ApiWebhookEndpoint as ae, type AutoRemixOfferParams as af, type CancelOrderIntentParams as ag, type ChainFilter as ah, type CheckoutIntentItem as ai, type ClaimConditions as aj, type CollectionServiceId as ak, type CollectionSort as al, type CollectionTokensSort as am, type ConfirmRemixOfferParams as an, type ConfirmSelfRemixParams as ao, type ConsiderationItem as ap, type CreateCheckoutIntentParams as aq, type CreateCoinIntentParams as ar, type CreateCollectionIntentParams as as, type CreateCounterOfferIntentParams as at, type CreateDropParams as au, type CreateListingIntentParams as av, type CreateMembershipParams as aw, type CreateMintIntentParams as ax, type CreatePopCollectionParams as ay, type CreateRemixOfferParams as az, type AcceptSponsorshipProposalIntentParams as b, type Order as b0, type OrderDetails as b1, type OrderParameters as b2, type OrderStatus as b3, type PlaceSponsorshipBidIntentParams as b4, type PopBatchEligibilityItem as b5, type PopClaimStatus as b6, type PopEventType as b7, type ProposeSponsorshipParams as b8, type RejectSponsorshipProposalIntentParams as b9, type RemixOfferStatus as ba, type ResolvedConfig as bb, type RetractSponsorshipBidIntentParams as bc, type RetryOptions as bd, type ServiceEventDeclaration as be, type SetSponsorshipOfferOpenIntentParams as bf, type SortOrder as bg, type TenantPlan as bh, type TierServiceId as bi, type TxResult as bj, type UpdateCollectionProfileInput as bk, type WebhookEventType as bl, type WebhookStatus as bm, type WithdrawSponsorshipProposalIntentParams as bn, resolveConfig as bo, resolveFeeConfig as bp, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
|
package/dist/starknet/index.cjs
CHANGED
|
@@ -11551,6 +11551,58 @@ async function requestSiwsToken({
|
|
|
11551
11551
|
return token;
|
|
11552
11552
|
}
|
|
11553
11553
|
|
|
11554
|
+
// src/starknet/services/executeIntent.ts
|
|
11555
|
+
async function confirmIntentBestEffort(client, intentId, txHash) {
|
|
11556
|
+
await client.api.confirmIntent(intentId, txHash).catch(() => {
|
|
11557
|
+
});
|
|
11558
|
+
}
|
|
11559
|
+
var RECEIPT_RETRY_DELAYS_MS = [0, 3e3, 5e3, 7e3, 1e4];
|
|
11560
|
+
async function assertTransactionSucceeded(provider, txHash, retryDelaysMs = RECEIPT_RETRY_DELAYS_MS) {
|
|
11561
|
+
for (let attempt = 0; attempt < retryDelaysMs.length; attempt++) {
|
|
11562
|
+
const delay = retryDelaysMs[attempt];
|
|
11563
|
+
if (delay) await new Promise((r) => setTimeout(r, delay));
|
|
11564
|
+
try {
|
|
11565
|
+
const receipt = await provider.getTransactionReceipt(txHash);
|
|
11566
|
+
const status = receipt.execution_status ?? receipt.status;
|
|
11567
|
+
if (status === "REVERTED" || status === "REJECTED") {
|
|
11568
|
+
throw new Error("Transaction was submitted but reverted onchain. Please check your balance and try again.");
|
|
11569
|
+
}
|
|
11570
|
+
if (status) return;
|
|
11571
|
+
} catch (err) {
|
|
11572
|
+
if (err instanceof Error && err.message.includes("reverted onchain")) throw err;
|
|
11573
|
+
}
|
|
11574
|
+
}
|
|
11575
|
+
throw new Error("Verification timed out. Check your account for the transaction status.");
|
|
11576
|
+
}
|
|
11577
|
+
async function executeIntent(provider, signer, client, intent, opts = {}) {
|
|
11578
|
+
let calls;
|
|
11579
|
+
if (intent.requiresSignature) {
|
|
11580
|
+
const signature = await signer.signTypedData(intent.typedData);
|
|
11581
|
+
const signed = await client.api.submitIntentSignature(intent.id, signature);
|
|
11582
|
+
calls = signed.data.calls;
|
|
11583
|
+
} else {
|
|
11584
|
+
calls = intent.calls;
|
|
11585
|
+
}
|
|
11586
|
+
const { txHash } = await signer.execute(calls);
|
|
11587
|
+
await assertTransactionSucceeded(provider, txHash);
|
|
11588
|
+
if (opts.confirm !== false) {
|
|
11589
|
+
await confirmIntentBestEffort(client, intent.id, txHash);
|
|
11590
|
+
}
|
|
11591
|
+
return { txHash };
|
|
11592
|
+
}
|
|
11593
|
+
async function executeIntents(provider, signer, client, intents, opts = {}) {
|
|
11594
|
+
if (intents.some((i) => i.requiresSignature)) {
|
|
11595
|
+
throw new Error("Expected prebuilt intents (requiresSignature=false)");
|
|
11596
|
+
}
|
|
11597
|
+
const calls = intents.flatMap((i) => i.calls);
|
|
11598
|
+
const { txHash } = await signer.execute(calls);
|
|
11599
|
+
await assertTransactionSucceeded(provider, txHash);
|
|
11600
|
+
if (opts.confirm !== false) {
|
|
11601
|
+
await Promise.all(intents.map((i) => confirmIntentBestEffort(client, i.id, txHash)));
|
|
11602
|
+
}
|
|
11603
|
+
return { txHash };
|
|
11604
|
+
}
|
|
11605
|
+
|
|
11554
11606
|
// src/starknet/services/sponsoredExecutor.ts
|
|
11555
11607
|
var SponsoredCallRejectedError = class extends Error {
|
|
11556
11608
|
};
|
|
@@ -11797,6 +11849,7 @@ exports.StarknetVenue = StarknetVenue;
|
|
|
11797
11849
|
exports.TicketService = TicketService;
|
|
11798
11850
|
exports.VALIDATED_EKUBO_PARAMS = VALIDATED_EKUBO_PARAMS;
|
|
11799
11851
|
exports.adminRequestDigest = adminRequestDigest;
|
|
11852
|
+
exports.assertTransactionSucceeded = assertTransactionSucceeded;
|
|
11800
11853
|
exports.build1155CancellationTypedData = build1155CancellationTypedData;
|
|
11801
11854
|
exports.build1155OrderTypedData = build1155OrderTypedData;
|
|
11802
11855
|
exports.buildAdminSessionTypedData = buildAdminSessionTypedData;
|
|
@@ -11815,6 +11868,7 @@ exports.buybackQuoteRaw = buybackQuoteRaw;
|
|
|
11815
11868
|
exports.coinToRaw = toRaw;
|
|
11816
11869
|
exports.computeAccountAddress = computeAccountAddress;
|
|
11817
11870
|
exports.computeOwnerGuid = computeOwnerGuid;
|
|
11871
|
+
exports.confirmIntentBestEffort = confirmIntentBestEffort;
|
|
11818
11872
|
exports.createAdminSessionGrant = createAdminSessionGrant;
|
|
11819
11873
|
exports.decodeEscapeAndStatus = decodeEscapeAndStatus;
|
|
11820
11874
|
exports.decodeGuardiansInfo = decodeGuardiansInfo;
|
|
@@ -11822,6 +11876,8 @@ exports.deriveAesKey = deriveAesKey;
|
|
|
11822
11876
|
exports.deriveOwnerKeyPair = deriveOwnerKeyPair;
|
|
11823
11877
|
exports.encodeAdminHeaders = encodeAdminHeaders;
|
|
11824
11878
|
exports.encodeByteArray = encodeByteArray;
|
|
11879
|
+
exports.executeIntent = executeIntent;
|
|
11880
|
+
exports.executeIntents = executeIntents;
|
|
11825
11881
|
exports.executeSponsored = executeSponsored;
|
|
11826
11882
|
exports.fdvHuman = fdvHuman;
|
|
11827
11883
|
exports.generateStarkKeyPair = generateStarkKeyPair;
|