@0xsequence/marketplace-sdk 0.2.0 → 0.3.1

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.
Files changed (204) hide show
  1. package/dist/chess-tile-6BS5MQT5.png +0 -0
  2. package/dist/chunk-22NLQ3AS.js +3078 -0
  3. package/dist/chunk-22NLQ3AS.js.map +1 -0
  4. package/dist/chunk-3OHM45R3.js +1294 -0
  5. package/dist/chunk-3OHM45R3.js.map +1 -0
  6. package/dist/{chunk-4E34HVSA.js → chunk-4YU2UPYH.js} +29 -74
  7. package/dist/chunk-4YU2UPYH.js.map +1 -0
  8. package/dist/chunk-7NJETFMF.js +21 -0
  9. package/dist/chunk-7NJETFMF.js.map +1 -0
  10. package/dist/{chunk-UYRQ5MJQ.js → chunk-FUM4OGOQ.js} +4 -4
  11. package/dist/chunk-FUM4OGOQ.js.map +1 -0
  12. package/dist/{chunk-FCQCNLFZ.js → chunk-G33554LK.js} +4 -1
  13. package/dist/chunk-G33554LK.js.map +1 -0
  14. package/dist/{chunk-7OO74L2K.js → chunk-GJAKQ5Q3.js} +40 -1
  15. package/dist/chunk-GJAKQ5Q3.js.map +1 -0
  16. package/dist/{chunk-GZIA25G4.js → chunk-GZG2QO64.js} +22 -6
  17. package/dist/chunk-GZG2QO64.js.map +1 -0
  18. package/dist/chunk-MCI3KOSQ.js +2 -0
  19. package/dist/{chunk-5EOVZAKT.js → chunk-O7UQGT43.js} +891 -100
  20. package/dist/chunk-O7UQGT43.js.map +1 -0
  21. package/dist/{chunk-CSN7YD5Q.js → chunk-Q57TEA3Z.js} +20 -2
  22. package/dist/chunk-Q57TEA3Z.js.map +1 -0
  23. package/dist/{chunk-VEX7FDL6.js → chunk-SBVLWSRZ.js} +2 -2
  24. package/dist/{chunk-VEX7FDL6.js.map → chunk-SBVLWSRZ.js.map} +1 -1
  25. package/dist/{chunk-6S4FYXP6.js → chunk-SPW24Y7I.js} +40 -1
  26. package/dist/chunk-SPW24Y7I.js.map +1 -0
  27. package/dist/chunk-UISBTKFF.js +1 -0
  28. package/dist/{chunk-LFQB477Y.js → chunk-WA433WAJ.js} +9 -33
  29. package/dist/chunk-WA433WAJ.js.map +1 -0
  30. package/dist/{chunk-O5JXKTWP.js → chunk-WFE6OCYF.js} +4 -4
  31. package/dist/chunk-WFE6OCYF.js.map +1 -0
  32. package/dist/chunk-XX4EVWBF.js +1292 -0
  33. package/dist/chunk-XX4EVWBF.js.map +1 -0
  34. package/dist/chunk-Y7YO5TLE.js +53 -0
  35. package/dist/chunk-Y7YO5TLE.js.map +1 -0
  36. package/dist/index.css +1 -50
  37. package/dist/index.d.ts +5 -7
  38. package/dist/index.js +158 -73
  39. package/dist/index.js.map +1 -1
  40. package/dist/{marketplace.gen-Ceofb9Cs.d.ts → marketplace.gen-BLP7822q.d.ts} +17 -5
  41. package/dist/react/_internal/api/index.d.ts +4 -2
  42. package/dist/react/_internal/api/index.js +1 -1
  43. package/dist/react/_internal/index.d.ts +3 -3
  44. package/dist/react/_internal/index.js +7 -7
  45. package/dist/react/hooks/index.css +82 -0
  46. package/dist/react/hooks/index.css.map +1 -0
  47. package/dist/react/hooks/index.d.ts +577 -427
  48. package/dist/react/hooks/index.js +39 -7
  49. package/dist/react/index.css +86 -81
  50. package/dist/react/index.css.map +1 -1
  51. package/dist/react/index.d.ts +6 -5
  52. package/dist/react/index.js +49 -16
  53. package/dist/react/ssr/index.js +4 -3
  54. package/dist/react/ssr/index.js.map +1 -1
  55. package/dist/react/ui/components/index.css +241 -0
  56. package/dist/react/ui/components/index.css.map +1 -0
  57. package/dist/react/ui/components/index.d.ts +23 -0
  58. package/dist/react/ui/components/index.js +25 -0
  59. package/dist/react/ui/icons/index.js +3 -2
  60. package/dist/react/ui/icons/index.js.map +1 -1
  61. package/dist/react/ui/index.css +86 -81
  62. package/dist/react/ui/index.css.map +1 -1
  63. package/dist/react/ui/index.d.ts +34 -33
  64. package/dist/react/ui/index.js +17 -12
  65. package/dist/react/ui/modals/_internal/components/actionModal/index.js +6 -17
  66. package/dist/react/ui/modals/_internal/components/actionModal/index.js.map +1 -1
  67. package/dist/react/ui/styles/index.d.ts +1 -1
  68. package/dist/{services-Dei25J6_.d.ts → services-C9-lvWcC.d.ts} +1 -1
  69. package/dist/styles/index.css +1 -50
  70. package/dist/styles/index.css.map +1 -1
  71. package/dist/styles/index.d.ts +1 -5
  72. package/dist/styles/index.js +10 -12
  73. package/dist/types/index.d.ts +2 -2
  74. package/dist/types/index.js +2 -2
  75. package/dist/{types-BzZVURNL.d.ts → types-QqXjNuUP.d.ts} +1 -1
  76. package/dist/utils/abi/index.d.ts +2 -0
  77. package/dist/utils/abi/index.js +21 -0
  78. package/dist/utils/abi/marketplace/index.d.ts +805 -0
  79. package/dist/utils/abi/marketplace/index.js +12 -0
  80. package/dist/utils/abi/{abi/token → token}/index.js +1 -2
  81. package/dist/utils/abi/token/index.js.map +1 -0
  82. package/dist/utils/index.d.ts +7 -7
  83. package/dist/utils/index.js +12 -14
  84. package/package.json +17 -15
  85. package/src/react/_internal/api/get-query-client.ts +3 -3
  86. package/src/react/_internal/api/marketplace.gen.ts +34 -10
  87. package/src/react/_internal/api/query-keys.ts +8 -0
  88. package/src/react/_internal/transaction-machine/execute-transaction.ts +592 -0
  89. package/src/react/_internal/transaction-machine/useTransactionMachine.ts +66 -0
  90. package/src/react/hooks/index.ts +7 -0
  91. package/src/react/hooks/useBuyCollectable.tsx +38 -0
  92. package/src/react/hooks/useCancelOrder.tsx +38 -0
  93. package/src/react/hooks/useCheckoutOptions.tsx +46 -43
  94. package/src/react/hooks/useCountOfCollectables.tsx +52 -52
  95. package/src/react/hooks/useCreateListing.tsx +65 -0
  96. package/src/react/hooks/useCurrencies.tsx +60 -60
  97. package/src/react/hooks/useCurrency.tsx +64 -0
  98. package/src/react/hooks/useGenerateBuyTransaction.tsx +71 -0
  99. package/src/react/hooks/useGenerateCancelTransaction.tsx +50 -0
  100. package/src/react/hooks/useListBalances.tsx +2 -3
  101. package/src/react/hooks/useListCollectibles.tsx +5 -6
  102. package/src/react/hooks/useListCollections.tsx +88 -0
  103. package/src/react/hooks/useListListingsForCollectible.tsx +61 -0
  104. package/src/react/hooks/useListOffersForCollectible.tsx +14 -16
  105. package/src/react/hooks/useMakeOffer.tsx +62 -0
  106. package/src/react/hooks/useRoyaltyPercentage.tsx +1 -1
  107. package/src/react/hooks/useSell.tsx +62 -0
  108. package/src/react/ui/components/_internals/action-button/ActionButton.tsx +156 -0
  109. package/src/react/ui/components/_internals/custom-network-image/CustomNetworkImage.tsx +27 -0
  110. package/src/react/ui/components/_internals/custom-network-image/styles.css.ts +51 -0
  111. package/src/react/ui/components/_internals/custom-select/CustomSelect.tsx +63 -0
  112. package/src/react/ui/components/_internals/custom-select/styles.css.ts +64 -0
  113. package/src/react/ui/components/_internals/pill/Pill.tsx +20 -0
  114. package/src/react/ui/components/collectible-card/CollectibleCard.tsx +191 -0
  115. package/src/react/ui/components/collectible-card/Footer.tsx +128 -0
  116. package/src/react/ui/components/collectible-card/styles.css.ts +62 -0
  117. package/src/react/ui/components/index.ts +1 -0
  118. package/src/react/ui/icons/Bell.tsx +31 -0
  119. package/src/react/ui/icons/DiamondEye.tsx +31 -0
  120. package/src/react/ui/images/chess-tile.png +0 -0
  121. package/src/react/ui/index.ts +4 -0
  122. package/src/react/ui/modals/BuyModal/_store.ts +53 -0
  123. package/src/react/ui/modals/BuyModal/index.tsx +119 -0
  124. package/src/react/ui/modals/CreateListingModal/_store.ts +35 -312
  125. package/src/react/ui/modals/CreateListingModal/index.tsx +216 -157
  126. package/src/react/ui/modals/MakeOfferModal/_store.ts +34 -276
  127. package/src/react/ui/modals/MakeOfferModal/index.tsx +195 -136
  128. package/src/react/ui/modals/SellModal/_store.ts +29 -262
  129. package/src/react/ui/modals/SellModal/index.tsx +156 -122
  130. package/src/react/ui/modals/SuccessfulPurchaseModal/_store.ts +17 -3
  131. package/src/react/ui/modals/SuccessfulPurchaseModal/index.tsx +3 -2
  132. package/src/react/ui/modals/TransferModal/_views/enterWalletAddress/index.tsx +92 -92
  133. package/src/react/ui/modals/TransferModal/index.tsx +10 -17
  134. package/src/react/ui/modals/_internal/components/actionModal/ActionModal.tsx +1 -0
  135. package/src/react/ui/modals/_internal/components/actionModal/ErrorModal.tsx +18 -0
  136. package/src/react/ui/modals/_internal/components/actionModal/LoadingModal.tsx +18 -0
  137. package/src/react/ui/modals/_internal/components/calendarPopover/index.tsx +1 -0
  138. package/src/react/ui/modals/_internal/components/calendarPopover/overrides.css +8 -0
  139. package/src/react/ui/modals/_internal/components/calendarPopover/styles.css.ts +10 -4
  140. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/index.tsx +10 -13
  141. package/src/react/ui/modals/_internal/components/expirationDateSelect/index.tsx +23 -9
  142. package/src/react/ui/modals/_internal/components/priceInput/index.tsx +7 -18
  143. package/src/react/ui/modals/_internal/components/switchChainModal/index.tsx +17 -44
  144. package/src/react/ui/modals/_internal/components/switchChainModal/store.ts +10 -8
  145. package/src/react/ui/modals/_internal/components/tokenPreview/index.tsx +14 -3
  146. package/src/react/ui/modals/_internal/components/transactionDetails/index.tsx +4 -2
  147. package/src/react/ui/modals/_internal/components/transactionHeader/index.tsx +4 -4
  148. package/src/react/ui/modals/_internal/components/transactionPreview/index.tsx +4 -2
  149. package/src/react/ui/modals/_internal/components/transactionStatusModal/index.tsx +13 -10
  150. package/src/react/ui/modals/_internal/types.ts +13 -0
  151. package/src/react/ui/modals/modal-provider.tsx +2 -1
  152. package/src/styles/index.ts +0 -2
  153. package/src/types/custom.d.ts +1 -0
  154. package/src/utils/abi/index.ts +2 -0
  155. package/src/utils/abi/marketplace/index.ts +3 -0
  156. package/src/utils/abi/marketplace/sequence-marketplace-v1.ts +463 -0
  157. package/src/utils/abi/marketplace/sequence-marketplace-v2.ts +802 -0
  158. package/src/utils/index.ts +2 -3
  159. package/src/utils/network.ts +4 -2
  160. package/tsconfig.tsbuildinfo +1 -1
  161. package/dist/chunk-4E34HVSA.js.map +0 -1
  162. package/dist/chunk-5EOVZAKT.js.map +0 -1
  163. package/dist/chunk-6JWGELXL.js +0 -214
  164. package/dist/chunk-6JWGELXL.js.map +0 -1
  165. package/dist/chunk-6S4FYXP6.js.map +0 -1
  166. package/dist/chunk-7OO74L2K.js.map +0 -1
  167. package/dist/chunk-BCNFYVAL.js +0 -1
  168. package/dist/chunk-CSN7YD5Q.js.map +0 -1
  169. package/dist/chunk-D7QQP6MS.js +0 -2
  170. package/dist/chunk-DBFOPEV6.js +0 -23
  171. package/dist/chunk-DBFOPEV6.js.map +0 -1
  172. package/dist/chunk-FCQCNLFZ.js.map +0 -1
  173. package/dist/chunk-GZIA25G4.js.map +0 -1
  174. package/dist/chunk-LFQB477Y.js.map +0 -1
  175. package/dist/chunk-MD4JHPMH.js +0 -2815
  176. package/dist/chunk-MD4JHPMH.js.map +0 -1
  177. package/dist/chunk-O5JXKTWP.js.map +0 -1
  178. package/dist/chunk-PE2LLUTJ.js +0 -213
  179. package/dist/chunk-PE2LLUTJ.js.map +0 -1
  180. package/dist/chunk-QVFMD6S2.js +0 -21
  181. package/dist/chunk-QVFMD6S2.js.map +0 -1
  182. package/dist/chunk-UYRQ5MJQ.js.map +0 -1
  183. package/dist/utils/abi/abi/standard/index.d.ts +0 -25
  184. package/dist/utils/abi/abi/standard/index.js +0 -8
  185. package/dist/utils/abi/clients/index.d.ts +0 -27
  186. package/dist/utils/abi/clients/index.js +0 -13
  187. package/src/react/ui/modals/_internal/components/currencyOptionsSelect/styles.css.ts +0 -33
  188. package/src/react/ui/modals/_internal/components/expirationDateSelect/styles.css.ts +0 -25
  189. package/src/utils/abi/abi/standard/index.ts +0 -1
  190. package/src/utils/abi/clients/ERC1155.ts +0 -82
  191. package/src/utils/abi/clients/ERC20.ts +0 -101
  192. package/src/utils/abi/clients/ERC721.ts +0 -97
  193. package/src/utils/abi/clients/index.ts +0 -3
  194. /package/dist/{chunk-BCNFYVAL.js.map → chunk-MCI3KOSQ.js.map} +0 -0
  195. /package/dist/{chunk-D7QQP6MS.js.map → chunk-UISBTKFF.js.map} +0 -0
  196. /package/dist/{utils/abi/abi/standard → react/ui/components}/index.js.map +0 -0
  197. /package/dist/utils/abi/{abi/token/index.js.map → index.js.map} +0 -0
  198. /package/dist/utils/abi/{clients → marketplace}/index.js.map +0 -0
  199. /package/dist/utils/abi/{abi/token → token}/index.d.ts +0 -0
  200. /package/src/utils/abi/{abi/standard → marketplace}/EIP2981.ts +0 -0
  201. /package/src/utils/abi/{abi/token → token}/ERC1155.ts +0 -0
  202. /package/src/utils/abi/{abi/token → token}/ERC20.ts +0 -0
  203. /package/src/utils/abi/{abi/token → token}/ERC721.ts +0 -0
  204. /package/src/utils/abi/{abi/token → token}/index.ts +0 -0
@@ -0,0 +1,12 @@
1
+ "use client"
2
+ import {
3
+ EIP2981_ABI,
4
+ SequenceMarketplaceV1_ABI,
5
+ SequenceMarketplaceV2_ABI
6
+ } from "../../../chunk-3OHM45R3.js";
7
+ export {
8
+ EIP2981_ABI,
9
+ SequenceMarketplaceV1_ABI,
10
+ SequenceMarketplaceV2_ABI
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -1,10 +1,9 @@
1
1
  "use client"
2
- import "../../../../chunk-D7QQP6MS.js";
3
2
  import {
4
3
  ERC1155_ABI,
5
4
  ERC20_ABI,
6
5
  ERC721_ABI
7
- } from "../../../../chunk-O5JXKTWP.js";
6
+ } from "../../../chunk-WFE6OCYF.js";
8
7
  export {
9
8
  ERC1155_ABI,
10
9
  ERC20_ABI,
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,12 +1,10 @@
1
+ export { EIP2981_ABI, SequenceMarketplaceV1_ABI, SequenceMarketplaceV2_ABI } from './abi/marketplace/index.js';
2
+ export { ERC1155_ABI, ERC20_ABI, ERC721_ABI } from './abi/token/index.js';
1
3
  import { PublicClient } from 'viem';
2
- import { c as ChainId } from '../types-BzZVURNL.js';
3
- export { EIP2981_ABI } from './abi/abi/standard/index.js';
4
- export { ERC1155_ABI, ERC20_ABI, ERC721_ABI } from './abi/abi/token/index.js';
5
- export { ERC1155, ERC20, ERC721 } from './abi/clients/index.js';
4
+ import { c as ChainId } from '../types-QqXjNuUP.js';
6
5
  import '@0xsequence/network';
7
6
  import 'zod';
8
- import '../marketplace.gen-Ceofb9Cs.js';
9
- import 'wagmi/query';
7
+ import '../marketplace.gen-BLP7822q.js';
10
8
 
11
9
  declare const truncateMiddle: (address: string, minPrefix?: number, minSuffix?: number) => string;
12
10
  declare const truncateEnd: (text: string | undefined, truncateAt: number) => string;
@@ -14,6 +12,8 @@ declare const compareAddress: (a?: string, b?: string) => boolean;
14
12
 
15
13
  declare const getPublicRpcClient: (chainId: ChainId) => PublicClient;
16
14
 
15
+ declare const getPresentableChainName: (chainId: ChainId) => string;
16
+
17
17
  type CalculatePriceDifferencePercentageArgs = {
18
18
  inputPriceRaw: bigint;
19
19
  basePriceRaw: bigint;
@@ -21,4 +21,4 @@ type CalculatePriceDifferencePercentageArgs = {
21
21
  };
22
22
  declare const calculatePriceDifferencePercentage: ({ inputPriceRaw, basePriceRaw, decimals, }: CalculatePriceDifferencePercentageArgs) => string;
23
23
 
24
- export { calculatePriceDifferencePercentage, compareAddress, getPublicRpcClient, truncateEnd, truncateMiddle };
24
+ export { calculatePriceDifferencePercentage, compareAddress, getPresentableChainName, getPublicRpcClient, truncateEnd, truncateMiddle };
@@ -2,34 +2,32 @@
2
2
  import {
3
3
  calculatePriceDifferencePercentage,
4
4
  compareAddress,
5
+ getPresentableChainName,
6
+ getPublicRpcClient,
5
7
  truncateEnd,
6
8
  truncateMiddle
7
- } from "../chunk-6S4FYXP6.js";
8
- import {
9
- ERC1155,
10
- ERC20,
11
- ERC721,
12
- getPublicRpcClient
13
- } from "../chunk-6JWGELXL.js";
9
+ } from "../chunk-SPW24Y7I.js";
10
+ import "../chunk-MCI3KOSQ.js";
14
11
  import {
15
- EIP2981_ABI
16
- } from "../chunk-DBFOPEV6.js";
17
- import "../chunk-D7QQP6MS.js";
12
+ EIP2981_ABI,
13
+ SequenceMarketplaceV1_ABI,
14
+ SequenceMarketplaceV2_ABI
15
+ } from "../chunk-3OHM45R3.js";
18
16
  import {
19
17
  ERC1155_ABI,
20
18
  ERC20_ABI,
21
19
  ERC721_ABI
22
- } from "../chunk-O5JXKTWP.js";
20
+ } from "../chunk-WFE6OCYF.js";
23
21
  export {
24
22
  EIP2981_ABI,
25
- ERC1155,
26
23
  ERC1155_ABI,
27
- ERC20,
28
24
  ERC20_ABI,
29
- ERC721,
30
25
  ERC721_ABI,
26
+ SequenceMarketplaceV1_ABI,
27
+ SequenceMarketplaceV2_ABI,
31
28
  calculatePriceDifferencePercentage,
32
29
  compareAddress,
30
+ getPresentableChainName,
33
31
  getPublicRpcClient,
34
32
  truncateEnd,
35
33
  truncateMiddle
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@0xsequence/marketplace-sdk",
3
3
  "private": false,
4
- "version": "0.2.0",
4
+ "version": "0.3.1",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -26,35 +26,37 @@
26
26
  "@legendapp/state": "^3.0.0-beta.19",
27
27
  "@radix-ui/react-dialog": "^1.1.2",
28
28
  "@radix-ui/react-popover": "^1.1.2",
29
+ "@radix-ui/react-select": "^2.1.2",
29
30
  "date-fns": "^4.1.0",
30
- "react-day-picker": "^9.3.1",
31
+ "react-day-picker": "^9.4.1",
31
32
  "zod": "^3.23.8"
32
33
  },
33
34
  "peerDependencies": {
34
- "@0xsequence/api": "^2.0.26",
35
+ "0xsequence": "^2.1.3",
36
+ "@0xsequence/api": "^2.1.3",
35
37
  "@0xsequence/design-system": "^1.8.0",
36
- "@0xsequence/indexer": "^2.0.26",
37
- "@0xsequence/kit": "^4.4.4",
38
- "@0xsequence/kit-checkout": "^4.4.4",
39
- "@0xsequence/metadata": "^2.0.26",
40
- "@0xsequence/network": "^2.0.26",
41
- "@tanstack/react-query": "^5.60.5",
38
+ "@0xsequence/indexer": "^2.1.3",
39
+ "@0xsequence/kit": "^4.4.5",
40
+ "@0xsequence/kit-checkout": "^4.4.5",
41
+ "@0xsequence/metadata": "^2.1.3",
42
+ "@0xsequence/network": "^2.1.3",
43
+ "@tanstack/react-query": "^5.62.2",
42
44
  "react": "^18.3.1",
43
45
  "react-dom": "^18.3.1",
44
- "viem": "^2.21.47",
45
- "wagmi": "^2.12.33"
46
+ "viem": "^2.21.53",
47
+ "wagmi": "^2.13.3"
46
48
  },
47
49
  "devDependencies": {
48
50
  "@biomejs/biome": "^1.9.4",
49
- "@vanilla-extract/css": "^1.16.0",
50
- "@vanilla-extract/esbuild-plugin": "^2.3.11",
51
- "@vanilla-extract/recipes": "^0.5.5",
52
51
  "@types/react": "^18.3.12",
53
52
  "@types/react-dom": "^18.3.1",
53
+ "@vanilla-extract/css": "^1.16.1",
54
+ "@vanilla-extract/esbuild-plugin": "^2.3.12",
55
+ "@vanilla-extract/recipes": "^0.5.5",
54
56
  "ctix": "^2.7.0",
55
57
  "rimraf": "^6.0.1",
56
58
  "tsup": "^8.3.5",
57
- "typescript": "^5.6.3"
59
+ "typescript": "^5.7.2"
58
60
  },
59
61
  "scripts": {
60
62
  "build": "tsc -b && rimraf dist && tsup",
@@ -25,8 +25,8 @@ let browserQueryClient: QueryClient | undefined = undefined;
25
25
  export function getQueryClient() {
26
26
  if (typeof globalThis.document === 'undefined') {
27
27
  return makeQueryClient();
28
- } else {
29
- if (!browserQueryClient) browserQueryClient = makeQueryClient();
30
- return browserQueryClient;
31
28
  }
29
+
30
+ if (!browserQueryClient) browserQueryClient = makeQueryClient();
31
+ return browserQueryClient;
32
32
  }
@@ -1,13 +1,13 @@
1
1
  /* eslint-disable */
2
- // marketplace-api 272a2d3c9208fb21b84c88a2a8cbd9ab8e29964d
2
+ // marketplace-api e5b2fbf15786c0449572939776a18f9ae3e589ea
3
3
  // --
4
- // Code generated by webrpc-gen@v0.21.0 with typescript generator. DO NOT EDIT.
4
+ // Code generated by webrpc-gen@v0.21.3 with typescript generator. DO NOT EDIT.
5
5
  //
6
6
  // webrpc-gen -schema=marketplace.ridl -target=typescript -client -out=./clients/marketplace.gen.ts
7
7
 
8
8
  export const WebrpcHeader = "Webrpc"
9
9
 
10
- export const WebrpcHeaderValue = "webrpc@v0.21.0;gen-typescript@v0.15.0;marketplace-api@v0.0.0-272a2d3c9208fb21b84c88a2a8cbd9ab8e29964d"
10
+ export const WebrpcHeaderValue = "webrpc@v0.21.3;gen-typescript@v0.16.0;marketplace-api@v0.0.0-e5b2fbf15786c0449572939776a18f9ae3e589ea"
11
11
 
12
12
  // WebRPC description and code-gen version
13
13
  export const WebRPCVersion = "v1"
@@ -16,7 +16,7 @@ export const WebRPCVersion = "v1"
16
16
  export const WebRPCSchemaVersion = ""
17
17
 
18
18
  // Schema hash generated from your RIDL schema
19
- export const WebRPCSchemaHash = "272a2d3c9208fb21b84c88a2a8cbd9ab8e29964d"
19
+ export const WebRPCSchemaHash = "e5b2fbf15786c0449572939776a18f9ae3e589ea"
20
20
 
21
21
  type WebrpcGenVersions = {
22
22
  webrpcGenVersion: string;
@@ -53,11 +53,8 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
53
53
  };
54
54
  }
55
55
 
56
- //@ts-ignore
57
56
  const [_, webrpcGenVersion] = versions[0].split("@");
58
- //@ts-ignore
59
57
  const [codeGenName, codeGenVersion] = versions[1].split("@");
60
- //@ts-ignore
61
58
  const [schemaName, schemaVersion] = versions[2].split("@");
62
59
 
63
60
  return {
@@ -66,7 +63,7 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
66
63
  codeGenVersion,
67
64
  schemaName,
68
65
  schemaVersion,
69
- }as WebrpcGenVersions;
66
+ };
70
67
  }
71
68
 
72
69
  //
@@ -220,7 +217,8 @@ export enum StepType {
220
217
  createListing = 'createListing',
221
218
  createOffer = 'createOffer',
222
219
  signEIP712 = 'signEIP712',
223
- signEIP191 = 'signEIP191'
220
+ signEIP191 = 'signEIP191',
221
+ cancel = 'cancel'
224
222
  }
225
223
 
226
224
  export enum TransactionCrypto {
@@ -589,6 +587,7 @@ export interface Marketplace {
589
587
  generateSellTransaction(args: GenerateSellTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateSellTransactionReturn>
590
588
  generateListingTransaction(args: GenerateListingTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateListingTransactionReturn>
591
589
  generateOfferTransaction(args: GenerateOfferTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateOfferTransactionReturn>
590
+ generateCancelTransaction(args: GenerateCancelTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateCancelTransactionReturn>
592
591
  execute(args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise<ExecuteReturn>
593
592
  listCollectibles(args: ListCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<ListCollectiblesReturn>
594
593
  getCountOfAllCollectibles(args: GetCountOfAllCollectiblesArgs, headers?: object, signal?: AbortSignal): Promise<GetCountOfAllCollectiblesReturn>
@@ -696,7 +695,7 @@ export interface GetCollectibleHighestOfferReturn {
696
695
  export interface GetCollectibleLowestListingArgs {
697
696
  contractAddress: string
698
697
  tokenId: string
699
- filters?: OrderFilter
698
+ filter?: OrderFilter
700
699
  }
701
700
 
702
701
  export interface GetCollectibleLowestListingReturn {
@@ -781,6 +780,16 @@ export interface GenerateOfferTransactionArgs {
781
780
  export interface GenerateOfferTransactionReturn {
782
781
  steps: Array<Step>
783
782
  }
783
+ export interface GenerateCancelTransactionArgs {
784
+ collectionAddress: string
785
+ maker: string
786
+ marketplace: MarketplaceKind
787
+ orderId: string
788
+ }
789
+
790
+ export interface GenerateCancelTransactionReturn {
791
+ steps: Array<Step>
792
+ }
784
793
  export interface ExecuteArgs {
785
794
  signature: string
786
795
  executeType: ExecuteType
@@ -1319,6 +1328,20 @@ export class Marketplace implements Marketplace {
1319
1328
  })
1320
1329
  }
1321
1330
 
1331
+ generateCancelTransaction = (args: GenerateCancelTransactionArgs, headers?: object, signal?: AbortSignal): Promise<GenerateCancelTransactionReturn> => {
1332
+ return this.fetch(
1333
+ this.url('GenerateCancelTransaction'),
1334
+ createHTTPRequest(args, headers, signal)).then((res) => {
1335
+ return buildResponse(res).then(_data => {
1336
+ return {
1337
+ steps: <Array<Step>>(_data.steps),
1338
+ }
1339
+ })
1340
+ }, (error) => {
1341
+ throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1342
+ })
1343
+ }
1344
+
1322
1345
  execute = (args: ExecuteArgs, headers?: object, signal?: AbortSignal): Promise<ExecuteReturn> => {
1323
1346
  return this.fetch(
1324
1347
  this.url('Execute'),
@@ -1912,3 +1935,4 @@ const webrpcErrorByCode: { [code: number]: any } = {
1912
1935
  }
1913
1936
 
1914
1937
  export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
1938
+
@@ -1,3 +1,4 @@
1
+ // biome-ignore lint/complexity/noStaticOnlyClass:
1
2
  class CollectableKeys {
2
3
  static all = ['collectable'] as const;
3
4
  static details = [...CollectableKeys.all, 'details'] as const;
@@ -23,32 +24,39 @@ class CollectableKeys {
23
24
  'lowestListings',
24
25
  ] as const;
25
26
  static offers = [...CollectableKeys.all, 'offers'] as const;
27
+ static listings = [...CollectableKeys.all, 'listings'] as const;
26
28
  static filter = [...CollectableKeys.all, 'filter'] as const;
27
29
  static counts = [...CollectableKeys.all, 'counts'] as const;
28
30
  }
29
31
 
32
+ // biome-ignore lint/complexity/noStaticOnlyClass:
30
33
  class CollectionKeys {
31
34
  static all = ['collections'] as const;
32
35
  static list = [...CollectionKeys.all, 'list'] as const;
33
36
  static detail = [...CollectionKeys.all, 'detail'] as const;
34
37
  }
35
38
 
39
+ // biome-ignore lint/complexity/noStaticOnlyClass:
36
40
  class BalanceQueries {
37
41
  static all = ['balances'] as const;
38
42
  static lists = [...BalanceQueries.all, 'tokenBalances'] as const;
39
43
  }
40
44
 
45
+ // biome-ignore lint/complexity/noStaticOnlyClass:
41
46
  class CheckoutKeys {
42
47
  static all = ['checkouts'] as const;
43
48
  static options = [...CheckoutKeys.all, 'options'] as const;
44
49
  static cartItems = [...CheckoutKeys.all, 'cartItems'] as const;
45
50
  }
46
51
 
52
+ // biome-ignore lint/complexity/noStaticOnlyClass:
47
53
  class CurrencyKeys {
48
54
  static all = ['currencies'] as const;
49
55
  static lists = [...CurrencyKeys.all, 'list'] as const;
56
+ static details = [...CurrencyKeys.all, 'details'] as const;
50
57
  }
51
58
 
59
+ // biome-ignore lint/complexity/noStaticOnlyClass:
52
60
  class ConfigKeys {
53
61
  static all = ['configs'] as const;
54
62
  static marketplace = [...ConfigKeys.all, 'marketplace'] as const;