@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
package/lib/sdk.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAE5C,oDAA6C;AAE7C,mCAMe;AACf,mCAAsC;AAGtC,yCAA4C;AAC5C,qDAAwD;AACxD,mDAAsD;AACtD,yCAAkE;AAClE,yCAA4C;AAC5C,mCAQgB;AAChB,yCAKsB;AAEtB;;;GAGG;AACH,MAAa,UAAU;IACrB,wCAAwC;IACjC,QAAQ,CAAiB;IAChC,+EAA+E;IACxE,OAAO,CAAS;IACvB,4CAA4C;IACrC,MAAM,CAAuB;IACpC,mBAAmB;IACH,GAAG,CAAY;IAC/B,2BAA2B;IACX,KAAK,CAAO;IAC5B,6EAA6E;IACrE,2BAA2B,GAAkC,EAAE,CAAA;IAE/D,QAAQ,CAAc;IACtB,iBAAiB,CAA0B;IAEnD,oBAAoB;IACZ,cAAc,CAAe;IAC7B,cAAc,CAAe;IAC7B,oBAAoB,CAAqB;IACzC,cAAc,CAAe;IAC7B,mBAAmB,CAAoB;IAE/C;;;;;;;OAOG;IACH,YACE,gBAA0C,EAC1C,YAA8B,EAAE,EAChC,MAA8B;QAE9B,aAAa;QACb,SAAS,CAAC,KAAK,KAAK,aAAK,CAAC,OAAO,CAAA;QACjC,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAA;QAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,gBAAU,CAAC,SAAS,CAAC,CAAA;QAEpC,IAAI,CAAC,QAAQ,GAAG,CAAE,gBAA2B,CAAC,QAAQ;YACpD,gBAAgB,CAAoB,CAAA;QACtC,IAAI,CAAC,iBAAiB,GAAG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gBAC1C,GAAG,oBAAoB;gBACvB,KAAK;aACN,CAAC,CAAA;YACF,MAAM,KAAK,CAAA;QACb,CAAC;IACH,CAAC;CACF;AAn/BD,gCAm/BC"}
@@ -0,0 +1,18 @@
1
+ import type { Chain, OpenSeaAccount, OpenSeaPaymentToken } from "../types";
2
+ import type { Fetcher } from "./fetcher";
3
+ /**
4
+ * Account and payment token related API operations
5
+ */
6
+ export declare class AccountsAPI {
7
+ private fetcher;
8
+ private chain;
9
+ constructor(fetcher: Fetcher, chain: Chain);
10
+ /**
11
+ * Fetch a payment token.
12
+ */
13
+ getPaymentToken(address: string, chain?: Chain): Promise<OpenSeaPaymentToken>;
14
+ /**
15
+ * Fetch account for an address.
16
+ */
17
+ getAccount(address: string): Promise<OpenSeaAccount>;
18
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccountsAPI = void 0;
4
+ const converters_1 = require("../utils/converters");
5
+ const apiPaths_1 = require("./apiPaths");
6
+ /**
7
+ * Account and payment token related API operations
8
+ */
9
+ class AccountsAPI {
10
+ constructor(fetcher, chain) {
11
+ this.fetcher = fetcher;
12
+ this.chain = chain;
13
+ }
14
+ /**
15
+ * Fetch a payment token.
16
+ */
17
+ async getPaymentToken(address, chain = this.chain) {
18
+ const json = await this.fetcher.get((0, apiPaths_1.getPaymentTokenPath)(chain, address));
19
+ return (0, converters_1.paymentTokenFromJSON)(json);
20
+ }
21
+ /**
22
+ * Fetch account for an address.
23
+ */
24
+ async getAccount(address) {
25
+ const json = await this.fetcher.get((0, apiPaths_1.getAccountPath)(address));
26
+ return (0, converters_1.accountFromJSON)(json);
27
+ }
28
+ }
29
+ exports.AccountsAPI = AccountsAPI;
30
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/api/accounts.ts"],"names":[],"mappings":";;;AACA,oDAA2E;AAC3E,yCAAgE;AAGhE;;GAEG;AACH,MAAa,WAAW;IACtB,YACU,OAAgB,EAChB,KAAY;QADZ,YAAO,GAAP,OAAO,CAAS;QAChB,UAAK,GAAL,KAAK,CAAO;IACnB,CAAC;IAEJ;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,OAAe,EACf,KAAK,GAAG,IAAI,CAAC,KAAK;QAElB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CACjC,IAAA,8BAAmB,EAAC,KAAK,EAAE,OAAO,CAAC,CACpC,CAAA;QACD,OAAO,IAAA,iCAAoB,EAAC,IAAI,CAAC,CAAA;IACnC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAiB,IAAA,yBAAc,EAAC,OAAO,CAAC,CAAC,CAAA;QAC5E,OAAO,IAAA,4BAAe,EAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;CACF;AA1BD,kCA0BC"}
@@ -0,0 +1,429 @@
1
+ import type { FulfillmentDataResponse, OrderAPIOptions, OrdersQueryOptions, OrderV2, ProtocolData } from "../orders/types";
2
+ import { Chain, type OpenSeaAccount, type OpenSeaAPIConfig, type OpenSeaCollection, type OpenSeaCollectionStats, type OpenSeaPaymentToken, type OrderSide, type RequestOptions } from "../types";
3
+ import { type BuildOfferResponse, type CancelOrderResponse, type CollectionOffer, CollectionOrderByOption, type GetBestListingResponse, type GetBestOfferResponse, type GetCollectionsResponse, type GetContractResponse, type GetEventsArgs, type GetEventsResponse, type GetListingsResponse, type GetNFTResponse, type GetOffersResponse, type GetOrderByHashResponse, type GetOrdersResponse, type GetSwapQuoteArgs, type GetSwapQuoteResponse, type GetTokenResponse, type GetTokensArgs, type GetTopTokensResponse, type GetTraitsResponse, type GetTrendingTokensResponse, type Listing, type ListNFTsResponse, type Offer, type SearchArgs, type SearchResponse } from "./types";
4
+ /**
5
+ * The API class for the OpenSea SDK.
6
+ * @category Main Classes
7
+ */
8
+ export declare class OpenSeaAPI {
9
+ /**
10
+ * Base url for the API
11
+ */
12
+ readonly apiBaseUrl: string;
13
+ /**
14
+ * Default size to use for fetching orders
15
+ */
16
+ pageSize: number;
17
+ /**
18
+ * Logger function to use when debugging
19
+ */
20
+ logger: (arg: string) => void;
21
+ private apiKey;
22
+ private chain;
23
+ private ordersAPI;
24
+ private offersAPI;
25
+ private listingsAPI;
26
+ private collectionsAPI;
27
+ private nftsAPI;
28
+ private accountsAPI;
29
+ private eventsAPI;
30
+ private searchAPI;
31
+ private tokensAPI;
32
+ /**
33
+ * Create an instance of the OpenSeaAPI
34
+ * @param config OpenSeaAPIConfig for setting up the API, including an optional API key, Chain name, and base URL
35
+ * @param logger Optional function for logging debug strings before and after requests are made. Defaults to no logging
36
+ */
37
+ constructor(config: OpenSeaAPIConfig, logger?: (arg: string) => void);
38
+ /**
39
+ * Gets an order from API based on query options.
40
+ * @deprecated Use collection-based endpoints instead: getAllOffers, getAllListings, getBestOffer, getBestListing.
41
+ * @param options Query options for fetching an order
42
+ * @returns The first {@link OrderV2} returned by the API
43
+ *
44
+ * @throws An error if there are no matching orders.
45
+ */
46
+ getOrder(options: Omit<OrdersQueryOptions, "limit">): Promise<OrderV2>;
47
+ /**
48
+ * Gets a single order by its order hash.
49
+ * @param orderHash The hash of the order to fetch
50
+ * @param protocolAddress The address of the seaport contract
51
+ * @param chain The chain where the order is located. Defaults to the chain set in the constructor.
52
+ * @returns The {@link GetOrderByHashResponse} returned by the API (can be Offer or Listing)
53
+ * @throws An error if the order is not found
54
+ */
55
+ getOrderByHash(orderHash: string, protocolAddress: string, chain?: Chain): Promise<GetOrderByHashResponse>;
56
+ /**
57
+ * Gets a list of orders from API based on query options.
58
+ * @deprecated Use collection-based endpoints instead: getAllOffers, getAllListings, getBestOffer, getBestListing.
59
+ * @param options Query options for fetching orders
60
+ * @returns The {@link GetOrdersResponse} returned by the API.
61
+ */
62
+ getOrders(options: Omit<OrdersQueryOptions, "limit">): Promise<GetOrdersResponse>;
63
+ /**
64
+ * Gets all offers for a given collection.
65
+ * @param collectionSlug The slug of the collection.
66
+ * @param limit The number of offers to return. Must be between 1 and 100. Default: 100
67
+ * @param next The cursor for the next page of results. This is returned from a previous request.
68
+ * @returns The {@link GetOffersResponse} returned by the API.
69
+ */
70
+ getAllOffers(collectionSlug: string, limit?: number, next?: string): Promise<GetOffersResponse>;
71
+ /**
72
+ * Gets all listings for a given collection.
73
+ * @param collectionSlug The slug of the collection.
74
+ * @param limit The number of listings to return. Must be between 1 and 100. Default: 100
75
+ * @param next The cursor for the next page of results. This is returned from a previous request.
76
+ * @param includePrivateListings Whether to include private listings (default: false)
77
+ * @returns The {@link GetListingsResponse} returned by the API.
78
+ */
79
+ getAllListings(collectionSlug: string, limit?: number, next?: string, includePrivateListings?: boolean): Promise<GetListingsResponse>;
80
+ /**
81
+ * Gets trait offers for a given collection.
82
+ * @param collectionSlug The slug of the collection.
83
+ * @param type The name of the trait (e.g. 'Background').
84
+ * @param value The value of the trait (e.g. 'Red').
85
+ * @param limit The number of offers to return. Must be between 1 and 100. Default: 100
86
+ * @param next The cursor for the next page of results. This is returned from a previous request.
87
+ * @param floatValue The value of the trait for decimal-based numeric traits.
88
+ * @param intValue The value of the trait for integer-based numeric traits.
89
+ * @returns The {@link GetOffersResponse} returned by the API.
90
+ */
91
+ getTraitOffers(collectionSlug: string, type: string, value: string, limit?: number, next?: string, floatValue?: number, intValue?: number): Promise<GetOffersResponse>;
92
+ /**
93
+ * Gets the best offer for a given token.
94
+ * @param collectionSlug The slug of the collection.
95
+ * @param tokenId The token identifier.
96
+ * @returns The {@link GetBestOfferResponse} returned by the API.
97
+ */
98
+ getBestOffer(collectionSlug: string, tokenId: string | number): Promise<GetBestOfferResponse>;
99
+ /**
100
+ * Gets the best listing for a given token.
101
+ * @param collectionSlug The slug of the collection.
102
+ * @param tokenId The token identifier.
103
+ * @param includePrivateListings Whether to include private listings (default: false)
104
+ * @returns The {@link GetBestListingResponse} returned by the API.
105
+ */
106
+ getBestListing(collectionSlug: string, tokenId: string | number, includePrivateListings?: boolean): Promise<GetBestListingResponse>;
107
+ /**
108
+ * Gets the best listings for a given collection.
109
+ * @param collectionSlug The slug of the collection.
110
+ * @param limit The number of listings to return. Must be between 1 and 100. Default: 100
111
+ * @param next The cursor for the next page of results. This is returned from a previous request.
112
+ * @param includePrivateListings Whether to include private listings (default: false)
113
+ * @returns The {@link GetListingsResponse} returned by the API.
114
+ */
115
+ getBestListings(collectionSlug: string, limit?: number, next?: string, includePrivateListings?: boolean): Promise<GetListingsResponse>;
116
+ /**
117
+ * Generate the data needed to fulfill a listing or an offer onchain.
118
+ * @param fulfillerAddress The wallet address which will be used to fulfill the order
119
+ * @param orderHash The hash of the order to fulfill
120
+ * @param protocolAddress The address of the seaport contract
121
+ * @param side The side of the order (buy or sell)
122
+ * @param assetContractAddress Optional address of the NFT contract for criteria offers (e.g., collection offers)
123
+ * @param tokenId Optional token ID for criteria offers (e.g., collection offers)
124
+ * @param unitsToFill Optional number of units to fill. Defaults to 1 for both listings and offers.
125
+ * @param recipientAddress Optional recipient address for the NFT when fulfilling a listing. Not applicable for offers.
126
+ * @param includeOptionalCreatorFees Whether to include optional creator fees in the fulfillment. If creator fees are already required, this is a no-op. Defaults to false.
127
+ * @returns The {@link FulfillmentDataResponse}
128
+ */
129
+ generateFulfillmentData(fulfillerAddress: string, orderHash: string, protocolAddress: string, side: OrderSide, assetContractAddress?: string, tokenId?: string, unitsToFill?: string, recipientAddress?: string, includeOptionalCreatorFees?: boolean): Promise<FulfillmentDataResponse>;
130
+ /**
131
+ * Post an order to OpenSea.
132
+ * @deprecated Use postListing or postOffer instead.
133
+ * @param order The order to post
134
+ * @param apiOptions API options for the order
135
+ * @returns The {@link OrderV2} posted to the API.
136
+ */
137
+ postOrder(order: ProtocolData, apiOptions: OrderAPIOptions): Promise<OrderV2>;
138
+ /**
139
+ * Post a listing to OpenSea. Returns the new v2 Listing response format.
140
+ * @param order The order to post
141
+ * @param protocolAddress The contract address of the seaport protocol
142
+ * @returns The {@link Listing} posted to the API.
143
+ */
144
+ postListing(order: ProtocolData, protocolAddress: string): Promise<Listing>;
145
+ /**
146
+ * Post an offer to OpenSea. Returns the new v2 Offer response format.
147
+ * @param order The order to post
148
+ * @param protocolAddress The contract address of the seaport protocol
149
+ * @returns The {@link Offer} posted to the API.
150
+ */
151
+ postOffer(order: ProtocolData, protocolAddress: string): Promise<Offer>;
152
+ /**
153
+ * Build a OpenSea collection offer.
154
+ * @param offererAddress The wallet address which is creating the offer.
155
+ * @param quantity The number of NFTs requested in the offer.
156
+ * @param collectionSlug The slug (identifier) of the collection to build the offer for.
157
+ * @param offerProtectionEnabled Build the offer on OpenSea's signed zone to provide offer protections from receiving an item which is disabled from trading.
158
+ * @param traitType If defined, the trait name to create the collection offer for.
159
+ * @param traitValue If defined, the trait value to create the collection offer for.
160
+ * @param traits If defined, an array of traits to create the multi-trait collection offer for.
161
+ * @param numericTraits If defined, an array of numeric trait criteria with min/max ranges.
162
+ * @returns The {@link BuildOfferResponse} returned by the API.
163
+ */
164
+ buildOffer(offererAddress: string, quantity: number, collectionSlug: string, offerProtectionEnabled?: boolean, traitType?: string, traitValue?: string, traits?: Array<{
165
+ type: string;
166
+ value: string;
167
+ }>, numericTraits?: Array<{
168
+ type: string;
169
+ min?: number;
170
+ max?: number;
171
+ }>): Promise<BuildOfferResponse>;
172
+ /**
173
+ * Get a list collection offers for a given slug.
174
+ * @param slug The slug (identifier) of the collection to list offers for
175
+ * @param limit Optional limit for number of results.
176
+ * @param next Optional cursor for pagination.
177
+ * @returns The {@link GetOffersResponse} returned by the API.
178
+ */
179
+ getCollectionOffers(slug: string, limit?: number, next?: string): Promise<GetOffersResponse>;
180
+ /**
181
+ * Post a collection offer to OpenSea.
182
+ * @param order The collection offer to post.
183
+ * @param slug The slug (identifier) of the collection to post the offer for.
184
+ * @param traitType If defined, the trait name to create the collection offer for.
185
+ * @param traitValue If defined, the trait value to create the collection offer for.
186
+ * @param traits If defined, an array of traits to create the multi-trait collection offer for.
187
+ * @param numericTraits If defined, an array of numeric trait criteria with min/max ranges.
188
+ * @returns The {@link Offer} returned to the API.
189
+ */
190
+ postCollectionOffer(order: ProtocolData, slug: string, traitType?: string, traitValue?: string, traits?: Array<{
191
+ type: string;
192
+ value: string;
193
+ }>, numericTraits?: Array<{
194
+ type: string;
195
+ min?: number;
196
+ max?: number;
197
+ }>): Promise<CollectionOffer | null>;
198
+ /**
199
+ * Fetch multiple NFTs for a collection.
200
+ * @param slug The slug (identifier) of the collection
201
+ * @param limit The number of NFTs to retrieve. Must be greater than 0 and less than 51.
202
+ * @param next Cursor to retrieve the next page of NFTs
203
+ * @returns The {@link ListNFTsResponse} returned by the API.
204
+ */
205
+ getNFTsByCollection(slug: string, limit?: number | undefined, next?: string | undefined): Promise<ListNFTsResponse>;
206
+ /**
207
+ * Fetch multiple NFTs for a contract.
208
+ * @param address The NFT's contract address.
209
+ * @param limit The number of NFTs to retrieve. Must be greater than 0 and less than 51.
210
+ * @param next Cursor to retrieve the next page of NFTs.
211
+ * @param chain The NFT's chain.
212
+ * @returns The {@link ListNFTsResponse} returned by the API.
213
+ */
214
+ getNFTsByContract(address: string, limit?: number | undefined, next?: string | undefined, chain?: Chain): Promise<ListNFTsResponse>;
215
+ /**
216
+ * Fetch NFTs owned by an account.
217
+ * @param address The address of the account
218
+ * @param limit The number of NFTs to retrieve. Must be greater than 0 and less than 51.
219
+ * @param next Cursor to retrieve the next page of NFTs
220
+ * @param chain The chain to query. Defaults to the chain set in the constructor.
221
+ * @returns The {@link ListNFTsResponse} returned by the API.
222
+ */
223
+ getNFTsByAccount(address: string, limit?: number | undefined, next?: string | undefined, chain?: Chain): Promise<ListNFTsResponse>;
224
+ /**
225
+ * Fetch metadata, traits, ownership information, and rarity for a single NFT.
226
+ * @param address The NFT's contract address.
227
+ * @param identifier the identifier of the NFT (i.e. Token ID)
228
+ * @param chain The NFT's chain.
229
+ * @returns The {@link GetNFTResponse} returned by the API.
230
+ */
231
+ getNFT(address: string, identifier: string, chain?: Chain): Promise<GetNFTResponse>;
232
+ /**
233
+ * Fetch an OpenSea collection.
234
+ * @param slug The slug (identifier) of the collection.
235
+ * @returns The {@link OpenSeaCollection} returned by the API.
236
+ */
237
+ getCollection(slug: string): Promise<OpenSeaCollection>;
238
+ /**
239
+ * Fetch a list of OpenSea collections.
240
+ * @param orderBy The order to return the collections in. Default: CREATED_DATE
241
+ * @param chain The chain to filter the collections on. Default: all chains
242
+ * @param creatorUsername The creator's OpenSea username to filter the collections on.
243
+ * @param includeHidden If hidden collections should be returned. Default: false
244
+ * @param limit The limit of collections to return.
245
+ * @param next The cursor for the next page of results. This is returned from a previous request.
246
+ * @returns List of {@link OpenSeaCollection} returned by the API.
247
+ */
248
+ getCollections(orderBy?: CollectionOrderByOption, chain?: Chain, creatorUsername?: string, includeHidden?: boolean, limit?: number, next?: string): Promise<GetCollectionsResponse>;
249
+ /**
250
+ * Fetch stats for an OpenSea collection.
251
+ * @param slug The slug (identifier) of the collection.
252
+ * @returns The {@link OpenSeaCollection} returned by the API.
253
+ */
254
+ getCollectionStats(slug: string): Promise<OpenSeaCollectionStats>;
255
+ /**
256
+ * Fetch a payment token.
257
+ * @param address The address of the payment token
258
+ * @param chain The chain of the payment token
259
+ * @returns The {@link OpenSeaPaymentToken} returned by the API.
260
+ */
261
+ getPaymentToken(address: string, chain?: Chain): Promise<OpenSeaPaymentToken>;
262
+ /**
263
+ * Fetch account for an address.
264
+ * @param address The address to fetch the account for
265
+ * @returns The {@link OpenSeaAccount} returned by the API.
266
+ */
267
+ getAccount(address: string): Promise<OpenSeaAccount>;
268
+ /**
269
+ * Force refresh the metadata for an NFT.
270
+ * @param address The address of the NFT's contract.
271
+ * @param identifier The identifier of the NFT.
272
+ * @param chain The chain where the NFT is located.
273
+ * @returns The response from the API.
274
+ */
275
+ refreshNFTMetadata(address: string, identifier: string, chain?: Chain): Promise<Response>;
276
+ /**
277
+ * Offchain cancel an order, offer or listing, by its order hash when protected by the SignedZone.
278
+ * Protocol and Chain are required to prevent hash collisions.
279
+ * Please note cancellation is only assured if a fulfillment signature was not vended prior to cancellation.
280
+ * @param protocolAddress The Seaport address for the order.
281
+ * @param orderHash The order hash, or external identifier, of the order.
282
+ * @param chain The chain where the order is located.
283
+ * @param offererSignature An EIP-712 signature from the offerer of the order.
284
+ * If this is not provided, the user associated with the API Key will be checked instead.
285
+ * The signature must be a EIP-712 signature consisting of the order's Seaport contract's
286
+ * name, version, address, and chain. The struct to sign is `OrderHash` containing a
287
+ * single bytes32 field.
288
+ * @returns The response from the API.
289
+ */
290
+ offchainCancelOrder(protocolAddress: string, orderHash: string, chain?: Chain, offererSignature?: string): Promise<CancelOrderResponse>;
291
+ /**
292
+ * Gets a list of events based on query parameters.
293
+ * @param args Query parameters for filtering events.
294
+ * @returns The {@link GetEventsResponse} returned by the API.
295
+ */
296
+ getEvents(args?: GetEventsArgs): Promise<GetEventsResponse>;
297
+ /**
298
+ * Gets a list of events for a specific account.
299
+ * @param address The account address.
300
+ * @param args Query parameters for filtering events.
301
+ * @returns The {@link GetEventsResponse} returned by the API.
302
+ */
303
+ getEventsByAccount(address: string, args?: GetEventsArgs): Promise<GetEventsResponse>;
304
+ /**
305
+ * Gets a list of events for a specific collection.
306
+ * @param collectionSlug The slug (identifier) of the collection.
307
+ * @param args Query parameters for filtering events.
308
+ * @returns The {@link GetEventsResponse} returned by the API.
309
+ */
310
+ getEventsByCollection(collectionSlug: string, args?: GetEventsArgs): Promise<GetEventsResponse>;
311
+ /**
312
+ * Gets a list of events for a specific NFT.
313
+ * @param chain The chain where the NFT is located.
314
+ * @param address The contract address of the NFT.
315
+ * @param identifier The token identifier.
316
+ * @param args Query parameters for filtering events.
317
+ * @returns The {@link GetEventsResponse} returned by the API.
318
+ */
319
+ getEventsByNFT(chain: Chain, address: string, identifier: string, args?: GetEventsArgs): Promise<GetEventsResponse>;
320
+ /**
321
+ * Fetch smart contract information for a given chain and address.
322
+ * @param address The contract address.
323
+ * @param chain The chain where the contract is deployed. Defaults to the chain set in the constructor.
324
+ * @returns The {@link GetContractResponse} returned by the API.
325
+ */
326
+ getContract(address: string, chain?: Chain): Promise<GetContractResponse>;
327
+ /**
328
+ * Fetch all traits for a collection with their possible values and counts.
329
+ * @param collectionSlug The slug (identifier) of the collection.
330
+ * @returns The {@link GetTraitsResponse} returned by the API.
331
+ */
332
+ getTraits(collectionSlug: string): Promise<GetTraitsResponse>;
333
+ /**
334
+ * Gets a list of trending tokens.
335
+ * @param args Optional query parameters for pagination.
336
+ * @returns The {@link GetTrendingTokensResponse} returned by the API.
337
+ */
338
+ getTrendingTokens(args?: GetTokensArgs): Promise<GetTrendingTokensResponse>;
339
+ /**
340
+ * Gets a list of top tokens.
341
+ * @param args Optional query parameters for pagination.
342
+ * @returns The {@link GetTopTokensResponse} returned by the API.
343
+ */
344
+ getTopTokens(args?: GetTokensArgs): Promise<GetTopTokensResponse>;
345
+ /**
346
+ * Gets a swap quote for exchanging tokens.
347
+ * @param args Query parameters for the swap quote including token addresses, amount, and chain.
348
+ * @returns The {@link GetSwapQuoteResponse} returned by the API.
349
+ */
350
+ getSwapQuote(args: GetSwapQuoteArgs): Promise<GetSwapQuoteResponse>;
351
+ /**
352
+ * Gets details for a specific token.
353
+ * @param chain The chain the token is on.
354
+ * @param address The token contract address.
355
+ * @returns The {@link GetTokenResponse} returned by the API.
356
+ */
357
+ getToken(chain: string, address: string): Promise<GetTokenResponse>;
358
+ /**
359
+ * Search across collections, tokens, NFTs, and accounts.
360
+ * Results are ranked by relevance.
361
+ * @param args Query parameters including query text, optional chain/asset type filters, and limit.
362
+ * @returns The {@link SearchResponse} returned by the API.
363
+ */
364
+ search(args: SearchArgs): Promise<SearchResponse>;
365
+ /**
366
+ * Gets all active offers for a specific NFT (not just the best offer).
367
+ * @param assetContractAddress The NFT contract address.
368
+ * @param tokenId The token identifier.
369
+ * @param limit The number of offers to return. Must be between 1 and 100.
370
+ * @param next The cursor for the next page of results. This is returned from a previous request.
371
+ * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
372
+ * @returns The {@link GetOffersResponse} returned by the API.
373
+ */
374
+ getNFTOffers(assetContractAddress: string, tokenId: string, limit?: number, next?: string, chain?: Chain): Promise<GetOffersResponse>;
375
+ /**
376
+ * Gets all active listings for a specific NFT (not just the best listing).
377
+ * @param assetContractAddress The NFT contract address.
378
+ * @param tokenId The token identifier.
379
+ * @param limit The number of listings to return. Must be between 1 and 100.
380
+ * @param next The cursor for the next page of results. This is returned from a previous request.
381
+ * @param chain The chain where the NFT is located. Defaults to the chain set in the constructor.
382
+ * @param includePrivateListings Whether to include private listings (default: false)
383
+ * @returns The {@link GetListingsResponse} returned by the API.
384
+ */
385
+ getNFTListings(assetContractAddress: string, tokenId: string, limit?: number, next?: string, chain?: Chain, includePrivateListings?: boolean): Promise<GetListingsResponse>;
386
+ /**
387
+ * Generic fetch method for any API endpoint with automatic rate limit retry
388
+ * @param apiPath Path to URL endpoint under API
389
+ * @param query URL query params. Will be used to create a URLSearchParams object.
390
+ * @param options Request options like timeout and abort signal.
391
+ * @returns @typeParam T The response from the API.
392
+ */
393
+ get<T>(apiPath: string, query?: object, options?: RequestOptions): Promise<T>;
394
+ /**
395
+ * Generic post method for any API endpoint with automatic rate limit retry
396
+ * @param apiPath Path to URL endpoint under API
397
+ * @param body Data to send.
398
+ * @param headers Additional headers to send with the request.
399
+ * @param options Request options like timeout and abort signal.
400
+ * @returns @typeParam T The response from the API.
401
+ */
402
+ post<T>(apiPath: string, body?: object, headers?: object, options?: RequestOptions): Promise<T>;
403
+ private objectToSearchParams;
404
+ /**
405
+ * Fetch from an API Endpoint, sending auth token in headers
406
+ * @param url The URL to fetch
407
+ * @param headers Additional headers to send with the request
408
+ * @param body Optional body to send. If set, will POST, otherwise GET
409
+ * @param options Request options like timeout and abort signal
410
+ */
411
+ private _fetch;
412
+ /**
413
+ * Maximum retry-after value in seconds (5 minutes).
414
+ * Prevents excessively long waits from buggy or malicious servers.
415
+ */
416
+ private static readonly MAX_RETRY_AFTER_SECONDS;
417
+ /**
418
+ * Parses the retry-after header from the response with robust error handling.
419
+ * @param response The HTTP response object from the API
420
+ * @returns The retry-after value in seconds (capped at 5 minutes), or undefined if not present or invalid
421
+ */
422
+ private _parseRetryAfter;
423
+ /**
424
+ * Creates a rate limit error with status code and retry-after information.
425
+ * @param response The HTTP response object from the API
426
+ * @returns An enhanced Error object with statusCode, retryAfter and responseBody properties
427
+ */
428
+ private _createRateLimitError;
429
+ }