@medialane/sdk 0.140.0 → 0.142.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/{errors-CMjZp66y.d.cts → errors-BRCRmVep.d.cts} +15 -3
- package/dist/{errors-CtXjdRsL.d.ts → errors-DP-VnOWP.d.ts} +15 -3
- 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/starknet/index.cjs +52 -10
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +21 -5
- package/dist/starknet/index.d.ts +21 -5
- package/dist/starknet/index.js +48 -10
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner } from '../errors-
|
|
2
|
-
export {
|
|
1
|
+
import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner, b$ as CreatedOwner } from '../errors-BRCRmVep.cjs';
|
|
2
|
+
export { c0 as InvalidRecoveryKeyError, c1 as OwnerSigner, by as PasskeyCancelledError, c2 as PasskeyConfig, c3 as RecoveryKey, bQ as UserFacingError, c4 as createPasskeyOwner, c5 as encodeRecoveryKey, c6 as parseRecoveryKey } from '../errors-BRCRmVep.cjs';
|
|
3
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
4
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
|
|
5
5
|
import 'zod';
|
|
@@ -8047,8 +8047,6 @@ declare function encodePairingPayload(payload: PairingPayload): string;
|
|
|
8047
8047
|
declare function parsePairingPayload(encoded: string): PairingPayload;
|
|
8048
8048
|
declare function parseAccountAddress(input: string): string;
|
|
8049
8049
|
|
|
8050
|
-
declare function isRecoveryKeyForWallet(sealed: SealedOwner): boolean;
|
|
8051
|
-
|
|
8052
8050
|
type GuardianStatus = {
|
|
8053
8051
|
kind: "none";
|
|
8054
8052
|
} | {
|
|
@@ -8184,6 +8182,24 @@ interface MediaWallet {
|
|
|
8184
8182
|
}
|
|
8185
8183
|
declare function createMediaWallet(config: MediaWalletConfig): MediaWallet;
|
|
8186
8184
|
|
|
8185
|
+
interface SessionWallet {
|
|
8186
|
+
walletAddress: string;
|
|
8187
|
+
/** The wallet's key is not set up yet: call `setupSessionWalletKey`. */
|
|
8188
|
+
needsKeySetup: boolean;
|
|
8189
|
+
}
|
|
8190
|
+
/**
|
|
8191
|
+
* The wallet of the account behind the session, saved as this device's account. `null` only when the account has
|
|
8192
|
+
* no wallet; a failed lookup throws, so it is never mistaken for an account without one.
|
|
8193
|
+
*/
|
|
8194
|
+
declare function adoptSessionWallet(api: Pick<ApiClient, "getSessionWallet">, saveAddress: (walletAddress: string) => void): Promise<SessionWallet | null>;
|
|
8195
|
+
interface SessionWalletKeyDeps {
|
|
8196
|
+
createOwnerKey(): Promise<CreatedOwner>;
|
|
8197
|
+
saveOwner(sealed: SealedOwner): void;
|
|
8198
|
+
now?(): number;
|
|
8199
|
+
}
|
|
8200
|
+
/** Creates the owner key and makes it the only owner of the session account's wallet. */
|
|
8201
|
+
declare function setupSessionWalletKey(api: Pick<ApiClient, "setupWalletKey">, walletAddress: string, deps: SessionWalletKeyDeps): Promise<void>;
|
|
8202
|
+
|
|
8187
8203
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8188
8204
|
|
|
8189
|
-
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 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, 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, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, 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, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed,
|
|
8205
|
+
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, CreatedOwner, 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 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, 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 SessionWallet, type SessionWalletKeyDeps, 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, adoptSessionWallet, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, 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, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, setupSessionWalletKey, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner } from '../errors-
|
|
2
|
-
export {
|
|
1
|
+
import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner, b$ as CreatedOwner } from '../errors-DP-VnOWP.js';
|
|
2
|
+
export { c0 as InvalidRecoveryKeyError, c1 as OwnerSigner, by as PasskeyCancelledError, c2 as PasskeyConfig, c3 as RecoveryKey, bQ as UserFacingError, c4 as createPasskeyOwner, c5 as encodeRecoveryKey, c6 as parseRecoveryKey } from '../errors-DP-VnOWP.js';
|
|
3
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
4
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
|
|
5
5
|
import 'zod';
|
|
@@ -8047,8 +8047,6 @@ declare function encodePairingPayload(payload: PairingPayload): string;
|
|
|
8047
8047
|
declare function parsePairingPayload(encoded: string): PairingPayload;
|
|
8048
8048
|
declare function parseAccountAddress(input: string): string;
|
|
8049
8049
|
|
|
8050
|
-
declare function isRecoveryKeyForWallet(sealed: SealedOwner): boolean;
|
|
8051
|
-
|
|
8052
8050
|
type GuardianStatus = {
|
|
8053
8051
|
kind: "none";
|
|
8054
8052
|
} | {
|
|
@@ -8184,6 +8182,24 @@ interface MediaWallet {
|
|
|
8184
8182
|
}
|
|
8185
8183
|
declare function createMediaWallet(config: MediaWalletConfig): MediaWallet;
|
|
8186
8184
|
|
|
8185
|
+
interface SessionWallet {
|
|
8186
|
+
walletAddress: string;
|
|
8187
|
+
/** The wallet's key is not set up yet: call `setupSessionWalletKey`. */
|
|
8188
|
+
needsKeySetup: boolean;
|
|
8189
|
+
}
|
|
8190
|
+
/**
|
|
8191
|
+
* The wallet of the account behind the session, saved as this device's account. `null` only when the account has
|
|
8192
|
+
* no wallet; a failed lookup throws, so it is never mistaken for an account without one.
|
|
8193
|
+
*/
|
|
8194
|
+
declare function adoptSessionWallet(api: Pick<ApiClient, "getSessionWallet">, saveAddress: (walletAddress: string) => void): Promise<SessionWallet | null>;
|
|
8195
|
+
interface SessionWalletKeyDeps {
|
|
8196
|
+
createOwnerKey(): Promise<CreatedOwner>;
|
|
8197
|
+
saveOwner(sealed: SealedOwner): void;
|
|
8198
|
+
now?(): number;
|
|
8199
|
+
}
|
|
8200
|
+
/** Creates the owner key and makes it the only owner of the session account's wallet. */
|
|
8201
|
+
declare function setupSessionWalletKey(api: Pick<ApiClient, "setupWalletKey">, walletAddress: string, deps: SessionWalletKeyDeps): Promise<void>;
|
|
8202
|
+
|
|
8187
8203
|
type StarknetVenueSigner = VenueSigner<TypedData, Call>;
|
|
8188
8204
|
|
|
8189
|
-
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 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, 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, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, 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, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed,
|
|
8205
|
+
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, CreatedOwner, 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 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, 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 SessionWallet, type SessionWalletKeyDeps, 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, adoptSessionWallet, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, 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, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, setupSessionWalletKey, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
package/dist/starknet/index.js
CHANGED
|
@@ -12719,12 +12719,38 @@ function parseAccountAddress(input) {
|
|
|
12719
12719
|
}
|
|
12720
12720
|
|
|
12721
12721
|
// src/wallet/recovery-key.ts
|
|
12722
|
-
|
|
12722
|
+
var PREFIX = "medialane-recovery:v1:";
|
|
12723
|
+
var ADDRESS = /^0x[0-9a-fA-F]{1,64}$/;
|
|
12724
|
+
var InvalidRecoveryKeyError = class extends Error {
|
|
12725
|
+
constructor(message = "This is not a valid recovery key.") {
|
|
12726
|
+
super(message);
|
|
12727
|
+
this.name = "InvalidRecoveryKeyError";
|
|
12728
|
+
}
|
|
12729
|
+
};
|
|
12730
|
+
var canonicalAddress = (address) => `0x${BigInt(address).toString(16).padStart(64, "0")}`;
|
|
12731
|
+
function keyPair(privateKey) {
|
|
12723
12732
|
try {
|
|
12724
|
-
return
|
|
12733
|
+
return starkKeyPairFromPrivateKey(privateKey);
|
|
12725
12734
|
} catch {
|
|
12726
|
-
|
|
12735
|
+
throw new InvalidRecoveryKeyError();
|
|
12736
|
+
}
|
|
12737
|
+
}
|
|
12738
|
+
function encodeRecoveryKey(key) {
|
|
12739
|
+
if (!ADDRESS.test(key.walletAddress) || BigInt(key.walletAddress) === 0n) throw new InvalidRecoveryKeyError();
|
|
12740
|
+
return `${PREFIX}${canonicalAddress(key.walletAddress)}:${keyPair(key.privateKey).privateKeyHex}`;
|
|
12741
|
+
}
|
|
12742
|
+
function parseRecoveryKey(input) {
|
|
12743
|
+
const trimmed = input.trim();
|
|
12744
|
+
if (!trimmed.startsWith(PREFIX)) {
|
|
12745
|
+
const { privateKeyHex, publicKeyHex } = keyPair(trimmed);
|
|
12746
|
+
return { walletAddress: computeAccountAddress(publicKeyHex, 0), privateKey: privateKeyHex };
|
|
12747
|
+
}
|
|
12748
|
+
const parts = trimmed.slice(PREFIX.length).split(":");
|
|
12749
|
+
const [walletAddress, privateKey] = parts;
|
|
12750
|
+
if (parts.length !== 2 || !walletAddress || !privateKey || !ADDRESS.test(walletAddress) || BigInt(walletAddress) === 0n) {
|
|
12751
|
+
throw new InvalidRecoveryKeyError();
|
|
12727
12752
|
}
|
|
12753
|
+
return { walletAddress: canonicalAddress(walletAddress), privateKey: keyPair(privateKey).privateKeyHex };
|
|
12728
12754
|
}
|
|
12729
12755
|
|
|
12730
12756
|
// src/wallet/guardian-status.ts
|
|
@@ -12892,21 +12918,18 @@ function createPasskeyOwner(config) {
|
|
|
12892
12918
|
const aes = await deriveAesKey(secret, config.hkdfInfo);
|
|
12893
12919
|
return unsealPrivateKey(aes, decodeBase64(sealed.iv), decodeBase64(sealed.ciphertext));
|
|
12894
12920
|
},
|
|
12895
|
-
async sealImportedOwnerKey(
|
|
12896
|
-
const { privateKeyHex, publicKeyHex } = starkKeyPairFromPrivateKey(
|
|
12921
|
+
async sealImportedOwnerKey(recovery) {
|
|
12922
|
+
const { privateKeyHex, publicKeyHex } = starkKeyPairFromPrivateKey(recovery.privateKey);
|
|
12897
12923
|
const registration = await registerPasskey();
|
|
12898
12924
|
const secret = await secretFromRegistration(registration);
|
|
12899
12925
|
const { iv, ciphertext } = await seal(secret, privateKeyHex);
|
|
12900
12926
|
return {
|
|
12901
12927
|
credentialId: registration.credentialId,
|
|
12902
12928
|
ownerPubKey: publicKeyHex,
|
|
12903
|
-
address:
|
|
12929
|
+
address: recovery.walletAddress,
|
|
12904
12930
|
iv,
|
|
12905
12931
|
ciphertext
|
|
12906
12932
|
};
|
|
12907
|
-
},
|
|
12908
|
-
walletAddressForPrivateKey(privateKeyInput) {
|
|
12909
|
-
return computeAccountAddress(starkKeyPairFromPrivateKey(privateKeyInput).publicKeyHex, 0);
|
|
12910
12933
|
}
|
|
12911
12934
|
};
|
|
12912
12935
|
}
|
|
@@ -13180,7 +13203,22 @@ function createMediaWallet(config) {
|
|
|
13180
13203
|
}
|
|
13181
13204
|
};
|
|
13182
13205
|
}
|
|
13206
|
+
async function adoptSessionWallet(api, saveAddress) {
|
|
13207
|
+
const wallet = await api.getSessionWallet();
|
|
13208
|
+
if (wallet) saveAddress(wallet.walletAddress);
|
|
13209
|
+
return wallet;
|
|
13210
|
+
}
|
|
13211
|
+
var PROOF_TTL_SECONDS = 600;
|
|
13212
|
+
async function setupSessionWalletKey(api, walletAddress, deps) {
|
|
13213
|
+
const { sealed, privateKeyHex } = await deps.createOwnerKey();
|
|
13214
|
+
const now = deps.now?.() ?? Math.floor(Date.now() / 1e3);
|
|
13215
|
+
const expiration = now + PROOF_TTL_SECONDS;
|
|
13216
|
+
const message = ownerAliveTypedData(computeOwnerGuid(sealed.ownerPubKey), expiration, "SN_MAIN");
|
|
13217
|
+
const signature = signWithPrivateKey(privateKeyHex, typedData.getMessageHash(message, walletAddress));
|
|
13218
|
+
const result = await api.setupWalletKey({ newOwnerPubkey: sealed.ownerPubKey, signature, expiration });
|
|
13219
|
+
deps.saveOwner({ ...sealed, address: result.walletAddress });
|
|
13220
|
+
}
|
|
13183
13221
|
|
|
13184
|
-
export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FundingTransferNotSentError, 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, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, 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, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed,
|
|
13222
|
+
export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, FundingTransferNotSentError, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidPairingPayloadError, InvalidRecoveryKeyError, 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, adoptSessionWallet, allowsFallbackFunding, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildFundingTransferCall, 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, encodeRecoveryKey, estimateSelfFundedFee, executeIntent, executeIntents, executeSponsored, fdvHuman, fundWithChainTransfer, fundingApiFor, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isDeployed, isSiwsTokenValid, isValidStarknetAddress, mintedTokenIdFromReceipt, normalizeSiwsSignature, normalizeWalletAddress, ownerAliveTypedData, ownerConstructorCalldata, parseAccountAddress, parseAdminHeaders, parseCreatorCoinCreated, parsePairingPayload, parseRecoveryKey, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, selfFundedExecutor, sessionKeyHashOf, setupSessionWalletKey, signAdminRequest, signWithPrivateKey, sponsoredExecutor, starkKeyPairFromPrivateKey, storeSiwsToken, syncTransactionBestEffort, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig, waitUntilDeployed };
|
|
13185
13223
|
//# sourceMappingURL=index.js.map
|
|
13186
13224
|
//# sourceMappingURL=index.js.map
|