@hypercerts-org/marketplace-sdk 0.0.18 → 0.0.20

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,6 +1,6 @@
1
- import { BigNumberish, ContractTransactionResponse, Overrides, TypedDataDomain, Provider, Signer } from "ethers";
1
+ import { BigNumberish, ContractTransactionResponse, Overrides, Provider, Signer, TypedDataDomain } from "ethers";
2
2
  import * as api from "./utils/api";
3
- import { Addresses, Maker, Taker, ChainId, CreateMakerInput, CreateMakerAskOutput, CreateMakerBidOutput, CreateMakerCollectionOfferInput, CreateMakerCollectionOfferWithProofInput, MerkleTree, ContractMethods, OrderValidatorCode, BatchTransferItem, SignMerkleTreeOrdersOutput, StrategyType, StrategyInfo } from "./types";
3
+ import { Addresses, BatchTransferItem, ChainId, ContractMethods, CreateMakerAskOutput, CreateMakerBidOutput, CreateMakerCollectionOfferInput, CreateMakerCollectionOfferWithProofInput, CreateMakerInput, Maker, MerkleTree, OrderValidatorCode, SignMerkleTreeOrdersOutput, StrategyInfo, StrategyType, Taker } from "./types";
4
4
  /**
5
5
  * LooksRare
6
6
  * This class provides helpers to interact with the LooksRare V2 contracts
@@ -83,7 +83,7 @@ export declare class HypercertExchangeClient {
83
83
  * Create a taker ask order for collection order.
84
84
  * @see this.createTaker
85
85
  * @see this.createMakerCollectionOffer
86
- * @param makerBid Maker bid that will be used as counterparty for the taker
86
+ * @param maker Maker bid that will be used as counterparty for the taker
87
87
  * @param itemId Token id to use as a counterparty for the collection order
88
88
  * @param recipient Recipient address of the taker (if none, it will use the sender)
89
89
  * @returns Taker object
@@ -93,7 +93,7 @@ export declare class HypercertExchangeClient {
93
93
  * Create a taker ask to fulfill a collection order (maker bid) created with a whitelist of item ids
94
94
  * @see this.createTaker
95
95
  * @see this.createMakerCollectionOfferWithMerkleTree
96
- * @param makerBid Maker bid that will be used as counterparty for the taker
96
+ * @param maker Maker bid that will be used as counterparty for the taker
97
97
  * @param itemId Token id to use as a counterparty for the collection order
98
98
  * @param itemIds List of token ids used during the maker creation
99
99
  * @param recipient Recipient address of the taker (if none, it will use the sender)
@@ -115,11 +115,10 @@ export declare class HypercertExchangeClient {
115
115
  signMultipleMakerOrders(makerOrders: Maker[]): Promise<SignMerkleTreeOrdersOutput>;
116
116
  /**
117
117
  * Execute a trade
118
- * @param makerBid Maker order
118
+ * @param maker Maker order
119
119
  * @param taker Taker order
120
120
  * @param signature Signature of the maker order
121
121
  * @param merkleTree If the maker has been signed with a merkle tree
122
- * @param affiliate Affiliate address if applicable
123
122
  * @returns ContractMethods
124
123
  */
125
124
  executeOrder(maker: Maker, taker: Taker, signature: string, merkleTree?: MerkleTree, overrides?: Overrides): ContractMethods;
@@ -127,7 +126,6 @@ export declare class HypercertExchangeClient {
127
126
  * Execute several orders
128
127
  * @param orders List of orders data
129
128
  * @param isAtomic Should the transaction revert or not if a trade fails
130
- * @param affiliate Affiliate address
131
129
  * @param overrides Call overrides
132
130
  * @returns ContractMethods
133
131
  */
@@ -223,16 +221,37 @@ export declare class HypercertExchangeClient {
223
221
  * @param price Price of the fractions in wei
224
222
  * @param startTime Timestamp in seconds when the order becomes valid
225
223
  * @param endTime Timestamp in seconds when the order becomes invalid
224
+ * @param currency Currency used to buy the fractions (default to WETH)
226
225
  * @param additionalParameters Additional parameters used to support complex orders
227
226
  */
228
- createDirectFractionsSaleMakerAsk({ itemIds, price, startTime, endTime, additionalParameters, }: Omit<CreateMakerInput, "strategyId" | "collectionType" | "collection" | "subsetNonce" | "orderNonce" | "amounts" | "currency">): Promise<CreateMakerAskOutput>;
229
- createFractionalSaleMakerAsk({ itemIds, price, startTime, endTime, maxUnitAmount, minUnitAmount, minUnitsToKeep, sellLeftoverFraction, root, }: Omit<CreateMakerInput, "strategyId" | "collectionType" | "collection" | "subsetNonce" | "orderNonce" | "amounts" | "currency" | "additionalParameters"> & {
227
+ createDirectFractionsSaleMakerAsk({ itemIds, price, startTime, endTime, currency, additionalParameters, }: Omit<CreateMakerInput, "strategyId" | "collectionType" | "collection" | "subsetNonce" | "orderNonce" | "amounts">): Promise<CreateMakerAskOutput>;
228
+ /**
229
+ * Create a maker ask to let the buyer decide how much of the fraction they want to buy
230
+ * @param itemIds Token IDs of the fractions to be sold
231
+ * @param price Price of one unit in wei
232
+ * @param startTime Timestamp in seconds when the order becomes valid
233
+ * @param endTime Timestamp in seconds when the order becomes invalid
234
+ * @param currency Currency used to buy the fractions (default to WETH)
235
+ * @param maxUnitAmount Maximum amount of units that can be bought in a single transaction
236
+ * @param minUnitAmount Minimum amount of units that can be bought in a single transaction
237
+ * @param minUnitsToKeep Minimum amount of units that the seller wants to keep
238
+ * @param sellLeftoverFraction Whether or not the seller wants to sell the leftover units
239
+ * @param root Merkle tree root (optional)
240
+ */
241
+ createFractionalSaleMakerAsk({ itemIds, price, startTime, endTime, currency, maxUnitAmount, minUnitAmount, minUnitsToKeep, sellLeftoverFraction, root, }: Omit<CreateMakerInput, "strategyId" | "collectionType" | "collection" | "subsetNonce" | "orderNonce" | "amounts" | "additionalParameters"> & {
230
242
  minUnitAmount: BigNumberish;
231
243
  maxUnitAmount: BigNumberish;
232
244
  minUnitsToKeep: BigNumberish;
233
245
  sellLeftoverFraction: boolean;
234
246
  root?: string;
235
247
  }): Promise<CreateMakerAskOutput>;
248
+ /**
249
+ * Create a taker bid for buying a fraction of an open fractional sale
250
+ * @param maker Maker order
251
+ * @param recipient Recipient address of the taker (if none, it will use the sender)
252
+ * @param unitAmount Amount of units to buy
253
+ * @param pricePerUnit Price per unit in wei
254
+ */
236
255
  createFractionalSaleTakerBid(maker: Maker, recipient: string | undefined, unitAmount: BigNumberish, pricePerUnit: BigNumberish): Taker;
237
256
  /**
238
257
  * Register the order with hypercerts marketplace API.
package/dist/index.cjs.js CHANGED
@@ -4804,9 +4804,9 @@ const contractName = "LooksRareProtocol";
4804
4804
  */
4805
4805
  const version = 2;
4806
4806
 
4807
- const HYPERCERTS_MARKETPLACE_API_URL = "http://localhost:3000/api";
4808
- const SUPABASE_HYPERCERTS_URL = "https://clagjjfinooizoqdkvqc.supabase.co";
4809
- const SUPABASE_HYPERCERTS_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNsYWdqamZpbm9vaXpvcWRrdnFjIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzY5NTAxNDAsImV4cCI6MTk5MjUyNjE0MH0.LOIW3NcYEfF7w893PS3Ne1VrntACE3OPeSRFkspvyqw";
4807
+ const HYPERCERTS_MARKETPLACE_API_URL = process.env.HYPERCERTS_MARKETPLACE_API_URL;
4808
+ const SUPABASE_HYPERCERTS_URL = process.env.SUPABASE_HYPERCERTS_URL;
4809
+ const SUPABASE_HYPERCERTS_ANON_KEY = process.env.SUPABASE_HYPERCERTS_ANON_KEY;
4810
4810
  const supabaseHypercerts = supabaseJs.createClient(SUPABASE_HYPERCERTS_URL, SUPABASE_HYPERCERTS_ANON_KEY);
4811
4811
  /**
4812
4812
  * Fetches order nonce from api
@@ -4890,7 +4890,6 @@ class HypercertExchangeClient {
4890
4890
  constructor(chainId, provider, signer, override) {
4891
4891
  this.chainId = chainId;
4892
4892
  this.addresses = override ?? addressesByNetwork[this.chainId];
4893
- console.log("Addresses", this.addresses);
4894
4893
  this.signer = signer;
4895
4894
  this.provider = provider;
4896
4895
  this.api = api;
@@ -5045,17 +5044,16 @@ class HypercertExchangeClient {
5045
5044
  * @returns Taker object
5046
5045
  */
5047
5046
  createTaker(maker, recipient = ethers.ZeroAddress, additionalParameters = []) {
5048
- const order = {
5047
+ return {
5049
5048
  recipient: recipient,
5050
5049
  additionalParameters: encodeParams(additionalParameters, getTakerParamsTypes(maker.strategyId)),
5051
5050
  };
5052
- return order;
5053
5051
  }
5054
5052
  /**
5055
5053
  * Create a taker ask order for collection order.
5056
5054
  * @see this.createTaker
5057
5055
  * @see this.createMakerCollectionOffer
5058
- * @param makerBid Maker bid that will be used as counterparty for the taker
5056
+ * @param maker Maker bid that will be used as counterparty for the taker
5059
5057
  * @param itemId Token id to use as a counterparty for the collection order
5060
5058
  * @param recipient Recipient address of the taker (if none, it will use the sender)
5061
5059
  * @returns Taker object
@@ -5073,7 +5071,7 @@ class HypercertExchangeClient {
5073
5071
  * Create a taker ask to fulfill a collection order (maker bid) created with a whitelist of item ids
5074
5072
  * @see this.createTaker
5075
5073
  * @see this.createMakerCollectionOfferWithMerkleTree
5076
- * @param makerBid Maker bid that will be used as counterparty for the taker
5074
+ * @param maker Maker bid that will be used as counterparty for the taker
5077
5075
  * @param itemId Token id to use as a counterparty for the collection order
5078
5076
  * @param itemIds List of token ids used during the maker creation
5079
5077
  * @param recipient Recipient address of the taker (if none, it will use the sender)
@@ -5123,11 +5121,10 @@ class HypercertExchangeClient {
5123
5121
  }
5124
5122
  /**
5125
5123
  * Execute a trade
5126
- * @param makerBid Maker order
5124
+ * @param maker Maker order
5127
5125
  * @param taker Taker order
5128
5126
  * @param signature Signature of the maker order
5129
5127
  * @param merkleTree If the maker has been signed with a merkle tree
5130
- * @param affiliate Affiliate address if applicable
5131
5128
  * @returns ContractMethods
5132
5129
  */
5133
5130
  executeOrder(maker, taker, signature, merkleTree = defaultMerkleTree, overrides) {
@@ -5139,7 +5136,6 @@ class HypercertExchangeClient {
5139
5136
  * Execute several orders
5140
5137
  * @param orders List of orders data
5141
5138
  * @param isAtomic Should the transaction revert or not if a trade fails
5142
- * @param affiliate Affiliate address
5143
5139
  * @param overrides Call overrides
5144
5140
  * @returns ContractMethods
5145
5141
  */
@@ -5278,9 +5274,10 @@ class HypercertExchangeClient {
5278
5274
  * @param price Price of the fractions in wei
5279
5275
  * @param startTime Timestamp in seconds when the order becomes valid
5280
5276
  * @param endTime Timestamp in seconds when the order becomes invalid
5277
+ * @param currency Currency used to buy the fractions (default to WETH)
5281
5278
  * @param additionalParameters Additional parameters used to support complex orders
5282
5279
  */
5283
- async createDirectFractionsSaleMakerAsk({ itemIds, price, startTime, endTime, additionalParameters = [], }) {
5280
+ async createDirectFractionsSaleMakerAsk({ itemIds, price, startTime, endTime, currency = this.addresses.WETH, additionalParameters = [], }) {
5284
5281
  const address = await this.signer?.getAddress();
5285
5282
  if (!address) {
5286
5283
  throw new Error("No signer address could be determined");
@@ -5297,7 +5294,7 @@ class HypercertExchangeClient {
5297
5294
  collectionType: 2,
5298
5295
  collection: this.addresses.MINTER,
5299
5296
  subsetNonce: 0,
5300
- currency: this.addresses.WETH,
5297
+ currency,
5301
5298
  amounts,
5302
5299
  orderNonce: nonce_counter.toString(),
5303
5300
  // User specified
@@ -5308,7 +5305,20 @@ class HypercertExchangeClient {
5308
5305
  additionalParameters,
5309
5306
  });
5310
5307
  }
5311
- async createFractionalSaleMakerAsk({ itemIds, price, startTime, endTime, maxUnitAmount, minUnitAmount, minUnitsToKeep, sellLeftoverFraction, root, }) {
5308
+ /**
5309
+ * Create a maker ask to let the buyer decide how much of the fraction they want to buy
5310
+ * @param itemIds Token IDs of the fractions to be sold
5311
+ * @param price Price of one unit in wei
5312
+ * @param startTime Timestamp in seconds when the order becomes valid
5313
+ * @param endTime Timestamp in seconds when the order becomes invalid
5314
+ * @param currency Currency used to buy the fractions (default to WETH)
5315
+ * @param maxUnitAmount Maximum amount of units that can be bought in a single transaction
5316
+ * @param minUnitAmount Minimum amount of units that can be bought in a single transaction
5317
+ * @param minUnitsToKeep Minimum amount of units that the seller wants to keep
5318
+ * @param sellLeftoverFraction Whether or not the seller wants to sell the leftover units
5319
+ * @param root Merkle tree root (optional)
5320
+ */
5321
+ async createFractionalSaleMakerAsk({ itemIds, price, startTime, endTime, currency = this.addresses.WETH, maxUnitAmount, minUnitAmount, minUnitsToKeep, sellLeftoverFraction, root, }) {
5312
5322
  const address = await this.signer?.getAddress();
5313
5323
  if (!address) {
5314
5324
  throw new Error("No signer address could be determined");
@@ -5324,7 +5334,7 @@ class HypercertExchangeClient {
5324
5334
  collectionType: 2,
5325
5335
  collection: this.addresses.MINTER,
5326
5336
  subsetNonce: 0,
5327
- currency: this.addresses.WETH,
5337
+ currency,
5328
5338
  amounts,
5329
5339
  orderNonce: nonce_counter.toString(),
5330
5340
  // User specified
@@ -5346,12 +5356,18 @@ class HypercertExchangeClient {
5346
5356
  additionalParameters: [minUnitAmount, maxUnitAmount, minUnitsToKeep, sellLeftoverFraction],
5347
5357
  });
5348
5358
  }
5359
+ /**
5360
+ * Create a taker bid for buying a fraction of an open fractional sale
5361
+ * @param maker Maker order
5362
+ * @param recipient Recipient address of the taker (if none, it will use the sender)
5363
+ * @param unitAmount Amount of units to buy
5364
+ * @param pricePerUnit Price per unit in wei
5365
+ */
5349
5366
  createFractionalSaleTakerBid(maker, recipient = ethers.ZeroAddress, unitAmount, pricePerUnit) {
5350
- const order = {
5367
+ return {
5351
5368
  recipient: recipient,
5352
5369
  additionalParameters: encodeParams([unitAmount, pricePerUnit], getTakerParamsTypes(maker.strategyId)),
5353
5370
  };
5354
- return order;
5355
5371
  }
5356
5372
  /**
5357
5373
  * Register the order with hypercerts marketplace API.
package/dist/index.esm.js CHANGED
@@ -4802,9 +4802,9 @@ const contractName = "LooksRareProtocol";
4802
4802
  */
4803
4803
  const version = 2;
4804
4804
 
4805
- const HYPERCERTS_MARKETPLACE_API_URL = "http://localhost:3000/api";
4806
- const SUPABASE_HYPERCERTS_URL = "https://clagjjfinooizoqdkvqc.supabase.co";
4807
- const SUPABASE_HYPERCERTS_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNsYWdqamZpbm9vaXpvcWRrdnFjIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NzY5NTAxNDAsImV4cCI6MTk5MjUyNjE0MH0.LOIW3NcYEfF7w893PS3Ne1VrntACE3OPeSRFkspvyqw";
4805
+ const HYPERCERTS_MARKETPLACE_API_URL = process.env.HYPERCERTS_MARKETPLACE_API_URL;
4806
+ const SUPABASE_HYPERCERTS_URL = process.env.SUPABASE_HYPERCERTS_URL;
4807
+ const SUPABASE_HYPERCERTS_ANON_KEY = process.env.SUPABASE_HYPERCERTS_ANON_KEY;
4808
4808
  const supabaseHypercerts = createClient(SUPABASE_HYPERCERTS_URL, SUPABASE_HYPERCERTS_ANON_KEY);
4809
4809
  /**
4810
4810
  * Fetches order nonce from api
@@ -4888,7 +4888,6 @@ class HypercertExchangeClient {
4888
4888
  constructor(chainId, provider, signer, override) {
4889
4889
  this.chainId = chainId;
4890
4890
  this.addresses = override ?? addressesByNetwork[this.chainId];
4891
- console.log("Addresses", this.addresses);
4892
4891
  this.signer = signer;
4893
4892
  this.provider = provider;
4894
4893
  this.api = api;
@@ -5043,17 +5042,16 @@ class HypercertExchangeClient {
5043
5042
  * @returns Taker object
5044
5043
  */
5045
5044
  createTaker(maker, recipient = ZeroAddress, additionalParameters = []) {
5046
- const order = {
5045
+ return {
5047
5046
  recipient: recipient,
5048
5047
  additionalParameters: encodeParams(additionalParameters, getTakerParamsTypes(maker.strategyId)),
5049
5048
  };
5050
- return order;
5051
5049
  }
5052
5050
  /**
5053
5051
  * Create a taker ask order for collection order.
5054
5052
  * @see this.createTaker
5055
5053
  * @see this.createMakerCollectionOffer
5056
- * @param makerBid Maker bid that will be used as counterparty for the taker
5054
+ * @param maker Maker bid that will be used as counterparty for the taker
5057
5055
  * @param itemId Token id to use as a counterparty for the collection order
5058
5056
  * @param recipient Recipient address of the taker (if none, it will use the sender)
5059
5057
  * @returns Taker object
@@ -5071,7 +5069,7 @@ class HypercertExchangeClient {
5071
5069
  * Create a taker ask to fulfill a collection order (maker bid) created with a whitelist of item ids
5072
5070
  * @see this.createTaker
5073
5071
  * @see this.createMakerCollectionOfferWithMerkleTree
5074
- * @param makerBid Maker bid that will be used as counterparty for the taker
5072
+ * @param maker Maker bid that will be used as counterparty for the taker
5075
5073
  * @param itemId Token id to use as a counterparty for the collection order
5076
5074
  * @param itemIds List of token ids used during the maker creation
5077
5075
  * @param recipient Recipient address of the taker (if none, it will use the sender)
@@ -5121,11 +5119,10 @@ class HypercertExchangeClient {
5121
5119
  }
5122
5120
  /**
5123
5121
  * Execute a trade
5124
- * @param makerBid Maker order
5122
+ * @param maker Maker order
5125
5123
  * @param taker Taker order
5126
5124
  * @param signature Signature of the maker order
5127
5125
  * @param merkleTree If the maker has been signed with a merkle tree
5128
- * @param affiliate Affiliate address if applicable
5129
5126
  * @returns ContractMethods
5130
5127
  */
5131
5128
  executeOrder(maker, taker, signature, merkleTree = defaultMerkleTree, overrides) {
@@ -5137,7 +5134,6 @@ class HypercertExchangeClient {
5137
5134
  * Execute several orders
5138
5135
  * @param orders List of orders data
5139
5136
  * @param isAtomic Should the transaction revert or not if a trade fails
5140
- * @param affiliate Affiliate address
5141
5137
  * @param overrides Call overrides
5142
5138
  * @returns ContractMethods
5143
5139
  */
@@ -5276,9 +5272,10 @@ class HypercertExchangeClient {
5276
5272
  * @param price Price of the fractions in wei
5277
5273
  * @param startTime Timestamp in seconds when the order becomes valid
5278
5274
  * @param endTime Timestamp in seconds when the order becomes invalid
5275
+ * @param currency Currency used to buy the fractions (default to WETH)
5279
5276
  * @param additionalParameters Additional parameters used to support complex orders
5280
5277
  */
5281
- async createDirectFractionsSaleMakerAsk({ itemIds, price, startTime, endTime, additionalParameters = [], }) {
5278
+ async createDirectFractionsSaleMakerAsk({ itemIds, price, startTime, endTime, currency = this.addresses.WETH, additionalParameters = [], }) {
5282
5279
  const address = await this.signer?.getAddress();
5283
5280
  if (!address) {
5284
5281
  throw new Error("No signer address could be determined");
@@ -5295,7 +5292,7 @@ class HypercertExchangeClient {
5295
5292
  collectionType: 2,
5296
5293
  collection: this.addresses.MINTER,
5297
5294
  subsetNonce: 0,
5298
- currency: this.addresses.WETH,
5295
+ currency,
5299
5296
  amounts,
5300
5297
  orderNonce: nonce_counter.toString(),
5301
5298
  // User specified
@@ -5306,7 +5303,20 @@ class HypercertExchangeClient {
5306
5303
  additionalParameters,
5307
5304
  });
5308
5305
  }
5309
- async createFractionalSaleMakerAsk({ itemIds, price, startTime, endTime, maxUnitAmount, minUnitAmount, minUnitsToKeep, sellLeftoverFraction, root, }) {
5306
+ /**
5307
+ * Create a maker ask to let the buyer decide how much of the fraction they want to buy
5308
+ * @param itemIds Token IDs of the fractions to be sold
5309
+ * @param price Price of one unit in wei
5310
+ * @param startTime Timestamp in seconds when the order becomes valid
5311
+ * @param endTime Timestamp in seconds when the order becomes invalid
5312
+ * @param currency Currency used to buy the fractions (default to WETH)
5313
+ * @param maxUnitAmount Maximum amount of units that can be bought in a single transaction
5314
+ * @param minUnitAmount Minimum amount of units that can be bought in a single transaction
5315
+ * @param minUnitsToKeep Minimum amount of units that the seller wants to keep
5316
+ * @param sellLeftoverFraction Whether or not the seller wants to sell the leftover units
5317
+ * @param root Merkle tree root (optional)
5318
+ */
5319
+ async createFractionalSaleMakerAsk({ itemIds, price, startTime, endTime, currency = this.addresses.WETH, maxUnitAmount, minUnitAmount, minUnitsToKeep, sellLeftoverFraction, root, }) {
5310
5320
  const address = await this.signer?.getAddress();
5311
5321
  if (!address) {
5312
5322
  throw new Error("No signer address could be determined");
@@ -5322,7 +5332,7 @@ class HypercertExchangeClient {
5322
5332
  collectionType: 2,
5323
5333
  collection: this.addresses.MINTER,
5324
5334
  subsetNonce: 0,
5325
- currency: this.addresses.WETH,
5335
+ currency,
5326
5336
  amounts,
5327
5337
  orderNonce: nonce_counter.toString(),
5328
5338
  // User specified
@@ -5344,12 +5354,18 @@ class HypercertExchangeClient {
5344
5354
  additionalParameters: [minUnitAmount, maxUnitAmount, minUnitsToKeep, sellLeftoverFraction],
5345
5355
  });
5346
5356
  }
5357
+ /**
5358
+ * Create a taker bid for buying a fraction of an open fractional sale
5359
+ * @param maker Maker order
5360
+ * @param recipient Recipient address of the taker (if none, it will use the sender)
5361
+ * @param unitAmount Amount of units to buy
5362
+ * @param pricePerUnit Price per unit in wei
5363
+ */
5347
5364
  createFractionalSaleTakerBid(maker, recipient = ZeroAddress, unitAmount, pricePerUnit) {
5348
- const order = {
5365
+ return {
5349
5366
  recipient: recipient,
5350
5367
  additionalParameters: encodeParams([unitAmount, pricePerUnit], getTakerParamsTypes(maker.strategyId)),
5351
5368
  };
5352
- return order;
5353
5369
  }
5354
5370
  /**
5355
5371
  * Register the order with hypercerts marketplace API.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypercerts-org/marketplace-sdk",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -24,20 +24,6 @@
24
24
  "engines": {
25
25
  "node": ">= 16.15.1 <= 20.x"
26
26
  },
27
- "scripts": {
28
- "prebuild": "rm -rf ./src/typechain ./src/artifacts cache dist",
29
- "dev": "rollup -c --bundleConfigAsCjs -w",
30
- "build:ts": "rollup -c --bundleConfigAsCjs",
31
- "build:sc": "hardhat compile",
32
- "build": "yarn build:sc && yarn build:ts",
33
- "test": "nyc hardhat test",
34
- "doc": "typedoc --plugin typedoc-plugin-markdown --tsconfig tsconfig.build.json",
35
- "lint": "eslint --max-warnings 0 'src/**/*.{js,ts}'",
36
- "format:check": "prettier --check 'src/**/*.{js,ts,json,yaml,yml,md}'",
37
- "format:write": "prettier --write 'src/**/*.{js,ts,json,yaml,yml,md}'",
38
- "release": "release-it --only-version --set-upstream",
39
- "supabase:types:hypercerts": "npx supabase gen types typescript --project-id clagjjfinooizoqdkvqc --schema public > src/utils/hypercerts-database-types.ts"
40
- },
41
27
  "lint-staged": {
42
28
  "*.{js,jsx,ts,tsx,json,yaml,yml}": "yarn format:write"
43
29
  },
@@ -47,7 +33,7 @@
47
33
  "devDependencies": {
48
34
  "@commitlint/cli": "^17.0.2",
49
35
  "@commitlint/config-conventional": "^17.0.2",
50
- "@hypercerts-org/contracts": "1.1.0",
36
+ "@hypercerts-org/contracts": "1.1.1-alpha.1",
51
37
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
52
38
  "@looksrare/contracts-exchange-v1": "^1.2.0",
53
39
  "@looksrare/contracts-exchange-v2": "^0.1.2",
@@ -95,5 +81,19 @@
95
81
  "@supabase/supabase-js": "^2.39.2",
96
82
  "ethers": "^6.6.2",
97
83
  "merkletreejs": "^0.3.9"
84
+ },
85
+ "scripts": {
86
+ "prebuild": "rm -rf ./src/typechain ./src/artifacts cache dist",
87
+ "dev": "rollup -c --bundleConfigAsCjs -w",
88
+ "build:ts": "rollup -c --bundleConfigAsCjs",
89
+ "build:sc": "hardhat compile",
90
+ "build": "yarn build:sc && yarn build:ts",
91
+ "test": "nyc hardhat test",
92
+ "doc": "typedoc --plugin typedoc-plugin-markdown --tsconfig tsconfig.build.json",
93
+ "lint": "eslint --max-warnings 0 'src/**/*.{js,ts}'",
94
+ "format:check": "prettier --check 'src/**/*.{js,ts,json,yaml,yml,md}'",
95
+ "format:write": "prettier --write 'src/**/*.{js,ts,json,yaml,yml,md}'",
96
+ "release": "release-it --only-version --set-upstream",
97
+ "supabase:types:hypercerts": "npx supabase gen types typescript --project-id clagjjfinooizoqdkvqc --schema public > src/utils/hypercerts-database-types.ts"
98
98
  }
99
- }
99
+ }