@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @zoralabs/protocol-sdk@0.7.4 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-sdk
2
+ > @zoralabs/protocol-sdk@0.7.5 build /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-sdk
3
3
  > pnpm tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,9 +10,9 @@ CLI Target: es2021
10
10
  CLI Cleaning output folder
11
11
  CJS Build start
12
12
  ESM Build start
13
- ESM dist/index.js 179.77 KB
14
- ESM dist/index.js.map 368.18 KB
15
- ESM ⚡️ Build success in 293ms
16
- CJS dist/index.cjs 185.58 KB
17
- CJS dist/index.cjs.map 370.26 KB
18
- CJS ⚡️ Build success in 328ms
13
+ ESM dist/index.js 178.86 KB
14
+ ESM dist/index.js.map 364.87 KB
15
+ ESM ⚡️ Build success in 299ms
16
+ CJS dist/index.cjs 184.43 KB
17
+ CJS dist/index.cjs.map 366.90 KB
18
+ CJS ⚡️ Build success in 355ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @zoralabs/protocol-sdk
2
2
 
3
+ ## 0.7.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 12909b5b: Renamed Mints to Sparks
8
+ - Updated dependencies [12909b5b]
9
+ - Updated dependencies [58914a0c]
10
+ - @zoralabs/protocol-deployments@0.2.2
11
+
3
12
  ## 0.7.4
4
13
 
5
14
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1973,7 +1973,6 @@ __export(src_exports, {
1973
1973
  isPremintConfigV1: () => isPremintConfigV1,
1974
1974
  isPremintConfigV2: () => isPremintConfigV2,
1975
1975
  isValidSignature: () => isValidSignature,
1976
- makeCallWithEthSafeTransferData: () => makeCallWithEthSafeTransferData,
1977
1976
  makeMediaTokenMetadata: () => makeMediaTokenMetadata,
1978
1977
  makeMintRewardsRecipient: () => makeMintRewardsRecipient,
1979
1978
  makeNewPremint: () => makeNewPremint,
@@ -1992,8 +1991,7 @@ __export(src_exports, {
1992
1991
  supportedPremintVersions: () => supportedPremintVersions,
1993
1992
  supportsPremintVersion: () => supportsPremintVersion,
1994
1993
  toContractCreationConfigOrAddress: () => toContractCreationConfigOrAddress,
1995
- tryRecoverPremintSigner: () => tryRecoverPremintSigner,
1996
- unwrapAndForwardEthPermitAndTypedDataDefinition: () => unwrapAndForwardEthPermitAndTypedDataDefinition
1994
+ tryRecoverPremintSigner: () => tryRecoverPremintSigner
1997
1995
  });
1998
1996
  module.exports = __toCommonJS(src_exports);
1999
1997
 
@@ -4569,7 +4567,7 @@ async function createNew1155Token({
4569
4567
  };
4570
4568
  }
4571
4569
 
4572
- // src/mints/mints-queries.ts
4570
+ // src/sparks/mints-queries.ts
4573
4571
  var getMintsAccountBalanceWithPriceQuery = (account) => {
4574
4572
  const query = `
4575
4573
  query GetMintAccountBalances($account: String!) {
@@ -4625,21 +4623,22 @@ var sumBalances = (mintAccountBalances) => {
4625
4623
  }, BigInt(0));
4626
4624
  };
4627
4625
 
4628
- // src/mints/mints-contracts.ts
4626
+ // src/sparks/sparks-contracts.ts
4629
4627
  var import_protocol_deployments10 = require("@zoralabs/protocol-deployments");
4630
4628
  var import_viem9 = require("viem");
4631
4629
  var addressOrAccountAddress = (address) => typeof address === "string" ? address : address.address;
4632
4630
  var mintWithEthParams = ({
4631
+ tokenId,
4633
4632
  quantity,
4634
4633
  recipient,
4635
4634
  chainId,
4636
4635
  pricePerMint,
4637
4636
  account
4638
4637
  }) => makeContractParameters({
4639
- abi: import_protocol_deployments10.zoraMintsManagerImplConfig.abi,
4640
- address: import_protocol_deployments10.zoraMintsManagerImplConfig.address[chainId],
4638
+ abi: import_protocol_deployments10.zoraSparksManagerImplABI,
4639
+ address: import_protocol_deployments10.zoraSparksManagerImplAddress[chainId],
4641
4640
  functionName: "mintWithEth",
4642
- args: [quantity, recipient || addressOrAccountAddress(account)],
4641
+ args: [tokenId, quantity, recipient || addressOrAccountAddress(account)],
4643
4642
  value: pricePerMint * quantity,
4644
4643
  account
4645
4644
  });
@@ -4856,38 +4855,6 @@ function decodeCallFailedError(error) {
4856
4855
  });
4857
4856
  }
4858
4857
 
4859
- // src/mints/mints-eth-unwrapper-and-caller.ts
4860
- var import_protocol_deployments11 = require("@zoralabs/protocol-deployments");
4861
- var import_viem10 = require("viem");
4862
- var makeCallWithEthSafeTransferData = ({
4863
- address: addressToCall,
4864
- call: functionToCall,
4865
- value: valueToSend
4866
- }) => (0, import_viem10.encodeFunctionData)({
4867
- abi: import_protocol_deployments11.iUnwrapAndForwardActionABI,
4868
- functionName: "callWithEth",
4869
- args: [addressToCall, functionToCall, valueToSend]
4870
- });
4871
- var unwrapAndForwardEthPermitAndTypedDataDefinition = ({
4872
- chainId,
4873
- tokenIds,
4874
- quantities,
4875
- from: from2,
4876
- callWithEth,
4877
- safeTransferData,
4878
- deadline,
4879
- nonce
4880
- }) => makePermitTransferBatchAndTypeData({
4881
- mintsOwner: from2,
4882
- chainId,
4883
- deadline,
4884
- tokenIds,
4885
- quantities,
4886
- safeTransferData: safeTransferData || makeCallWithEthSafeTransferData(callWithEth),
4887
- to: import_protocol_deployments11.mintsEthUnwrapperAndCallerAddress[chainId],
4888
- nonce
4889
- });
4890
-
4891
4858
  // src/sdk.ts
4892
4859
  function createCreatorClient(clientConfig) {
4893
4860
  const premintClient = new PremintClient({
@@ -6167,7 +6134,6 @@ async function generateTextNftMetadataFiles(text) {
6167
6134
  isPremintConfigV1,
6168
6135
  isPremintConfigV2,
6169
6136
  isValidSignature,
6170
- makeCallWithEthSafeTransferData,
6171
6137
  makeMediaTokenMetadata,
6172
6138
  makeMintRewardsRecipient,
6173
6139
  makeNewPremint,
@@ -6186,7 +6152,6 @@ async function generateTextNftMetadataFiles(text) {
6186
6152
  supportedPremintVersions,
6187
6153
  supportsPremintVersion,
6188
6154
  toContractCreationConfigOrAddress,
6189
- tryRecoverPremintSigner,
6190
- unwrapAndForwardEthPermitAndTypedDataDefinition
6155
+ tryRecoverPremintSigner
6191
6156
  });
6192
6157
  //# sourceMappingURL=index.cjs.map