@bonfida/spl-name-service 3.0.19 → 3.0.21

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 (329) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/bindings/burnDomain.js.map +1 -1
  3. package/dist/cjs/bindings/createNameRegistry.js.map +1 -1
  4. package/dist/cjs/bindings/createRecordInstruction.js.map +1 -1
  5. package/dist/cjs/bindings/createRecordV2Instruction.js.map +1 -1
  6. package/dist/cjs/bindings/createReverseName.js.map +1 -1
  7. package/dist/cjs/bindings/createSolRecordInstruction.js.map +1 -1
  8. package/dist/cjs/bindings/createSubdomain.js.map +1 -1
  9. package/dist/cjs/bindings/deleteNameRegistry.js.map +1 -1
  10. package/dist/cjs/bindings/deleteRecordV2.js.map +1 -1
  11. package/dist/cjs/bindings/ethValidateRecordV2Content.js.map +1 -1
  12. package/dist/cjs/bindings/registerDomainName.js +1 -1
  13. package/dist/cjs/bindings/registerDomainName.js.map +1 -1
  14. package/dist/cjs/bindings/registerDomainNameV2.js +1 -1
  15. package/dist/cjs/bindings/registerDomainNameV2.js.map +1 -1
  16. package/dist/cjs/bindings/registerFavorite.js.map +1 -1
  17. package/dist/cjs/bindings/registerWithNft.js.map +1 -1
  18. package/dist/cjs/bindings/transferNameOwnership.js.map +1 -1
  19. package/dist/cjs/bindings/transferSubdomain.js.map +1 -1
  20. package/dist/cjs/bindings/updateNameRegistryData.js.map +1 -1
  21. package/dist/cjs/bindings/updateRecordInstruction.js.map +1 -1
  22. package/dist/cjs/bindings/updateRecordV2Instruction.js.map +1 -1
  23. package/dist/cjs/bindings/updateSolRecordInstruction.js.map +1 -1
  24. package/dist/cjs/bindings/validateRecordV2Content.js.map +1 -1
  25. package/dist/cjs/bindings/writRoaRecordV2.js.map +1 -1
  26. package/dist/cjs/custom-bg.js.map +1 -1
  27. package/dist/cjs/deprecated/utils.js +1 -1
  28. package/dist/cjs/deprecated/utils.js.map +1 -1
  29. package/dist/cjs/devnet.js +1 -1
  30. package/dist/cjs/devnet.js.map +1 -1
  31. package/dist/cjs/error.js.map +1 -1
  32. package/dist/cjs/favorite-domain.js +1 -1
  33. package/dist/cjs/favorite-domain.js.map +1 -1
  34. package/dist/cjs/index.d.ts +1 -1
  35. package/dist/cjs/index.js +1 -1
  36. package/dist/cjs/instructions/burnInstruction.js.map +1 -1
  37. package/dist/cjs/instructions/createInstruction.js.map +1 -1
  38. package/dist/cjs/instructions/createInstructionV3.js.map +1 -1
  39. package/dist/cjs/instructions/createReverseInstruction.js.map +1 -1
  40. package/dist/cjs/instructions/createSplitV2Instruction.js.map +1 -1
  41. package/dist/cjs/instructions/createV2Instruction.js.map +1 -1
  42. package/dist/cjs/instructions/createWithNftInstruction.js.map +1 -1
  43. package/dist/cjs/instructions/reallocInstruction.js.map +1 -1
  44. package/dist/cjs/instructions/registerFavoriteInstruction.js.map +1 -1
  45. package/dist/cjs/instructions/transferInstruction.js.map +1 -1
  46. package/dist/cjs/instructions/updateInstruction.js.map +1 -1
  47. package/dist/cjs/int.js.map +1 -1
  48. package/dist/cjs/nft/getDomainMint.js.map +1 -1
  49. package/dist/cjs/nft/getRecordFromMint.js.map +1 -1
  50. package/dist/cjs/nft/retrieveNftOwner.js.map +1 -1
  51. package/dist/cjs/nft/retrieveNftOwnerV2.js.map +1 -1
  52. package/dist/cjs/nft/retrieveNfts.js +1 -1
  53. package/dist/cjs/nft/retrieveNfts.js.map +1 -1
  54. package/dist/cjs/nft/retrieveRecords.js +1 -1
  55. package/dist/cjs/nft/retrieveRecords.js.map +1 -1
  56. package/dist/cjs/nft/state.js.map +1 -1
  57. package/dist/cjs/node_modules/@bonfida/sns-records/dist/index.js +1 -1
  58. package/dist/cjs/node_modules/@noble/curves/esm/abstract/curve.js +2 -2
  59. package/dist/cjs/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -1
  60. package/dist/cjs/node_modules/@noble/curves/esm/abstract/edwards.js +2 -2
  61. package/dist/cjs/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -1
  62. package/dist/cjs/node_modules/@noble/curves/esm/abstract/modular.js +2 -2
  63. package/dist/cjs/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -1
  64. package/dist/cjs/node_modules/@noble/curves/esm/ed25519.js +2 -2
  65. package/dist/cjs/node_modules/@noble/curves/esm/ed25519.js.map +1 -1
  66. package/dist/cjs/node_modules/@noble/curves/esm/utils.js +3 -0
  67. package/dist/cjs/node_modules/@noble/curves/esm/utils.js.map +1 -0
  68. package/dist/cjs/node_modules/@noble/hashes/esm/_md.js +1 -1
  69. package/dist/cjs/node_modules/@noble/hashes/esm/_md.js.map +1 -1
  70. package/dist/cjs/node_modules/@noble/hashes/esm/sha2.js +1 -1
  71. package/dist/cjs/node_modules/@noble/hashes/esm/sha2.js.map +1 -1
  72. package/dist/cjs/node_modules/@noble/hashes/esm/utils.js +2 -2
  73. package/dist/cjs/node_modules/@noble/hashes/esm/utils.js.map +1 -1
  74. package/dist/cjs/node_modules/@scure/base/lib/esm/index.js +1 -1
  75. package/dist/cjs/node_modules/@scure/base/lib/esm/index.js.map +1 -1
  76. package/dist/cjs/node_modules/@solana/spl-token/lib/esm/extensions/accountType.js.map +1 -1
  77. package/dist/cjs/node_modules/@solana/spl-token/lib/esm/state/account.js.map +1 -1
  78. package/dist/cjs/node_modules/@solana/spl-token/lib/esm/state/mint.js.map +1 -1
  79. package/dist/cjs/node_modules/@solana/spl-token/lib/esm/state/multisig.js.map +1 -1
  80. package/dist/cjs/node_modules/base64-js/index.js +1 -1
  81. package/dist/cjs/node_modules/base64-js/index.js.map +1 -1
  82. package/dist/cjs/node_modules/borsh/lib/esm/buffer.js.map +1 -1
  83. package/dist/cjs/node_modules/borsh/lib/esm/deserialize.js +1 -1
  84. package/dist/cjs/node_modules/borsh/lib/esm/deserialize.js.map +1 -1
  85. package/dist/cjs/node_modules/borsh/lib/esm/index.js.map +1 -1
  86. package/dist/cjs/node_modules/borsh/lib/esm/serialize.js.map +1 -1
  87. package/dist/cjs/node_modules/borsh/lib/esm/utils.js.map +1 -1
  88. package/dist/cjs/node_modules/bs58/index.js.map +1 -1
  89. package/dist/cjs/node_modules/bs58/node_modules/base-x/src/index.js.map +1 -1
  90. package/dist/cjs/node_modules/buffer/index.js +1 -1
  91. package/dist/cjs/node_modules/buffer/index.js.map +1 -1
  92. package/dist/cjs/node_modules/graphemesplit/index.js.map +1 -1
  93. package/dist/cjs/node_modules/ieee754/index.js.map +1 -1
  94. package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.js +1 -1
  95. package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.js.map +1 -1
  96. package/dist/cjs/node_modules/js-base64/base64.js +1 -1
  97. package/dist/cjs/node_modules/js-base64/base64.js.map +1 -1
  98. package/dist/cjs/node_modules/punycode/punycode.es6.js +1 -1
  99. package/dist/cjs/node_modules/punycode/punycode.es6.js.map +1 -1
  100. package/dist/cjs/node_modules/tiny-inflate/index.js.map +1 -1
  101. package/dist/cjs/node_modules/unicode-trie/index.js.map +1 -1
  102. package/dist/cjs/node_modules/unicode-trie/swap.js.map +1 -1
  103. package/dist/cjs/record/deserializeRecord.js +1 -1
  104. package/dist/cjs/record/deserializeRecord.js.map +1 -1
  105. package/dist/cjs/record/getRecord.js.map +1 -1
  106. package/dist/cjs/record/getRecordKeySync.js.map +1 -1
  107. package/dist/cjs/record/getRecords.js +1 -1
  108. package/dist/cjs/record/getRecords.js.map +1 -1
  109. package/dist/cjs/record/helpers/getSolRecord.js.map +1 -1
  110. package/dist/cjs/record/serializeRecord.js.map +1 -1
  111. package/dist/cjs/record/serializeSolRecord.js.map +1 -1
  112. package/dist/cjs/record_v2/const.d.ts +1 -0
  113. package/dist/cjs/record_v2/const.js +1 -1
  114. package/dist/cjs/record_v2/const.js.map +1 -1
  115. package/dist/cjs/record_v2/deserializeRecordV2Content.js.map +1 -1
  116. package/dist/cjs/record_v2/getMultipleRecordsV2.d.ts +16 -5
  117. package/dist/cjs/record_v2/getMultipleRecordsV2.js +1 -1
  118. package/dist/cjs/record_v2/getMultipleRecordsV2.js.map +1 -1
  119. package/dist/cjs/record_v2/getRecordV2.d.ts +16 -8
  120. package/dist/cjs/record_v2/getRecordV2.js +1 -1
  121. package/dist/cjs/record_v2/getRecordV2.js.map +1 -1
  122. package/dist/cjs/record_v2/getRecordV2Key.js.map +1 -1
  123. package/dist/cjs/record_v2/serializeRecordV2Content.js.map +1 -1
  124. package/dist/cjs/record_v2/verifyRightOfAssociation.js.map +1 -1
  125. package/dist/cjs/record_v2/{utils.js → verifyStaleness.js} +1 -1
  126. package/dist/cjs/record_v2/verifyStaleness.js.map +1 -0
  127. package/dist/cjs/resolve/resolve.js +1 -1
  128. package/dist/cjs/resolve/resolve.js.map +1 -1
  129. package/dist/cjs/resolve/resolveSolRecordV1.js.map +1 -1
  130. package/dist/cjs/resolve/resolveSolRecordV2.js.map +1 -1
  131. package/dist/cjs/state.js +1 -1
  132. package/dist/cjs/state.js.map +1 -1
  133. package/dist/cjs/twitter/ReverseTwitterRegistryState.js.map +1 -1
  134. package/dist/cjs/twitter/changeTwitterRegistryData.js.map +1 -1
  135. package/dist/cjs/twitter/changeVerifiedPubkey.js.map +1 -1
  136. package/dist/cjs/twitter/createReverseTwitterRegistry.js.map +1 -1
  137. package/dist/cjs/twitter/createVerifiedTwitterRegistry.js.map +1 -1
  138. package/dist/cjs/twitter/deleteTwitterRegistry.js.map +1 -1
  139. package/dist/cjs/twitter/getHandleAndRegistryKey.js.map +1 -1
  140. package/dist/cjs/twitter/getTwitterHandleandRegistryKeyViaFilters.js.map +1 -1
  141. package/dist/cjs/twitter/getTwitterRegistry.js.map +1 -1
  142. package/dist/cjs/twitter/getTwitterRegistryData.js.map +1 -1
  143. package/dist/cjs/twitter/getTwitterRegistryKey.js.map +1 -1
  144. package/dist/cjs/types/custom-bg.js.map +1 -1
  145. package/dist/cjs/types/record.d.ts +2 -1
  146. package/dist/cjs/types/record.js +1 -1
  147. package/dist/cjs/types/record.js.map +1 -1
  148. package/dist/cjs/utils/findSubdomains.js +1 -1
  149. package/dist/cjs/utils/findSubdomains.js.map +1 -1
  150. package/dist/cjs/utils/getAllDomains.js +1 -1
  151. package/dist/cjs/utils/getAllDomains.js.map +1 -1
  152. package/dist/cjs/utils/getAllRegisteredDomains.js.map +1 -1
  153. package/dist/cjs/utils/getDomainKeySync.js.map +1 -1
  154. package/dist/cjs/utils/getDomainKeysWithReverses.js +1 -1
  155. package/dist/cjs/utils/getDomainKeysWithReverses.js.map +1 -1
  156. package/dist/cjs/utils/getDomainPriceFromName.js.map +1 -1
  157. package/dist/cjs/utils/getHashedNameSync.js.map +1 -1
  158. package/dist/cjs/utils/getNameAccountKeySync.js.map +1 -1
  159. package/dist/cjs/utils/getPythFeedAccountKey.js.map +1 -1
  160. package/dist/cjs/utils/getReverseKeyFromDomainKey.js.map +1 -1
  161. package/dist/cjs/utils/getReverseKeySync.js.map +1 -1
  162. package/dist/cjs/utils/getTokenizedDomains.js +1 -1
  163. package/dist/cjs/utils/getTokenizedDomains.js.map +1 -1
  164. package/dist/cjs/utils/reverseLookup.js.map +1 -1
  165. package/dist/cjs/utils/reverseLookupBatch.js +1 -1
  166. package/dist/cjs/utils/reverseLookupBatch.js.map +1 -1
  167. package/dist/esm/bindings/burnDomain.js.map +1 -1
  168. package/dist/esm/bindings/createNameRegistry.js.map +1 -1
  169. package/dist/esm/bindings/createRecordInstruction.js.map +1 -1
  170. package/dist/esm/bindings/createRecordV2Instruction.js.map +1 -1
  171. package/dist/esm/bindings/createReverseName.js.map +1 -1
  172. package/dist/esm/bindings/createSolRecordInstruction.js.map +1 -1
  173. package/dist/esm/bindings/createSubdomain.js.map +1 -1
  174. package/dist/esm/bindings/deleteRecordV2.js.map +1 -1
  175. package/dist/esm/bindings/ethValidateRecordV2Content.js.map +1 -1
  176. package/dist/esm/bindings/registerDomainName.js +1 -1
  177. package/dist/esm/bindings/registerDomainName.js.map +1 -1
  178. package/dist/esm/bindings/registerDomainNameV2.js +1 -1
  179. package/dist/esm/bindings/registerDomainNameV2.js.map +1 -1
  180. package/dist/esm/bindings/registerFavorite.js.map +1 -1
  181. package/dist/esm/bindings/registerWithNft.js.map +1 -1
  182. package/dist/esm/bindings/transferSubdomain.js.map +1 -1
  183. package/dist/esm/bindings/updateRecordInstruction.js.map +1 -1
  184. package/dist/esm/bindings/updateRecordV2Instruction.js.map +1 -1
  185. package/dist/esm/bindings/updateSolRecordInstruction.js.map +1 -1
  186. package/dist/esm/bindings/validateRecordV2Content.js.map +1 -1
  187. package/dist/esm/bindings/writRoaRecordV2.js.map +1 -1
  188. package/dist/esm/custom-bg.js +1 -1
  189. package/dist/esm/custom-bg.js.map +1 -1
  190. package/dist/esm/deprecated/utils.js +1 -1
  191. package/dist/esm/deprecated/utils.js.map +1 -1
  192. package/dist/esm/devnet.js +1 -1
  193. package/dist/esm/devnet.js.map +1 -1
  194. package/dist/esm/error.js.map +1 -1
  195. package/dist/esm/favorite-domain.js +1 -1
  196. package/dist/esm/favorite-domain.js.map +1 -1
  197. package/dist/esm/index.d.ts +1 -1
  198. package/dist/esm/index.js +1 -1
  199. package/dist/esm/instructions/burnInstruction.js.map +1 -1
  200. package/dist/esm/instructions/createInstruction.js.map +1 -1
  201. package/dist/esm/instructions/createInstructionV3.js.map +1 -1
  202. package/dist/esm/instructions/createReverseInstruction.js.map +1 -1
  203. package/dist/esm/instructions/createSplitV2Instruction.js.map +1 -1
  204. package/dist/esm/instructions/createV2Instruction.js.map +1 -1
  205. package/dist/esm/instructions/createWithNftInstruction.js.map +1 -1
  206. package/dist/esm/instructions/reallocInstruction.js.map +1 -1
  207. package/dist/esm/instructions/registerFavoriteInstruction.js.map +1 -1
  208. package/dist/esm/instructions/transferInstruction.js.map +1 -1
  209. package/dist/esm/instructions/updateInstruction.js.map +1 -1
  210. package/dist/esm/int.js.map +1 -1
  211. package/dist/esm/nft/getDomainMint.js.map +1 -1
  212. package/dist/esm/nft/getRecordFromMint.js.map +1 -1
  213. package/dist/esm/nft/retrieveNftOwner.js.map +1 -1
  214. package/dist/esm/nft/retrieveNftOwnerV2.js.map +1 -1
  215. package/dist/esm/nft/retrieveNfts.js +1 -1
  216. package/dist/esm/nft/retrieveNfts.js.map +1 -1
  217. package/dist/esm/nft/retrieveRecords.js +1 -1
  218. package/dist/esm/nft/retrieveRecords.js.map +1 -1
  219. package/dist/esm/nft/state.js.map +1 -1
  220. package/dist/esm/node_modules/@bonfida/sns-records/dist/index.js +1 -1
  221. package/dist/esm/node_modules/@noble/curves/esm/abstract/curve.js +2 -2
  222. package/dist/esm/node_modules/@noble/curves/esm/abstract/curve.js.map +1 -1
  223. package/dist/esm/node_modules/@noble/curves/esm/abstract/edwards.js +2 -2
  224. package/dist/esm/node_modules/@noble/curves/esm/abstract/edwards.js.map +1 -1
  225. package/dist/esm/node_modules/@noble/curves/esm/abstract/modular.js +2 -2
  226. package/dist/esm/node_modules/@noble/curves/esm/abstract/modular.js.map +1 -1
  227. package/dist/esm/node_modules/@noble/curves/esm/ed25519.js +2 -2
  228. package/dist/esm/node_modules/@noble/curves/esm/ed25519.js.map +1 -1
  229. package/dist/esm/node_modules/@noble/curves/esm/utils.js +3 -0
  230. package/dist/esm/node_modules/@noble/curves/esm/utils.js.map +1 -0
  231. package/dist/esm/node_modules/@noble/hashes/esm/_md.js +1 -1
  232. package/dist/esm/node_modules/@noble/hashes/esm/_md.js.map +1 -1
  233. package/dist/esm/node_modules/@noble/hashes/esm/_u64.js.map +1 -1
  234. package/dist/esm/node_modules/@noble/hashes/esm/sha2.js +1 -1
  235. package/dist/esm/node_modules/@noble/hashes/esm/sha2.js.map +1 -1
  236. package/dist/esm/node_modules/@noble/hashes/esm/utils.js +2 -2
  237. package/dist/esm/node_modules/@noble/hashes/esm/utils.js.map +1 -1
  238. package/dist/esm/node_modules/@scure/base/lib/esm/index.js +1 -1
  239. package/dist/esm/node_modules/@scure/base/lib/esm/index.js.map +1 -1
  240. package/dist/esm/node_modules/@solana/spl-token/lib/esm/extensions/accountType.js.map +1 -1
  241. package/dist/esm/node_modules/@solana/spl-token/lib/esm/state/account.js.map +1 -1
  242. package/dist/esm/node_modules/@solana/spl-token/lib/esm/state/mint.js.map +1 -1
  243. package/dist/esm/node_modules/base64-js/index.js +1 -1
  244. package/dist/esm/node_modules/base64-js/index.js.map +1 -1
  245. package/dist/esm/node_modules/borsh/lib/esm/buffer.js.map +1 -1
  246. package/dist/esm/node_modules/borsh/lib/esm/deserialize.js +1 -1
  247. package/dist/esm/node_modules/borsh/lib/esm/deserialize.js.map +1 -1
  248. package/dist/esm/node_modules/borsh/lib/esm/serialize.js.map +1 -1
  249. package/dist/esm/node_modules/borsh/lib/esm/utils.js.map +1 -1
  250. package/dist/esm/node_modules/bs58/node_modules/base-x/src/index.js.map +1 -1
  251. package/dist/esm/node_modules/buffer/index.js +1 -1
  252. package/dist/esm/node_modules/buffer/index.js.map +1 -1
  253. package/dist/esm/node_modules/graphemesplit/index.js +1 -1
  254. package/dist/esm/node_modules/graphemesplit/index.js.map +1 -1
  255. package/dist/esm/node_modules/ieee754/index.js.map +1 -1
  256. package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.js +1 -1
  257. package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.js.map +1 -1
  258. package/dist/esm/node_modules/js-base64/base64.js +1 -1
  259. package/dist/esm/node_modules/js-base64/base64.js.map +1 -1
  260. package/dist/esm/node_modules/punycode/punycode.es6.js +1 -1
  261. package/dist/esm/node_modules/punycode/punycode.es6.js.map +1 -1
  262. package/dist/esm/node_modules/tiny-inflate/index.js.map +1 -1
  263. package/dist/esm/node_modules/unicode-trie/index.js.map +1 -1
  264. package/dist/esm/node_modules/unicode-trie/swap.js.map +1 -1
  265. package/dist/esm/record/checkSolRecord.js.map +1 -1
  266. package/dist/esm/record/deserializeRecord.js +1 -1
  267. package/dist/esm/record/deserializeRecord.js.map +1 -1
  268. package/dist/esm/record/getRecordKeySync.js.map +1 -1
  269. package/dist/esm/record/getRecords.js +1 -1
  270. package/dist/esm/record/getRecords.js.map +1 -1
  271. package/dist/esm/record/serializeRecord.js.map +1 -1
  272. package/dist/esm/record/serializeSolRecord.js.map +1 -1
  273. package/dist/esm/record_v2/const.d.ts +1 -0
  274. package/dist/esm/record_v2/const.js +1 -1
  275. package/dist/esm/record_v2/const.js.map +1 -1
  276. package/dist/esm/record_v2/deserializeRecordV2Content.js.map +1 -1
  277. package/dist/esm/record_v2/getMultipleRecordsV2.d.ts +16 -5
  278. package/dist/esm/record_v2/getMultipleRecordsV2.js +1 -1
  279. package/dist/esm/record_v2/getMultipleRecordsV2.js.map +1 -1
  280. package/dist/esm/record_v2/getRecordV2.d.ts +16 -8
  281. package/dist/esm/record_v2/getRecordV2.js +1 -1
  282. package/dist/esm/record_v2/getRecordV2.js.map +1 -1
  283. package/dist/esm/record_v2/getRecordV2Key.js.map +1 -1
  284. package/dist/esm/record_v2/serializeRecordV2Content.js.map +1 -1
  285. package/dist/esm/record_v2/verifyRightOfAssociation.js.map +1 -1
  286. package/dist/esm/record_v2/{utils.js → verifyStaleness.js} +1 -1
  287. package/dist/esm/record_v2/verifyStaleness.js.map +1 -0
  288. package/dist/esm/resolve/resolve.js +1 -1
  289. package/dist/esm/resolve/resolve.js.map +1 -1
  290. package/dist/esm/resolve/resolveSolRecordV1.js.map +1 -1
  291. package/dist/esm/resolve/resolveSolRecordV2.js.map +1 -1
  292. package/dist/esm/state.js +1 -1
  293. package/dist/esm/state.js.map +1 -1
  294. package/dist/esm/twitter/ReverseTwitterRegistryState.js.map +1 -1
  295. package/dist/esm/twitter/changeVerifiedPubkey.js +1 -1
  296. package/dist/esm/twitter/createReverseTwitterRegistry.js +1 -1
  297. package/dist/esm/twitter/createVerifiedTwitterRegistry.js +1 -1
  298. package/dist/esm/twitter/getTwitterHandleandRegistryKeyViaFilters.js.map +1 -1
  299. package/dist/esm/types/custom-bg.js.map +1 -1
  300. package/dist/esm/types/record.d.ts +2 -1
  301. package/dist/esm/types/record.js +1 -1
  302. package/dist/esm/types/record.js.map +1 -1
  303. package/dist/esm/utils/findSubdomains.js +1 -1
  304. package/dist/esm/utils/findSubdomains.js.map +1 -1
  305. package/dist/esm/utils/getAllDomains.js +1 -1
  306. package/dist/esm/utils/getAllDomains.js.map +1 -1
  307. package/dist/esm/utils/getAllRegisteredDomains.js.map +1 -1
  308. package/dist/esm/utils/getDomainKeySync.js.map +1 -1
  309. package/dist/esm/utils/getDomainKeysWithReverses.js +1 -1
  310. package/dist/esm/utils/getDomainKeysWithReverses.js.map +1 -1
  311. package/dist/esm/utils/getDomainPriceFromName.js.map +1 -1
  312. package/dist/esm/utils/getHashedNameSync.js.map +1 -1
  313. package/dist/esm/utils/getNameAccountKeySync.js.map +1 -1
  314. package/dist/esm/utils/getPythFeedAccountKey.js.map +1 -1
  315. package/dist/esm/utils/getReverseKeyFromDomainKey.js.map +1 -1
  316. package/dist/esm/utils/getReverseKeySync.js.map +1 -1
  317. package/dist/esm/utils/getTokenizedDomains.js +1 -1
  318. package/dist/esm/utils/getTokenizedDomains.js.map +1 -1
  319. package/dist/esm/utils/reverseLookupBatch.js +1 -1
  320. package/dist/esm/utils/reverseLookupBatch.js.map +1 -1
  321. package/package.json +2 -2
  322. package/dist/cjs/node_modules/@noble/curves/esm/abstract/utils.js +0 -3
  323. package/dist/cjs/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
  324. package/dist/cjs/record_v2/utils.js.map +0 -1
  325. package/dist/esm/node_modules/@noble/curves/esm/abstract/utils.js +0 -3
  326. package/dist/esm/node_modules/@noble/curves/esm/abstract/utils.js.map +0 -1
  327. package/dist/esm/record_v2/utils.js.map +0 -1
  328. /package/dist/cjs/record_v2/{utils.d.ts → verifyStaleness.d.ts} +0 -0
  329. /package/dist/esm/record_v2/{utils.d.ts → verifyStaleness.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ReverseTwitterRegistryState.js","sources":["../../../src/twitter/ReverseTwitterRegistryState.ts"],"sourcesContent":[null],"names":["ReverseTwitterRegistryState","constructor","obj","this","twitterRegistryKey","twitterHandle","retrieve","connection","reverseTwitterAccountKey","reverseTwitterAccount","getAccountInfo","InvalidReverseTwitterError","deserialize","schema","data","slice","NameRegistryState","HEADER_LEN","struct","array","type","len"],"mappings":"oLAKaA,EAWX,WAAAC,CAAYC,GACVC,KAAKC,mBAAqBF,EAAIE,mBAC9BD,KAAKE,cAAgBH,EAAIG,cAGpB,qBAAaC,CAClBC,EACAC,GAEA,IAAIC,QAA8BF,EAAWG,eAC3CF,EACA,aAEF,IAAKC,EACH,MAAM,IAAIE,EACR,6CAWJ,OAPY,IAAIX,EACdY,EACEZ,EAA4Ba,OAC5BJ,EAAsBK,KAAKC,MAAMC,EAAkBC,eA7BlDjB,EAAAa,OAAS,CACdK,OAAQ,CACNd,mBAAoB,CAAEe,MAAO,CAAEC,KAAM,KAAMC,IAAK,KAChDhB,cAAe"}
1
+ {"version":3,"file":"ReverseTwitterRegistryState.js","sources":["../../../src/twitter/ReverseTwitterRegistryState.ts"],"sourcesContent":[null],"names":["ReverseTwitterRegistryState","constructor","obj","this","twitterRegistryKey","twitterHandle","retrieve","connection","reverseTwitterAccountKey","reverseTwitterAccount","getAccountInfo","InvalidReverseTwitterError","deserialize","schema","data","slice","NameRegistryState","HEADER_LEN","struct","array","type","len"],"mappings":"oLAKaA,EAWX,WAAAC,CAAYC,GACVC,KAAKC,mBAAqBF,EAAIE,mBAC9BD,KAAKE,cAAgBH,EAAIG,aAC3B,CAEO,qBAAaC,CAClBC,EACAC,GAEA,IAAIC,QAA8BF,EAAWG,eAC3CF,EACA,aAEF,IAAKC,EACH,MAAM,IAAIE,EACR,6CAWJ,OAPY,IAAIX,EACdY,EACEZ,EAA4Ba,OAC5BJ,EAAsBK,KAAKC,MAAMC,EAAkBC,aAKzD,EAlCOjB,EAAAa,OAAS,CACdK,OAAQ,CACNd,mBAAoB,CAAEe,MAAO,CAAEC,KAAM,KAAMC,IAAK,KAChDhB,cAAe"}
@@ -1,2 +1,2 @@
1
- import{TWITTER_VERIFICATION_AUTHORITY as t,NAME_PROGRAM_ID as r,TWITTER_ROOT_PARENT_REGISTRY_KEY as o}from"../constants.js";import{deleteNameRegistry as e}from"../bindings/deleteNameRegistry.js";import{transferInstruction as i}from"../instructions/transferInstruction.js";import{getHashedNameSync as s}from"../utils/getHashedNameSync.js";import{getNameAccountKeySync as n}from"../utils/getNameAccountKeySync.js";import{createReverseTwitterRegistry as m}from"./createReverseTwitterRegistry.js";async function a(a,c,f,p,u){const g=s(c),j=n(g,void 0,o);let y=[i(r,j,p,f,void 0)];return y.push(await e(a,f.toString(),u,t,o)),y=y.concat(await m(a,c,j,p,u)),y}export{a as changeVerifiedPubkey};
1
+ import{NAME_PROGRAM_ID as t,TWITTER_ROOT_PARENT_REGISTRY_KEY as r,TWITTER_VERIFICATION_AUTHORITY as o}from"../constants.js";import{deleteNameRegistry as e}from"../bindings/deleteNameRegistry.js";import{transferInstruction as i}from"../instructions/transferInstruction.js";import{getHashedNameSync as s}from"../utils/getHashedNameSync.js";import{getNameAccountKeySync as n}from"../utils/getNameAccountKeySync.js";import{createReverseTwitterRegistry as m}from"./createReverseTwitterRegistry.js";async function a(a,c,f,p,u){const g=s(c),j=n(g,void 0,r);let y=[i(t,j,p,f,void 0)];return y.push(await e(a,f.toString(),u,o,r)),y=y.concat(await m(a,c,j,p,u)),y}export{a as changeVerifiedPubkey};
2
2
  //# sourceMappingURL=changeVerifiedPubkey.js.map
@@ -1,2 +1,2 @@
1
- import{serialize as t}from"../node_modules/borsh/lib/esm/index.js";import"../node_modules/buffer/index.js";import{SystemProgram as e}from"@solana/web3.js";import{NAME_PROGRAM_ID as r,TWITTER_ROOT_PARENT_REGISTRY_KEY as o,TWITTER_VERIFICATION_AUTHORITY as s}from"../constants.js";import{createInstruction as i}from"../instructions/createInstruction.js";import{updateInstruction as n}from"../instructions/updateInstruction.js";import{NameRegistryState as m}from"../state.js";import{getHashedNameSync as a}from"../utils/getHashedNameSync.js";import{getNameAccountKeySync as f}from"../utils/getNameAccountKeySync.js";import{Numberu32 as p,Numberu64 as u}from"../int.js";import{ReverseTwitterRegistryState as c}from"./ReverseTwitterRegistryState.js";import{__exports as j}from"../_virtual/index.js";async function l(l,d,g,w,y){const x=a(w.toString()),_=f(x,s,o);let h=t(c.schema,new c({twitterRegistryKey:g.toBytes(),twitterHandle:d}));return[i(r,e.programId,_,w,y,x,new u(await l.getMinimumBalanceForRentExemption(h.length+m.HEADER_LEN)),new p(h.length),s,o,s),n(r,_,new p(0),j.Buffer.from(h),s)]}export{l as createReverseTwitterRegistry};
1
+ import{serialize as t}from"../node_modules/borsh/lib/esm/index.js";import"../node_modules/buffer/index.js";import{SystemProgram as e}from"@solana/web3.js";import{TWITTER_VERIFICATION_AUTHORITY as r,TWITTER_ROOT_PARENT_REGISTRY_KEY as o,NAME_PROGRAM_ID as s}from"../constants.js";import{createInstruction as i}from"../instructions/createInstruction.js";import{updateInstruction as n}from"../instructions/updateInstruction.js";import{NameRegistryState as m}from"../state.js";import{getHashedNameSync as a}from"../utils/getHashedNameSync.js";import{getNameAccountKeySync as f}from"../utils/getNameAccountKeySync.js";import{Numberu32 as p,Numberu64 as u}from"../int.js";import{ReverseTwitterRegistryState as c}from"./ReverseTwitterRegistryState.js";import{__exports as j}from"../_virtual/index.js";async function l(l,d,g,w,y){const x=a(w.toString()),_=f(x,r,o);let h=t(c.schema,new c({twitterRegistryKey:g.toBytes(),twitterHandle:d}));return[i(s,e.programId,_,w,y,x,new u(await l.getMinimumBalanceForRentExemption(h.length+m.HEADER_LEN)),new p(h.length),r,o,r),n(s,_,new p(0),j.Buffer.from(h),r)]}export{l as createReverseTwitterRegistry};
2
2
  //# sourceMappingURL=createReverseTwitterRegistry.js.map
@@ -1,2 +1,2 @@
1
- import{SystemProgram as t}from"@solana/web3.js";import{NAME_PROGRAM_ID as o,TWITTER_ROOT_PARENT_REGISTRY_KEY as r,TWITTER_VERIFICATION_AUTHORITY as e}from"../constants.js";import{createInstruction as i}from"../instructions/createInstruction.js";import{NameRegistryState as n}from"../state.js";import{getHashedNameSync as m}from"../utils/getHashedNameSync.js";import{getNameAccountKeySync as s}from"../utils/getNameAccountKeySync.js";import{Numberu32 as a,Numberu64 as c}from"../int.js";import{createReverseTwitterRegistry as p}from"./createReverseTwitterRegistry.js";async function f(f,j,u,w,g){const l=m(j),y=s(l,void 0,r),d=await f.getMinimumBalanceForRentExemption(w+n.HEADER_LEN);let E=[i(o,t.programId,y,u,g,l,new c(d),new a(w),void 0,r,e)];return E=E.concat(await p(f,j,y,u,g)),E}export{f as createVerifiedTwitterRegistry};
1
+ import{SystemProgram as t}from"@solana/web3.js";import{TWITTER_VERIFICATION_AUTHORITY as o,TWITTER_ROOT_PARENT_REGISTRY_KEY as r,NAME_PROGRAM_ID as e}from"../constants.js";import{createInstruction as i}from"../instructions/createInstruction.js";import{NameRegistryState as n}from"../state.js";import{getHashedNameSync as m}from"../utils/getHashedNameSync.js";import{getNameAccountKeySync as s}from"../utils/getNameAccountKeySync.js";import{Numberu32 as a,Numberu64 as c}from"../int.js";import{createReverseTwitterRegistry as p}from"./createReverseTwitterRegistry.js";async function f(f,j,u,w,g){const l=m(j),y=s(l,void 0,r),d=await f.getMinimumBalanceForRentExemption(w+n.HEADER_LEN);let E=[i(e,t.programId,y,u,g,l,new c(d),new a(w),void 0,r,o)];return E=E.concat(await p(f,j,y,u,g)),E}export{f as createVerifiedTwitterRegistry};
2
2
  //# sourceMappingURL=createVerifiedTwitterRegistry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTwitterHandleandRegistryKeyViaFilters.js","sources":["../../../src/twitter/getTwitterHandleandRegistryKeyViaFilters.ts"],"sourcesContent":[null],"names":["async","getTwitterHandleandRegistryKeyViaFilters","connection","verifiedPubkey","filters","memcmp","offset","bytes","TWITTER_ROOT_PARENT_REGISTRY_KEY","toBase58","TWITTER_VERIFICATION_AUTHORITY","filteredAccounts","getProgramAccounts","NAME_PROGRAM_ID","f","account","data","length","NameRegistryState","HEADER_LEN","slice","state","ReverseTwitterRegistryState","deserialize","schema","twitterHandle","PublicKey","twitterRegistryKey","AccountDoesNotExistError"],"mappings":"maAaOA,eAAeC,EACpBC,EACAC,GAEA,MAAMC,EAAU,CACd,CACEC,OAAQ,CACNC,OAAQ,EACRC,MAAOC,EAAiCC,aAG5C,CACEJ,OAAQ,CACNC,OAAQ,GACRC,MAAOJ,EAAeM,aAG1B,CACEJ,OAAQ,CACNC,OAAQ,GACRC,MAAOG,EAA+BD,cAItCE,QAAyBT,EAAWU,mBACxCC,EACA,CAAET,YAGJ,IAAK,MAAMU,KAAKH,EACd,GAAIG,EAAEC,QAAQC,KAAKC,OAASC,EAAkBC,WAAa,GAAI,CAC7D,MAAMH,EAAOF,EAAEC,QAAQC,KAAKI,MAAMF,EAAkBC,YAC9CE,EAAQ,IAAIC,EAChBC,EAAYD,EAA4BE,OAAQR,IAElD,MAAO,CAACK,EAAMI,cAAe,IAAIC,EAAUL,EAAMM,qBAIrD,MAAM,IAAIC,EAAyB,qCACrC"}
1
+ {"version":3,"file":"getTwitterHandleandRegistryKeyViaFilters.js","sources":["../../../src/twitter/getTwitterHandleandRegistryKeyViaFilters.ts"],"sourcesContent":[null],"names":["async","getTwitterHandleandRegistryKeyViaFilters","connection","verifiedPubkey","filters","memcmp","offset","bytes","TWITTER_ROOT_PARENT_REGISTRY_KEY","toBase58","TWITTER_VERIFICATION_AUTHORITY","filteredAccounts","getProgramAccounts","NAME_PROGRAM_ID","f","account","data","length","NameRegistryState","HEADER_LEN","slice","state","ReverseTwitterRegistryState","deserialize","schema","twitterHandle","PublicKey","twitterRegistryKey","AccountDoesNotExistError"],"mappings":"maAaOA,eAAeC,EACpBC,EACAC,GAEA,MAAMC,EAAU,CACd,CACEC,OAAQ,CACNC,OAAQ,EACRC,MAAOC,EAAiCC,aAG5C,CACEJ,OAAQ,CACNC,OAAQ,GACRC,MAAOJ,EAAeM,aAG1B,CACEJ,OAAQ,CACNC,OAAQ,GACRC,MAAOG,EAA+BD,cAItCE,QAAyBT,EAAWU,mBACxCC,EACA,CAAET,YAGJ,IAAK,MAAMU,KAAKH,EACd,GAAIG,EAAEC,QAAQC,KAAKC,OAASC,EAAkBC,WAAa,GAAI,CAC7D,MAAMH,EAAOF,EAAEC,QAAQC,KAAKI,MAAMF,EAAkBC,YAC9CE,EAAQ,IAAIC,EAChBC,EAAYD,EAA4BE,OAAQR,IAElD,MAAO,CAACK,EAAMI,cAAe,IAAIC,EAAUL,EAAMM,oBACnD,CAGF,MAAM,IAAIC,EAAyB,qCACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"custom-bg.js","sources":["../../../src/types/custom-bg.ts"],"sourcesContent":[null],"names":["CustomBg"],"mappings":"IAAYA,GAAZ,SAAYA,GACVA,EAAA,WAAA,cACAA,EAAA,SAAA,YACAA,EAAA,UAAA,aACAA,EAAA,UAAA,aACAA,EAAA,UAAA,aACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,iBAAA,qBACAA,EAAA,SAAA,WACAA,EAAA,iBAAA,kBACD,CAnBD,CAAYA,IAAAA,EAmBX,CAAA"}
1
+ {"version":3,"file":"custom-bg.js","sources":["../../../src/types/custom-bg.ts"],"sourcesContent":[null],"names":["CustomBg"],"mappings":"IAAYA,GAAZ,SAAYA,GACVA,EAAA,WAAA,cACAA,EAAA,SAAA,YACAA,EAAA,UAAA,aACAA,EAAA,UAAA,aACAA,EAAA,UAAA,aACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,WAAA,cACAA,EAAA,iBAAA,qBACAA,EAAA,SAAA,WACAA,EAAA,iBAAA,kBACD,CAnBD,CAAYA,IAAAA,EAAQ,CAAA"}
@@ -28,7 +28,8 @@ export declare enum Record {
28
28
  TXT = "TXT",
29
29
  Background = "background",
30
30
  BASE = "BASE",
31
- IPNS = "IPNS"
31
+ IPNS = "IPNS",
32
+ Bio = "bio"
32
33
  }
33
34
  export declare const RECORD_V1_SIZE: Map<Record, number>;
34
35
  export declare enum RecordVersion {
@@ -1,2 +1,2 @@
1
- var A;!function(A){A.IPFS="IPFS",A.ARWV="ARWV",A.SOL="SOL",A.ETH="ETH",A.BTC="BTC",A.LTC="LTC",A.DOGE="DOGE",A.Email="email",A.Url="url",A.Discord="discord",A.Github="github",A.Reddit="reddit",A.Twitter="twitter",A.Telegram="telegram",A.Pic="pic",A.SHDW="SHDW",A.POINT="POINT",A.BSC="BSC",A.Injective="INJ",A.Backpack="backpack",A.A="A",A.AAAA="AAAA",A.CNAME="CNAME",A.TXT="TXT",A.Background="background",A.BASE="BASE",A.IPNS="IPNS"}(A||(A={}));const c=new Map([[A.SOL,96],[A.ETH,20],[A.BSC,20],[A.Injective,20],[A.A,4],[A.AAAA,16],[A.Background,32]]);var i;!function(A){A[A.V1=1]="V1",A[A.V2=2]="V2"}(i||(i={}));export{c as RECORD_V1_SIZE,A as Record,i as RecordVersion};
1
+ var A;!function(A){A.IPFS="IPFS",A.ARWV="ARWV",A.SOL="SOL",A.ETH="ETH",A.BTC="BTC",A.LTC="LTC",A.DOGE="DOGE",A.Email="email",A.Url="url",A.Discord="discord",A.Github="github",A.Reddit="reddit",A.Twitter="twitter",A.Telegram="telegram",A.Pic="pic",A.SHDW="SHDW",A.POINT="POINT",A.BSC="BSC",A.Injective="INJ",A.Backpack="backpack",A.A="A",A.AAAA="AAAA",A.CNAME="CNAME",A.TXT="TXT",A.Background="background",A.BASE="BASE",A.IPNS="IPNS",A.Bio="bio"}(A||(A={}));const i=new Map([[A.SOL,96],[A.ETH,20],[A.BSC,20],[A.Injective,20],[A.A,4],[A.AAAA,16],[A.Background,32]]);var c;!function(A){A[A.V1=1]="V1",A[A.V2=2]="V2"}(c||(c={}));export{i as RECORD_V1_SIZE,A as Record,c as RecordVersion};
2
2
  //# sourceMappingURL=record.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"record.js","sources":["../../../src/types/record.ts"],"sourcesContent":[null],"names":["Record","RECORD_V1_SIZE","Map","SOL","ETH","BSC","Injective","A","AAAA","Background","RecordVersion"],"mappings":"IAGYA,GAAZ,SAAYA,GACVA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,QAAA,UACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SACAA,EAAA,QAAA,UACAA,EAAA,SAAA,WACAA,EAAA,IAAA,MACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,UAAA,MACAA,EAAA,SAAA,WACAA,EAAA,EAAA,IACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,WAAA,aACAA,EAAA,KAAA,OACAA,EAAA,KAAA,MACD,CA5BD,CAAYA,IAAAA,EA4BX,CAAA,IAEY,MAAAC,EAAsC,IAAIC,IAAI,CACzD,CAACF,EAAOG,IAAK,IACb,CAACH,EAAOI,IAAK,IACb,CAACJ,EAAOK,IAAK,IACb,CAACL,EAAOM,UAAW,IACnB,CAACN,EAAOO,EAAG,GACX,CAACP,EAAOQ,KAAM,IACd,CAACR,EAAOS,WAAY,UAGVC,GAAZ,SAAYA,GACVA,EAAAA,EAAA,GAAA,GAAA,KACAA,EAAAA,EAAA,GAAA,GAAA,IACD,CAHD,CAAYA,IAAAA,EAGX,CAAA"}
1
+ {"version":3,"file":"record.js","sources":["../../../src/types/record.ts"],"sourcesContent":[null],"names":["Record","RECORD_V1_SIZE","Map","SOL","ETH","BSC","Injective","A","AAAA","Background","RecordVersion"],"mappings":"IAGYA,GAAZ,SAAYA,GACVA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,IAAA,MACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,QAAA,UACAA,EAAA,OAAA,SACAA,EAAA,OAAA,SACAA,EAAA,QAAA,UACAA,EAAA,SAAA,WACAA,EAAA,IAAA,MACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,UAAA,MACAA,EAAA,SAAA,WACAA,EAAA,EAAA,IACAA,EAAA,KAAA,OACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,WAAA,aACAA,EAAA,KAAA,OACAA,EAAA,KAAA,OACAA,EAAA,IAAA,KACD,CA7BD,CAAYA,IAAAA,EAAM,CAAA,IA+BX,MAAMC,EAAsC,IAAIC,IAAI,CACzD,CAACF,EAAOG,IAAK,IACb,CAACH,EAAOI,IAAK,IACb,CAACJ,EAAOK,IAAK,IACb,CAACL,EAAOM,UAAW,IACnB,CAACN,EAAOO,EAAG,GACX,CAACP,EAAOQ,KAAM,IACd,CAACR,EAAOS,WAAY,UAGVC,GAAZ,SAAYA,GACVA,EAAAA,EAAA,GAAA,GAAA,KACAA,EAAAA,EAAA,GAAA,GAAA,IACD,CAHD,CAAYA,IAAAA,EAAa,CAAA"}
@@ -1,2 +1,2 @@
1
- import{REVERSE_LOOKUP_CLASS as e,NAME_PROGRAM_ID as t}from"../constants.js";import{deserializeReverse as s}from"./deserializeReverse.js";import{getReverseKeyFromDomainKey as o}from"./getReverseKeyFromDomainKey.js";const a=async(a,m)=>{const r=[{memcmp:{offset:0,bytes:m.toBase58()}},{memcmp:{offset:64,bytes:e.toBase58()}}],c=await a.getProgramAccounts(t,{filters:r}),f=[{memcmp:{offset:0,bytes:m.toBase58()}}],n=await a.getProgramAccounts(t,{filters:f,dataSlice:{offset:0,length:0}}),i=new Map(c.map((e=>[e.pubkey.toBase58(),s(e.account.data.slice(96),!0)]))),p=[];return n.forEach((e=>{const t=o(e.pubkey,m).toBase58(),s=i.get(t);s&&p.push(s)})),p};export{a as findSubdomains};
1
+ import{REVERSE_LOOKUP_CLASS as e,NAME_PROGRAM_ID as t}from"../constants.js";import{deserializeReverse as s}from"./deserializeReverse.js";import{getReverseKeyFromDomainKey as o}from"./getReverseKeyFromDomainKey.js";const a=async(a,m)=>{const r=[{memcmp:{offset:0,bytes:m.toBase58()}},{memcmp:{offset:64,bytes:e.toBase58()}}],c=await a.getProgramAccounts(t,{filters:r}),f=[{memcmp:{offset:0,bytes:m.toBase58()}}],n=await a.getProgramAccounts(t,{filters:f,dataSlice:{offset:0,length:0}}),i=new Map(c.map(e=>[e.pubkey.toBase58(),s(e.account.data.slice(96),!0)])),p=[];return n.forEach(e=>{const t=o(e.pubkey,m).toBase58(),s=i.get(t);s&&p.push(s)}),p};export{a as findSubdomains};
2
2
  //# sourceMappingURL=findSubdomains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"findSubdomains.js","sources":["../../../src/utils/findSubdomains.ts"],"sourcesContent":[null],"names":["findSubdomains","async","connection","parentKey","filtersRevs","memcmp","offset","bytes","toBase58","REVERSE_LOOKUP_CLASS","reverses","getProgramAccounts","NAME_PROGRAM_ID","filters","filtersSubs","subs","dataSlice","length","map","Map","e","pubkey","deserializeReverse","account","data","slice","result","forEach","revKey","getReverseKeyFromDomainKey","rev","get","push"],"mappings":"sNAaa,MAAAA,EAAiBC,MAC5BC,EACAC,KAGA,MAAMC,EAA8B,CAClC,CACEC,OAAQ,CACNC,OAAQ,EACRC,MAAOJ,EAAUK,aAGrB,CACEH,OAAQ,CACNC,OAAQ,GACRC,MAAOE,EAAqBD,cAI5BE,QAAiBR,EAAWS,mBAAmBC,EAAiB,CACpEC,QAAST,IAGLU,EAA8B,CAClC,CACET,OAAQ,CACNC,OAAQ,EACRC,MAAOJ,EAAUK,cAIjBO,QAAab,EAAWS,mBAAmBC,EAAiB,CAChEC,QAASC,EACTE,UAAW,CAAEV,OAAQ,EAAGW,OAAQ,KAG5BC,EAAM,IAAIC,IACdT,EAASQ,KAAKE,GAAM,CAClBA,EAAEC,OAAOb,WACTc,EAAmBF,EAAEG,QAAQC,KAAKC,MAAM,KAAK,OAI3CC,EAAmB,GASzB,OARAX,EAAKY,SAASP,IACZ,MAAMQ,EAASC,EAA2BT,EAAEC,OAAQlB,GAAWK,WACzDsB,EAAMZ,EAAIa,IAAIH,GACdE,GACJJ,EAAOM,KAAKF,MAITJ,CAAM"}
1
+ {"version":3,"file":"findSubdomains.js","sources":["../../../src/utils/findSubdomains.ts"],"sourcesContent":[null],"names":["findSubdomains","async","connection","parentKey","filtersRevs","memcmp","offset","bytes","toBase58","REVERSE_LOOKUP_CLASS","reverses","getProgramAccounts","NAME_PROGRAM_ID","filters","filtersSubs","subs","dataSlice","length","map","Map","e","pubkey","deserializeReverse","account","data","slice","result","forEach","revKey","getReverseKeyFromDomainKey","rev","get","push"],"mappings":"sNAaO,MAAMA,EAAiBC,MAC5BC,EACAC,KAGA,MAAMC,EAA8B,CAClC,CACEC,OAAQ,CACNC,OAAQ,EACRC,MAAOJ,EAAUK,aAGrB,CACEH,OAAQ,CACNC,OAAQ,GACRC,MAAOE,EAAqBD,cAI5BE,QAAiBR,EAAWS,mBAAmBC,EAAiB,CACpEC,QAAST,IAGLU,EAA8B,CAClC,CACET,OAAQ,CACNC,OAAQ,EACRC,MAAOJ,EAAUK,cAIjBO,QAAab,EAAWS,mBAAmBC,EAAiB,CAChEC,QAASC,EACTE,UAAW,CAAEV,OAAQ,EAAGW,OAAQ,KAG5BC,EAAM,IAAIC,IACdT,EAASQ,IAAKE,GAAM,CAClBA,EAAEC,OAAOb,WACTc,EAAmBF,EAAEG,QAAQC,KAAKC,MAAM,KAAK,MAI3CC,EAAmB,GASzB,OARAX,EAAKY,QAASP,IACZ,MAAMQ,EAASC,EAA2BT,EAAEC,OAAQlB,GAAWK,WACzDsB,EAAMZ,EAAIa,IAAIH,GACdE,GACJJ,EAAOM,KAAKF,KAITJ"}
@@ -1,2 +1,2 @@
1
- import{ROOT_DOMAIN_ACCOUNT as t,NAME_PROGRAM_ID as e}from"../constants.js";async function s(s,o){const a=[{memcmp:{offset:32,bytes:o.toBase58()}},{memcmp:{offset:0,bytes:t.toBase58()}}];return(await s.getProgramAccounts(e,{filters:a,dataSlice:{offset:0,length:0}})).map((t=>t.pubkey))}export{s as getAllDomains};
1
+ import{ROOT_DOMAIN_ACCOUNT as t,NAME_PROGRAM_ID as e}from"../constants.js";async function s(s,o){const a=[{memcmp:{offset:32,bytes:o.toBase58()}},{memcmp:{offset:0,bytes:t.toBase58()}}];return(await s.getProgramAccounts(e,{filters:a,dataSlice:{offset:0,length:0}})).map(t=>t.pubkey)}export{s as getAllDomains};
2
2
  //# sourceMappingURL=getAllDomains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getAllDomains.js","sources":["../../../src/utils/getAllDomains.ts"],"sourcesContent":[null],"names":["async","getAllDomains","connection","wallet","filters","memcmp","offset","bytes","toBase58","ROOT_DOMAIN_ACCOUNT","getProgramAccounts","NAME_PROGRAM_ID","dataSlice","length","map","a","pubkey"],"mappings":"2EASOA,eAAeC,EACpBC,EACAC,GAEA,MAAMC,EAAU,CACd,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOJ,EAAOK,aAGlB,CACEH,OAAQ,CACNC,OAAQ,EACRC,MAAOE,EAAoBD,cASjC,aALuBN,EAAWQ,mBAAmBC,EAAiB,CACpEP,UAEAQ,UAAW,CAAEN,OAAQ,EAAGO,OAAQ,MAElBC,KAAKC,GAAMA,EAAEC,QAC/B"}
1
+ {"version":3,"file":"getAllDomains.js","sources":["../../../src/utils/getAllDomains.ts"],"sourcesContent":[null],"names":["async","getAllDomains","connection","wallet","filters","memcmp","offset","bytes","toBase58","ROOT_DOMAIN_ACCOUNT","getProgramAccounts","NAME_PROGRAM_ID","dataSlice","length","map","a","pubkey"],"mappings":"2EASOA,eAAeC,EACpBC,EACAC,GAEA,MAAMC,EAAU,CACd,CACEC,OAAQ,CACNC,OAAQ,GACRC,MAAOJ,EAAOK,aAGlB,CACEH,OAAQ,CACNC,OAAQ,EACRC,MAAOE,EAAoBD,cASjC,aALuBN,EAAWQ,mBAAmBC,EAAiB,CACpEP,UAEAQ,UAAW,CAAEN,OAAQ,EAAGO,OAAQ,MAElBC,IAAKC,GAAMA,EAAEC,OAC/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"getAllRegisteredDomains.js","sources":["../../../src/utils/getAllRegisteredDomains.ts"],"sourcesContent":[null],"names":["getAllRegisteredDomains","async","connection","filters","memcmp","offset","bytes","ROOT_DOMAIN_ACCOUNT","toBase58","getProgramAccounts","NAME_PROGRAM_ID","dataSlice","length"],"mappings":"iFASaA,EAA0BC,MAAOC,IAC5C,MAAMC,EAAU,CACd,CACEC,OAAQ,CACNC,OAAQ,EACRC,MAAOC,EAAoBC,cAUjC,aAJuBN,EAAWO,mBAAmBC,EAAiB,CACpEC,UAHgB,CAAEN,OAAQ,GAAIO,OAAQ,IAItCT,WAEa"}
1
+ {"version":3,"file":"getAllRegisteredDomains.js","sources":["../../../src/utils/getAllRegisteredDomains.ts"],"sourcesContent":[null],"names":["getAllRegisteredDomains","async","connection","filters","memcmp","offset","bytes","ROOT_DOMAIN_ACCOUNT","toBase58","getProgramAccounts","NAME_PROGRAM_ID","dataSlice","length"],"mappings":"iFASaA,EAA0BC,MAAOC,IAC5C,MAAMC,EAAU,CACd,CACEC,OAAQ,CACNC,OAAQ,EACRC,MAAOC,EAAoBC,cAUjC,aAJuBN,EAAWO,mBAAmBC,EAAiB,CACpEC,UAHgB,CAAEN,OAAQ,GAAIO,OAAQ,IAItCT"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDomainKeySync.js","sources":["../../../src/utils/getDomainKeySync.ts"],"sourcesContent":[null],"names":["_deriveSync","name","parent","ROOT_DOMAIN_ACCOUNT","classKey","hashed","getHashedNameSync","pubkey","getNameAccountKeySync","getDomainKeySync","domain","record","endsWith","slice","recordClass","RecordVersion","V2","CENTRAL_STATE_SNS_RECORDS","undefined","splitted","split","length","sub","Buffer","from","toString","concat","parentKey","isSub","subKey","recordPrefix","isSubRecord","InvalidInputError"],"mappings":"+cAUA,MAAMA,EAAc,CAClBC,EACAC,EAAoBC,EACpBC,KAEA,IAAIC,EAASC,EAAkBL,GAE/B,MAAO,CAAEM,OADIC,EAAsBH,EAAQD,EAAUF,GACpCG,SAAQ,EASdI,EAAmB,CAACC,EAAgBC,KAC3CD,EAAOE,SAAS,UAClBF,EAASA,EAAOG,MAAM,GAAG,IAE3B,MAAMC,EACJH,IAAWI,EAAcC,GAAKC,OAA4BC,EACtDC,EAAWT,EAAOU,MAAM,KAC9B,GAAwB,IAApBD,EAASE,OAAc,CACzB,MACMC,EADSC,EAAMA,OAACC,KAAK,CAACb,GAAkB,IAAIc,WAC/BC,OAAOP,EAAS,KAC3BZ,OAAQoB,GAAc3B,EAAYmB,EAAS,IAEnD,MAAO,IADQnB,EAAYsB,EAAKK,EAAWb,GACvBc,OAAO,EAAM1B,OAAQyB,GACpC,GAAwB,IAApBR,EAASE,QAAkBV,EAAQ,CAE5C,MAAQJ,OAAQoB,GAAc3B,EAAYmB,EAAS,KAE3CZ,OAAQsB,GAAW7B,EAAY,KAAK0B,OAAOP,EAAS,IAAKQ,GAE3DG,EAAenB,IAAWI,EAAcC,GAAK,IAAS,IAM5D,MAAO,IALQhB,EACb8B,EAAaJ,OAAOP,EAAS,IAC7BU,EACAf,GAEkBc,OAAO,EAAM1B,OAAQyB,EAAWI,aAAa,GAC5D,GAAIZ,EAASE,QAAU,EAC5B,MAAM,IAAIW,EAAkB,2BAG9B,MAAO,IADQhC,EAAYU,EAAQP,GACfyB,OAAO,EAAO1B,YAAQgB,EAAW"}
1
+ {"version":3,"file":"getDomainKeySync.js","sources":["../../../src/utils/getDomainKeySync.ts"],"sourcesContent":[null],"names":["_deriveSync","name","parent","ROOT_DOMAIN_ACCOUNT","classKey","hashed","getHashedNameSync","pubkey","getNameAccountKeySync","getDomainKeySync","domain","record","endsWith","slice","recordClass","RecordVersion","V2","CENTRAL_STATE_SNS_RECORDS","undefined","splitted","split","length","sub","Buffer","from","toString","concat","parentKey","isSub","subKey","recordPrefix","isSubRecord","InvalidInputError"],"mappings":"+cAUA,MAAMA,EAAc,CAClBC,EACAC,EAAoBC,EACpBC,KAEA,IAAIC,EAASC,EAAkBL,GAE/B,MAAO,CAAEM,OADIC,EAAsBH,EAAQD,EAAUF,GACpCG,WASNI,EAAmB,CAACC,EAAgBC,KAC3CD,EAAOE,SAAS,UAClBF,EAASA,EAAOG,MAAM,GAAG,IAE3B,MAAMC,EACJH,IAAWI,EAAcC,GAAKC,OAA4BC,EACtDC,EAAWT,EAAOU,MAAM,KAC9B,GAAwB,IAApBD,EAASE,OAAc,CACzB,MACMC,EADSC,EAAAA,OAAOC,KAAK,CAACb,GAAkB,IAAIc,WAC/BC,OAAOP,EAAS,KAC3BZ,OAAQoB,GAAc3B,EAAYmB,EAAS,IAEnD,MAAO,IADQnB,EAAYsB,EAAKK,EAAWb,GACvBc,OAAO,EAAM1B,OAAQyB,EAC3C,CAAO,GAAwB,IAApBR,EAASE,QAAkBV,EAAQ,CAE5C,MAAQJ,OAAQoB,GAAc3B,EAAYmB,EAAS,KAE3CZ,OAAQsB,GAAW7B,EAAY,KAAK0B,OAAOP,EAAS,IAAKQ,GAE3DG,EAAenB,IAAWI,EAAcC,GAAK,IAAS,IAM5D,MAAO,IALQhB,EACb8B,EAAaJ,OAAOP,EAAS,IAC7BU,EACAf,GAEkBc,OAAO,EAAM1B,OAAQyB,EAAWI,aAAa,EACnE,CAAO,GAAIZ,EAASE,QAAU,EAC5B,MAAM,IAAIW,EAAkB,2BAG9B,MAAO,IADQhC,EAAYU,EAAQP,GACfyB,OAAO,EAAO1B,YAAQgB"}
@@ -1,2 +1,2 @@
1
- import{reverseLookupBatch as o}from"./reverseLookupBatch.js";import{getAllDomains as t}from"./getAllDomains.js";async function a(a,r){const e=await t(a,r),i=await o(a,e);return e.map(((o,t)=>({pubKey:o,domain:i[t]})))}export{a as getDomainKeysWithReverses};
1
+ import{reverseLookupBatch as o}from"./reverseLookupBatch.js";import{getAllDomains as t}from"./getAllDomains.js";async function a(a,r){const e=await t(a,r),i=await o(a,e);return e.map((o,t)=>({pubKey:o,domain:i[t]}))}export{a as getDomainKeysWithReverses};
2
2
  //# sourceMappingURL=getDomainKeysWithReverses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDomainKeysWithReverses.js","sources":["../../../src/utils/getDomainKeysWithReverses.ts"],"sourcesContent":[null],"names":["async","getDomainKeysWithReverses","connection","wallet","encodedNameArr","getAllDomains","names","reverseLookupBatch","map","pubKey","index","domain"],"mappings":"gHAWOA,eAAeC,EACpBC,EACAC,GAEA,MAAMC,QAAuBC,EAAcH,EAAYC,GACjDG,QAAcC,EAAmBL,EAAYE,GAEnD,OAAOA,EAAeI,KAAI,CAACC,EAAQC,KAAW,CAC5CD,SACAE,OAAQL,EAAMI,MAElB"}
1
+ {"version":3,"file":"getDomainKeysWithReverses.js","sources":["../../../src/utils/getDomainKeysWithReverses.ts"],"sourcesContent":[null],"names":["async","getDomainKeysWithReverses","connection","wallet","encodedNameArr","getAllDomains","names","reverseLookupBatch","map","pubKey","index","domain"],"mappings":"gHAWOA,eAAeC,EACpBC,EACAC,GAEA,MAAMC,QAAuBC,EAAcH,EAAYC,GACjDG,QAAcC,EAAmBL,EAAYE,GAEnD,OAAOA,EAAeI,IAAI,CAACC,EAAQC,KAAK,CACtCD,SACAE,OAAQL,EAAMI,KAElB"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDomainPriceFromName.js","sources":["../../../src/utils/getDomainPriceFromName.ts"],"sourcesContent":[null],"names":["getDomainPriceFromName","name","splitGraphemes","length"],"mappings":"sDAQa,MAAAA,EAA0BC,IAGrC,OAFcC,EAAeD,GAEfE,QACZ,KAAK,EACH,OAAO,IACT,KAAK,EACH,OAAO,IACT,KAAK,EACH,OAAO,IACT,KAAK,EACH,OAAO,IACT,QACE,OAAO"}
1
+ {"version":3,"file":"getDomainPriceFromName.js","sources":["../../../src/utils/getDomainPriceFromName.ts"],"sourcesContent":[null],"names":["getDomainPriceFromName","name","splitGraphemes","length"],"mappings":"sDAQO,MAAMA,EAA0BC,IAGrC,OAFcC,EAAeD,GAEfE,QACZ,KAAK,EACH,OAAO,IACT,KAAK,EACH,OAAO,IACT,KAAK,EACH,OAAO,IACT,KAAK,EACH,OAAO,IACT,QACE,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"getHashedNameSync.js","sources":["../../../src/utils/getHashedNameSync.ts"],"sourcesContent":[null],"names":["getHashedNameSync","name","input","HASH_PREFIX","hashed","sha256","Buffer","from"],"mappings":"4MAIa,MAAAA,EAAqBC,IAChC,MAAMC,EAAQC,EAAcF,EACtBG,EAASC,EAAOC,EAAAA,OAAOC,KAAKL,EAAO,SACzC,OAAOI,EAAMA,OAACC,KAAKH,EAAO"}
1
+ {"version":3,"file":"getHashedNameSync.js","sources":["../../../src/utils/getHashedNameSync.ts"],"sourcesContent":[null],"names":["getHashedNameSync","name","input","HASH_PREFIX","hashed","sha256","Buffer","from"],"mappings":"4MAIO,MAAMA,EAAqBC,IAChC,MAAMC,EAAQC,EAAcF,EACtBG,EAASC,EAAOC,EAAAA,OAAOC,KAAKL,EAAO,SACzC,OAAOI,EAAAA,OAAOC,KAAKH"}
@@ -1 +1 @@
1
- {"version":3,"file":"getNameAccountKeySync.js","sources":["../../../src/utils/getNameAccountKeySync.ts"],"sourcesContent":[null],"names":["getNameAccountKeySync","hashed_name","nameClass","nameParent","seeds","push","toBuffer","Buffer","alloc","nameAccountKey","PublicKey","findProgramAddressSync","NAME_PROGRAM_ID"],"mappings":"uLAIa,MAAAA,EAAwB,CACnCC,EACAC,EACAC,KAEA,MAAMC,EAAQ,CAACH,GACXC,EACFE,EAAMC,KAAKH,EAAUI,YAErBF,EAAMC,KAAKE,EAAAA,OAAOC,MAAM,KAEtBL,EACFC,EAAMC,KAAKF,EAAWG,YAEtBF,EAAMC,KAAKE,EAAAA,OAAOC,MAAM,KAE1B,MAAOC,GAAkBC,EAAUC,uBACjCP,EACAQ,GAEF,OAAOH,CAAc"}
1
+ {"version":3,"file":"getNameAccountKeySync.js","sources":["../../../src/utils/getNameAccountKeySync.ts"],"sourcesContent":[null],"names":["getNameAccountKeySync","hashed_name","nameClass","nameParent","seeds","push","toBuffer","Buffer","alloc","nameAccountKey","PublicKey","findProgramAddressSync","NAME_PROGRAM_ID"],"mappings":"uLAIO,MAAMA,EAAwB,CACnCC,EACAC,EACAC,KAEA,MAAMC,EAAQ,CAACH,GACXC,EACFE,EAAMC,KAAKH,EAAUI,YAErBF,EAAMC,KAAKE,EAAAA,OAAOC,MAAM,KAEtBL,EACFC,EAAMC,KAAKF,EAAWG,YAEtBF,EAAMC,KAAKE,EAAAA,OAAOC,MAAM,KAE1B,MAAOC,GAAkBC,EAAUC,uBACjCP,EACAQ,GAEF,OAAOH"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPythFeedAccountKey.js","sources":["../../../src/utils/getPythFeedAccountKey.ts"],"sourcesContent":[null],"names":["getPythFeedAccountKey","shard","priceFeed","buffer","Buffer","alloc","writeUint16LE","PublicKey","findProgramAddressSync","from","DEFAULT_PYTH_PUSH_PROGRAM"],"mappings":"uMAIaA,EAAwB,CAACC,EAAeC,KACnD,MAAMC,EAASC,EAAAA,OAAOC,MAAM,GAE5B,OADAF,EAAOG,cAAcL,GACdM,EAAUC,uBACf,CAACL,EAAQC,EAAMA,OAACK,KAAKP,IACrBQ,EACD"}
1
+ {"version":3,"file":"getPythFeedAccountKey.js","sources":["../../../src/utils/getPythFeedAccountKey.ts"],"sourcesContent":[null],"names":["getPythFeedAccountKey","shard","priceFeed","buffer","Buffer","alloc","writeUint16LE","PublicKey","findProgramAddressSync","from","DEFAULT_PYTH_PUSH_PROGRAM"],"mappings":"uMAIaA,EAAwB,CAACC,EAAeC,KACnD,MAAMC,EAASC,EAAAA,OAAOC,MAAM,GAE5B,OADAF,EAAOG,cAAcL,GACdM,EAAUC,uBACf,CAACL,EAAQC,EAAAA,OAAOK,KAAKP,IACrBQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"getReverseKeyFromDomainKey.js","sources":["../../../src/utils/getReverseKeyFromDomainKey.ts"],"sourcesContent":[null],"names":["getReverseKeyFromDomainKey","domainKey","parent","hashedReverseLookup","getHashedNameSync","toBase58","getNameAccountKeySync","REVERSE_LOOKUP_CLASS"],"mappings":"2LAYaA,EAA6B,CACxCC,EACAC,KAEA,MAAMC,EAAsBC,EAAkBH,EAAUI,YAMxD,OAL6BC,EAC3BH,EACAI,EACAL,EAEyB"}
1
+ {"version":3,"file":"getReverseKeyFromDomainKey.js","sources":["../../../src/utils/getReverseKeyFromDomainKey.ts"],"sourcesContent":[null],"names":["getReverseKeyFromDomainKey","domainKey","parent","hashedReverseLookup","getHashedNameSync","toBase58","getNameAccountKeySync","REVERSE_LOOKUP_CLASS"],"mappings":"2LAYaA,EAA6B,CACxCC,EACAC,KAEA,MAAMC,EAAsBC,EAAkBH,EAAUI,YAMxD,OAL6BC,EAC3BH,EACAI,EACAL"}
@@ -1 +1 @@
1
- {"version":3,"file":"getReverseKeySync.js","sources":["../../../src/utils/getReverseKeySync.ts"],"sourcesContent":[null],"names":["getReverseKeySync","domain","isSub","pubkey","parent","getDomainKeySync","hashedReverseLookup","getHashedNameSync","toBase58","getNameAccountKeySync","REVERSE_LOOKUP_CLASS","undefined"],"mappings":"oPAYaA,EAAoB,CAACC,EAAgBC,KAChD,MAAMC,OAAEA,EAAMC,OAAEA,GAAWC,EAAiBJ,GACtCK,EAAsBC,EAAkBJ,EAAOK,YAMrD,OAL6BC,EAC3BH,EACAI,EACAR,EAAQE,OAASO,EAEQ"}
1
+ {"version":3,"file":"getReverseKeySync.js","sources":["../../../src/utils/getReverseKeySync.ts"],"sourcesContent":[null],"names":["getReverseKeySync","domain","isSub","pubkey","parent","getDomainKeySync","hashedReverseLookup","getHashedNameSync","toBase58","getNameAccountKeySync","REVERSE_LOOKUP_CLASS","undefined"],"mappings":"oPAYaA,EAAoB,CAACC,EAAgBC,KAChD,MAAMC,OAAEA,EAAMC,OAAEA,GAAWC,EAAiBJ,GACtCK,EAAsBC,EAAkBJ,EAAOK,YAMrD,OAL6BC,EAC3BH,EACAI,EACAR,EAAQE,OAASO"}
@@ -1,2 +1,2 @@
1
- import{retrieveRecords as e}from"../nft/retrieveRecords.js";import{reverseLookupBatch as r}from"./reverseLookupBatch.js";const t=async(t,n)=>{const o=await e(t,n);return(await r(t,o.map((e=>e.nameAccount)))).map(((e,r)=>({key:o[r].nameAccount,mint:o[r].nftMint,reverse:e}))).filter((e=>!!e.reverse))};export{t as getTokenizedDomains};
1
+ import{retrieveRecords as e}from"../nft/retrieveRecords.js";import{reverseLookupBatch as r}from"./reverseLookupBatch.js";const t=async(t,n)=>{const o=await e(t,n);return(await r(t,o.map(e=>e.nameAccount))).map((e,r)=>({key:o[r].nameAccount,mint:o[r].nftMint,reverse:e})).filter(e=>!!e.reverse)};export{t as getTokenizedDomains};
2
2
  //# sourceMappingURL=getTokenizedDomains.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getTokenizedDomains.js","sources":["../../../src/utils/getTokenizedDomains.ts"],"sourcesContent":[null],"names":["getTokenizedDomains","async","connection","owner","nftRecords","retrieveRecords","reverseLookupBatch","map","e","nameAccount","idx","key","mint","nftMint","reverse","filter"],"mappings":"yHAUa,MAAAA,EAAsBC,MACjCC,EACAC,KAEA,MAAMC,QAAmBC,EAAgBH,EAAYC,GAOrD,aALoBG,EAClBJ,EACAE,EAAWG,KAAKC,GAAMA,EAAEC,gBAIvBF,KAAI,CAACC,EAAGE,KACA,CACLC,IAAKP,EAAWM,GAAKD,YACrBG,KAAMR,EAAWM,GAAKG,QACtBC,QAASN,MAGZO,QAAQP,KAAQA,EAAEM,SAAQ"}
1
+ {"version":3,"file":"getTokenizedDomains.js","sources":["../../../src/utils/getTokenizedDomains.ts"],"sourcesContent":[null],"names":["getTokenizedDomains","async","connection","owner","nftRecords","retrieveRecords","reverseLookupBatch","map","e","nameAccount","idx","key","mint","nftMint","reverse","filter"],"mappings":"yHAUO,MAAMA,EAAsBC,MACjCC,EACAC,KAEA,MAAMC,QAAmBC,EAAgBH,EAAYC,GAOrD,aALoBG,EAClBJ,EACAE,EAAWG,IAAKC,GAAMA,EAAEC,eAIvBF,IAAI,CAACC,EAAGE,KACA,CACLC,IAAKP,EAAWM,GAAKD,YACrBG,KAAMR,EAAWM,GAAKG,QACtBC,QAASN,KAGZO,OAAQP,KAAQA,EAAEM"}
@@ -1,2 +1,2 @@
1
- import{NameRegistryState as t}from"../state.js";import{REVERSE_LOOKUP_CLASS as e}from"../constants.js";import{getHashedNameSync as o}from"./getHashedNameSync.js";import{getNameAccountKeySync as r}from"./getNameAccountKeySync.js";import{deserializeReverse as a}from"./deserializeReverse.js";async function s(s,i){let m=[];for(let t of i){const a=o(t.toBase58()),s=r(a,e);m.push(s)}return(await t.retrieveBatch(s,m)).map((t=>{if(void 0!==t&&void 0!==t.data)return a(t.data)}))}export{s as reverseLookupBatch};
1
+ import{NameRegistryState as t}from"../state.js";import{REVERSE_LOOKUP_CLASS as e}from"../constants.js";import{getHashedNameSync as o}from"./getHashedNameSync.js";import{getNameAccountKeySync as r}from"./getNameAccountKeySync.js";import{deserializeReverse as a}from"./deserializeReverse.js";async function s(s,i){let m=[];for(let t of i){const a=o(t.toBase58()),s=r(a,e);m.push(s)}return(await t.retrieveBatch(s,m)).map(t=>{if(void 0!==t&&void 0!==t.data)return a(t.data)})}export{s as reverseLookupBatch};
2
2
  //# sourceMappingURL=reverseLookupBatch.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reverseLookupBatch.js","sources":["../../../src/utils/reverseLookupBatch.ts"],"sourcesContent":[null],"names":["async","reverseLookupBatch","connection","nameAccounts","reverseLookupAccounts","nameAccount","hashedReverseLookup","getHashedNameSync","toBase58","reverseLookupAccount","getNameAccountKeySync","REVERSE_LOOKUP_CLASS","push","NameRegistryState","retrieveBatch","map","name","undefined","data","deserializeReverse"],"mappings":"kSAcOA,eAAeC,EACpBC,EACAC,GAEA,IAAIC,EAAqC,GACzC,IAAK,IAAIC,KAAeF,EAAc,CACpC,MAAMG,EAAsBC,EAAkBF,EAAYG,YACpDC,EAAuBC,EAC3BJ,EACAK,GAEFP,EAAsBQ,KAAKH,GAQ7B,aALkBI,EAAkBC,cAClCZ,EACAE,IAGWW,KAAKC,IAChB,QAAaC,IAATD,QAAoCC,IAAdD,EAAKE,KAG/B,OAAOC,EAAmBH,EAAKE,KAAK,GAExC"}
1
+ {"version":3,"file":"reverseLookupBatch.js","sources":["../../../src/utils/reverseLookupBatch.ts"],"sourcesContent":[null],"names":["async","reverseLookupBatch","connection","nameAccounts","reverseLookupAccounts","nameAccount","hashedReverseLookup","getHashedNameSync","toBase58","reverseLookupAccount","getNameAccountKeySync","REVERSE_LOOKUP_CLASS","push","NameRegistryState","retrieveBatch","map","name","undefined","data","deserializeReverse"],"mappings":"kSAcOA,eAAeC,EACpBC,EACAC,GAEA,IAAIC,EAAqC,GACzC,IAAK,IAAIC,KAAeF,EAAc,CACpC,MAAMG,EAAsBC,EAAkBF,EAAYG,YACpDC,EAAuBC,EAC3BJ,EACAK,GAEFP,EAAsBQ,KAAKH,EAC7B,CAOA,aALkBI,EAAkBC,cAClCZ,EACAE,IAGWW,IAAKC,IAChB,QAAaC,IAATD,QAAoCC,IAAdD,EAAKE,KAG/B,OAAOC,EAAmBH,EAAKE,OAEnC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonfida/spl-name-service",
3
- "version": "3.0.19",
3
+ "version": "3.0.21",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"
@@ -72,7 +72,7 @@
72
72
  "typescript": "^5.4.5"
73
73
  },
74
74
  "dependencies": {
75
- "@bonfida/sns-records": "0.0.1",
75
+ "@bonfida/sns-records": "0.1.0",
76
76
  "@noble/curves": "^1.9.1",
77
77
  "@scure/base": "^1.2.5",
78
78
  "@solana/spl-token": "0.4.6",
@@ -1,3 +0,0 @@
1
- "use strict";
2
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=BigInt(0),r=BigInt(1);function e(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function n(t){if(!e(t))throw new Error("Uint8Array expected")}function o(r){if("string"!=typeof r)throw new Error("hex string expected, got "+typeof r);return""===r?t:BigInt("0x"+r)}const i="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,s=Array.from({length:256},((t,r)=>r.toString(16).padStart(2,"0")));function f(t){if(n(t),i)return t.toHex();let r="";for(let e=0;e<t.length;e++)r+=s[t[e]];return r}const c=48,u=57,a=65,p=70,g=97,y=102;function x(t){return t>=c&&t<=u?t-c:t>=a&&t<=p?t-(a-10):t>=g&&t<=y?t-(g-10):void 0}function h(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);if(i)return Uint8Array.fromHex(t);const r=t.length,e=r/2;if(r%2)throw new Error("hex string expected, got unpadded hex of length "+r);const n=new Uint8Array(e);for(let r=0,o=0;r<e;r++,o+=2){const e=x(t.charCodeAt(o)),i=x(t.charCodeAt(o+1));if(void 0===e||void 0===i){const r=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+r+'" at index '+o)}n[r]=16*e+i}return n}function l(t,r){return h(t.toString(16).padStart(2*r,"0"))}const d=r=>"bigint"==typeof r&&t<=r;function w(t,r,e){return d(t)&&d(r)&&d(e)&&r<=t&&t<e}const b={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||e(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,r)=>r.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};exports.aInRange=function(t,r,e,n){if(!w(r,e,n))throw new Error("expected valid "+t+": "+e+" <= n < "+n+", got "+r)},exports.abool=function(t,r){if("boolean"!=typeof r)throw new Error(t+" boolean expected, got "+r)},exports.abytes=n,exports.bitLen=function(e){let n;for(n=0;e>t;e>>=r,n+=1);return n},exports.bitMask=t=>(r<<BigInt(t))-r,exports.bytesToHex=f,exports.bytesToNumberBE=function(t){return o(f(t))},exports.bytesToNumberLE=function(t){return n(t),o(f(Uint8Array.from(t).reverse()))},exports.concatBytes=function(...t){let r=0;for(let e=0;e<t.length;e++){const o=t[e];n(o),r+=o.length}const e=new Uint8Array(r);for(let r=0,n=0;r<t.length;r++){const o=t[r];e.set(o,n),n+=o.length}return e},exports.ensureBytes=function(t,r,n){let o;if("string"==typeof r)try{o=h(r)}catch(r){throw new Error(t+" must be hex string or Uint8Array, cause: "+r)}else{if(!e(r))throw new Error(t+" must be hex string or Uint8Array");o=Uint8Array.from(r)}const i=o.length;if("number"==typeof n&&i!==n)throw new Error(t+" of length "+n+" expected, got "+i);return o},exports.hexToBytes=h,exports.hexToNumber=o,exports.inRange=w,exports.isBytes=e,exports.memoized=function(t){const r=new WeakMap;return(e,...n)=>{const o=r.get(e);if(void 0!==o)return o;const i=t(e,...n);return r.set(e,i),i}},exports.numberToBytesBE=l,exports.numberToBytesLE=function(t,r){return l(t,r).reverse()},exports.validateObject=function(t,r,e={}){const n=(r,e,n)=>{const o=b[e];if("function"!=typeof o)throw new Error("invalid validator function");const i=t[r];if(!(n&&void 0===i||o(i,t)))throw new Error("param "+String(r)+" is invalid. Expected "+e+", got "+i)};for(const[t,e]of Object.entries(r))n(t,e,!1);for(const[t,r]of Object.entries(e))n(t,r,!0);return t};
3
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/@noble/curves/esm/abstract/utils.js"],"sourcesContent":["/**\n * Hex, bytes and number utilities.\n * @module\n */\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nexport function isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nexport function abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\nexport function abool(title, value) {\n if (typeof value !== 'boolean')\n throw new Error(title + ' boolean expected, got ' + value);\n}\n// Used in weierstrass, der\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? '0' + hex : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n return hex === '' ? _0n : BigInt('0x' + hex); // Big Endian\n}\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin = \n// @ts-ignore\ntypeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function';\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * Convert byte array to hex string. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // @ts-ignore\n if (hasHexBuiltin)\n return bytes.toHex();\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\nfunction asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n/**\n * Convert hex string to byte array. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // @ts-ignore\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(title + ' must be hex string or Uint8Array, cause: ' + e);\n }\n }\n else if (isBytes(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(title + ' must be hex string or Uint8Array');\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(title + ' of length ' + expectedLength + ' expected, got ' + len);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Is positive bigint\nconst isPosBig = (n) => typeof n === 'bigint' && _0n <= n;\nexport function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n}\n/**\n * Asserts min <= n < max. NOTE: It's < max and not <= max.\n * @example\n * aInRange('x', x, 1n, 256n); // would assume x is in (1n..255n)\n */\nexport function aInRange(title, n, min, max) {\n // Why min <= n < max and not a (min < n < max) OR b (min <= n <= max)?\n // consider P=256n, min=0n, max=P\n // - a for min=0 would require -1: `inRange('x', x, -1n, P)`\n // - b would commonly require subtraction: `inRange('x', x, 0n, P - 1n)`\n // - our way is the cleanest: `inRange('x', x, 0n, P)\n if (!inRange(n, min, max))\n throw new Error('expected valid ' + title + ': ' + min + ' <= n < ' + max + ', got ' + n);\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n * TODO: merge with nLength in modular\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_1n << BigInt(n)) - _1n;\n// DRBG\nconst u8n = (len) => new Uint8Array(len); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG<Key>(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n(0)) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record<K extends string | number | symbol, T> = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error('invalid validator function');\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error('param ' + String(fieldName) + ' is invalid. Expected ' + type + ', got ' + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n/**\n * throws not implemented error\n */\nexport const notImplemented = () => {\n throw new Error('not implemented');\n};\n/**\n * Memoizes (caches) computation result.\n * Uses WeakMap: the value is going auto-cleaned by GC after last reference is removed.\n */\nexport function memoized(fn) {\n const map = new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== undefined)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n}\n//# sourceMappingURL=utils.js.map"],"names":["_0n","BigInt","_1n","isBytes","a","Uint8Array","ArrayBuffer","isView","constructor","name","abytes","item","Error","hexToNumber","hex","hasHexBuiltin","from","toHex","fromHex","hexes","Array","length","_","i","toString","padStart","bytesToHex","bytes","asciis","asciiToBase16","ch","hexToBytes","hl","al","array","ai","hi","n1","charCodeAt","n2","undefined","char","numberToBytesBE","n","len","isPosBig","inRange","min","max","bitMask","validatorFns","bigint","val","function","boolean","string","stringOrUint8Array","isSafeInteger","Number","isArray","field","object","Fp","isValid","hash","outputLen","title","value","reverse","arrays","sum","res","pad","set","expectedLength","e","validators","optValidators","checkField","fieldName","type","isOptional","checkVal","String","Object","entries"],"mappings":";sEAUA,MAAMA,EAAsBC,OAAO,GAC7BC,EAAqBD,OAAA,GAWrB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C,EAAAhC,EAAA8B,GACE,GAAwB,mBAAbE,EAAc,MAAA,IAAAtE,MAAA,8BAEzB,MAAMwC,EAAMS,EAAOkB,GACnB,KAAIE,QAAsBzC,IAARY,GACb8B,EAAS9B,EAAKS,IACjB,MAAM,IAAIjD,MACR,SAAWuE,OAAOJ,GAAa,yBAAEC,EAAA,SAAA5B,EAErC,EAEJ,IAAA,MAAA2B,EAAAC,KAAAI,OAAAC,QAAAT,GAAAE,EAAAC,EAAAC,GAAA,GACE,IAAK,MAAOD,EAAWC,KAAOI,OAAAC,QAAAR,GAAAC,EAAAC,EAAAC,GAAA","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/record_v2/utils.ts"],"sourcesContent":[null],"names":["async","connection","record","domain","recordKey","getRecordV2Key","registry","nftOwner","NameRegistryState","retrieve","getDomainKeySync","pubkey","owner","recordObj","SnsRecord","stalenessId","getStalenessId","equals","PublicKey","header","stalenessValidation","Validation","Solana"],"mappings":"0OAc+BA,MAC7BC,EACAC,EACAC,KAEA,MAAMC,EAAYC,EAAAA,eAAeF,EAAQD,IACnCI,SAAEA,EAAQC,SAAEA,SAAmBC,EAAiBA,kBAACC,SACrDR,EACAS,EAAgBA,iBAACP,GAAQQ,QAErBC,EAAQL,GAAYD,EAASM,MAC7BC,QAAkBC,EAAAA,OAAUL,SAASR,EAAYG,GAEjDW,EAAcF,EAAUG,iBAE9B,OACEJ,aAAA,EAAAA,EAAOK,OAAO,IAAIC,EAASA,UAACH,MAC5BF,EAAUM,OAAOC,sBAAwBC,EAAAA,WAAWC,MAAM"}
@@ -1,3 +0,0 @@
1
- /*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
2
- const t=BigInt(0),r=BigInt(1);function n(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function e(t){if(!n(t))throw new Error("Uint8Array expected")}function o(t,r){if("boolean"!=typeof r)throw new Error(t+" boolean expected, got "+r)}function i(r){if("string"!=typeof r)throw new Error("hex string expected, got "+typeof r);return""===r?t:BigInt("0x"+r)}const f="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,c=Array.from({length:256},((t,r)=>r.toString(16).padStart(2,"0")));function u(t){if(e(t),f)return t.toHex();let r="";for(let n=0;n<t.length;n++)r+=c[t[n]];return r}const s=48,a=57,g=65,h=70,y=97,p=102;function l(t){return t>=s&&t<=a?t-s:t>=g&&t<=h?t-(g-10):t>=y&&t<=p?t-(y-10):void 0}function d(t){if("string"!=typeof t)throw new Error("hex string expected, got "+typeof t);if(f)return Uint8Array.fromHex(t);const r=t.length,n=r/2;if(r%2)throw new Error("hex string expected, got unpadded hex of length "+r);const e=new Uint8Array(n);for(let r=0,o=0;r<n;r++,o+=2){const n=l(t.charCodeAt(o)),i=l(t.charCodeAt(o+1));if(void 0===n||void 0===i){const r=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+r+'" at index '+o)}e[r]=16*n+i}return e}function w(t){return i(u(t))}function x(t){return e(t),i(u(Uint8Array.from(t).reverse()))}function A(t,r){return d(t.toString(16).padStart(2*r,"0"))}function b(t,r){return A(t,r).reverse()}function m(t,r,e){let o;if("string"==typeof r)try{o=d(r)}catch(r){throw new Error(t+" must be hex string or Uint8Array, cause: "+r)}else{if(!n(r))throw new Error(t+" must be hex string or Uint8Array");o=Uint8Array.from(r)}const i=o.length;if("number"==typeof e&&i!==e)throw new Error(t+" of length "+e+" expected, got "+i);return o}function E(...t){let r=0;for(let n=0;n<t.length;n++){const o=t[n];e(o),r+=o.length}const n=new Uint8Array(r);for(let r=0,e=0;r<t.length;r++){const o=t[r];n.set(o,e),e+=o.length}return n}const U=r=>"bigint"==typeof r&&t<=r;function v(t,r,n){return U(t)&&U(r)&&U(n)&&r<=t&&t<n}function S(t,r,n,e){if(!v(r,n,e))throw new Error("expected valid "+t+": "+n+" <= n < "+e+", got "+r)}function I(n){let e;for(e=0;n>t;n>>=r,e+=1);return e}const B=t=>(r<<BigInt(t))-r,H={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||n(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,r)=>r.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function O(t,r,n={}){const e=(r,n,e)=>{const o=H[n];if("function"!=typeof o)throw new Error("invalid validator function");const i=t[r];if(!(e&&void 0===i||o(i,t)))throw new Error("param "+String(r)+" is invalid. Expected "+n+", got "+i)};for(const[t,n]of Object.entries(r))e(t,n,!1);for(const[t,r]of Object.entries(n))e(t,r,!0);return t}function j(t){const r=new WeakMap;return(n,...e)=>{const o=r.get(n);if(void 0!==o)return o;const i=t(n,...e);return r.set(n,i),i}}export{S as aInRange,o as abool,e as abytes,I as bitLen,B as bitMask,u as bytesToHex,w as bytesToNumberBE,x as bytesToNumberLE,E as concatBytes,m as ensureBytes,d as hexToBytes,i as hexToNumber,v as inRange,n as isBytes,j as memoized,A as numberToBytesBE,b as numberToBytesLE,O as validateObject};
3
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../../../../node_modules/@noble/curves/esm/abstract/utils.js"],"sourcesContent":["/**\n * Hex, bytes and number utilities.\n * @module\n */\n/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n// 100 lines of code in the file are duplicated from noble-hashes (utils).\n// This is OK: `abstract` directory does not use noble-hashes.\n// User may opt-in into using different hashing library. This way, noble-hashes\n// won't be included into their bundle.\nconst _0n = /* @__PURE__ */ BigInt(0);\nconst _1n = /* @__PURE__ */ BigInt(1);\nexport function isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nexport function abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\nexport function abool(title, value) {\n if (typeof value !== 'boolean')\n throw new Error(title + ' boolean expected, got ' + value);\n}\n// Used in weierstrass, der\nexport function numberToHexUnpadded(num) {\n const hex = num.toString(16);\n return hex.length & 1 ? '0' + hex : hex;\n}\nexport function hexToNumber(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n return hex === '' ? _0n : BigInt('0x' + hex); // Big Endian\n}\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin = \n// @ts-ignore\ntypeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function';\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n/**\n * Convert byte array to hex string. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes) {\n abytes(bytes);\n // @ts-ignore\n if (hasHexBuiltin)\n return bytes.toHex();\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };\nfunction asciiToBase16(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n/**\n * Convert hex string to byte array. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex) {\n if (typeof hex !== 'string')\n throw new Error('hex string expected, got ' + typeof hex);\n // @ts-ignore\n if (hasHexBuiltin)\n return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2)\n throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n// BE: Big Endian, LE: Little Endian\nexport function bytesToNumberBE(bytes) {\n return hexToNumber(bytesToHex(bytes));\n}\nexport function bytesToNumberLE(bytes) {\n abytes(bytes);\n return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));\n}\nexport function numberToBytesBE(n, len) {\n return hexToBytes(n.toString(16).padStart(len * 2, '0'));\n}\nexport function numberToBytesLE(n, len) {\n return numberToBytesBE(n, len).reverse();\n}\n// Unpadded, rarely used\nexport function numberToVarBytesBE(n) {\n return hexToBytes(numberToHexUnpadded(n));\n}\n/**\n * Takes hex string or Uint8Array, converts to Uint8Array.\n * Validates output length.\n * Will throw error for other types.\n * @param title descriptive title for an error e.g. 'private key'\n * @param hex hex string or Uint8Array\n * @param expectedLength optional, will compare to result array's length\n * @returns\n */\nexport function ensureBytes(title, hex, expectedLength) {\n let res;\n if (typeof hex === 'string') {\n try {\n res = hexToBytes(hex);\n }\n catch (e) {\n throw new Error(title + ' must be hex string or Uint8Array, cause: ' + e);\n }\n }\n else if (isBytes(hex)) {\n // Uint8Array.from() instead of hash.slice() because node.js Buffer\n // is instance of Uint8Array, and its slice() creates **mutable** copy\n res = Uint8Array.from(hex);\n }\n else {\n throw new Error(title + ' must be hex string or Uint8Array');\n }\n const len = res.length;\n if (typeof expectedLength === 'number' && len !== expectedLength)\n throw new Error(title + ' of length ' + expectedLength + ' expected, got ' + len);\n return res;\n}\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays) {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n// Compares 2 u8a-s in kinda constant time\nexport function equalBytes(a, b) {\n if (a.length !== b.length)\n return false;\n let diff = 0;\n for (let i = 0; i < a.length; i++)\n diff |= a[i] ^ b[i];\n return diff === 0;\n}\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str) {\n if (typeof str !== 'string')\n throw new Error('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Is positive bigint\nconst isPosBig = (n) => typeof n === 'bigint' && _0n <= n;\nexport function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n}\n/**\n * Asserts min <= n < max. NOTE: It's < max and not <= max.\n * @example\n * aInRange('x', x, 1n, 256n); // would assume x is in (1n..255n)\n */\nexport function aInRange(title, n, min, max) {\n // Why min <= n < max and not a (min < n < max) OR b (min <= n <= max)?\n // consider P=256n, min=0n, max=P\n // - a for min=0 would require -1: `inRange('x', x, -1n, P)`\n // - b would commonly require subtraction: `inRange('x', x, 0n, P - 1n)`\n // - our way is the cleanest: `inRange('x', x, 0n, P)\n if (!inRange(n, min, max))\n throw new Error('expected valid ' + title + ': ' + min + ' <= n < ' + max + ', got ' + n);\n}\n// Bit operations\n/**\n * Calculates amount of bits in a bigint.\n * Same as `n.toString(2).length`\n * TODO: merge with nLength in modular\n */\nexport function bitLen(n) {\n let len;\n for (len = 0; n > _0n; n >>= _1n, len += 1)\n ;\n return len;\n}\n/**\n * Gets single bit at position.\n * NOTE: first bit position is 0 (same as arrays)\n * Same as `!!+Array.from(n.toString(2)).reverse()[pos]`\n */\nexport function bitGet(n, pos) {\n return (n >> BigInt(pos)) & _1n;\n}\n/**\n * Sets single bit at position.\n */\nexport function bitSet(n, pos, value) {\n return n | ((value ? _1n : _0n) << BigInt(pos));\n}\n/**\n * Calculate mask for N bits. Not using ** operator with bigints because of old engines.\n * Same as BigInt(`0b${Array(i).fill('1').join('')}`)\n */\nexport const bitMask = (n) => (_1n << BigInt(n)) - _1n;\n// DRBG\nconst u8n = (len) => new Uint8Array(len); // creates Uint8Array\nconst u8fr = (arr) => Uint8Array.from(arr); // another shortcut\n/**\n * Minimal HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n * @returns function that will call DRBG until 2nd arg returns something meaningful\n * @example\n * const drbg = createHmacDRBG<Key>(32, 32, hmac);\n * drbg(seed, bytesToKey); // bytesToKey must return Key or undefined\n */\nexport function createHmacDrbg(hashLen, qByteLen, hmacFn) {\n if (typeof hashLen !== 'number' || hashLen < 2)\n throw new Error('hashLen must be a number');\n if (typeof qByteLen !== 'number' || qByteLen < 2)\n throw new Error('qByteLen must be a number');\n if (typeof hmacFn !== 'function')\n throw new Error('hmacFn must be a function');\n // Step B, Step C: set hashLen to 8*ceil(hlen/8)\n let v = u8n(hashLen); // Minimal non-full-spec HMAC-DRBG from NIST 800-90 for RFC6979 sigs.\n let k = u8n(hashLen); // Steps B and C of RFC6979 3.2: set hashLen, in our case always same\n let i = 0; // Iterations counter, will throw when over 1000\n const reset = () => {\n v.fill(1);\n k.fill(0);\n i = 0;\n };\n const h = (...b) => hmacFn(k, v, ...b); // hmac(k)(v, ...values)\n const reseed = (seed = u8n(0)) => {\n // HMAC-DRBG reseed() function. Steps D-G\n k = h(u8fr([0x00]), seed); // k = hmac(k || v || 0x00 || seed)\n v = h(); // v = hmac(k || v)\n if (seed.length === 0)\n return;\n k = h(u8fr([0x01]), seed); // k = hmac(k || v || 0x01 || seed)\n v = h(); // v = hmac(k || v)\n };\n const gen = () => {\n // HMAC-DRBG generate() function\n if (i++ >= 1000)\n throw new Error('drbg: tried 1000 values');\n let len = 0;\n const out = [];\n while (len < qByteLen) {\n v = h();\n const sl = v.slice();\n out.push(sl);\n len += v.length;\n }\n return concatBytes(...out);\n };\n const genUntil = (seed, pred) => {\n reset();\n reseed(seed); // Steps D-G\n let res = undefined; // Step H: grind until k is in [1..n-1]\n while (!(res = pred(gen())))\n reseed();\n reset();\n return res;\n };\n return genUntil;\n}\n// Validating curves and fields\nconst validatorFns = {\n bigint: (val) => typeof val === 'bigint',\n function: (val) => typeof val === 'function',\n boolean: (val) => typeof val === 'boolean',\n string: (val) => typeof val === 'string',\n stringOrUint8Array: (val) => typeof val === 'string' || isBytes(val),\n isSafeInteger: (val) => Number.isSafeInteger(val),\n array: (val) => Array.isArray(val),\n field: (val, object) => object.Fp.isValid(val),\n hash: (val) => typeof val === 'function' && Number.isSafeInteger(val.outputLen),\n};\n// type Record<K extends string | number | symbol, T> = { [P in K]: T; }\nexport function validateObject(object, validators, optValidators = {}) {\n const checkField = (fieldName, type, isOptional) => {\n const checkVal = validatorFns[type];\n if (typeof checkVal !== 'function')\n throw new Error('invalid validator function');\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error('param ' + String(fieldName) + ' is invalid. Expected ' + type + ', got ' + val);\n }\n };\n for (const [fieldName, type] of Object.entries(validators))\n checkField(fieldName, type, false);\n for (const [fieldName, type] of Object.entries(optValidators))\n checkField(fieldName, type, true);\n return object;\n}\n// validate type tests\n// const o: { a: number; b: number; c: number } = { a: 1, b: 5, c: 6 };\n// const z0 = validateObject(o, { a: 'isSafeInteger' }, { c: 'bigint' }); // Ok!\n// // Should fail type-check\n// const z1 = validateObject(o, { a: 'tmp' }, { c: 'zz' });\n// const z2 = validateObject(o, { a: 'isSafeInteger' }, { c: 'zz' });\n// const z3 = validateObject(o, { test: 'boolean', z: 'bug' });\n// const z4 = validateObject(o, { a: 'boolean', z: 'bug' });\n/**\n * throws not implemented error\n */\nexport const notImplemented = () => {\n throw new Error('not implemented');\n};\n/**\n * Memoizes (caches) computation result.\n * Uses WeakMap: the value is going auto-cleaned by GC after last reference is removed.\n */\nexport function memoized(fn) {\n const map = new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== undefined)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n}\n//# sourceMappingURL=utils.js.map"],"names":["_0n","BigInt","_1n","isBytes","a","Uint8Array","ArrayBuffer","isView","constructor","name","abytes","item","Error","abool","title","value","hexToNumber","hex","hasHexBuiltin","from","toHex","fromHex","hexes","Array","length","_","i","toString","padStart","bytesToHex","bytes","asciis","asciiToBase16","ch","hexToBytes","hl","al","array","ai","hi","n1","charCodeAt","n2","undefined","char","bytesToNumberBE","bytesToNumberLE","reverse","numberToBytesBE","n","len","numberToBytesLE","ensureBytes","expectedLength","res","e","concatBytes","arrays","sum","pad","set","isPosBig","inRange","min","max","aInRange","bitLen","bitMask","validatorFns","bigint","val","function","boolean","string","stringOrUint8Array","isSafeInteger","Number","isArray","field","object","Fp","isValid","hash","outputLen","validateObject","validators","optValidators","checkField","fieldName","type","isOptional","checkVal","String","Object","entries"],"mappings":";AAUA,MAAMA,EAAsBC,OAAO,GAC7BC,EAAqBD,OAAA,GAWrB,SAAUE,EAAQC,GACtB,OAAOA,aAAaC,YAAeC,YAAIC,OAAAH,IAAA,eAAAA,EAAAI,YAAAC,IACzC,CAEA,SAAAC,EAAAC,GACE,IAAKR,EAAQQ,GAAO,MAAM,IAAIC,MAAC,sBACjC,CAEM,SAAUC,EAAMC,EAAeC,GACrC,GAAA,kBAAAA,EAAA,MAAA,IAAAH,MAAAE,EAAA,0BAAAC,EACA,CAQM,SAAUC,EAAYC,GAC1B,GAAA,iBAAAA,EAAA,MAAA,IAAAL,MAAA,mCAAAK,GACA,MAAe,KAARA,EAAajB,EAAMC,OAAM,KAAAgB,EAClC,CAGA,MAAMC,EAEU,mBAAPb,WAAOc,KAAA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google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/record_v2/utils.ts"],"sourcesContent":[null],"names":["verifyStaleness","async","connection","record","domain","recordKey","getRecordV2Key","registry","nftOwner","NameRegistryState","retrieve","getDomainKeySync","pubkey","owner","recordObj","SnsRecord","stalenessId","getStalenessId","equals","PublicKey","header","stalenessValidation","Validation","Solana"],"mappings":"6SAcO,MAAMA,EAAkBC,MAC7BC,EACAC,EACAC,KAEA,MAAMC,EAAYC,EAAeF,EAAQD,IACnCI,SAAEA,EAAQC,SAAEA,SAAmBC,EAAkBC,SACrDR,EACAS,EAAiBP,GAAQQ,QAErBC,EAAQL,GAAYD,EAASM,MAC7BC,QAAkBC,EAAUL,SAASR,EAAYG,GAEjDW,EAAcF,EAAUG,iBAE9B,OACEJ,aAAA,EAAAA,EAAOK,OAAO,IAAIC,EAAUH,MAC5BF,EAAUM,OAAOC,sBAAwBC,EAAWC,MAAM"}