@zoralabs/protocol-sdk 0.7.4 → 0.7.6

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.6 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
+ CJS dist/index.cjs 184.43 KB
14
+ CJS dist/index.cjs.map 366.90 KB
15
+ CJS ⚡️ Build success in 300ms
16
+ ESM dist/index.js 178.86 KB
17
+ ESM dist/index.js.map 364.87 KB
18
+ ESM ⚡️ Build success in 341ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @zoralabs/protocol-sdk
2
2
 
3
+ ## 0.7.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [58f59243]
8
+ - Updated dependencies [b5a7fac4]
9
+ - @zoralabs/protocol-deployments@0.3.0
10
+
11
+ ## 0.7.5
12
+
13
+ ### Patch Changes
14
+
15
+ - 12909b5b: Renamed Mints to Sparks
16
+ - Updated dependencies [12909b5b]
17
+ - Updated dependencies [58914a0c]
18
+ - @zoralabs/protocol-deployments@0.2.2
19
+
3
20
  ## 0.7.4
4
21
 
5
22
  ### 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({
@@ -4932,7 +4899,7 @@ function isArweaveURL(url) {
4932
4899
  return url && typeof url === "string" ? url.startsWith("ar://") : false;
4933
4900
  }
4934
4901
 
4935
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bytes.js
4902
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bytes.js
4936
4903
  var empty = new Uint8Array(0);
4937
4904
  function equals(aa, bb) {
4938
4905
  if (aa === bb)
@@ -4958,7 +4925,7 @@ function coerce4(o) {
4958
4925
  throw new Error("Unknown type, must be binary type");
4959
4926
  }
4960
4927
 
4961
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/vendor/base-x.js
4928
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/vendor/base-x.js
4962
4929
  function base2(ALPHABET, name) {
4963
4930
  if (ALPHABET.length >= 255) {
4964
4931
  throw new TypeError("Alphabet too long");
@@ -5094,7 +5061,7 @@ var src = base2;
5094
5061
  var _brrp__multiformats_scope_baseX = src;
5095
5062
  var base_x_default = _brrp__multiformats_scope_baseX;
5096
5063
 
5097
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bases/base.js
5064
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bases/base.js
5098
5065
  var Encoder = class {
5099
5066
  constructor(name, prefix, baseEncode) {
5100
5067
  __publicField(this, "name");
@@ -5265,7 +5232,7 @@ function rfc4648({ name, prefix, bitsPerChar, alphabet }) {
5265
5232
  });
5266
5233
  }
5267
5234
 
5268
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bases/base32.js
5235
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bases/base32.js
5269
5236
  var base32 = rfc4648({
5270
5237
  prefix: "b",
5271
5238
  name: "base32",
@@ -5321,7 +5288,7 @@ var base32z = rfc4648({
5321
5288
  bitsPerChar: 5
5322
5289
  });
5323
5290
 
5324
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bases/base58.js
5291
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bases/base58.js
5325
5292
  var base58btc = baseX({
5326
5293
  name: "base58btc",
5327
5294
  prefix: "z",
@@ -5333,7 +5300,7 @@ var base58flickr = baseX({
5333
5300
  alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
5334
5301
  });
5335
5302
 
5336
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/vendor/varint.js
5303
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/vendor/varint.js
5337
5304
  var encode_1 = encode2;
5338
5305
  var MSB = 128;
5339
5306
  var REST = 127;
@@ -5392,7 +5359,7 @@ var varint = {
5392
5359
  var _brrp_varint = varint;
5393
5360
  var varint_default = _brrp_varint;
5394
5361
 
5395
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/varint.js
5362
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/varint.js
5396
5363
  function decode3(data, offset = 0) {
5397
5364
  const code = varint_default.decode(data, offset);
5398
5365
  return [code, varint_default.decode.bytes];
@@ -5405,7 +5372,7 @@ function encodingLength(int) {
5405
5372
  return varint_default.encodingLength(int);
5406
5373
  }
5407
5374
 
5408
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/hashes/digest.js
5375
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/hashes/digest.js
5409
5376
  function create(code, digest) {
5410
5377
  const size = digest.byteLength;
5411
5378
  const sizeOffset = encodingLength(code);
@@ -5450,7 +5417,7 @@ var Digest = class {
5450
5417
  }
5451
5418
  };
5452
5419
 
5453
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/cid.js
5420
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/cid.js
5454
5421
  function format(link, base3) {
5455
5422
  const { bytes, version } = link;
5456
5423
  switch (version) {
@@ -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