@zoralabs/protocol-sdk 0.7.4 → 0.7.5

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.d.ts CHANGED
@@ -6,9 +6,8 @@ export * from "./premint/conversions";
6
6
  export * from "./mint/subgraph-mint-getter";
7
7
  export * from "./mint/mint-client";
8
8
  export * from "./create/1155-create-helper";
9
- export * from "./mints/mints-queries";
10
- export * from "./mints/mints-contracts";
11
- export * from "./mints/mints-eth-unwrapper-and-caller";
9
+ export * from "./sparks/mints-queries";
10
+ export * from "./sparks/sparks-contracts";
12
11
  export { type ContractCreationConfigWithOptionalAdditionalAdmins, type ContractCreationConfigOrAddress, type ContractCreationConfigAndAddress, } from "./premint/contract-types";
13
12
  export * from "./create/types";
14
13
  export * from "./sdk";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AAEzC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,yBAAyB,CAAC;AAExC,cAAc,wCAAwC,CAAC;AAEvD,OAAO,EACL,KAAK,kDAAkD,EACvD,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,GACtC,MAAM,0BAA0B,CAAC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,OAAO,CAAC;AAEtB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AAEzC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,0BAA0B,CAAC;AAEzC,cAAc,8BAA8B,CAAC;AAE7C,cAAc,uBAAuB,CAAC;AAEtC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,oBAAoB,CAAC;AAEnC,cAAc,6BAA6B,CAAC;AAE5C,cAAc,wBAAwB,CAAC;AAEvC,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EACL,KAAK,kDAAkD,EACvD,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,GACtC,MAAM,0BAA0B,CAAC;AAElC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,OAAO,CAAC;AAEtB,cAAc,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -4545,7 +4545,7 @@ async function createNew1155Token({
4545
4545
  };
4546
4546
  }
4547
4547
 
4548
- // src/mints/mints-queries.ts
4548
+ // src/sparks/mints-queries.ts
4549
4549
  var getMintsAccountBalanceWithPriceQuery = (account) => {
4550
4550
  const query = `
4551
4551
  query GetMintAccountBalances($account: String!) {
@@ -4601,14 +4601,16 @@ var sumBalances = (mintAccountBalances) => {
4601
4601
  }, BigInt(0));
4602
4602
  };
4603
4603
 
4604
- // src/mints/mints-contracts.ts
4604
+ // src/sparks/sparks-contracts.ts
4605
4605
  import {
4606
4606
  mintsSafeTransferBatchTypedDataDefinition,
4607
4607
  mintsSafeTransferTypedDataDefinition,
4608
4608
  zoraMints1155Config,
4609
4609
  zoraMintsManagerImplABI,
4610
4610
  zoraMintsManagerImplAddress,
4611
- zoraMintsManagerImplConfig
4611
+ zoraMintsManagerImplConfig,
4612
+ zoraSparksManagerImplABI,
4613
+ zoraSparksManagerImplAddress
4612
4614
  } from "@zoralabs/protocol-deployments";
4613
4615
  import {
4614
4616
  decodeErrorResult,
@@ -4617,16 +4619,17 @@ import {
4617
4619
  } from "viem";
4618
4620
  var addressOrAccountAddress = (address) => typeof address === "string" ? address : address.address;
4619
4621
  var mintWithEthParams = ({
4622
+ tokenId,
4620
4623
  quantity,
4621
4624
  recipient,
4622
4625
  chainId,
4623
4626
  pricePerMint,
4624
4627
  account
4625
4628
  }) => makeContractParameters({
4626
- abi: zoraMintsManagerImplConfig.abi,
4627
- address: zoraMintsManagerImplConfig.address[chainId],
4629
+ abi: zoraSparksManagerImplABI,
4630
+ address: zoraSparksManagerImplAddress[chainId],
4628
4631
  functionName: "mintWithEth",
4629
- args: [quantity, recipient || addressOrAccountAddress(account)],
4632
+ args: [tokenId, quantity, recipient || addressOrAccountAddress(account)],
4630
4633
  value: pricePerMint * quantity,
4631
4634
  account
4632
4635
  });
@@ -4843,41 +4846,6 @@ function decodeCallFailedError(error) {
4843
4846
  });
4844
4847
  }
4845
4848
 
4846
- // src/mints/mints-eth-unwrapper-and-caller.ts
4847
- import {
4848
- iUnwrapAndForwardActionABI,
4849
- mintsEthUnwrapperAndCallerAddress
4850
- } from "@zoralabs/protocol-deployments";
4851
- import { encodeFunctionData as encodeFunctionData3 } from "viem";
4852
- var makeCallWithEthSafeTransferData = ({
4853
- address: addressToCall,
4854
- call: functionToCall,
4855
- value: valueToSend
4856
- }) => encodeFunctionData3({
4857
- abi: iUnwrapAndForwardActionABI,
4858
- functionName: "callWithEth",
4859
- args: [addressToCall, functionToCall, valueToSend]
4860
- });
4861
- var unwrapAndForwardEthPermitAndTypedDataDefinition = ({
4862
- chainId,
4863
- tokenIds,
4864
- quantities,
4865
- from: from2,
4866
- callWithEth,
4867
- safeTransferData,
4868
- deadline,
4869
- nonce
4870
- }) => makePermitTransferBatchAndTypeData({
4871
- mintsOwner: from2,
4872
- chainId,
4873
- deadline,
4874
- tokenIds,
4875
- quantities,
4876
- safeTransferData: safeTransferData || makeCallWithEthSafeTransferData(callWithEth),
4877
- to: mintsEthUnwrapperAndCallerAddress[chainId],
4878
- nonce
4879
- });
4880
-
4881
4849
  // src/sdk.ts
4882
4850
  function createCreatorClient(clientConfig) {
4883
4851
  const premintClient = new PremintClient({
@@ -6156,7 +6124,6 @@ export {
6156
6124
  isPremintConfigV1,
6157
6125
  isPremintConfigV2,
6158
6126
  isValidSignature,
6159
- makeCallWithEthSafeTransferData,
6160
6127
  makeMediaTokenMetadata,
6161
6128
  makeMintRewardsRecipient,
6162
6129
  makeNewPremint,
@@ -6175,7 +6142,6 @@ export {
6175
6142
  supportedPremintVersions,
6176
6143
  supportsPremintVersion,
6177
6144
  toContractCreationConfigOrAddress,
6178
- tryRecoverPremintSigner,
6179
- unwrapAndForwardEthPermitAndTypedDataDefinition
6145
+ tryRecoverPremintSigner
6180
6146
  };
6181
6147
  //# sourceMappingURL=index.js.map