@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.
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({
@@ -4922,7 +4890,7 @@ function isArweaveURL(url) {
4922
4890
  return url && typeof url === "string" ? url.startsWith("ar://") : false;
4923
4891
  }
4924
4892
 
4925
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bytes.js
4893
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bytes.js
4926
4894
  var empty = new Uint8Array(0);
4927
4895
  function equals(aa, bb) {
4928
4896
  if (aa === bb)
@@ -4948,7 +4916,7 @@ function coerce4(o) {
4948
4916
  throw new Error("Unknown type, must be binary type");
4949
4917
  }
4950
4918
 
4951
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/vendor/base-x.js
4919
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/vendor/base-x.js
4952
4920
  function base2(ALPHABET, name) {
4953
4921
  if (ALPHABET.length >= 255) {
4954
4922
  throw new TypeError("Alphabet too long");
@@ -5084,7 +5052,7 @@ var src = base2;
5084
5052
  var _brrp__multiformats_scope_baseX = src;
5085
5053
  var base_x_default = _brrp__multiformats_scope_baseX;
5086
5054
 
5087
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bases/base.js
5055
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bases/base.js
5088
5056
  var Encoder = class {
5089
5057
  constructor(name, prefix, baseEncode) {
5090
5058
  __publicField(this, "name");
@@ -5255,7 +5223,7 @@ function rfc4648({ name, prefix, bitsPerChar, alphabet }) {
5255
5223
  });
5256
5224
  }
5257
5225
 
5258
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bases/base32.js
5226
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bases/base32.js
5259
5227
  var base32 = rfc4648({
5260
5228
  prefix: "b",
5261
5229
  name: "base32",
@@ -5311,7 +5279,7 @@ var base32z = rfc4648({
5311
5279
  bitsPerChar: 5
5312
5280
  });
5313
5281
 
5314
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/bases/base58.js
5282
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/bases/base58.js
5315
5283
  var base58btc = baseX({
5316
5284
  name: "base58btc",
5317
5285
  prefix: "z",
@@ -5323,7 +5291,7 @@ var base58flickr = baseX({
5323
5291
  alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
5324
5292
  });
5325
5293
 
5326
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/vendor/varint.js
5294
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/vendor/varint.js
5327
5295
  var encode_1 = encode2;
5328
5296
  var MSB = 128;
5329
5297
  var REST = 127;
@@ -5382,7 +5350,7 @@ var varint = {
5382
5350
  var _brrp_varint = varint;
5383
5351
  var varint_default = _brrp_varint;
5384
5352
 
5385
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/varint.js
5353
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/varint.js
5386
5354
  function decode3(data, offset = 0) {
5387
5355
  const code = varint_default.decode(data, offset);
5388
5356
  return [code, varint_default.decode.bytes];
@@ -5395,7 +5363,7 @@ function encodingLength(int) {
5395
5363
  return varint_default.encodingLength(int);
5396
5364
  }
5397
5365
 
5398
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/hashes/digest.js
5366
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/hashes/digest.js
5399
5367
  function create(code, digest) {
5400
5368
  const size = digest.byteLength;
5401
5369
  const sizeOffset = encodingLength(code);
@@ -5440,7 +5408,7 @@ var Digest = class {
5440
5408
  }
5441
5409
  };
5442
5410
 
5443
- // ../../node_modules/.pnpm/multiformats@13.2.0/node_modules/multiformats/dist/src/cid.js
5411
+ // ../../node_modules/.pnpm/multiformats@13.2.1/node_modules/multiformats/dist/src/cid.js
5444
5412
  function format(link, base3) {
5445
5413
  const { bytes, version } = link;
5446
5414
  switch (version) {
@@ -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