@ensdomains/ensjs 3.0.0-beta.5 → 3.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/dist/cjs/clients/decorators/wallet.js +2 -0
  2. package/dist/cjs/clients/decorators/wallet.js.map +1 -1
  3. package/dist/cjs/contracts/consts.js +1 -1
  4. package/dist/cjs/errors/version.js +1 -1
  5. package/dist/cjs/functions/dns/getDnsImportData.js.map +1 -1
  6. package/dist/cjs/functions/dns/importDnsName.js.map +1 -1
  7. package/dist/cjs/functions/public/_getAddr.js +15 -13
  8. package/dist/cjs/functions/public/_getAddr.js.map +1 -1
  9. package/dist/cjs/functions/public/batch.js.map +1 -1
  10. package/dist/cjs/functions/public/getAbiRecord.js.map +1 -1
  11. package/dist/cjs/functions/public/getAddressRecord.js.map +1 -1
  12. package/dist/cjs/functions/public/getAvailable.js.map +1 -1
  13. package/dist/cjs/functions/public/getContentHashRecord.js.map +1 -1
  14. package/dist/cjs/functions/public/getExpiry.js.map +1 -1
  15. package/dist/cjs/functions/public/getName.js.map +1 -1
  16. package/dist/cjs/functions/public/getOwner.js.map +1 -1
  17. package/dist/cjs/functions/public/getPrice.js.map +1 -1
  18. package/dist/cjs/functions/public/getRecords.js +51 -37
  19. package/dist/cjs/functions/public/getRecords.js.map +1 -1
  20. package/dist/cjs/functions/public/getResolver.js.map +1 -1
  21. package/dist/cjs/functions/public/getSupportedInterfaces.js.map +1 -1
  22. package/dist/cjs/functions/public/getTextRecord.js.map +1 -1
  23. package/dist/cjs/functions/public/getWrapperData.js.map +1 -1
  24. package/dist/cjs/functions/public/getWrapperName.js.map +1 -1
  25. package/dist/cjs/functions/subgraph/getDecodedName.js.map +1 -1
  26. package/dist/cjs/functions/subgraph/getNameHistory.js.map +1 -1
  27. package/dist/cjs/functions/subgraph/getNamesForAddress.js +17 -10
  28. package/dist/cjs/functions/subgraph/getNamesForAddress.js.map +1 -1
  29. package/dist/cjs/functions/subgraph/getSubgraphRecords.js +34 -26
  30. package/dist/cjs/functions/subgraph/getSubgraphRecords.js.map +1 -1
  31. package/dist/cjs/functions/subgraph/getSubgraphRegistrant.js.map +1 -1
  32. package/dist/cjs/functions/subgraph/getSubnames.js.map +1 -1
  33. package/dist/cjs/functions/wallet/clearRecords.js +26 -0
  34. package/dist/cjs/functions/wallet/clearRecords.js.map +1 -0
  35. package/dist/cjs/functions/wallet/commitName.js.map +1 -1
  36. package/dist/cjs/functions/wallet/createSubname.js.map +1 -1
  37. package/dist/cjs/functions/wallet/deleteSubname.js.map +1 -1
  38. package/dist/cjs/functions/wallet/registerName.js.map +1 -1
  39. package/dist/cjs/functions/wallet/renewNames.js.map +1 -1
  40. package/dist/cjs/functions/wallet/setAbiRecord.js.map +1 -1
  41. package/dist/cjs/functions/wallet/setAddressRecord.js.map +1 -1
  42. package/dist/cjs/functions/wallet/setChildFuses.js.map +1 -1
  43. package/dist/cjs/functions/wallet/setContentHashRecord.js.map +1 -1
  44. package/dist/cjs/functions/wallet/setFuses.js.map +1 -1
  45. package/dist/cjs/functions/wallet/setPrimaryName.js.map +1 -1
  46. package/dist/cjs/functions/wallet/setRecords.js.map +1 -1
  47. package/dist/cjs/functions/wallet/setResolver.js.map +1 -1
  48. package/dist/cjs/functions/wallet/setTextRecord.js.map +1 -1
  49. package/dist/cjs/functions/wallet/transferName.js.map +1 -1
  50. package/dist/cjs/functions/wallet/unwrapName.js.map +1 -1
  51. package/dist/cjs/functions/wallet/wrapName.js.map +1 -1
  52. package/dist/cjs/subgraph.js +4 -1
  53. package/dist/cjs/subgraph.js.map +1 -1
  54. package/dist/cjs/utils/contentHash.js +5 -3
  55. package/dist/cjs/utils/contentHash.js.map +1 -1
  56. package/dist/cjs/utils/encoders/encodeClearRecords.js +12 -0
  57. package/dist/cjs/utils/encoders/encodeClearRecords.js.map +1 -0
  58. package/dist/cjs/utils/fuses.js +12 -9
  59. package/dist/cjs/utils/fuses.js.map +1 -1
  60. package/dist/cjs/utils/generateRecordCallArray.js +2 -7
  61. package/dist/cjs/utils/generateRecordCallArray.js.map +1 -1
  62. package/dist/cjs/utils/index.js +9 -2
  63. package/dist/cjs/utils/index.js.map +1 -1
  64. package/dist/cjs/utils/normaliseCoinId.js +15 -0
  65. package/dist/cjs/utils/normaliseCoinId.js.map +1 -0
  66. package/dist/cjs/wallet.js +3 -1
  67. package/dist/cjs/wallet.js.map +1 -1
  68. package/dist/esm/clients/decorators/wallet.js +2 -0
  69. package/dist/esm/clients/decorators/wallet.js.map +1 -1
  70. package/dist/esm/contracts/consts.js +1 -1
  71. package/dist/esm/errors/version.js +1 -1
  72. package/dist/esm/functions/dns/getDnsImportData.js +2 -1
  73. package/dist/esm/functions/dns/getDnsImportData.js.map +1 -1
  74. package/dist/esm/functions/dns/getDnsOwner.js +1 -1
  75. package/dist/esm/functions/dns/importDnsName.js +2 -1
  76. package/dist/esm/functions/dns/importDnsName.js.map +1 -1
  77. package/dist/esm/functions/public/_getAddr.js +15 -13
  78. package/dist/esm/functions/public/_getAddr.js.map +1 -1
  79. package/dist/esm/functions/public/batch.js +2 -1
  80. package/dist/esm/functions/public/batch.js.map +1 -1
  81. package/dist/esm/functions/public/getAbiRecord.js +2 -1
  82. package/dist/esm/functions/public/getAbiRecord.js.map +1 -1
  83. package/dist/esm/functions/public/getAddressRecord.js +2 -1
  84. package/dist/esm/functions/public/getAddressRecord.js.map +1 -1
  85. package/dist/esm/functions/public/getAvailable.js +2 -1
  86. package/dist/esm/functions/public/getAvailable.js.map +1 -1
  87. package/dist/esm/functions/public/getContentHashRecord.js +2 -1
  88. package/dist/esm/functions/public/getContentHashRecord.js.map +1 -1
  89. package/dist/esm/functions/public/getExpiry.js +2 -1
  90. package/dist/esm/functions/public/getExpiry.js.map +1 -1
  91. package/dist/esm/functions/public/getName.js +2 -1
  92. package/dist/esm/functions/public/getName.js.map +1 -1
  93. package/dist/esm/functions/public/getOwner.js +3 -2
  94. package/dist/esm/functions/public/getOwner.js.map +1 -1
  95. package/dist/esm/functions/public/getPrice.js +3 -2
  96. package/dist/esm/functions/public/getPrice.js.map +1 -1
  97. package/dist/esm/functions/public/getRecords.js +54 -39
  98. package/dist/esm/functions/public/getRecords.js.map +1 -1
  99. package/dist/esm/functions/public/getResolver.js +2 -1
  100. package/dist/esm/functions/public/getResolver.js.map +1 -1
  101. package/dist/esm/functions/public/getSupportedInterfaces.js +22 -0
  102. package/dist/esm/functions/public/getSupportedInterfaces.js.map +1 -1
  103. package/dist/esm/functions/public/getTextRecord.js +2 -1
  104. package/dist/esm/functions/public/getTextRecord.js.map +1 -1
  105. package/dist/esm/functions/public/getWrapperData.js +2 -1
  106. package/dist/esm/functions/public/getWrapperData.js.map +1 -1
  107. package/dist/esm/functions/public/getWrapperName.js +2 -1
  108. package/dist/esm/functions/public/getWrapperName.js.map +1 -1
  109. package/dist/esm/functions/subgraph/getDecodedName.js +2 -1
  110. package/dist/esm/functions/subgraph/getDecodedName.js.map +1 -1
  111. package/dist/esm/functions/subgraph/getNameHistory.js +2 -1
  112. package/dist/esm/functions/subgraph/getNameHistory.js.map +1 -1
  113. package/dist/esm/functions/subgraph/getNamesForAddress.js +21 -11
  114. package/dist/esm/functions/subgraph/getNamesForAddress.js.map +1 -1
  115. package/dist/esm/functions/subgraph/getSubgraphRecords.js +36 -27
  116. package/dist/esm/functions/subgraph/getSubgraphRecords.js.map +1 -1
  117. package/dist/esm/functions/subgraph/getSubgraphRegistrant.js +2 -1
  118. package/dist/esm/functions/subgraph/getSubgraphRegistrant.js.map +1 -1
  119. package/dist/esm/functions/subgraph/getSubnames.js +2 -1
  120. package/dist/esm/functions/subgraph/getSubnames.js.map +1 -1
  121. package/dist/esm/functions/wallet/clearRecords.js +44 -0
  122. package/dist/esm/functions/wallet/clearRecords.js.map +1 -0
  123. package/dist/esm/functions/wallet/commitName.js +3 -1
  124. package/dist/esm/functions/wallet/commitName.js.map +1 -1
  125. package/dist/esm/functions/wallet/createSubname.js +2 -1
  126. package/dist/esm/functions/wallet/createSubname.js.map +1 -1
  127. package/dist/esm/functions/wallet/deleteSubname.js +2 -1
  128. package/dist/esm/functions/wallet/deleteSubname.js.map +1 -1
  129. package/dist/esm/functions/wallet/registerName.js +4 -1
  130. package/dist/esm/functions/wallet/registerName.js.map +1 -1
  131. package/dist/esm/functions/wallet/renewNames.js +3 -1
  132. package/dist/esm/functions/wallet/renewNames.js.map +1 -1
  133. package/dist/esm/functions/wallet/setAbiRecord.js +3 -1
  134. package/dist/esm/functions/wallet/setAbiRecord.js.map +1 -1
  135. package/dist/esm/functions/wallet/setAddressRecord.js +2 -1
  136. package/dist/esm/functions/wallet/setAddressRecord.js.map +1 -1
  137. package/dist/esm/functions/wallet/setChildFuses.js +2 -1
  138. package/dist/esm/functions/wallet/setChildFuses.js.map +1 -1
  139. package/dist/esm/functions/wallet/setContentHashRecord.js +2 -1
  140. package/dist/esm/functions/wallet/setContentHashRecord.js.map +1 -1
  141. package/dist/esm/functions/wallet/setFuses.js +2 -1
  142. package/dist/esm/functions/wallet/setFuses.js.map +1 -1
  143. package/dist/esm/functions/wallet/setPrimaryName.js +2 -1
  144. package/dist/esm/functions/wallet/setPrimaryName.js.map +1 -1
  145. package/dist/esm/functions/wallet/setRecords.js +2 -1
  146. package/dist/esm/functions/wallet/setRecords.js.map +1 -1
  147. package/dist/esm/functions/wallet/setResolver.js +2 -1
  148. package/dist/esm/functions/wallet/setResolver.js.map +1 -1
  149. package/dist/esm/functions/wallet/setTextRecord.js +2 -1
  150. package/dist/esm/functions/wallet/setTextRecord.js.map +1 -1
  151. package/dist/esm/functions/wallet/transferName.js +2 -1
  152. package/dist/esm/functions/wallet/transferName.js.map +1 -1
  153. package/dist/esm/functions/wallet/unwrapName.js +2 -1
  154. package/dist/esm/functions/wallet/unwrapName.js.map +1 -1
  155. package/dist/esm/functions/wallet/wrapName.js +2 -1
  156. package/dist/esm/functions/wallet/wrapName.js.map +1 -1
  157. package/dist/esm/subgraph.js +1 -0
  158. package/dist/esm/subgraph.js.map +1 -1
  159. package/dist/esm/utils/contentHash.js +2 -2
  160. package/dist/esm/utils/contentHash.js.map +1 -1
  161. package/dist/esm/utils/encoders/encodeClearRecords.js +8 -0
  162. package/dist/esm/utils/encoders/encodeClearRecords.js.map +1 -0
  163. package/dist/esm/utils/fuses.js +11 -8
  164. package/dist/esm/utils/fuses.js.map +1 -1
  165. package/dist/esm/utils/generateRecordCallArray.js +3 -7
  166. package/dist/esm/utils/generateRecordCallArray.js.map +1 -1
  167. package/dist/esm/utils/index.js +3 -2
  168. package/dist/esm/utils/index.js.map +1 -1
  169. package/dist/esm/utils/normaliseCoinId.js +11 -0
  170. package/dist/esm/utils/normaliseCoinId.js.map +1 -0
  171. package/dist/esm/wallet.js +1 -0
  172. package/dist/esm/wallet.js.map +1 -1
  173. package/dist/types/clients/decorators/wallet.d.ts +28 -3
  174. package/dist/types/clients/decorators/wallet.d.ts.map +1 -1
  175. package/dist/types/clients/wallet.d.ts +10 -0
  176. package/dist/types/clients/wallet.d.ts.map +1 -1
  177. package/dist/types/contracts/consts.d.ts +1 -1
  178. package/dist/types/errors/version.d.ts +1 -1
  179. package/dist/types/functions/dns/getDnsImportData.d.ts +2 -1
  180. package/dist/types/functions/dns/getDnsImportData.d.ts.map +1 -1
  181. package/dist/types/functions/dns/getDnsOwner.d.ts +1 -1
  182. package/dist/types/functions/dns/importDnsName.d.ts +2 -1
  183. package/dist/types/functions/dns/importDnsName.d.ts.map +1 -1
  184. package/dist/types/functions/public/_getAddr.d.ts.map +1 -1
  185. package/dist/types/functions/public/batch.d.ts +2 -1
  186. package/dist/types/functions/public/batch.d.ts.map +1 -1
  187. package/dist/types/functions/public/getAbiRecord.d.ts +2 -1
  188. package/dist/types/functions/public/getAbiRecord.d.ts.map +1 -1
  189. package/dist/types/functions/public/getAddressRecord.d.ts +2 -1
  190. package/dist/types/functions/public/getAddressRecord.d.ts.map +1 -1
  191. package/dist/types/functions/public/getAvailable.d.ts +2 -1
  192. package/dist/types/functions/public/getAvailable.d.ts.map +1 -1
  193. package/dist/types/functions/public/getContentHashRecord.d.ts +2 -1
  194. package/dist/types/functions/public/getContentHashRecord.d.ts.map +1 -1
  195. package/dist/types/functions/public/getExpiry.d.ts +2 -1
  196. package/dist/types/functions/public/getExpiry.d.ts.map +1 -1
  197. package/dist/types/functions/public/getName.d.ts +2 -1
  198. package/dist/types/functions/public/getName.d.ts.map +1 -1
  199. package/dist/types/functions/public/getOwner.d.ts +19 -9
  200. package/dist/types/functions/public/getOwner.d.ts.map +1 -1
  201. package/dist/types/functions/public/getPrice.d.ts +3 -2
  202. package/dist/types/functions/public/getPrice.d.ts.map +1 -1
  203. package/dist/types/functions/public/getRecords.d.ts +3 -2
  204. package/dist/types/functions/public/getRecords.d.ts.map +1 -1
  205. package/dist/types/functions/public/getResolver.d.ts +2 -1
  206. package/dist/types/functions/public/getResolver.d.ts.map +1 -1
  207. package/dist/types/functions/public/getSupportedInterfaces.d.ts +22 -0
  208. package/dist/types/functions/public/getSupportedInterfaces.d.ts.map +1 -1
  209. package/dist/types/functions/public/getTextRecord.d.ts +2 -1
  210. package/dist/types/functions/public/getTextRecord.d.ts.map +1 -1
  211. package/dist/types/functions/public/getWrapperData.d.ts +2 -1
  212. package/dist/types/functions/public/getWrapperData.d.ts.map +1 -1
  213. package/dist/types/functions/public/getWrapperName.d.ts +2 -1
  214. package/dist/types/functions/public/getWrapperName.d.ts.map +1 -1
  215. package/dist/types/functions/subgraph/getDecodedName.d.ts +2 -1
  216. package/dist/types/functions/subgraph/getDecodedName.d.ts.map +1 -1
  217. package/dist/types/functions/subgraph/getNameHistory.d.ts +2 -1
  218. package/dist/types/functions/subgraph/getNameHistory.d.ts.map +1 -1
  219. package/dist/types/functions/subgraph/getNamesForAddress.d.ts +5 -2
  220. package/dist/types/functions/subgraph/getNamesForAddress.d.ts.map +1 -1
  221. package/dist/types/functions/subgraph/getSubgraphRecords.d.ts +2 -1
  222. package/dist/types/functions/subgraph/getSubgraphRecords.d.ts.map +1 -1
  223. package/dist/types/functions/subgraph/getSubgraphRegistrant.d.ts +2 -1
  224. package/dist/types/functions/subgraph/getSubgraphRegistrant.d.ts.map +1 -1
  225. package/dist/types/functions/subgraph/getSubnames.d.ts +2 -1
  226. package/dist/types/functions/subgraph/getSubnames.d.ts.map +1 -1
  227. package/dist/types/functions/wallet/clearRecords.d.ts +552 -0
  228. package/dist/types/functions/wallet/clearRecords.d.ts.map +1 -0
  229. package/dist/types/functions/wallet/commitName.d.ts +3 -1
  230. package/dist/types/functions/wallet/commitName.d.ts.map +1 -1
  231. package/dist/types/functions/wallet/createSubname.d.ts +2 -1
  232. package/dist/types/functions/wallet/createSubname.d.ts.map +1 -1
  233. package/dist/types/functions/wallet/deleteSubname.d.ts +2 -1
  234. package/dist/types/functions/wallet/deleteSubname.d.ts.map +1 -1
  235. package/dist/types/functions/wallet/registerName.d.ts +4 -1
  236. package/dist/types/functions/wallet/registerName.d.ts.map +1 -1
  237. package/dist/types/functions/wallet/renewNames.d.ts +3 -1
  238. package/dist/types/functions/wallet/renewNames.d.ts.map +1 -1
  239. package/dist/types/functions/wallet/setAbiRecord.d.ts +3 -1
  240. package/dist/types/functions/wallet/setAbiRecord.d.ts.map +1 -1
  241. package/dist/types/functions/wallet/setAddressRecord.d.ts +2 -1
  242. package/dist/types/functions/wallet/setAddressRecord.d.ts.map +1 -1
  243. package/dist/types/functions/wallet/setChildFuses.d.ts +2 -1
  244. package/dist/types/functions/wallet/setChildFuses.d.ts.map +1 -1
  245. package/dist/types/functions/wallet/setContentHashRecord.d.ts +2 -1
  246. package/dist/types/functions/wallet/setContentHashRecord.d.ts.map +1 -1
  247. package/dist/types/functions/wallet/setFuses.d.ts +2 -1
  248. package/dist/types/functions/wallet/setFuses.d.ts.map +1 -1
  249. package/dist/types/functions/wallet/setPrimaryName.d.ts +2 -1
  250. package/dist/types/functions/wallet/setPrimaryName.d.ts.map +1 -1
  251. package/dist/types/functions/wallet/setRecords.d.ts +2 -1
  252. package/dist/types/functions/wallet/setRecords.d.ts.map +1 -1
  253. package/dist/types/functions/wallet/setResolver.d.ts +2 -1
  254. package/dist/types/functions/wallet/setResolver.d.ts.map +1 -1
  255. package/dist/types/functions/wallet/setTextRecord.d.ts +2 -1
  256. package/dist/types/functions/wallet/setTextRecord.d.ts.map +1 -1
  257. package/dist/types/functions/wallet/transferName.d.ts +2 -1
  258. package/dist/types/functions/wallet/transferName.d.ts.map +1 -1
  259. package/dist/types/functions/wallet/unwrapName.d.ts +2 -1
  260. package/dist/types/functions/wallet/unwrapName.d.ts.map +1 -1
  261. package/dist/types/functions/wallet/wrapName.d.ts +2 -1
  262. package/dist/types/functions/wallet/wrapName.d.ts.map +1 -1
  263. package/dist/types/subgraph.d.ts +1 -0
  264. package/dist/types/subgraph.d.ts.map +1 -1
  265. package/dist/types/utils/contentHash.d.ts +3 -0
  266. package/dist/types/utils/contentHash.d.ts.map +1 -1
  267. package/dist/types/utils/encoders/encodeClearRecords.d.ts +3 -0
  268. package/dist/types/utils/encoders/encodeClearRecords.d.ts.map +1 -0
  269. package/dist/types/utils/fuses.d.ts +16 -16
  270. package/dist/types/utils/fuses.d.ts.map +1 -1
  271. package/dist/types/utils/generateRecordCallArray.d.ts.map +1 -1
  272. package/dist/types/utils/index.d.ts +3 -2
  273. package/dist/types/utils/index.d.ts.map +1 -1
  274. package/dist/types/utils/normaliseCoinId.d.ts +8 -0
  275. package/dist/types/utils/normaliseCoinId.d.ts.map +1 -0
  276. package/dist/types/wallet.d.ts +1 -0
  277. package/dist/types/wallet.d.ts.map +1 -1
  278. package/package.json +1 -1
  279. package/src/clients/decorators/wallet.ts +41 -3
  280. package/src/contracts/consts.ts +1 -1
  281. package/src/errors/version.ts +1 -1
  282. package/src/functions/dns/getDnsImportData.ts +2 -1
  283. package/src/functions/dns/getDnsOwner.ts +1 -1
  284. package/src/functions/dns/importDnsName.ts +2 -1
  285. package/src/functions/public/_getAddr.ts +21 -13
  286. package/src/functions/public/batch.ts +2 -1
  287. package/src/functions/public/getAbiRecord.ts +2 -1
  288. package/src/functions/public/getAddressRecord.ts +2 -1
  289. package/src/functions/public/getAvailable.ts +2 -1
  290. package/src/functions/public/getContentHashRecord.ts +2 -1
  291. package/src/functions/public/getExpiry.ts +2 -1
  292. package/src/functions/public/getName.ts +2 -1
  293. package/src/functions/public/getOwner.ts +54 -33
  294. package/src/functions/public/getPrice.ts +3 -2
  295. package/src/functions/public/getRecords.ts +124 -104
  296. package/src/functions/public/getResolver.ts +2 -1
  297. package/src/functions/public/getSupportedInterfaces.ts +22 -0
  298. package/src/functions/public/getTextRecord.ts +2 -1
  299. package/src/functions/public/getWrapperData.ts +2 -1
  300. package/src/functions/public/getWrapperName.ts +2 -1
  301. package/src/functions/subgraph/getDecodedName.ts +2 -1
  302. package/src/functions/subgraph/getNameHistory.ts +2 -1
  303. package/src/functions/subgraph/getNamesForAddress.ts +31 -11
  304. package/src/functions/subgraph/getSubgraphRecords.ts +65 -33
  305. package/src/functions/subgraph/getSubgraphRegistrant.ts +2 -1
  306. package/src/functions/subgraph/getSubnames.ts +2 -1
  307. package/src/functions/wallet/clearRecords.ts +97 -0
  308. package/src/functions/wallet/commitName.ts +3 -1
  309. package/src/functions/wallet/createSubname.ts +2 -1
  310. package/src/functions/wallet/deleteSubname.ts +2 -1
  311. package/src/functions/wallet/registerName.ts +4 -1
  312. package/src/functions/wallet/renewNames.ts +3 -1
  313. package/src/functions/wallet/setAbiRecord.ts +3 -1
  314. package/src/functions/wallet/setAddressRecord.ts +2 -1
  315. package/src/functions/wallet/setChildFuses.ts +2 -1
  316. package/src/functions/wallet/setContentHashRecord.ts +2 -1
  317. package/src/functions/wallet/setFuses.ts +2 -1
  318. package/src/functions/wallet/setPrimaryName.ts +2 -1
  319. package/src/functions/wallet/setRecords.ts +2 -1
  320. package/src/functions/wallet/setResolver.ts +2 -1
  321. package/src/functions/wallet/setTextRecord.ts +2 -1
  322. package/src/functions/wallet/transferName.ts +2 -1
  323. package/src/functions/wallet/unwrapName.ts +2 -1
  324. package/src/functions/wallet/wrapName.ts +2 -1
  325. package/src/subgraph.ts +5 -0
  326. package/src/utils/contentHash.ts +2 -2
  327. package/src/utils/encoders/encodeClearRecords.ts +9 -0
  328. package/src/utils/fuses.ts +27 -23
  329. package/src/utils/generateRecordCallArray.ts +3 -9
  330. package/src/utils/index.ts +9 -0
  331. package/src/utils/normaliseCoinId.ts +11 -0
  332. package/src/wallet.ts +7 -0
@@ -0,0 +1,97 @@
1
+ import type {
2
+ Account,
3
+ Address,
4
+ Hash,
5
+ SendTransactionParameters,
6
+ Transport,
7
+ } from 'viem'
8
+ import type { ChainWithEns, WalletWithEns } from '../../contracts/consts.js'
9
+ import type {
10
+ Prettify,
11
+ SimpleTransactionRequest,
12
+ WriteTransactionParameters,
13
+ } from '../../types.js'
14
+ import { encodeClearRecords } from '../../utils/encoders/encodeClearRecords.js'
15
+ import { namehash } from '../../utils/normalise.js'
16
+
17
+ export type ClearRecordsDataParameters = {
18
+ /** The name to clear records for */
19
+ name: string
20
+ /** The resolver address to use */
21
+ resolverAddress: Address
22
+ }
23
+
24
+ export type ClearRecordsDataReturnType = SimpleTransactionRequest
25
+
26
+ export type ClearRecordsParameters<
27
+ TChain extends ChainWithEns,
28
+ TAccount extends Account | undefined,
29
+ TChainOverride extends ChainWithEns | undefined,
30
+ > = Prettify<
31
+ ClearRecordsDataParameters &
32
+ WriteTransactionParameters<TChain, TAccount, TChainOverride>
33
+ >
34
+
35
+ export type ClearRecordsReturnType = Hash
36
+
37
+ export const makeFunctionData = <
38
+ TChain extends ChainWithEns,
39
+ TAccount extends Account | undefined,
40
+ >(
41
+ _wallet: WalletWithEns<Transport, TChain, TAccount>,
42
+ { name, resolverAddress }: ClearRecordsDataParameters,
43
+ ): ClearRecordsDataReturnType => {
44
+ return {
45
+ to: resolverAddress,
46
+ data: encodeClearRecords(namehash(name)),
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Clears the records for a name on a resolver.
52
+ * @param wallet - {@link WalletWithEns}
53
+ * @param parameters - {@link ClearRecordsParameters}
54
+ * @returns Transaction hash. {@link ClearRecordsReturnType}
55
+ *
56
+ * @example
57
+ * import { createWalletClient, custom } from 'viem'
58
+ * import { mainnet } from 'viem/chains'
59
+ * import { addEnsContracts } from '@ensdomains/ensjs'
60
+ * import { clearRecords } from '@ensdomains/ensjs/wallet'
61
+ *
62
+ * const wallet = createWalletClient({
63
+ * chain: addEnsContracts(mainnet),
64
+ * transport: custom(window.ethereum),
65
+ * })
66
+ * const hash = await clearRecords(wallet, {
67
+ * name: 'ens.eth',
68
+ * resolverAddress: '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41',
69
+ * })
70
+ * // 0x...
71
+ */
72
+ async function clearRecords<
73
+ TChain extends ChainWithEns,
74
+ TAccount extends Account | undefined,
75
+ TChainOverride extends ChainWithEns | undefined = ChainWithEns,
76
+ >(
77
+ wallet: WalletWithEns<Transport, TChain, TAccount>,
78
+ {
79
+ name,
80
+ resolverAddress,
81
+ ...txArgs
82
+ }: ClearRecordsParameters<TChain, TAccount, TChainOverride>,
83
+ ): Promise<ClearRecordsReturnType> {
84
+ const data = makeFunctionData(wallet, {
85
+ name,
86
+ resolverAddress,
87
+ })
88
+ const writeArgs = {
89
+ ...data,
90
+ ...txArgs,
91
+ } as SendTransactionParameters<TChain, TAccount, TChainOverride>
92
+ return wallet.sendTransaction(writeArgs)
93
+ }
94
+
95
+ clearRecords.makeFunctionData = makeFunctionData
96
+
97
+ export default clearRecords
@@ -74,7 +74,9 @@ export const makeFunctionData = <
74
74
  * @example
75
75
  * import { createWalletClient, custom } from 'viem'
76
76
  * import { mainnet } from 'viem/chains'
77
- * import { addEnsContracts, commitName, randomSecret } from '@ensdomains/ensjs'
77
+ * import { addEnsContracts } from '@ensdomains/ensjs'
78
+ * import { commitName } from '@ensdomains/ensjs/wallet'
79
+ * import { randomSecret } from '@ensdomains/ensjs/utils'
78
80
  *
79
81
  * const wallet = createWalletClient({
80
82
  * chain: addEnsContracts(mainnet),
@@ -158,7 +158,8 @@ export const makeFunctionData = <
158
158
  * @example
159
159
  * import { createWalletClient, custom } from 'viem'
160
160
  * import { mainnet } from 'viem/chains'
161
- * import { addEnsContracts, createSubname } from '@ensdomains/ensjs'
161
+ * import { addEnsContracts } from '@ensdomains/ensjs'
162
+ * import { createSubname } from '@ensdomains/ensjs/wallet'
162
163
  *
163
164
  * const wallet = createWalletClient({
164
165
  * chain: addEnsContracts(mainnet),
@@ -148,7 +148,8 @@ export const makeFunctionData = <
148
148
  * @example
149
149
  * import { createWalletClient, custom } from 'viem'
150
150
  * import { mainnet } from 'viem/chains'
151
- * import { addEnsContracts, deleteSubname } from '@ensdomains/ensjs'
151
+ * import { addEnsContracts } from '@ensdomains/ensjs'
152
+ * import { deleteSubname } from '@ensdomains/ensjs/wallet'
152
153
  *
153
154
  * const wallet = createWalletClient({
154
155
  * chain: mainnetWithEns,
@@ -82,7 +82,10 @@ export const makeFunctionData = <
82
82
  * @example
83
83
  * import { createPublicClient, createWalletClient, http, custom } from 'viem'
84
84
  * import { mainnet } from 'viem/chains'
85
- * import { addEnsContracts, commitName, randomSecret, getPrice, registerName } from '@ensdomains/ensjs'
85
+ * import { addEnsContracts } from '@ensdomains/ensjs'
86
+ * import { getPrice } from '@ensdomains/ensjs/public'
87
+ * import { randomSecret } from '@ensdomains/ensjs/utils'
88
+ * import { commitName, registerName } from '@ensdomains/ensjs/wallet'
86
89
  *
87
90
  * const mainnetWithEns = addEnsContracts(mainnet)
88
91
  * const client = createPublicClient({
@@ -99,7 +99,9 @@ export const makeFunctionData = <
99
99
  * @example
100
100
  * import { createPublicClient, createWalletClient, http, custom } from 'viem'
101
101
  * import { mainnet } from 'viem/chains'
102
- * import { addEnsContracts, renewNames, getPrice } from '@ensdomains/ensjs'
102
+ * import { addEnsContracts } from '@ensdomains/ensjs'
103
+ * import { getPrice } from '@ensdomains/ensjs/public'
104
+ * import { renewNames } from '@ensdomains/ensjs/wallet'
103
105
  *
104
106
  * const mainnetWithEns = addEnsContracts(mainnet)
105
107
  * const client = createPublicClient({
@@ -67,7 +67,9 @@ export const makeFunctionData = <
67
67
  * import abi from './abi.json'
68
68
  * import { createWalletClient, custom } from 'viem'
69
69
  * import { mainnet } from 'viem/chains'
70
- * import { addEnsContracts, encodeAbi, setAbiRecord } from '@ensdomains/ensjs'
70
+ * import { addEnsContracts } from '@ensdomains/ensjs'
71
+ * import { encodeAbi } from '@ensdomains/ensjs/utils'
72
+ * import { setAbiRecord } from '@ensdomains/ensjs/wallet'
71
73
  *
72
74
  * const wallet = createWalletClient({
73
75
  * chain: addEnsContracts(mainnet),
@@ -60,7 +60,8 @@ export const makeFunctionData = <
60
60
  * @example
61
61
  * import { createWalletClient, custom } from 'viem'
62
62
  * import { mainnet } from 'viem/chains'
63
- * import { addEnsContracts, setAddressRecord } from '@ensdomains/ensjs'
63
+ * import { addEnsContracts } from '@ensdomains/ensjs'
64
+ * import { setAddressRecord } from '@ensdomains/ensjs/wallet'
64
65
  *
65
66
  * const wallet = createWalletClient({
66
67
  * chain: addEnsContracts(mainnet),
@@ -69,7 +69,8 @@ export const makeFunctionData = <
69
69
  * @example
70
70
  * import { createWalletClient, custom } from 'viem'
71
71
  * import { mainnet } from 'viem/chains'
72
- * import { addEnsContracts, setChildFuses } from '@ensdomains/ensjs'
72
+ * import { addEnsContracts } from '@ensdomains/ensjs'
73
+ * import { setChildFuses } from '@ensdomains/ensjs/wallet'
73
74
  *
74
75
  * const wallet = createWalletClient({
75
76
  * chain: addEnsContracts(mainnet),
@@ -58,7 +58,8 @@ export const makeFunctionData = <
58
58
  * @example
59
59
  * import { createWalletClient, custom } from 'viem'
60
60
  * import { mainnet } from 'viem/chains'
61
- * import { addEnsContracts, setContentHashRecord } from '@ensdomains/ensjs'
61
+ * import { addEnsContracts } from '@ensdomains/ensjs'
62
+ * import { setContentHashRecord } from '@ensdomains/ensjs/wallet'
62
63
  *
63
64
  * const wallet = createWalletClient({
64
65
  * chain: addEnsContracts(mainnet),
@@ -66,7 +66,8 @@ export const makeFunctionData = <
66
66
  * @example
67
67
  * import { createWalletClient, custom } from 'viem'
68
68
  * import { mainnet } from 'viem/chains'
69
- * import { addEnsContracts, setFuses } from '@ensdomains/ensjs'
69
+ * import { addEnsContracts } from '@ensdomains/ensjs'
70
+ * import { setFuses } from '@ensdomains/ensjs/wallet'
70
71
  *
71
72
  * const wallet = createWalletClient({
72
73
  * chain: addEnsContracts(mainnet),
@@ -111,7 +111,8 @@ export const makeFunctionData = <
111
111
  * @example
112
112
  * import { createWalletClient, custom } from 'viem'
113
113
  * import { mainnet } from 'viem/chains'
114
- * import { addEnsContracts, setPrimaryName } from '@ensdomains/ensjs'
114
+ * import { addEnsContracts } from '@ensdomains/ensjs'
115
+ * import { setPrimaryName } from '@ensdomains/ensjs/wallet'
115
116
  *
116
117
  * const wallet = createWalletClient({
117
118
  * chain: addEnsContracts(mainnet),
@@ -76,7 +76,8 @@ export const makeFunctionData = <
76
76
  * @example
77
77
  * import { createWalletClient, custom } from 'viem'
78
78
  * import { mainnet } from 'viem/chains'
79
- * import { addEnsContracts, setRecords } from '@ensdomains/ensjs'
79
+ * import { addEnsContracts } from '@ensdomains/ensjs'
80
+ * import { setRecords } from '@ensdomains/ensjs/wallet'
80
81
  *
81
82
  * const wallet = createWalletClient({
82
83
  * chain: addEnsContracts(mainnet),
@@ -86,7 +86,8 @@ export const makeFunctionData = <
86
86
  * @example
87
87
  * import { createWalletClient, custom } from 'viem'
88
88
  * import { mainnet } from 'viem/chains'
89
- * import { addEnsContracts, setResolver } from '@ensdomains/ensjs'
89
+ * import { addEnsContracts } from '@ensdomains/ensjs'
90
+ * import { setResolver } from '@ensdomains/ensjs/wallet'
90
91
  *
91
92
  * const wallet = createWalletClient({
92
93
  * chain: addEnsContracts(mainnet),
@@ -60,7 +60,8 @@ export const makeFunctionData = <
60
60
  * @example
61
61
  * import { createWalletClient, custom } from 'viem'
62
62
  * import { mainnet } from 'viem/chains'
63
- * import { addEnsContracts, setTextRecord } from '@ensdomains/ensjs'
63
+ * import { addEnsContracts } from '@ensdomains/ensjs'
64
+ * import { setTextRecord } from '@ensdomains/ensjs/wallet'
64
65
  *
65
66
  * const wallet = createWalletClient({
66
67
  * chain: addEnsContracts(mainnet),
@@ -209,7 +209,8 @@ export const makeFunctionData = <
209
209
  * @example
210
210
  * import { createWalletClient, custom } from 'viem'
211
211
  * import { mainnet } from 'viem/chains'
212
- * import { addEnsContracts, transferName } from '@ensdomains/ensjs'
212
+ * import { addEnsContracts } from '@ensdomains/ensjs'
213
+ * import { transferName } from '@ensdomains/ensjs/wallet'
213
214
  *
214
215
  * const wallet = createWalletClient({
215
216
  * chain: addEnsContracts(mainnet),
@@ -127,7 +127,8 @@ export const makeFunctionData = <
127
127
  * @example
128
128
  * import { createWalletClient, custom } from 'viem'
129
129
  * import { mainnet } from 'viem/chains'
130
- * import { addEnsContracts, unwrapName } from '@ensdomains/ensjs'
130
+ * import { addEnsContracts } from '@ensdomains/ensjs'
131
+ * import { unwrapName } from '@ensdomains/ensjs/wallet'
131
132
  *
132
133
  * const wallet = createWalletClient({
133
134
  * chain: addEnsContracts(mainnet),
@@ -141,7 +141,8 @@ export const makeFunctionData = <
141
141
  * @example
142
142
  * import { createWalletClient, custom } from 'viem'
143
143
  * import { mainnet } from 'viem/chains'
144
- * import { addEnsContracts, wrapName } from '@ensdomains/ensjs'
144
+ * import { addEnsContracts } from '@ensdomains/ensjs'
145
+ * import { wrapName } from '@ensdomains/ensjs/wallet'
145
146
  *
146
147
  * const wallet = createWalletClient({
147
148
  * chain: addEnsContracts(mainnet),
package/src/subgraph.ts CHANGED
@@ -63,3 +63,8 @@ export {
63
63
  type GetSubnamesParameters,
64
64
  type GetSubnamesReturnType,
65
65
  } from './functions/subgraph/getSubnames.js'
66
+ export {
67
+ getChecksumAddressOrNull,
68
+ makeNameObject,
69
+ type Name,
70
+ } from './functions/subgraph/utils.js'
@@ -30,7 +30,7 @@ function matchProtocol(text: string) {
30
30
  )
31
31
  }
32
32
 
33
- const getDisplayCodec = (encoded: string): ProtocolType => {
33
+ export const getDisplayCodec = (encoded: string): ProtocolType => {
34
34
  const codec = getCodec(encoded)
35
35
  switch (codec) {
36
36
  case 'ipfs':
@@ -49,7 +49,7 @@ const getDisplayCodec = (encoded: string): ProtocolType => {
49
49
  }
50
50
  }
51
51
 
52
- const getInternalCodec = (
52
+ export const getInternalCodec = (
53
53
  displayCodec: NonNullable<ProtocolType>,
54
54
  ): InternalCodec => {
55
55
  switch (displayCodec) {
@@ -0,0 +1,9 @@
1
+ import { encodeFunctionData, type Hex } from 'viem'
2
+ import { publicResolverClearRecordsSnippet } from '../../contracts/publicResolver.js'
3
+
4
+ export const encodeClearRecords = (namehash: Hex) =>
5
+ encodeFunctionData({
6
+ abi: publicResolverClearRecordsSnippet,
7
+ functionName: 'clearRecords',
8
+ args: [namehash],
9
+ })
@@ -114,7 +114,7 @@ type GenericFuseEnum<TGroupName extends FuseRestriction = FuseRestriction> = {
114
114
  Maximum: bigint
115
115
  }
116
116
 
117
- const ChildReference = {
117
+ export const ChildFuseReference = {
118
118
  Name: 'child',
119
119
  Object: ChildFuses,
120
120
  Keys: ChildFuseKeys,
@@ -124,12 +124,12 @@ const ChildReference = {
124
124
  Minimum: 0n,
125
125
  Maximum: 2n ** 16n - 1n,
126
126
  } as const
127
- type ChildReference = typeof ChildReference & {
128
- Key: keyof ChildReference['Object']
129
- UnnamedKey: ChildReference['Unnamed'][number]
127
+ export type ChildFuseReferenceType = typeof ChildFuseReference & {
128
+ Key: keyof ChildFuseReferenceType['Object']
129
+ UnnamedKey: ChildFuseReferenceType['Unnamed'][number]
130
130
  }
131
131
 
132
- const ParentReference = {
132
+ export const ParentFuseReference = {
133
133
  Name: 'parent',
134
134
  Object: ParentFuses,
135
135
  Keys: ParentFuseKeys,
@@ -139,12 +139,12 @@ const ParentReference = {
139
139
  Minimum: 2n ** 16n,
140
140
  Maximum: 2n ** 32n,
141
141
  } as const
142
- type ParentReference = typeof ParentReference & {
143
- Key: keyof ParentReference['Object']
144
- UnnamedKey: ParentReference['Unnamed'][number]
142
+ export type ParentFuseReferenceType = typeof ParentFuseReference & {
143
+ Key: keyof ParentFuseReferenceType['Object']
144
+ UnnamedKey: ParentFuseReferenceType['Unnamed'][number]
145
145
  }
146
146
 
147
- const FullParentReference = {
147
+ export const FullParentFuseReference = {
148
148
  Name: 'parent',
149
149
  Object: FullParentFuses,
150
150
  Keys: FullParentFuseKeys,
@@ -154,9 +154,9 @@ const FullParentReference = {
154
154
  Minimum: 2n ** 16n,
155
155
  Maximum: 2n ** 32n,
156
156
  } as const
157
- type FullParentReference = typeof FullParentReference & {
158
- Key: keyof FullParentReference['Object']
159
- UnnamedKey: ParentReference['Unnamed'][number]
157
+ export type FullParentFuseReferenceType = typeof FullParentFuseReference & {
158
+ Key: keyof FullParentFuseReferenceType['Object']
159
+ UnnamedKey: ParentFuseReferenceType['Unnamed'][number]
160
160
  }
161
161
 
162
162
  type InputFuses<NamedFuse extends string, UnnamedFuse extends bigint> =
@@ -177,12 +177,12 @@ type InputFuses<NamedFuse extends string, UnnamedFuse extends bigint> =
177
177
  }
178
178
 
179
179
  export type EncodeChildFusesInputObject = InputFuses<
180
- ChildReference['Key'],
181
- ChildReference['UnnamedKey']
180
+ ChildFuseReferenceType['Key'],
181
+ ChildFuseReferenceType['UnnamedKey']
182
182
  >
183
183
  export type EncodeParentFusesInputObject = InputFuses<
184
- ParentReference['Key'],
185
- ParentReference['UnnamedKey']
184
+ ParentFuseReferenceType['Key'],
185
+ ParentFuseReferenceType['UnnamedKey']
186
186
  >
187
187
 
188
188
  export type EncodeFusesInputObject =
@@ -293,7 +293,8 @@ export const encodeFuses = ({
293
293
  })
294
294
  return checkFuseObject({
295
295
  object: input,
296
- reference: restriction === 'child' ? ChildReference : ParentReference,
296
+ reference:
297
+ restriction === 'child' ? ChildFuseReference : ParentFuseReference,
297
298
  })
298
299
  }
299
300
 
@@ -310,11 +311,14 @@ export const encodeFuses = ({
310
311
 
311
312
  const childFuses =
312
313
  'child' in input
313
- ? checkFuseObject({ object: input.child, reference: ChildReference })
314
+ ? checkFuseObject({ object: input.child, reference: ChildFuseReference })
314
315
  : 0
315
316
  const parentFuses =
316
317
  'parent' in input
317
- ? checkFuseObject({ object: input.parent, reference: ParentReference })
318
+ ? checkFuseObject({
319
+ object: input.parent,
320
+ reference: ParentFuseReference,
321
+ })
318
322
  : 0
319
323
 
320
324
  return Number(childFuses | parentFuses)
@@ -328,10 +332,10 @@ type DecodedFuseGroup<TFuseReference extends GenericFuseEnum> = {
328
332
  }
329
333
  }
330
334
 
331
- type DecodedChildFuses = DecodedFuseGroup<ChildReference> & {
335
+ type DecodedChildFuses = DecodedFuseGroup<ChildFuseReferenceType> & {
332
336
  CAN_DO_EVERYTHING: boolean
333
337
  }
334
- type DecodedParentFuses = DecodedFuseGroup<FullParentReference>
338
+ type DecodedParentFuses = DecodedFuseGroup<FullParentFuseReferenceType>
335
339
 
336
340
  export type DecodedFuses = {
337
341
  child: DecodedChildFuses
@@ -364,12 +368,12 @@ export const decodeFuses = (fuses: number): DecodedFuses => {
364
368
  return {
365
369
  parent: decodeFusesFromReference({
366
370
  input: fusesBigInt,
367
- reference: FullParentReference,
371
+ reference: FullParentFuseReference,
368
372
  }),
369
373
  child: {
370
374
  ...decodeFusesFromReference({
371
375
  input: fusesBigInt,
372
- reference: ChildReference,
376
+ reference: ChildFuseReference,
373
377
  }),
374
378
  CAN_DO_EVERYTHING:
375
379
  (fusesBigInt & FuseRanges.CHILD_CONTROLLED_FUSES) === 0n,
@@ -1,6 +1,6 @@
1
- import { encodeFunctionData, type Hex } from 'viem'
2
- import { publicResolverClearRecordsSnippet } from '../contracts/publicResolver.js'
1
+ import { type Hex } from 'viem'
3
2
  import type { Prettify } from '../types.js'
3
+ import { encodeClearRecords } from './encoders/encodeClearRecords.js'
4
4
  import {
5
5
  encodeSetAbi,
6
6
  type EncodeSetAbiParameters,
@@ -39,13 +39,7 @@ export const generateRecordCallArray = ({
39
39
  const calls: Hex[] = []
40
40
 
41
41
  if (clearRecords) {
42
- calls.push(
43
- encodeFunctionData({
44
- abi: publicResolverClearRecordsSnippet,
45
- functionName: 'clearRecords',
46
- args: [namehash],
47
- }),
48
- )
42
+ calls.push(encodeClearRecords(namehash))
49
43
  }
50
44
 
51
45
  if (typeof contentHash === 'string') {
@@ -6,6 +6,7 @@ export {
6
6
  type EncodeAbiReturnType,
7
7
  type EncodedAbi,
8
8
  } from './encoders/encodeAbi.js'
9
+ export { encodeClearRecords } from './encoders/encodeClearRecords.js'
9
10
  export {
10
11
  encodeSetAbi,
11
12
  type EncodeSetAbiParameters,
@@ -36,11 +37,14 @@ export {
36
37
  } from './consts.js'
37
38
  export {
38
39
  ChildFuseKeys,
40
+ ChildFuseReference,
39
41
  ChildFuses,
40
42
  FullParentFuseKeys,
43
+ FullParentFuseReference,
41
44
  FullParentFuses,
42
45
  FuseRanges,
43
46
  ParentFuseKeys,
47
+ ParentFuseReference,
44
48
  ParentFuses,
45
49
  UnnamedChildFuseKeys,
46
50
  UnnamedChildFuses,
@@ -51,15 +55,20 @@ export {
51
55
  checkPccBurned,
52
56
  decodeFuses,
53
57
  encodeFuses,
58
+ type ChildFuseReferenceType,
54
59
  type DecodedFuses,
55
60
  type EncodeChildFusesInputObject,
56
61
  type EncodeFusesInputObject,
57
62
  type EncodeParentFusesInputObject,
63
+ type FullParentFuseReferenceType,
64
+ type ParentFuseReferenceType,
58
65
  } from './fuses.js'
59
66
 
60
67
  export {
61
68
  decodeContentHash,
62
69
  encodeContentHash,
70
+ getDisplayCodec,
71
+ getInternalCodec,
63
72
  getProtocolType,
64
73
  isValidContentHash,
65
74
  type DecodedContentHash,
@@ -0,0 +1,11 @@
1
+ export const normaliseCoinId = (coinId: string | number) => {
2
+ const isString = typeof coinId === 'string'
3
+
4
+ if (isString && Number.isNaN(parseInt(coinId))) {
5
+ return { type: 'name', value: coinId.toUpperCase() } as const
6
+ }
7
+ return {
8
+ type: 'id',
9
+ value: isString ? parseInt(coinId as string) : (coinId as number),
10
+ } as const
11
+ }
package/src/wallet.ts CHANGED
@@ -1,3 +1,10 @@
1
+ export {
2
+ default as clearRecords,
3
+ type ClearRecordsDataParameters,
4
+ type ClearRecordsDataReturnType,
5
+ type ClearRecordsParameters,
6
+ type ClearRecordsReturnType,
7
+ } from './functions/wallet/clearRecords.js'
1
8
  export {
2
9
  default as commitName,
3
10
  type CommitNameDataParameters,