@opensea/sdk 9.0.0

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 (363) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +70 -0
  3. package/lib/api/accounts.d.ts +27 -0
  4. package/lib/api/accounts.js +46 -0
  5. package/lib/api/accounts.js.map +1 -0
  6. package/lib/api/api.d.ts +489 -0
  7. package/lib/api/api.js +754 -0
  8. package/lib/api/api.js.map +1 -0
  9. package/lib/api/apiPaths.d.ts +46 -0
  10. package/lib/api/apiPaths.js +176 -0
  11. package/lib/api/apiPaths.js.map +1 -0
  12. package/lib/api/chains.d.ts +13 -0
  13. package/lib/api/chains.js +22 -0
  14. package/lib/api/chains.js.map +1 -0
  15. package/lib/api/collections.d.ts +34 -0
  16. package/lib/api/collections.js +80 -0
  17. package/lib/api/collections.js.map +1 -0
  18. package/lib/api/drops.d.ts +21 -0
  19. package/lib/api/drops.js +39 -0
  20. package/lib/api/drops.js.map +1 -0
  21. package/lib/api/events.d.ts +26 -0
  22. package/lib/api/events.js +43 -0
  23. package/lib/api/events.js.map +1 -0
  24. package/lib/api/fetcher.d.ts +24 -0
  25. package/lib/api/fetcher.js +3 -0
  26. package/lib/api/fetcher.js.map +1 -0
  27. package/lib/api/index.d.ts +2 -0
  28. package/lib/api/index.js +19 -0
  29. package/lib/api/index.js.map +1 -0
  30. package/lib/api/listings.d.ts +44 -0
  31. package/lib/api/listings.js +88 -0
  32. package/lib/api/listings.js.map +1 -0
  33. package/lib/api/nfts.d.ts +39 -0
  34. package/lib/api/nfts.js +79 -0
  35. package/lib/api/nfts.js.map +1 -0
  36. package/lib/api/offers.d.ts +54 -0
  37. package/lib/api/offers.js +124 -0
  38. package/lib/api/offers.js.map +1 -0
  39. package/lib/api/orders.d.ts +50 -0
  40. package/lib/api/orders.js +153 -0
  41. package/lib/api/orders.js.map +1 -0
  42. package/lib/api/search.d.ts +13 -0
  43. package/lib/api/search.js +22 -0
  44. package/lib/api/search.js.map +1 -0
  45. package/lib/api/tokens.d.ts +25 -0
  46. package/lib/api/tokens.js +43 -0
  47. package/lib/api/tokens.js.map +1 -0
  48. package/lib/api/types.d.ts +1113 -0
  49. package/lib/api/types.js +65 -0
  50. package/lib/api/types.js.map +1 -0
  51. package/lib/constants.d.ts +22 -0
  52. package/lib/constants.js +52 -0
  53. package/lib/constants.js.map +1 -0
  54. package/lib/index.d.ts +18 -0
  55. package/lib/index.js +24 -0
  56. package/lib/index.js.map +1 -0
  57. package/lib/orders/privateListings.d.ts +12 -0
  58. package/lib/orders/privateListings.js +130 -0
  59. package/lib/orders/privateListings.js.map +1 -0
  60. package/lib/orders/types.d.ts +160 -0
  61. package/lib/orders/types.js +10 -0
  62. package/lib/orders/types.js.map +1 -0
  63. package/lib/orders/utils.d.ts +89 -0
  64. package/lib/orders/utils.js +177 -0
  65. package/lib/orders/utils.js.map +1 -0
  66. package/lib/sdk/assets.d.ts +104 -0
  67. package/lib/sdk/assets.js +398 -0
  68. package/lib/sdk/assets.js.map +1 -0
  69. package/lib/sdk/cancellation.d.ts +97 -0
  70. package/lib/sdk/cancellation.js +235 -0
  71. package/lib/sdk/cancellation.js.map +1 -0
  72. package/lib/sdk/context.d.ts +28 -0
  73. package/lib/sdk/context.js +3 -0
  74. package/lib/sdk/context.js.map +1 -0
  75. package/lib/sdk/fulfillment.d.ts +153 -0
  76. package/lib/sdk/fulfillment.js +298 -0
  77. package/lib/sdk/fulfillment.js.map +1 -0
  78. package/lib/sdk/orders.d.ts +253 -0
  79. package/lib/sdk/orders.js +679 -0
  80. package/lib/sdk/orders.js.map +1 -0
  81. package/lib/sdk/tokens.d.ts +31 -0
  82. package/lib/sdk/tokens.js +65 -0
  83. package/lib/sdk/tokens.js.map +1 -0
  84. package/lib/sdk.d.ts +560 -0
  85. package/lib/sdk.js +693 -0
  86. package/lib/sdk.js.map +1 -0
  87. package/lib/src/api/accounts.d.ts +18 -0
  88. package/lib/src/api/accounts.js +30 -0
  89. package/lib/src/api/accounts.js.map +1 -0
  90. package/lib/src/api/api.d.ts +429 -0
  91. package/lib/src/api/api.js +652 -0
  92. package/lib/src/api/api.js.map +1 -0
  93. package/lib/src/api/apiPaths.d.ts +37 -0
  94. package/lib/src/api/apiPaths.js +140 -0
  95. package/lib/src/api/apiPaths.js.map +1 -0
  96. package/lib/src/api/collections.d.ts +26 -0
  97. package/lib/src/api/collections.js +57 -0
  98. package/lib/src/api/collections.js.map +1 -0
  99. package/lib/src/api/events.d.ts +26 -0
  100. package/lib/src/api/events.js +42 -0
  101. package/lib/src/api/events.js.map +1 -0
  102. package/lib/src/api/fetcher.d.ts +24 -0
  103. package/lib/src/api/fetcher.js +3 -0
  104. package/lib/src/api/fetcher.js.map +1 -0
  105. package/lib/src/api/index.d.ts +2 -0
  106. package/lib/src/api/index.js +19 -0
  107. package/lib/src/api/index.js.map +1 -0
  108. package/lib/src/api/listings.d.ts +44 -0
  109. package/lib/src/api/listings.js +86 -0
  110. package/lib/src/api/listings.js.map +1 -0
  111. package/lib/src/api/nfts.d.ts +35 -0
  112. package/lib/src/api/nfts.js +66 -0
  113. package/lib/src/api/nfts.js.map +1 -0
  114. package/lib/src/api/offers.d.ts +54 -0
  115. package/lib/src/api/offers.js +122 -0
  116. package/lib/src/api/offers.js.map +1 -0
  117. package/lib/src/api/orders.d.ts +50 -0
  118. package/lib/src/api/orders.js +151 -0
  119. package/lib/src/api/orders.js.map +1 -0
  120. package/lib/src/api/search.d.ts +13 -0
  121. package/lib/src/api/search.js +21 -0
  122. package/lib/src/api/search.js.map +1 -0
  123. package/lib/src/api/tokens.d.ts +25 -0
  124. package/lib/src/api/tokens.js +42 -0
  125. package/lib/src/api/tokens.js.map +1 -0
  126. package/lib/src/api/types.d.ts +840 -0
  127. package/lib/src/api/types.js +65 -0
  128. package/lib/src/api/types.js.map +1 -0
  129. package/lib/src/constants.d.ts +22 -0
  130. package/lib/src/constants.js +52 -0
  131. package/lib/src/constants.js.map +1 -0
  132. package/lib/src/index.d.ts +18 -0
  133. package/lib/src/index.js +24 -0
  134. package/lib/src/index.js.map +1 -0
  135. package/lib/src/orders/privateListings.d.ts +12 -0
  136. package/lib/src/orders/privateListings.js +130 -0
  137. package/lib/src/orders/privateListings.js.map +1 -0
  138. package/lib/src/orders/types.d.ts +160 -0
  139. package/lib/src/orders/types.js +10 -0
  140. package/lib/src/orders/types.js.map +1 -0
  141. package/lib/src/orders/utils.d.ts +89 -0
  142. package/lib/src/orders/utils.js +177 -0
  143. package/lib/src/orders/utils.js.map +1 -0
  144. package/lib/src/sdk/assets.d.ts +104 -0
  145. package/lib/src/sdk/assets.js +397 -0
  146. package/lib/src/sdk/assets.js.map +1 -0
  147. package/lib/src/sdk/cancellation.d.ts +97 -0
  148. package/lib/src/sdk/cancellation.js +234 -0
  149. package/lib/src/sdk/cancellation.js.map +1 -0
  150. package/lib/src/sdk/context.d.ts +28 -0
  151. package/lib/src/sdk/context.js +3 -0
  152. package/lib/src/sdk/context.js.map +1 -0
  153. package/lib/src/sdk/fulfillment.d.ts +153 -0
  154. package/lib/src/sdk/fulfillment.js +296 -0
  155. package/lib/src/sdk/fulfillment.js.map +1 -0
  156. package/lib/src/sdk/orders.d.ts +253 -0
  157. package/lib/src/sdk/orders.js +677 -0
  158. package/lib/src/sdk/orders.js.map +1 -0
  159. package/lib/src/sdk/tokens.d.ts +31 -0
  160. package/lib/src/sdk/tokens.js +64 -0
  161. package/lib/src/sdk/tokens.js.map +1 -0
  162. package/lib/src/sdk.d.ts +560 -0
  163. package/lib/src/sdk.js +675 -0
  164. package/lib/src/sdk.js.map +1 -0
  165. package/lib/src/typechain/contracts/ERC1155.d.ts +236 -0
  166. package/lib/src/typechain/contracts/ERC1155.js +3 -0
  167. package/lib/src/typechain/contracts/ERC1155.js.map +1 -0
  168. package/lib/src/typechain/contracts/ERC20.d.ts +141 -0
  169. package/lib/src/typechain/contracts/ERC20.js +3 -0
  170. package/lib/src/typechain/contracts/ERC20.js.map +1 -0
  171. package/lib/src/typechain/contracts/ERC721.d.ts +213 -0
  172. package/lib/src/typechain/contracts/ERC721.js +3 -0
  173. package/lib/src/typechain/contracts/ERC721.js.map +1 -0
  174. package/lib/src/typechain/contracts/Multicall3.d.ts +57 -0
  175. package/lib/src/typechain/contracts/Multicall3.js +3 -0
  176. package/lib/src/typechain/contracts/Multicall3.js.map +1 -0
  177. package/lib/src/typechain/contracts/TransferHelper.d.ts +55 -0
  178. package/lib/src/typechain/contracts/TransferHelper.js +3 -0
  179. package/lib/src/typechain/contracts/TransferHelper.js.map +1 -0
  180. package/lib/src/typechain/contracts/common.d.ts +50 -0
  181. package/lib/src/typechain/contracts/common.js +3 -0
  182. package/lib/src/typechain/contracts/common.js.map +1 -0
  183. package/lib/src/typechain/contracts/factories/ERC1155__factory.d.ts +250 -0
  184. package/lib/src/typechain/contracts/factories/ERC1155__factory.js +332 -0
  185. package/lib/src/typechain/contracts/factories/ERC1155__factory.js.map +1 -0
  186. package/lib/src/typechain/contracts/factories/ERC20__factory.d.ts +174 -0
  187. package/lib/src/typechain/contracts/factories/ERC20__factory.js +240 -0
  188. package/lib/src/typechain/contracts/factories/ERC20__factory.js.map +1 -0
  189. package/lib/src/typechain/contracts/factories/ERC721__factory.d.ts +268 -0
  190. package/lib/src/typechain/contracts/factories/ERC721__factory.js +351 -0
  191. package/lib/src/typechain/contracts/factories/ERC721__factory.js.map +1 -0
  192. package/lib/src/typechain/contracts/factories/Multicall3__factory.d.ts +43 -0
  193. package/lib/src/typechain/contracts/factories/Multicall3__factory.js +68 -0
  194. package/lib/src/typechain/contracts/factories/Multicall3__factory.js.map +1 -0
  195. package/lib/src/typechain/contracts/factories/TransferHelper__factory.d.ts +46 -0
  196. package/lib/src/typechain/contracts/factories/TransferHelper__factory.js +71 -0
  197. package/lib/src/typechain/contracts/factories/TransferHelper__factory.js.map +1 -0
  198. package/lib/src/typechain/contracts/factories/index.d.ts +5 -0
  199. package/lib/src/typechain/contracts/factories/index.js +17 -0
  200. package/lib/src/typechain/contracts/factories/index.js.map +1 -0
  201. package/lib/src/typechain/contracts/index.d.ts +11 -0
  202. package/lib/src/typechain/contracts/index.js +48 -0
  203. package/lib/src/typechain/contracts/index.js.map +1 -0
  204. package/lib/src/types.d.ts +387 -0
  205. package/lib/src/types.js +127 -0
  206. package/lib/src/types.js.map +1 -0
  207. package/lib/src/utils/chain.d.ts +60 -0
  208. package/lib/src/utils/chain.js +248 -0
  209. package/lib/src/utils/chain.js.map +1 -0
  210. package/lib/src/utils/converters.d.ts +37 -0
  211. package/lib/src/utils/converters.js +137 -0
  212. package/lib/src/utils/converters.js.map +1 -0
  213. package/lib/src/utils/dateHelper.d.ts +38 -0
  214. package/lib/src/utils/dateHelper.js +52 -0
  215. package/lib/src/utils/dateHelper.js.map +1 -0
  216. package/lib/src/utils/fees.d.ts +13 -0
  217. package/lib/src/utils/fees.js +29 -0
  218. package/lib/src/utils/fees.js.map +1 -0
  219. package/lib/src/utils/index.d.ts +2 -0
  220. package/lib/src/utils/index.js +19 -0
  221. package/lib/src/utils/index.js.map +1 -0
  222. package/lib/src/utils/protocol.d.ts +75 -0
  223. package/lib/src/utils/protocol.js +161 -0
  224. package/lib/src/utils/protocol.js.map +1 -0
  225. package/lib/src/utils/rateLimit.d.ts +34 -0
  226. package/lib/src/utils/rateLimit.js +97 -0
  227. package/lib/src/utils/rateLimit.js.map +1 -0
  228. package/lib/src/utils/stringHelper.d.ts +18 -0
  229. package/lib/src/utils/stringHelper.js +24 -0
  230. package/lib/src/utils/stringHelper.js.map +1 -0
  231. package/lib/src/utils/utils.d.ts +18 -0
  232. package/lib/src/utils/utils.js +45 -0
  233. package/lib/src/utils/utils.js.map +1 -0
  234. package/lib/typechain/contracts/ERC1155.d.ts +236 -0
  235. package/lib/typechain/contracts/ERC1155.js +3 -0
  236. package/lib/typechain/contracts/ERC1155.js.map +1 -0
  237. package/lib/typechain/contracts/ERC20.d.ts +141 -0
  238. package/lib/typechain/contracts/ERC20.js +3 -0
  239. package/lib/typechain/contracts/ERC20.js.map +1 -0
  240. package/lib/typechain/contracts/ERC721.d.ts +213 -0
  241. package/lib/typechain/contracts/ERC721.js +3 -0
  242. package/lib/typechain/contracts/ERC721.js.map +1 -0
  243. package/lib/typechain/contracts/Multicall3.d.ts +57 -0
  244. package/lib/typechain/contracts/Multicall3.js +3 -0
  245. package/lib/typechain/contracts/Multicall3.js.map +1 -0
  246. package/lib/typechain/contracts/TransferHelper.d.ts +55 -0
  247. package/lib/typechain/contracts/TransferHelper.js +3 -0
  248. package/lib/typechain/contracts/TransferHelper.js.map +1 -0
  249. package/lib/typechain/contracts/common.d.ts +50 -0
  250. package/lib/typechain/contracts/common.js +3 -0
  251. package/lib/typechain/contracts/common.js.map +1 -0
  252. package/lib/typechain/contracts/factories/ERC1155__factory.d.ts +250 -0
  253. package/lib/typechain/contracts/factories/ERC1155__factory.js +332 -0
  254. package/lib/typechain/contracts/factories/ERC1155__factory.js.map +1 -0
  255. package/lib/typechain/contracts/factories/ERC20__factory.d.ts +174 -0
  256. package/lib/typechain/contracts/factories/ERC20__factory.js +240 -0
  257. package/lib/typechain/contracts/factories/ERC20__factory.js.map +1 -0
  258. package/lib/typechain/contracts/factories/ERC721__factory.d.ts +268 -0
  259. package/lib/typechain/contracts/factories/ERC721__factory.js +351 -0
  260. package/lib/typechain/contracts/factories/ERC721__factory.js.map +1 -0
  261. package/lib/typechain/contracts/factories/Multicall3__factory.d.ts +43 -0
  262. package/lib/typechain/contracts/factories/Multicall3__factory.js +68 -0
  263. package/lib/typechain/contracts/factories/Multicall3__factory.js.map +1 -0
  264. package/lib/typechain/contracts/factories/TransferHelper__factory.d.ts +46 -0
  265. package/lib/typechain/contracts/factories/TransferHelper__factory.js +71 -0
  266. package/lib/typechain/contracts/factories/TransferHelper__factory.js.map +1 -0
  267. package/lib/typechain/contracts/factories/index.d.ts +5 -0
  268. package/lib/typechain/contracts/factories/index.js +17 -0
  269. package/lib/typechain/contracts/factories/index.js.map +1 -0
  270. package/lib/typechain/contracts/index.d.ts +11 -0
  271. package/lib/typechain/contracts/index.js +48 -0
  272. package/lib/typechain/contracts/index.js.map +1 -0
  273. package/lib/types.d.ts +389 -0
  274. package/lib/types.js +129 -0
  275. package/lib/types.js.map +1 -0
  276. package/lib/utils/chain.d.ts +64 -0
  277. package/lib/utils/chain.js +211 -0
  278. package/lib/utils/chain.js.map +1 -0
  279. package/lib/utils/chainIds.generated.d.ts +7 -0
  280. package/lib/utils/chainIds.generated.js +37 -0
  281. package/lib/utils/chainIds.generated.js.map +1 -0
  282. package/lib/utils/converters.d.ts +37 -0
  283. package/lib/utils/converters.js +137 -0
  284. package/lib/utils/converters.js.map +1 -0
  285. package/lib/utils/dateHelper.d.ts +38 -0
  286. package/lib/utils/dateHelper.js +52 -0
  287. package/lib/utils/dateHelper.js.map +1 -0
  288. package/lib/utils/fees.d.ts +13 -0
  289. package/lib/utils/fees.js +29 -0
  290. package/lib/utils/fees.js.map +1 -0
  291. package/lib/utils/index.d.ts +2 -0
  292. package/lib/utils/index.js +19 -0
  293. package/lib/utils/index.js.map +1 -0
  294. package/lib/utils/protocol.d.ts +75 -0
  295. package/lib/utils/protocol.js +161 -0
  296. package/lib/utils/protocol.js.map +1 -0
  297. package/lib/utils/rateLimit.d.ts +34 -0
  298. package/lib/utils/rateLimit.js +97 -0
  299. package/lib/utils/rateLimit.js.map +1 -0
  300. package/lib/utils/stringHelper.d.ts +18 -0
  301. package/lib/utils/stringHelper.js +24 -0
  302. package/lib/utils/stringHelper.js.map +1 -0
  303. package/lib/utils/utils.d.ts +18 -0
  304. package/lib/utils/utils.js +45 -0
  305. package/lib/utils/utils.js.map +1 -0
  306. package/package.json +72 -0
  307. package/src/abi/ERC1155.json +314 -0
  308. package/src/abi/ERC20.json +222 -0
  309. package/src/abi/ERC721.json +333 -0
  310. package/src/abi/Multicall3.json +50 -0
  311. package/src/abi/TransferHelper.json +53 -0
  312. package/src/api/accounts.ts +69 -0
  313. package/src/api/api.ts +1152 -0
  314. package/src/api/apiPaths.ts +208 -0
  315. package/src/api/chains.ts +18 -0
  316. package/src/api/collections.ts +120 -0
  317. package/src/api/drops.ts +49 -0
  318. package/src/api/events.ts +71 -0
  319. package/src/api/fetcher.ts +31 -0
  320. package/src/api/index.ts +2 -0
  321. package/src/api/listings.ts +126 -0
  322. package/src/api/nfts.ts +144 -0
  323. package/src/api/offers.ts +242 -0
  324. package/src/api/orders.ts +283 -0
  325. package/src/api/search.ts +21 -0
  326. package/src/api/tokens.ts +67 -0
  327. package/src/api/types.ts +1210 -0
  328. package/src/constants.ts +90 -0
  329. package/src/index.ts +22 -0
  330. package/src/orders/privateListings.ts +173 -0
  331. package/src/orders/types.ts +191 -0
  332. package/src/orders/utils.ts +253 -0
  333. package/src/sdk/assets.ts +591 -0
  334. package/src/sdk/cancellation.ts +346 -0
  335. package/src/sdk/context.ts +33 -0
  336. package/src/sdk/fulfillment.ts +478 -0
  337. package/src/sdk/orders.ts +1149 -0
  338. package/src/sdk/tokens.ts +95 -0
  339. package/src/sdk.ts +1051 -0
  340. package/src/typechain/contracts/ERC1155.ts +440 -0
  341. package/src/typechain/contracts/ERC20.ts +286 -0
  342. package/src/typechain/contracts/ERC721.ts +412 -0
  343. package/src/typechain/contracts/Multicall3.ts +117 -0
  344. package/src/typechain/contracts/TransferHelper.ts +122 -0
  345. package/src/typechain/contracts/common.ts +131 -0
  346. package/src/typechain/contracts/factories/ERC1155__factory.ts +331 -0
  347. package/src/typechain/contracts/factories/ERC20__factory.ts +239 -0
  348. package/src/typechain/contracts/factories/ERC721__factory.ts +350 -0
  349. package/src/typechain/contracts/factories/Multicall3__factory.ts +67 -0
  350. package/src/typechain/contracts/factories/TransferHelper__factory.ts +76 -0
  351. package/src/typechain/contracts/factories/index.ts +8 -0
  352. package/src/typechain/contracts/index.ts +14 -0
  353. package/src/types.ts +413 -0
  354. package/src/utils/chain.ts +224 -0
  355. package/src/utils/chainIds.generated.ts +34 -0
  356. package/src/utils/converters.ts +145 -0
  357. package/src/utils/dateHelper.ts +48 -0
  358. package/src/utils/fees.ts +31 -0
  359. package/src/utils/index.ts +2 -0
  360. package/src/utils/protocol.ts +185 -0
  361. package/src/utils/rateLimit.ts +147 -0
  362. package/src/utils/stringHelper.ts +25 -0
  363. package/src/utils/utils.ts +36 -0
@@ -0,0 +1,840 @@
1
+ import type { ConsiderationItem } from "@opensea/seaport-js/lib/types";
2
+ import type { OrderType, OrderV2, ProtocolData, QueryCursors } from "../orders/types";
3
+ import type { OpenSeaCollection } from "../types";
4
+ /**
5
+ * Response from OpenSea API for building an offer.
6
+ * @category API Response Types
7
+ */
8
+ export type BuildOfferResponse = {
9
+ /** A portion of the parameters needed to submit a criteria offer, i.e. collection offer. */
10
+ partialParameters: PartialParameters;
11
+ /** Criteria echoed back from the build request. Includes collection and trait info. */
12
+ criteria: BuildOfferCriteria;
13
+ };
14
+ /**
15
+ * Criteria returned by the build offer endpoint.
16
+ * Subset of {@link Criteria} — only collection and trait fields.
17
+ * @category API Response Types
18
+ */
19
+ export type BuildOfferCriteria = {
20
+ collection: CollectionCriteria;
21
+ traits?: TraitCriteria[];
22
+ numericTraits?: NumericTraitCriteria[];
23
+ };
24
+ type PartialParameters = {
25
+ consideration: ConsiderationItem[];
26
+ zone: string;
27
+ zoneHash: string;
28
+ };
29
+ /**
30
+ * Criteria for collection or trait offers.
31
+ * @category API Response Types
32
+ */
33
+ type Criteria = {
34
+ /** The collection for the criteria */
35
+ collection: CollectionCriteria;
36
+ /** The contract for the criteria */
37
+ contract: ContractCriteria;
38
+ /** Represents a list of token ids which can be used to fulfill the criteria offer. */
39
+ encoded_token_ids?: string;
40
+ /** The trait for the criteria (single trait) */
41
+ trait?: TraitCriteria;
42
+ /** Multiple traits for the criteria (multi-trait offers) */
43
+ traits?: TraitCriteria[];
44
+ /** Numeric traits for the criteria (numeric trait offers) */
45
+ numericTraits?: NumericTraitCriteria[];
46
+ };
47
+ /**
48
+ * Criteria for trait offers.
49
+ * @category API Response Types
50
+ */
51
+ type TraitCriteria = {
52
+ type: string;
53
+ value: string;
54
+ };
55
+ /**
56
+ * Criteria for numeric trait offers.
57
+ * At least one of min or max must be defined.
58
+ * @category API Response Types
59
+ */
60
+ type NumericTraitCriteria = {
61
+ type: string;
62
+ min?: number;
63
+ max?: number;
64
+ };
65
+ type CollectionCriteria = {
66
+ slug: string;
67
+ };
68
+ type ContractCriteria = {
69
+ address: string;
70
+ };
71
+ /**
72
+ * Query args for Get Collections
73
+ * @category API Query Args
74
+ */
75
+ export interface GetCollectionsArgs {
76
+ order_by?: string;
77
+ limit?: number;
78
+ next?: string;
79
+ chain?: string;
80
+ creator_username?: string;
81
+ include_hidden?: boolean;
82
+ }
83
+ /**
84
+ * Response from OpenSea API for fetching a single collection.
85
+ * @category API Response Types
86
+ */
87
+ export type GetCollectionResponse = {
88
+ /** Collection object. See {@link OpenSeaCollection} */
89
+ collection: OpenSeaCollection;
90
+ };
91
+ /**
92
+ * Response from OpenSea API for fetching a list of collections.
93
+ * @category API Response Types
94
+ */
95
+ export type GetCollectionsResponse = QueryCursorsV2 & {
96
+ /** List of collections. See {@link OpenSeaCollection} */
97
+ collections: OpenSeaCollection[];
98
+ };
99
+ export declare enum CollectionOrderByOption {
100
+ CREATED_DATE = "created_date",
101
+ ONE_DAY_CHANGE = "one_day_change",
102
+ SEVEN_DAY_VOLUME = "seven_day_volume",
103
+ SEVEN_DAY_CHANGE = "seven_day_change",
104
+ NUM_OWNERS = "num_owners",
105
+ MARKET_CAP = "market_cap"
106
+ }
107
+ /**
108
+ * Order status enum.
109
+ * @category API Models
110
+ */
111
+ export declare enum OrderStatus {
112
+ ACTIVE = "ACTIVE",
113
+ INACTIVE = "INACTIVE",
114
+ FULFILLED = "FULFILLED",
115
+ EXPIRED = "EXPIRED",
116
+ CANCELLED = "CANCELLED"
117
+ }
118
+ /**
119
+ * Base Order type shared between Listings and Offers.
120
+ * @category API Models
121
+ */
122
+ export type Order = {
123
+ /** Offer Identifier */
124
+ order_hash: string;
125
+ /** Chain the offer exists on */
126
+ chain: string;
127
+ /** The protocol data for the order. Only 'seaport' is currently supported. */
128
+ protocol_data: ProtocolData;
129
+ /** The contract address of the protocol. */
130
+ protocol_address: string;
131
+ /** The price of the order. */
132
+ price: Price;
133
+ };
134
+ /**
135
+ * Offer type.
136
+ * @category API Models
137
+ */
138
+ export type Offer = Order & {
139
+ /** The criteria for the offer if it is a collection or trait offer. */
140
+ criteria?: Criteria;
141
+ /** The status of the offer. */
142
+ status: OrderStatus;
143
+ };
144
+ /**
145
+ * Collection Offer type.
146
+ * @category API Models
147
+ */
148
+ export type CollectionOffer = Required<Pick<Offer, "criteria">> & Offer;
149
+ /**
150
+ * Price response.
151
+ * @category API Models
152
+ */
153
+ export type Price = {
154
+ currency: string;
155
+ decimals: number;
156
+ value: string;
157
+ };
158
+ /**
159
+ * Listing order type.
160
+ * @category API Models
161
+ */
162
+ export type Listing = Omit<Order, "price"> & {
163
+ /** The order type of the listing. */
164
+ type: OrderType;
165
+ /** The price of the listing with current price nested. */
166
+ price: {
167
+ current: Price;
168
+ };
169
+ /** The remaining quantity available for the listing. This is important for partially filled orders. */
170
+ remaining_quantity: number;
171
+ /** The status of the listing. */
172
+ status: OrderStatus;
173
+ };
174
+ /**
175
+ * Response from OpenSea API for fetching a list of collection offers.
176
+ * @category API Response Types
177
+ */
178
+ export type ListCollectionOffersResponse = {
179
+ /** List of {@link Offer} */
180
+ offers: CollectionOffer[];
181
+ };
182
+ /**
183
+ * Response from OpenSea API for fetching a list of NFTs.
184
+ * @category API Response Types
185
+ */
186
+ export type ListNFTsResponse = {
187
+ /** List of {@link NFT} */
188
+ nfts: NFT[];
189
+ /** Cursor for next page of results. */
190
+ next: string;
191
+ };
192
+ /**
193
+ * Response from OpenSea API for fetching a single NFT.
194
+ * @category API Response Types
195
+ */
196
+ export type GetNFTResponse = {
197
+ /** See {@link NFT} */
198
+ nft: NFT;
199
+ };
200
+ /**
201
+ * Response from OpenSea API for fetching Orders.
202
+ * @category API Response Types
203
+ */
204
+ export type GetOrdersResponse = QueryCursors & {
205
+ /** List of {@link OrderV2} */
206
+ orders: OrderV2[];
207
+ };
208
+ /**
209
+ * Base query cursors response from OpenSea API.
210
+ * @category API Response Types
211
+ */
212
+ export type QueryCursorsV2 = {
213
+ next?: string;
214
+ };
215
+ /**
216
+ * Response from OpenSea API for fetching offers.
217
+ * @category API Response Types
218
+ */
219
+ export type GetOffersResponse = QueryCursorsV2 & {
220
+ offers: Offer[];
221
+ };
222
+ /**
223
+ * Response from OpenSea API for fetching listings.
224
+ * @category API Response Types
225
+ */
226
+ export type GetListingsResponse = QueryCursorsV2 & {
227
+ listings: Listing[];
228
+ };
229
+ /**
230
+ * Response from OpenSea API for fetching a best offer.
231
+ * @category API Response Types
232
+ */
233
+ export type GetBestOfferResponse = Offer | CollectionOffer;
234
+ /**
235
+ * Response from OpenSea API for fetching a best listing.
236
+ * @category API Response Types
237
+ */
238
+ export type GetBestListingResponse = Listing;
239
+ /**
240
+ * Response from OpenSea API for fetching an order by hash.
241
+ * Can be either an Offer or a Listing.
242
+ * @category API Response Types
243
+ */
244
+ export type GetOrderByHashResponse = Offer | Listing;
245
+ /**
246
+ * Response from OpenSea API for offchain canceling an order.
247
+ * @category API Response Types
248
+ */
249
+ export type CancelOrderResponse = {
250
+ last_signature_issued_valid_until: string | null;
251
+ };
252
+ /**
253
+ * NFT type returned by OpenSea API.
254
+ * @category API Models
255
+ */
256
+ export type NFT = {
257
+ /** NFT Identifier (also commonly referred to as tokenId) */
258
+ identifier: string;
259
+ /** Slug identifier of collection */
260
+ collection: string;
261
+ /** Address of contract */
262
+ contract: string;
263
+ /** Token standard, i.e. ERC721, ERC1155, etc. */
264
+ token_standard: string;
265
+ /** Name of NFT */
266
+ name: string;
267
+ /** Description of NFT */
268
+ description: string;
269
+ /** URL of image */
270
+ image_url: string;
271
+ /** URL of metadata */
272
+ metadata_url: string;
273
+ /** URL on OpenSea */
274
+ opensea_url: string;
275
+ /** Date of latest NFT update */
276
+ updated_at: string;
277
+ /** Whether NFT is disabled for trading on OpenSea */
278
+ is_disabled: boolean;
279
+ /** Whether NFT is NSFW (Not Safe For Work) */
280
+ is_nsfw: boolean;
281
+ /** Traits for the NFT, returns null if the NFT has than 50 traits */
282
+ traits: Trait[] | null;
283
+ /** Creator of the NFT */
284
+ creator: string;
285
+ /** Owners of the NFT */
286
+ owners: {
287
+ address: string;
288
+ quantity: number;
289
+ }[];
290
+ /** Rarity of the NFT */
291
+ rarity: null | {
292
+ strategy_id: string | null;
293
+ strategy_version: string | null;
294
+ rank: number | null;
295
+ score: number | null;
296
+ calculated_at: string;
297
+ max_rank: number | null;
298
+ tokens_scored: number | null;
299
+ ranking_features: null | {
300
+ unique_attribute_count: number;
301
+ };
302
+ };
303
+ };
304
+ /**
305
+ * Trait type returned by OpenSea API.
306
+ * @category API Models
307
+ */
308
+ export type Trait = {
309
+ /** The name of the trait category (e.g. 'Background') */
310
+ trait_type: string;
311
+ /** A field indicating how to display. None is used for string traits. */
312
+ display_type: TraitDisplayType;
313
+ /** Ceiling for possible numeric trait values */
314
+ max_value: string;
315
+ /** The value of the trait (e.g. 'Red') */
316
+ value: string | number | Date;
317
+ };
318
+ /**
319
+ * Trait display type returned by OpenSea API.
320
+ * @category API Models
321
+ */
322
+ export declare enum TraitDisplayType {
323
+ NUMBER = "number",
324
+ BOOST_PERCENTAGE = "boost_percentage",
325
+ BOOST_NUMBER = "boost_number",
326
+ AUTHOR = "author",
327
+ DATE = "date",
328
+ /** "None" is used for string traits */
329
+ NONE = "None"
330
+ }
331
+ /**
332
+ * Asset event type returned by OpenSea API.
333
+ * @category API Models
334
+ */
335
+ export declare enum AssetEventType {
336
+ SALE = "sale",
337
+ TRANSFER = "transfer",
338
+ MINT = "mint",
339
+ LISTING = "listing",
340
+ ORDER = "order",
341
+ OFFER = "offer",
342
+ TRAIT_OFFER = "trait_offer",
343
+ COLLECTION_OFFER = "collection_offer"
344
+ }
345
+ /**
346
+ * Order type for order events.
347
+ * @category API Models
348
+ */
349
+ export declare enum OrderEventType {
350
+ LISTING = "listing",
351
+ ITEM_OFFER = "item_offer",
352
+ COLLECTION_OFFER = "collection_offer",
353
+ TRAIT_OFFER = "trait_offer"
354
+ }
355
+ /**
356
+ * Payment information for an event.
357
+ * @category API Models
358
+ */
359
+ export type EventPayment = {
360
+ /** Quantity of the payment token */
361
+ quantity: string;
362
+ /** Address of the payment token (0x0...0 for ETH) */
363
+ token_address: string;
364
+ /** Decimals of the payment token */
365
+ decimals: number;
366
+ /** Symbol of the payment token */
367
+ symbol: string;
368
+ };
369
+ /**
370
+ * Asset information in an event.
371
+ * @category API Models
372
+ */
373
+ export type EventAsset = {
374
+ identifier: string;
375
+ collection: string;
376
+ contract: string;
377
+ token_standard: string;
378
+ name: string;
379
+ description: string;
380
+ image_url: string;
381
+ display_image_url: string;
382
+ display_animation_url: string | null;
383
+ metadata_url: string;
384
+ opensea_url: string;
385
+ updated_at: string;
386
+ is_disabled: boolean;
387
+ is_nsfw: boolean;
388
+ };
389
+ /**
390
+ * Base event type.
391
+ * @category API Models
392
+ */
393
+ type BaseEvent = {
394
+ /** Type of the event */
395
+ event_type: AssetEventType | string;
396
+ /** Timestamp of the event */
397
+ event_timestamp: number;
398
+ /** Chain the event occurred on */
399
+ chain: string;
400
+ /** Quantity involved in the event */
401
+ quantity: number;
402
+ };
403
+ /**
404
+ * Listing event type.
405
+ * @category API Models
406
+ */
407
+ export type ListingEvent = BaseEvent & {
408
+ event_type: AssetEventType.LISTING | "listing";
409
+ /** Payment information */
410
+ payment: EventPayment;
411
+ /** Start date of the listing */
412
+ start_date: number | null;
413
+ /** Expiration date of the listing */
414
+ expiration_date: number;
415
+ /** Asset involved in the listing */
416
+ asset: EventAsset;
417
+ /** Maker of the listing */
418
+ maker: string;
419
+ /** Taker of the listing */
420
+ taker: string;
421
+ /** Whether the listing is private */
422
+ is_private_listing: boolean;
423
+ /** Order hash (optional) */
424
+ order_hash?: string;
425
+ /** Protocol address (optional) */
426
+ protocol_address?: string;
427
+ };
428
+ /**
429
+ * Offer event type.
430
+ * @category API Models
431
+ */
432
+ export type OfferEvent = BaseEvent & {
433
+ event_type: AssetEventType.OFFER | "offer";
434
+ /** Payment information */
435
+ payment: EventPayment;
436
+ /** Start date of the offer */
437
+ start_date: number | null;
438
+ /** Expiration date of the offer */
439
+ expiration_date: number;
440
+ /** Asset involved in the offer */
441
+ asset: EventAsset;
442
+ /** Maker of the offer */
443
+ maker: string;
444
+ /** Taker of the offer */
445
+ taker: string;
446
+ /** Order hash (optional) */
447
+ order_hash?: string;
448
+ /** Protocol address (optional) */
449
+ protocol_address?: string;
450
+ };
451
+ /**
452
+ * Trait offer event type.
453
+ * @category API Models
454
+ */
455
+ export type TraitOfferEvent = BaseEvent & {
456
+ event_type: AssetEventType.TRAIT_OFFER | "trait_offer";
457
+ /** Payment information */
458
+ payment: EventPayment;
459
+ /** Start date of the offer */
460
+ start_date: number | null;
461
+ /** Expiration date of the offer */
462
+ expiration_date: number;
463
+ /** Criteria for trait offers */
464
+ criteria: Record<string, unknown>;
465
+ /** Maker of the offer */
466
+ maker: string;
467
+ /** Taker of the offer */
468
+ taker: string;
469
+ /** Order hash (optional) */
470
+ order_hash?: string;
471
+ /** Protocol address (optional) */
472
+ protocol_address?: string;
473
+ };
474
+ /**
475
+ * Collection offer event type.
476
+ * @category API Models
477
+ */
478
+ export type CollectionOfferEvent = BaseEvent & {
479
+ event_type: AssetEventType.COLLECTION_OFFER | "collection_offer";
480
+ /** Payment information */
481
+ payment: EventPayment;
482
+ /** Start date of the offer */
483
+ start_date: number | null;
484
+ /** Expiration date of the offer */
485
+ expiration_date: number;
486
+ /** Criteria for collection offers */
487
+ criteria: Record<string, unknown>;
488
+ /** Maker of the offer */
489
+ maker: string;
490
+ /** Taker of the offer */
491
+ taker: string;
492
+ /** Order hash (optional) */
493
+ order_hash?: string;
494
+ /** Protocol address (optional) */
495
+ protocol_address?: string;
496
+ };
497
+ /**
498
+ * Order event type returned by the API for order-related activities
499
+ * (listings, offers, trait offers, collection offers).
500
+ * @category API Models
501
+ */
502
+ export type OrderEvent = BaseEvent & {
503
+ event_type: AssetEventType.ORDER | "order";
504
+ /** Payment information */
505
+ payment: EventPayment;
506
+ /** Start date of the order */
507
+ start_date: number | null;
508
+ /** Expiration date of the order */
509
+ expiration_date: number;
510
+ /** Asset involved in the order (optional, not present for collection/trait offers) */
511
+ asset?: EventAsset;
512
+ /** Criteria for collection/trait offers (optional) */
513
+ criteria?: Record<string, unknown>;
514
+ /** Maker of the order */
515
+ maker: string;
516
+ /** Taker of the order */
517
+ taker: string;
518
+ /** Order hash (optional) */
519
+ order_hash?: string;
520
+ /** Protocol address (optional) */
521
+ protocol_address?: string;
522
+ /** Order type providing more detail */
523
+ order_type?: OrderEventType;
524
+ };
525
+ /**
526
+ * Mint event type.
527
+ * @category API Models
528
+ */
529
+ export type MintEvent = BaseEvent & {
530
+ event_type: AssetEventType.MINT | "mint";
531
+ /** Transaction hash */
532
+ transaction: string;
533
+ /** Address the NFT was minted to */
534
+ to_address: string;
535
+ /** NFT that was minted */
536
+ nft: EventAsset;
537
+ };
538
+ /**
539
+ * Sale event type.
540
+ * @category API Models
541
+ */
542
+ export type SaleEvent = BaseEvent & {
543
+ event_type: AssetEventType.SALE | "sale";
544
+ /** Transaction hash */
545
+ transaction: string;
546
+ /** Order hash */
547
+ order_hash: string;
548
+ /** Protocol address */
549
+ protocol_address: string;
550
+ /** Payment information */
551
+ payment: EventPayment;
552
+ /** Closing date of the sale */
553
+ closing_date: number;
554
+ /** Seller address */
555
+ seller: string;
556
+ /** Buyer address */
557
+ buyer: string;
558
+ /** NFT involved in the sale */
559
+ nft: EventAsset;
560
+ };
561
+ /**
562
+ * Transfer event type.
563
+ * @category API Models
564
+ */
565
+ export type TransferEvent = BaseEvent & {
566
+ event_type: AssetEventType.TRANSFER | "transfer";
567
+ /** Transaction hash */
568
+ transaction: string;
569
+ /** Address the NFT was transferred from */
570
+ from_address: string;
571
+ /** Address the NFT was transferred to */
572
+ to_address: string;
573
+ /** NFT involved in the transfer */
574
+ nft: EventAsset;
575
+ };
576
+ /**
577
+ * Generic event type that can be any event type.
578
+ * @category API Models
579
+ */
580
+ export type AssetEvent = ListingEvent | OfferEvent | TraitOfferEvent | CollectionOfferEvent | OrderEvent | SaleEvent | TransferEvent | MintEvent;
581
+ /**
582
+ * Query args for Get Events endpoints.
583
+ * @category API Query Args
584
+ */
585
+ export interface GetEventsArgs {
586
+ /** Type of event to filter by */
587
+ event_type?: AssetEventType | string;
588
+ /** Filter events after this timestamp */
589
+ after?: number;
590
+ /** Filter events before this timestamp */
591
+ before?: number;
592
+ /** Limit the number of results */
593
+ limit?: number;
594
+ /** Cursor for pagination */
595
+ next?: string;
596
+ /** Chain to filter by */
597
+ chain?: string;
598
+ }
599
+ /**
600
+ * Response from OpenSea API for fetching events.
601
+ * @category API Response Types
602
+ */
603
+ export type GetEventsResponse = QueryCursorsV2 & {
604
+ /** List of {@link AssetEvent} */
605
+ asset_events: AssetEvent[];
606
+ };
607
+ /**
608
+ * Contract information returned by OpenSea API.
609
+ * @category API Models
610
+ */
611
+ export type Contract = {
612
+ /** Contract address */
613
+ address: string;
614
+ /** Chain the contract is deployed on */
615
+ chain: string;
616
+ /** Associated collection slug (if any) */
617
+ collection: string | null;
618
+ /** Contract name */
619
+ name: string;
620
+ /** Contract standard (e.g., erc721, erc1155) */
621
+ contract_standard: string;
622
+ };
623
+ /**
624
+ * Response from OpenSea API for fetching a contract.
625
+ * @category API Response Types
626
+ */
627
+ export type GetContractResponse = Contract;
628
+ /**
629
+ * Trait counts for a specific trait type.
630
+ * @category API Models
631
+ */
632
+ export type TraitCounts = {
633
+ [traitValue: string]: number;
634
+ };
635
+ /**
636
+ * Trait categories in a collection.
637
+ * @category API Models
638
+ */
639
+ export type TraitCategories = {
640
+ [traitType: string]: "string" | "number" | "date";
641
+ };
642
+ /**
643
+ * Response from OpenSea API for fetching collection traits.
644
+ * @category API Response Types
645
+ */
646
+ export type GetTraitsResponse = {
647
+ /** Trait categories with their data types */
648
+ categories: TraitCategories;
649
+ /** Trait counts for each category */
650
+ counts: {
651
+ [traitType: string]: TraitCounts;
652
+ };
653
+ };
654
+ /**
655
+ * Token model returned by OpenSea API.
656
+ * @category API Models
657
+ */
658
+ export type Token = {
659
+ /** Token contract address */
660
+ address: string;
661
+ /** Chain the token is on */
662
+ chain: string;
663
+ /** Token name */
664
+ name: string;
665
+ /** Token symbol */
666
+ symbol: string;
667
+ /** Number of decimals */
668
+ decimals: number;
669
+ /** URL of the token image */
670
+ image_url: string | null;
671
+ /** URL on OpenSea */
672
+ opensea_url: string;
673
+ };
674
+ /**
675
+ * Response from OpenSea API for fetching trending tokens.
676
+ * @category API Response Types
677
+ */
678
+ export type GetTrendingTokensResponse = QueryCursorsV2 & {
679
+ /** List of {@link Token} */
680
+ tokens: Token[];
681
+ };
682
+ /**
683
+ * Response from OpenSea API for fetching top tokens.
684
+ * @category API Response Types
685
+ */
686
+ export type GetTopTokensResponse = QueryCursorsV2 & {
687
+ /** List of {@link Token} */
688
+ tokens: Token[];
689
+ };
690
+ /**
691
+ * Query args for Get Trending/Top Tokens endpoints.
692
+ * @category API Query Args
693
+ */
694
+ export interface GetTokensArgs {
695
+ /** Limit the number of results */
696
+ limit?: number;
697
+ /** Cursor for pagination */
698
+ next?: string;
699
+ }
700
+ /**
701
+ * Query args for Get Swap Quote endpoint.
702
+ * @category API Query Args
703
+ */
704
+ export interface GetSwapQuoteArgs {
705
+ /** Address of the input token */
706
+ token_in: string;
707
+ /** Address of the output token */
708
+ token_out: string;
709
+ /** Amount of input token */
710
+ amount: string;
711
+ /** Chain for the swap */
712
+ chain: string;
713
+ /** Address of the taker */
714
+ taker_address?: string;
715
+ /** Slippage tolerance */
716
+ slippage?: number;
717
+ }
718
+ /**
719
+ * Response from OpenSea API for fetching a swap quote.
720
+ * @category API Response Types
721
+ */
722
+ export type GetSwapQuoteResponse = {
723
+ [key: string]: unknown;
724
+ };
725
+ /**
726
+ * Response from OpenSea API for fetching token details.
727
+ * @category API Response Types
728
+ */
729
+ export type GetTokenResponse = Token;
730
+ /**
731
+ * Query args for the Search endpoint.
732
+ * @category API Query Args
733
+ */
734
+ export interface SearchArgs {
735
+ /** Search query text */
736
+ query: string;
737
+ /** Filter by blockchain(s) */
738
+ chains?: string[];
739
+ /** Filter by asset type(s): collection, nft, token, account */
740
+ asset_types?: string[];
741
+ /** Number of results to return (default: 20, max: 50) */
742
+ limit?: number;
743
+ }
744
+ /**
745
+ * Collection search result.
746
+ * @category API Models
747
+ */
748
+ export type CollectionSearchResult = {
749
+ /** The collection slug */
750
+ collection: string;
751
+ /** The collection name */
752
+ name: string;
753
+ /** URL of the collection image */
754
+ image_url: string | null;
755
+ /** Whether trading is disabled for this collection */
756
+ is_disabled: boolean;
757
+ /** Whether this collection is marked as NSFW */
758
+ is_nsfw: boolean;
759
+ /** URL to the collection on OpenSea */
760
+ opensea_url: string;
761
+ };
762
+ /**
763
+ * Token (currency) search result.
764
+ * @category API Models
765
+ */
766
+ export type TokenSearchResult = {
767
+ /** Contract address of the token */
768
+ address: string;
769
+ /** Blockchain the token is on */
770
+ chain: string;
771
+ /** Token name */
772
+ name: string;
773
+ /** Token symbol */
774
+ symbol: string;
775
+ /** URL of the token image */
776
+ image_url: string | null;
777
+ /** Current USD price of the token */
778
+ usd_price: string;
779
+ /** Number of decimal places for the token */
780
+ decimals: number;
781
+ /** URL to the token on OpenSea */
782
+ opensea_url: string;
783
+ };
784
+ /**
785
+ * NFT search result.
786
+ * @category API Models
787
+ */
788
+ export type NftSearchResult = {
789
+ /** Token ID of the NFT */
790
+ identifier: string;
791
+ /** Collection slug the NFT belongs to */
792
+ collection: string;
793
+ /** Contract address of the NFT */
794
+ contract: string;
795
+ /** Name of the NFT */
796
+ name: string | null;
797
+ /** URL of the NFT image */
798
+ image_url: string | null;
799
+ /** URL to the NFT on OpenSea */
800
+ opensea_url: string;
801
+ };
802
+ /**
803
+ * Account search result.
804
+ * @category API Models
805
+ */
806
+ export type AccountSearchResult = {
807
+ /** Primary wallet address of the account */
808
+ address: string;
809
+ /** Username of the account */
810
+ username: string | null;
811
+ /** URL of the account's profile image */
812
+ profile_image_url: string | null;
813
+ /** URL to the account on OpenSea */
814
+ opensea_url: string;
815
+ };
816
+ /**
817
+ * A single search result with a type discriminator and the corresponding typed object.
818
+ * @category API Models
819
+ */
820
+ export type SearchResult = {
821
+ /** The type of search result */
822
+ type: string;
823
+ /** Collection details, present when type is 'collection' */
824
+ collection?: CollectionSearchResult;
825
+ /** Token details, present when type is 'token' */
826
+ token?: TokenSearchResult;
827
+ /** NFT details, present when type is 'nft' */
828
+ nft?: NftSearchResult;
829
+ /** Account details, present when type is 'account' */
830
+ account?: AccountSearchResult;
831
+ };
832
+ /**
833
+ * Response from OpenSea API for search.
834
+ * @category API Response Types
835
+ */
836
+ export type SearchResponse = {
837
+ /** List of search results ranked by relevance */
838
+ results: SearchResult[];
839
+ };
840
+ export {};