@medialane/sdk 0.108.0 → 0.110.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.
@@ -7891,7 +7891,16 @@ declare function ownerConstructorCalldata(ownerPubkey: BigNumberish): string[];
7891
7891
  declare function computeAccountAddress(ownerPubkey: BigNumberish, salt?: BigNumberish): string;
7892
7892
 
7893
7893
  declare function computeOwnerGuid(ownerPubkey: BigNumberish): string;
7894
- declare function buildChangeOwnersCall(accountAddress: string, removeOwnerPubkey: BigNumberish, addOwnerPubkey: BigNumberish): Call;
7894
+ interface OwnerAliveProof {
7895
+ newOwnerPubkey: BigNumberish;
7896
+ signature: string[];
7897
+ expiration: number;
7898
+ }
7899
+ declare function ownerAliveTypedData(newOwnerGuid: string, expiration: number, chainId: string): TypedData;
7900
+ declare function buildChangeOwnersCall(accountAddress: string, removeOwnerPubkey: BigNumberish, addOwnerPubkey: BigNumberish, ownerAlive?: OwnerAliveProof): Call;
7901
+ declare function buildAddOwnerCall(accountAddress: string, addOwnerPubkey: BigNumberish): Call;
7902
+ declare function buildRemoveOwnerCall(accountAddress: string, removeOwnerPubkey: BigNumberish): Call;
7903
+ declare function buildRemoveOwnerByGuidCall(accountAddress: string, ownerGuid: BigNumberish): Call;
7895
7904
 
7896
7905
  declare function buildDeployAccountParams(ownerPubkey: BigNumberish, salt?: BigNumberish): DeployAccountContractPayload;
7897
7906
 
@@ -7916,19 +7925,10 @@ interface EscapeInfo {
7916
7925
  }
7917
7926
  declare function decodeEscapeAndStatus(res: string[]): EscapeInfo;
7918
7927
  declare function getGuardians(provider: ProviderInterface, address: string): Promise<GuardianInfo[]>;
7928
+ declare function getOwners(provider: ProviderInterface, address: string): Promise<GuardianInfo[]>;
7919
7929
  declare function getEscape(provider: ProviderInterface, address: string): Promise<EscapeInfo>;
7920
7930
  declare function getEscapeSecurityPeriod(provider: ProviderInterface, address: string): Promise<number>;
7921
7931
 
7922
- /**
7923
- * Pure crypto primitives behind a passkey-sealed Starknet wallet — HKDF key
7924
- * derivation, AES-GCM seal/unseal, Stark keypair generation, Stark-curve
7925
- * signing. Deliberately excludes the WebAuthn calls (`navigator.credentials`)
7926
- * that produce the PRF secret these functions consume — that stays app-local
7927
- * because it's untestable in this SDK's Node-based test environment and
7928
- * because RP_NAME/PRF_SALT are legitimately per-app identity, not protocol
7929
- * facts. `hkdfInfo` is always an explicit caller-supplied parameter, never
7930
- * defaulted — see the design doc's "load-bearing constraint" for why.
7931
- */
7932
7932
  declare function deriveAesKey(prfSecret: Uint8Array, hkdfInfo: Uint8Array): Promise<CryptoKey>;
7933
7933
  declare function generateStarkKeyPair(): {
7934
7934
  privateKeyHex: string;
@@ -7947,4 +7947,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
7947
7947
 
7948
7948
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
7949
7949
 
7950
- 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, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
7950
+ 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, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
@@ -7891,7 +7891,16 @@ declare function ownerConstructorCalldata(ownerPubkey: BigNumberish): string[];
7891
7891
  declare function computeAccountAddress(ownerPubkey: BigNumberish, salt?: BigNumberish): string;
7892
7892
 
7893
7893
  declare function computeOwnerGuid(ownerPubkey: BigNumberish): string;
7894
- declare function buildChangeOwnersCall(accountAddress: string, removeOwnerPubkey: BigNumberish, addOwnerPubkey: BigNumberish): Call;
7894
+ interface OwnerAliveProof {
7895
+ newOwnerPubkey: BigNumberish;
7896
+ signature: string[];
7897
+ expiration: number;
7898
+ }
7899
+ declare function ownerAliveTypedData(newOwnerGuid: string, expiration: number, chainId: string): TypedData;
7900
+ declare function buildChangeOwnersCall(accountAddress: string, removeOwnerPubkey: BigNumberish, addOwnerPubkey: BigNumberish, ownerAlive?: OwnerAliveProof): Call;
7901
+ declare function buildAddOwnerCall(accountAddress: string, addOwnerPubkey: BigNumberish): Call;
7902
+ declare function buildRemoveOwnerCall(accountAddress: string, removeOwnerPubkey: BigNumberish): Call;
7903
+ declare function buildRemoveOwnerByGuidCall(accountAddress: string, ownerGuid: BigNumberish): Call;
7895
7904
 
7896
7905
  declare function buildDeployAccountParams(ownerPubkey: BigNumberish, salt?: BigNumberish): DeployAccountContractPayload;
7897
7906
 
@@ -7916,19 +7925,10 @@ interface EscapeInfo {
7916
7925
  }
7917
7926
  declare function decodeEscapeAndStatus(res: string[]): EscapeInfo;
7918
7927
  declare function getGuardians(provider: ProviderInterface, address: string): Promise<GuardianInfo[]>;
7928
+ declare function getOwners(provider: ProviderInterface, address: string): Promise<GuardianInfo[]>;
7919
7929
  declare function getEscape(provider: ProviderInterface, address: string): Promise<EscapeInfo>;
7920
7930
  declare function getEscapeSecurityPeriod(provider: ProviderInterface, address: string): Promise<number>;
7921
7931
 
7922
- /**
7923
- * Pure crypto primitives behind a passkey-sealed Starknet wallet — HKDF key
7924
- * derivation, AES-GCM seal/unseal, Stark keypair generation, Stark-curve
7925
- * signing. Deliberately excludes the WebAuthn calls (`navigator.credentials`)
7926
- * that produce the PRF secret these functions consume — that stays app-local
7927
- * because it's untestable in this SDK's Node-based test environment and
7928
- * because RP_NAME/PRF_SALT are legitimately per-app identity, not protocol
7929
- * facts. `hkdfInfo` is always an explicit caller-supplied parameter, never
7930
- * defaulted — see the design doc's "load-bearing constraint" for why.
7931
- */
7932
7932
  declare function deriveAesKey(prfSecret: Uint8Array, hkdfInfo: Uint8Array): Promise<CryptoKey>;
7933
7933
  declare function generateStarkKeyPair(): {
7934
7934
  privateKeyHex: string;
@@ -7947,4 +7947,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
7947
7947
 
7948
7948
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
7949
7949
 
7950
- 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, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
7950
+ 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, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type ExecuteIntentOpts, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type ReceiptProvider, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsoredCallRejectedError, type SponsoredExecuteConfig, type SponsoredExecuteResult, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, type TypedDataSigner, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
@@ -11698,17 +11698,79 @@ function computeAccountAddress(ownerPubkey, salt = 0) {
11698
11698
  );
11699
11699
  }
11700
11700
  var STARKNET_SIGNER_TYPE = "0x537461726b6e6574205369676e6572";
11701
+ var OPTION_NONE = "0x1";
11702
+ var OPTION_SOME = "0x0";
11703
+ var SIGNER_STARKNET = "0x0";
11701
11704
  function computeOwnerGuid(ownerPubkey) {
11702
11705
  return hash.computePoseidonHash(STARKNET_SIGNER_TYPE, num.toHex(ownerPubkey));
11703
11706
  }
11704
- function buildChangeOwnersCall(accountAddress, removeOwnerPubkey, addOwnerPubkey) {
11705
- const guidToRemove = computeOwnerGuid(removeOwnerPubkey);
11707
+ function changeOwners(accountAddress, guidsToRemove, pubkeysToAdd, ownerAlive) {
11706
11708
  return {
11707
11709
  contractAddress: accountAddress,
11708
11710
  entrypoint: "change_owners",
11709
- calldata: ["0x1", guidToRemove, "0x1", "0x0", num.toHex(addOwnerPubkey)]
11711
+ calldata: [
11712
+ num.toHex(guidsToRemove.length),
11713
+ ...guidsToRemove,
11714
+ num.toHex(pubkeysToAdd.length),
11715
+ ...pubkeysToAdd.flatMap((p) => [SIGNER_STARKNET, num.toHex(p)]),
11716
+ ...ownerAlive ? ownerAliveCalldata(ownerAlive) : [OPTION_NONE]
11717
+ ]
11710
11718
  };
11711
11719
  }
11720
+ function ownerAliveTypedData(newOwnerGuid, expiration, chainId) {
11721
+ return {
11722
+ types: {
11723
+ StarknetDomain: [
11724
+ { name: "name", type: "shortstring" },
11725
+ { name: "version", type: "shortstring" },
11726
+ { name: "chainId", type: "shortstring" },
11727
+ { name: "revision", type: "shortstring" }
11728
+ ],
11729
+ "Owner Alive": [
11730
+ { name: "Owner GUID", type: "felt" },
11731
+ { name: "Signature expiration", type: "timestamp" }
11732
+ ]
11733
+ },
11734
+ primaryType: "Owner Alive",
11735
+ domain: { name: "Owner Alive", version: "1", chainId, revision: "1" },
11736
+ message: { "Owner GUID": newOwnerGuid, "Signature expiration": expiration }
11737
+ };
11738
+ }
11739
+ function ownerAliveCalldata(proof) {
11740
+ if (proof.signature.length !== 2) {
11741
+ throw new Error("owner-alive proof needs an r and s from the incoming owner");
11742
+ }
11743
+ return [
11744
+ OPTION_SOME,
11745
+ SIGNER_STARKNET,
11746
+ num.toHex(proof.newOwnerPubkey),
11747
+ num.toHex(proof.signature[0]),
11748
+ num.toHex(proof.signature[1]),
11749
+ num.toHex(proof.expiration)
11750
+ ];
11751
+ }
11752
+ function buildChangeOwnersCall(accountAddress, removeOwnerPubkey, addOwnerPubkey, ownerAlive) {
11753
+ if (!ownerAlive) {
11754
+ throw new Error(
11755
+ "Handing an account over removes the signing owner, so the account requires an owner-alive proof from the incoming owner. Sign ownerAliveTypedData with the new owner key and pass it here."
11756
+ );
11757
+ }
11758
+ return changeOwners(
11759
+ accountAddress,
11760
+ [computeOwnerGuid(removeOwnerPubkey)],
11761
+ [addOwnerPubkey],
11762
+ ownerAlive
11763
+ );
11764
+ }
11765
+ function buildAddOwnerCall(accountAddress, addOwnerPubkey) {
11766
+ return changeOwners(accountAddress, [], [addOwnerPubkey]);
11767
+ }
11768
+ function buildRemoveOwnerCall(accountAddress, removeOwnerPubkey) {
11769
+ return changeOwners(accountAddress, [computeOwnerGuid(removeOwnerPubkey)], []);
11770
+ }
11771
+ function buildRemoveOwnerByGuidCall(accountAddress, ownerGuid) {
11772
+ return changeOwners(accountAddress, [num.toHex(ownerGuid)], []);
11773
+ }
11712
11774
  function buildDeployAccountParams(ownerPubkey, salt = 0) {
11713
11775
  return {
11714
11776
  classHash: STARKNET_MEDIAWALLET_CLASS_HASH,
@@ -11779,6 +11841,14 @@ async function getGuardians(provider, address) {
11779
11841
  });
11780
11842
  return decodeGuardiansInfo(res);
11781
11843
  }
11844
+ async function getOwners(provider, address) {
11845
+ const res = await provider.callContract({
11846
+ contractAddress: norm(address),
11847
+ entrypoint: "get_owners_info",
11848
+ calldata: []
11849
+ });
11850
+ return decodeGuardiansInfo(res);
11851
+ }
11782
11852
  async function getEscape(provider, address) {
11783
11853
  const res = await provider.callContract({
11784
11854
  contractAddress: norm(address),
@@ -11843,6 +11913,6 @@ function signWithPrivateKey(privateKeyHex, msgHash) {
11843
11913
  return [num.toHex(sig.r), num.toHex(sig.s)];
11844
11914
  }
11845
11915
 
11846
- export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SUGGESTED_DEFAULT_PRICE, SponsoredCallRejectedError, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
11916
+ export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, InvalidStarkPrivateKeyError, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SUGGESTED_DEFAULT_PRICE, SponsoredCallRejectedError, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, assertTransactionSucceeded, build1155CancellationTypedData, build1155OrderTypedData, buildAddOwnerCall, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildRemoveOwnerByGuidCall, buildRemoveOwnerCall, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, confirmIntentBestEffort, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, executeIntent, executeIntents, executeSponsored, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getOwners, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerAliveTypedData, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, starkKeyPairFromPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
11847
11917
  //# sourceMappingURL=index.js.map
11848
11918
  //# sourceMappingURL=index.js.map