@solana-name-service/sns-sdk-kit 0.10.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. package/README.md +322 -90
  2. package/dist/cjs/address/getPrimaryDomain.cjs +54 -1
  3. package/dist/cjs/address/getPrimaryDomain.cjs.map +1 -1
  4. package/dist/cjs/address/getPrimaryDomainsBatch.cjs +108 -1
  5. package/dist/cjs/address/getPrimaryDomainsBatch.cjs.map +1 -1
  6. package/dist/cjs/address/getSnsDomainsForAddress.cjs +65 -0
  7. package/dist/cjs/address/getSnsDomainsForAddress.cjs.map +1 -0
  8. package/dist/cjs/address/getSnsNftsForAddress.cjs +94 -0
  9. package/dist/cjs/address/getSnsNftsForAddress.cjs.map +1 -0
  10. package/dist/cjs/address/index.cjs +15 -1
  11. package/dist/cjs/address/index.cjs.map +1 -1
  12. package/dist/cjs/bindings/burnDomain.cjs +46 -1
  13. package/dist/cjs/bindings/burnDomain.cjs.map +1 -1
  14. package/dist/cjs/bindings/createNameRegistry.cjs +54 -1
  15. package/dist/cjs/bindings/createNameRegistry.cjs.map +1 -1
  16. package/dist/cjs/bindings/createRecord.cjs +57 -1
  17. package/dist/cjs/bindings/createRecord.cjs.map +1 -1
  18. package/dist/cjs/bindings/createReverse.cjs +36 -1
  19. package/dist/cjs/bindings/createReverse.cjs.map +1 -1
  20. package/dist/cjs/bindings/createSubdomain.cjs +69 -1
  21. package/dist/cjs/bindings/createSubdomain.cjs.map +1 -1
  22. package/dist/cjs/bindings/deleteNameRegistry.cjs +37 -1
  23. package/dist/cjs/bindings/deleteNameRegistry.cjs.map +1 -1
  24. package/dist/cjs/bindings/deleteRecord.cjs +49 -1
  25. package/dist/cjs/bindings/deleteRecord.cjs.map +1 -1
  26. package/dist/cjs/bindings/index.cjs +43 -1
  27. package/dist/cjs/bindings/index.cjs.map +1 -1
  28. package/dist/cjs/bindings/recordValidation.cjs +60 -0
  29. package/dist/cjs/bindings/recordValidation.cjs.map +1 -0
  30. package/dist/cjs/bindings/registerDomain.cjs +86 -1
  31. package/dist/cjs/bindings/registerDomain.cjs.map +1 -1
  32. package/dist/cjs/bindings/registerDomainWithNft.cjs +67 -0
  33. package/dist/cjs/bindings/registerDomainWithNft.cjs.map +1 -0
  34. package/dist/cjs/bindings/setPrimaryDomain.cjs +39 -1
  35. package/dist/cjs/bindings/setPrimaryDomain.cjs.map +1 -1
  36. package/dist/cjs/bindings/setRecordRoaVerifier.cjs +44 -0
  37. package/dist/cjs/bindings/setRecordRoaVerifier.cjs.map +1 -0
  38. package/dist/cjs/bindings/setRecordStalenessVerifier.cjs +32 -0
  39. package/dist/cjs/bindings/setRecordStalenessVerifier.cjs.map +1 -0
  40. package/dist/cjs/bindings/transferDomain.cjs +33 -1
  41. package/dist/cjs/bindings/transferDomain.cjs.map +1 -1
  42. package/dist/cjs/bindings/transferSubdomain.cjs +48 -1
  43. package/dist/cjs/bindings/transferSubdomain.cjs.map +1 -1
  44. package/dist/cjs/bindings/updateNameRegistry.cjs +45 -1
  45. package/dist/cjs/bindings/updateNameRegistry.cjs.map +1 -1
  46. package/dist/cjs/bindings/updateRecord.cjs +57 -1
  47. package/dist/cjs/bindings/updateRecord.cjs.map +1 -1
  48. package/dist/cjs/bindings/validateRecordRoa.cjs +32 -0
  49. package/dist/cjs/bindings/validateRecordRoa.cjs.map +1 -0
  50. package/dist/cjs/bindings/validateRecordRoaEthereum.cjs +49 -0
  51. package/dist/cjs/bindings/validateRecordRoaEthereum.cjs.map +1 -0
  52. package/dist/cjs/codecs.cjs +27 -1
  53. package/dist/cjs/codecs.cjs.map +1 -1
  54. package/dist/cjs/config.cjs +18 -0
  55. package/dist/cjs/config.cjs.map +1 -0
  56. package/dist/cjs/constants/addresses.cjs +124 -1
  57. package/dist/cjs/constants/addresses.cjs.map +1 -1
  58. package/dist/cjs/constants/index.cjs +40 -1
  59. package/dist/cjs/constants/index.cjs.map +1 -1
  60. package/dist/cjs/constants/pythFeeds.cjs +91 -1
  61. package/dist/cjs/constants/pythFeeds.cjs.map +1 -1
  62. package/dist/cjs/constants/records.cjs +71 -1
  63. package/dist/cjs/constants/records.cjs.map +1 -1
  64. package/dist/cjs/domain/getAllSnsDomains.cjs +43 -0
  65. package/dist/cjs/domain/getAllSnsDomains.cjs.map +1 -0
  66. package/dist/cjs/domain/getDomainOwner.cjs +27 -1
  67. package/dist/cjs/domain/getDomainOwner.cjs.map +1 -1
  68. package/dist/cjs/domain/getDomainRecord.cjs +54 -1
  69. package/dist/cjs/domain/getDomainRecord.cjs.map +1 -1
  70. package/dist/cjs/domain/getDomainRecords.cjs +64 -1
  71. package/dist/cjs/domain/getDomainRecords.cjs.map +1 -1
  72. package/dist/cjs/domain/getSnsDomainAddress.cjs +52 -0
  73. package/dist/cjs/domain/getSnsDomainAddress.cjs.map +1 -0
  74. package/dist/cjs/domain/getSnsDomainOwner.cjs +31 -0
  75. package/dist/cjs/domain/getSnsDomainOwner.cjs.map +1 -0
  76. package/dist/cjs/domain/getSrsDomainAddress.cjs +36 -0
  77. package/dist/cjs/domain/getSrsDomainAddress.cjs.map +1 -0
  78. package/dist/cjs/domain/getSubdomains.cjs +95 -1
  79. package/dist/cjs/domain/getSubdomains.cjs.map +1 -1
  80. package/dist/cjs/domain/index.cjs +24 -1
  81. package/dist/cjs/domain/index.cjs.map +1 -1
  82. package/dist/cjs/domain/resolve.cjs +67 -0
  83. package/dist/cjs/domain/resolve.cjs.map +1 -0
  84. package/dist/cjs/domain/resolveSns.cjs +113 -0
  85. package/dist/cjs/domain/resolveSns.cjs.map +1 -0
  86. package/dist/cjs/errors.cjs +250 -1
  87. package/dist/cjs/errors.cjs.map +1 -1
  88. package/dist/cjs/index.cjs +245 -1
  89. package/dist/cjs/index.cjs.map +1 -1
  90. package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs +71 -1
  91. package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs.map +1 -1
  92. package/dist/cjs/instructions/burnDomainInstruction.cjs +71 -1
  93. package/dist/cjs/instructions/burnDomainInstruction.cjs.map +1 -1
  94. package/dist/cjs/instructions/createAtaIdempotentInstruction.cjs +71 -0
  95. package/dist/cjs/instructions/createAtaIdempotentInstruction.cjs.map +1 -0
  96. package/dist/cjs/instructions/createNameRegistryInstruction.cjs +94 -1
  97. package/dist/cjs/instructions/createNameRegistryInstruction.cjs.map +1 -1
  98. package/dist/cjs/instructions/createReverseInstruction.cjs +79 -1
  99. package/dist/cjs/instructions/createReverseInstruction.cjs.map +1 -1
  100. package/dist/cjs/instructions/createSplitV2Instruction.cjs +113 -1
  101. package/dist/cjs/instructions/createSplitV2Instruction.cjs.map +1 -1
  102. package/dist/cjs/instructions/createWithNftInstruction.cjs +107 -1
  103. package/dist/cjs/instructions/createWithNftInstruction.cjs.map +1 -1
  104. package/dist/cjs/instructions/deleteNameRegistryInstruction.cjs +47 -1
  105. package/dist/cjs/instructions/deleteNameRegistryInstruction.cjs.map +1 -1
  106. package/dist/cjs/instructions/deleteRecordInstruction.cjs +63 -1
  107. package/dist/cjs/instructions/deleteRecordInstruction.cjs.map +1 -1
  108. package/dist/cjs/instructions/index.cjs +41 -1
  109. package/dist/cjs/instructions/index.cjs.map +1 -1
  110. package/dist/cjs/instructions/reallocInstruction.cjs +55 -1
  111. package/dist/cjs/instructions/reallocInstruction.cjs.map +1 -1
  112. package/dist/cjs/instructions/registerPrimaryInstruction.cjs +58 -0
  113. package/dist/cjs/instructions/registerPrimaryInstruction.cjs.map +1 -0
  114. package/dist/cjs/instructions/setRecordRoaVerifierInstruction.cjs +69 -0
  115. package/dist/cjs/instructions/setRecordRoaVerifierInstruction.cjs.map +1 -0
  116. package/dist/cjs/instructions/transferInstruction.cjs +67 -1
  117. package/dist/cjs/instructions/transferInstruction.cjs.map +1 -1
  118. package/dist/cjs/instructions/updateNameRegistryInstruction.cjs +51 -1
  119. package/dist/cjs/instructions/updateNameRegistryInstruction.cjs.map +1 -1
  120. package/dist/cjs/instructions/updateRecordInstruction.cjs +71 -1
  121. package/dist/cjs/instructions/updateRecordInstruction.cjs.map +1 -1
  122. package/dist/cjs/instructions/validateEthereumSignatureInstruction.cjs +76 -0
  123. package/dist/cjs/instructions/validateEthereumSignatureInstruction.cjs.map +1 -0
  124. package/dist/cjs/instructions/validateSolanaSignatureInstruction.cjs +72 -0
  125. package/dist/cjs/instructions/validateSolanaSignatureInstruction.cjs.map +1 -0
  126. package/dist/cjs/nft/getSnsNftMint.cjs +31 -0
  127. package/dist/cjs/nft/getSnsNftMint.cjs.map +1 -0
  128. package/dist/cjs/nft/getSnsNftOwner.cjs +48 -0
  129. package/dist/cjs/nft/getSnsNftOwner.cjs.map +1 -0
  130. package/dist/cjs/nft/index.cjs +11 -1
  131. package/dist/cjs/nft/index.cjs.map +1 -1
  132. package/dist/cjs/record/getRecordV1Address.cjs +31 -1
  133. package/dist/cjs/record/getRecordV1Address.cjs.map +1 -1
  134. package/dist/cjs/record/getRecordV2Address.cjs +27 -1
  135. package/dist/cjs/record/getRecordV2Address.cjs.map +1 -1
  136. package/dist/cjs/record/index.cjs +18 -1
  137. package/dist/cjs/record/index.cjs.map +1 -1
  138. package/dist/cjs/record/verifyRecordRightOfAssociation.cjs +95 -1
  139. package/dist/cjs/record/verifyRecordRightOfAssociation.cjs.map +1 -1
  140. package/dist/cjs/record/verifyRecordStaleness.cjs +55 -1
  141. package/dist/cjs/record/verifyRecordStaleness.cjs.map +1 -1
  142. package/dist/cjs/states/index.cjs +22 -1
  143. package/dist/cjs/states/index.cjs.map +1 -1
  144. package/dist/cjs/states/nft.cjs +109 -1
  145. package/dist/cjs/states/nft.cjs.map +1 -1
  146. package/dist/cjs/states/primaryDomain.cjs +65 -1
  147. package/dist/cjs/states/primaryDomain.cjs.map +1 -1
  148. package/dist/cjs/states/record.cjs +120 -1
  149. package/dist/cjs/states/record.cjs.map +1 -1
  150. package/dist/cjs/states/registry.cjs +68 -1
  151. package/dist/cjs/states/registry.cjs.map +1 -1
  152. package/dist/cjs/types/index.cjs +22 -1
  153. package/dist/cjs/types/index.cjs.map +1 -1
  154. package/dist/cjs/types/record.cjs +56 -1
  155. package/dist/cjs/types/record.cjs.map +1 -1
  156. package/dist/cjs/types/validation.cjs +12 -1
  157. package/dist/cjs/types/validation.cjs.map +1 -1
  158. package/dist/cjs/utils/assertTldSupported.cjs +28 -0
  159. package/dist/cjs/utils/assertTldSupported.cjs.map +1 -0
  160. package/dist/cjs/utils/check.cjs +20 -1
  161. package/dist/cjs/utils/check.cjs.map +1 -1
  162. package/dist/cjs/utils/checkAddressOnCurve/ed25519.cjs +81 -3
  163. package/dist/cjs/utils/checkAddressOnCurve/ed25519.cjs.map +1 -1
  164. package/dist/cjs/utils/checkAddressOnCurve/index.cjs +42 -1
  165. package/dist/cjs/utils/checkAddressOnCurve/index.cjs.map +1 -1
  166. package/dist/cjs/utils/deriveAddress.cjs +57 -1
  167. package/dist/cjs/utils/deriveAddress.cjs.map +1 -1
  168. package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs +64 -1
  169. package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs.map +1 -1
  170. package/dist/cjs/utils/deserializers/deserializeReverse.cjs +17 -1
  171. package/dist/cjs/utils/deserializers/deserializeReverse.cjs.map +1 -1
  172. package/dist/cjs/utils/getPythFeedAddress.cjs +32 -1
  173. package/dist/cjs/utils/getPythFeedAddress.cjs.map +1 -1
  174. package/dist/cjs/utils/getReverseAddress.cjs +29 -1
  175. package/dist/cjs/utils/getReverseAddress.cjs.map +1 -1
  176. package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs +25 -1
  177. package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs.map +1 -1
  178. package/dist/cjs/utils/index.cjs +32 -1
  179. package/dist/cjs/utils/index.cjs.map +1 -1
  180. package/dist/cjs/utils/parseSnsDomain.cjs +66 -0
  181. package/dist/cjs/utils/parseSnsDomain.cjs.map +1 -0
  182. package/dist/cjs/utils/reverseLookup.cjs +40 -1
  183. package/dist/cjs/utils/reverseLookup.cjs.map +1 -1
  184. package/dist/cjs/utils/reverseLookupBatch.cjs +30 -1
  185. package/dist/cjs/utils/reverseLookupBatch.cjs.map +1 -1
  186. package/dist/cjs/utils/serializers/serializeRecordContent.cjs +90 -1
  187. package/dist/cjs/utils/serializers/serializeRecordContent.cjs.map +1 -1
  188. package/dist/cjs/utils/tld.cjs +67 -0
  189. package/dist/cjs/utils/tld.cjs.map +1 -0
  190. package/dist/cjs/utils/uint8Array/uint8ArrayFromHex.cjs +20 -1
  191. package/dist/cjs/utils/uint8Array/uint8ArrayFromHex.cjs.map +1 -1
  192. package/dist/cjs/utils/uint8Array/uint8ArrayToHex.cjs +16 -1
  193. package/dist/cjs/utils/uint8Array/uint8ArrayToHex.cjs.map +1 -1
  194. package/dist/cjs/utils/uint8Array/uint8ArraysEqual.cjs +20 -1
  195. package/dist/cjs/utils/uint8Array/uint8ArraysEqual.cjs.map +1 -1
  196. package/dist/esm/address/getPrimaryDomain.mjs +50 -1
  197. package/dist/esm/address/getPrimaryDomain.mjs.map +1 -1
  198. package/dist/esm/address/getPrimaryDomainsBatch.mjs +104 -1
  199. package/dist/esm/address/getPrimaryDomainsBatch.mjs.map +1 -1
  200. package/dist/esm/address/getSnsDomainsForAddress.mjs +61 -0
  201. package/dist/esm/address/getSnsDomainsForAddress.mjs.map +1 -0
  202. package/dist/esm/address/getSnsNftsForAddress.mjs +90 -0
  203. package/dist/esm/address/getSnsNftsForAddress.mjs.map +1 -0
  204. package/dist/esm/address/index.mjs +4 -1
  205. package/dist/esm/address/index.mjs.map +1 -1
  206. package/dist/esm/bindings/burnDomain.mjs +42 -1
  207. package/dist/esm/bindings/burnDomain.mjs.map +1 -1
  208. package/dist/esm/bindings/createNameRegistry.mjs +50 -1
  209. package/dist/esm/bindings/createNameRegistry.mjs.map +1 -1
  210. package/dist/esm/bindings/createRecord.mjs +53 -1
  211. package/dist/esm/bindings/createRecord.mjs.map +1 -1
  212. package/dist/esm/bindings/createReverse.mjs +32 -1
  213. package/dist/esm/bindings/createReverse.mjs.map +1 -1
  214. package/dist/esm/bindings/createSubdomain.mjs +65 -1
  215. package/dist/esm/bindings/createSubdomain.mjs.map +1 -1
  216. package/dist/esm/bindings/deleteNameRegistry.mjs +33 -1
  217. package/dist/esm/bindings/deleteNameRegistry.mjs.map +1 -1
  218. package/dist/esm/bindings/deleteRecord.mjs +45 -1
  219. package/dist/esm/bindings/deleteRecord.mjs.map +1 -1
  220. package/dist/esm/bindings/index.mjs +18 -1
  221. package/dist/esm/bindings/index.mjs.map +1 -1
  222. package/dist/esm/bindings/recordValidation.mjs +55 -0
  223. package/dist/esm/bindings/recordValidation.mjs.map +1 -0
  224. package/dist/esm/bindings/registerDomain.mjs +82 -1
  225. package/dist/esm/bindings/registerDomain.mjs.map +1 -1
  226. package/dist/esm/bindings/registerDomainWithNft.mjs +63 -0
  227. package/dist/esm/bindings/registerDomainWithNft.mjs.map +1 -0
  228. package/dist/esm/bindings/setPrimaryDomain.mjs +35 -1
  229. package/dist/esm/bindings/setPrimaryDomain.mjs.map +1 -1
  230. package/dist/esm/bindings/setRecordRoaVerifier.mjs +40 -0
  231. package/dist/esm/bindings/setRecordRoaVerifier.mjs.map +1 -0
  232. package/dist/esm/bindings/setRecordStalenessVerifier.mjs +28 -0
  233. package/dist/esm/bindings/setRecordStalenessVerifier.mjs.map +1 -0
  234. package/dist/esm/bindings/transferDomain.mjs +29 -1
  235. package/dist/esm/bindings/transferDomain.mjs.map +1 -1
  236. package/dist/esm/bindings/transferSubdomain.mjs +44 -1
  237. package/dist/esm/bindings/transferSubdomain.mjs.map +1 -1
  238. package/dist/esm/bindings/updateNameRegistry.mjs +41 -1
  239. package/dist/esm/bindings/updateNameRegistry.mjs.map +1 -1
  240. package/dist/esm/bindings/updateRecord.mjs +53 -1
  241. package/dist/esm/bindings/updateRecord.mjs.map +1 -1
  242. package/dist/esm/bindings/validateRecordRoa.mjs +28 -0
  243. package/dist/esm/bindings/validateRecordRoa.mjs.map +1 -0
  244. package/dist/esm/bindings/validateRecordRoaEthereum.mjs +45 -0
  245. package/dist/esm/bindings/validateRecordRoaEthereum.mjs.map +1 -0
  246. package/dist/esm/codecs.mjs +19 -1
  247. package/dist/esm/codecs.mjs.map +1 -1
  248. package/dist/esm/config.mjs +11 -0
  249. package/dist/esm/config.mjs.map +1 -0
  250. package/dist/esm/constants/addresses.mjs +98 -1
  251. package/dist/esm/constants/addresses.mjs.map +1 -1
  252. package/dist/esm/constants/index.mjs +3 -1
  253. package/dist/esm/constants/index.mjs.map +1 -1
  254. package/dist/esm/constants/pythFeeds.mjs +86 -1
  255. package/dist/esm/constants/pythFeeds.mjs.map +1 -1
  256. package/dist/esm/constants/records.mjs +63 -1
  257. package/dist/esm/constants/records.mjs.map +1 -1
  258. package/dist/esm/domain/getAllSnsDomains.mjs +39 -0
  259. package/dist/esm/domain/getAllSnsDomains.mjs.map +1 -0
  260. package/dist/esm/domain/getDomainOwner.mjs +23 -1
  261. package/dist/esm/domain/getDomainOwner.mjs.map +1 -1
  262. package/dist/esm/domain/getDomainRecord.mjs +50 -1
  263. package/dist/esm/domain/getDomainRecord.mjs.map +1 -1
  264. package/dist/esm/domain/getDomainRecords.mjs +60 -1
  265. package/dist/esm/domain/getDomainRecords.mjs.map +1 -1
  266. package/dist/esm/domain/getSnsDomainAddress.mjs +48 -0
  267. package/dist/esm/domain/getSnsDomainAddress.mjs.map +1 -0
  268. package/dist/esm/domain/getSnsDomainOwner.mjs +27 -0
  269. package/dist/esm/domain/getSnsDomainOwner.mjs.map +1 -0
  270. package/dist/esm/domain/getSrsDomainAddress.mjs +32 -0
  271. package/dist/esm/domain/getSrsDomainAddress.mjs.map +1 -0
  272. package/dist/esm/domain/getSubdomains.mjs +91 -1
  273. package/dist/esm/domain/getSubdomains.mjs.map +1 -1
  274. package/dist/esm/domain/index.mjs +8 -1
  275. package/dist/esm/domain/index.mjs.map +1 -1
  276. package/dist/esm/domain/resolve.mjs +62 -0
  277. package/dist/esm/domain/resolve.mjs.map +1 -0
  278. package/dist/esm/domain/resolveSns.mjs +109 -0
  279. package/dist/esm/domain/resolveSns.mjs.map +1 -0
  280. package/dist/esm/errors.mjs +218 -1
  281. package/dist/esm/errors.mjs.map +1 -1
  282. package/dist/esm/index.mjs +74 -1
  283. package/dist/esm/index.mjs.map +1 -1
  284. package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs +67 -1
  285. package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs.map +1 -1
  286. package/dist/esm/instructions/burnDomainInstruction.mjs +67 -1
  287. package/dist/esm/instructions/burnDomainInstruction.mjs.map +1 -1
  288. package/dist/esm/instructions/createAtaIdempotentInstruction.mjs +67 -0
  289. package/dist/esm/instructions/createAtaIdempotentInstruction.mjs.map +1 -0
  290. package/dist/esm/instructions/createNameRegistryInstruction.mjs +90 -1
  291. package/dist/esm/instructions/createNameRegistryInstruction.mjs.map +1 -1
  292. package/dist/esm/instructions/createReverseInstruction.mjs +75 -1
  293. package/dist/esm/instructions/createReverseInstruction.mjs.map +1 -1
  294. package/dist/esm/instructions/createSplitV2Instruction.mjs +109 -1
  295. package/dist/esm/instructions/createSplitV2Instruction.mjs.map +1 -1
  296. package/dist/esm/instructions/createWithNftInstruction.mjs +103 -1
  297. package/dist/esm/instructions/createWithNftInstruction.mjs.map +1 -1
  298. package/dist/esm/instructions/deleteNameRegistryInstruction.mjs +43 -1
  299. package/dist/esm/instructions/deleteNameRegistryInstruction.mjs.map +1 -1
  300. package/dist/esm/instructions/deleteRecordInstruction.mjs +59 -1
  301. package/dist/esm/instructions/deleteRecordInstruction.mjs.map +1 -1
  302. package/dist/esm/instructions/index.mjs +17 -1
  303. package/dist/esm/instructions/index.mjs.map +1 -1
  304. package/dist/esm/instructions/reallocInstruction.mjs +51 -1
  305. package/dist/esm/instructions/reallocInstruction.mjs.map +1 -1
  306. package/dist/esm/instructions/registerPrimaryInstruction.mjs +54 -0
  307. package/dist/esm/instructions/registerPrimaryInstruction.mjs.map +1 -0
  308. package/dist/esm/instructions/setRecordRoaVerifierInstruction.mjs +65 -0
  309. package/dist/esm/instructions/setRecordRoaVerifierInstruction.mjs.map +1 -0
  310. package/dist/esm/instructions/transferInstruction.mjs +63 -1
  311. package/dist/esm/instructions/transferInstruction.mjs.map +1 -1
  312. package/dist/esm/instructions/updateNameRegistryInstruction.mjs +47 -1
  313. package/dist/esm/instructions/updateNameRegistryInstruction.mjs.map +1 -1
  314. package/dist/esm/instructions/updateRecordInstruction.mjs +67 -1
  315. package/dist/esm/instructions/updateRecordInstruction.mjs.map +1 -1
  316. package/dist/esm/instructions/validateEthereumSignatureInstruction.mjs +72 -0
  317. package/dist/esm/instructions/validateEthereumSignatureInstruction.mjs.map +1 -0
  318. package/dist/esm/instructions/validateSolanaSignatureInstruction.mjs +68 -0
  319. package/dist/esm/instructions/validateSolanaSignatureInstruction.mjs.map +1 -0
  320. package/dist/esm/nft/getSnsNftMint.mjs +27 -0
  321. package/dist/esm/nft/getSnsNftMint.mjs.map +1 -0
  322. package/dist/esm/nft/getSnsNftOwner.mjs +44 -0
  323. package/dist/esm/nft/getSnsNftOwner.mjs.map +1 -0
  324. package/dist/esm/nft/index.mjs +2 -1
  325. package/dist/esm/nft/index.mjs.map +1 -1
  326. package/dist/esm/record/getRecordV1Address.mjs +27 -1
  327. package/dist/esm/record/getRecordV1Address.mjs.map +1 -1
  328. package/dist/esm/record/getRecordV2Address.mjs +23 -1
  329. package/dist/esm/record/getRecordV2Address.mjs.map +1 -1
  330. package/dist/esm/record/index.mjs +4 -1
  331. package/dist/esm/record/index.mjs.map +1 -1
  332. package/dist/esm/record/verifyRecordRightOfAssociation.mjs +89 -1
  333. package/dist/esm/record/verifyRecordRightOfAssociation.mjs.map +1 -1
  334. package/dist/esm/record/verifyRecordStaleness.mjs +50 -1
  335. package/dist/esm/record/verifyRecordStaleness.mjs.map +1 -1
  336. package/dist/esm/states/index.mjs +4 -1
  337. package/dist/esm/states/index.mjs.map +1 -1
  338. package/dist/esm/states/nft.mjs +105 -1
  339. package/dist/esm/states/nft.mjs.map +1 -1
  340. package/dist/esm/states/primaryDomain.mjs +61 -1
  341. package/dist/esm/states/primaryDomain.mjs.map +1 -1
  342. package/dist/esm/states/record.mjs +113 -1
  343. package/dist/esm/states/record.mjs.map +1 -1
  344. package/dist/esm/states/registry.mjs +64 -1
  345. package/dist/esm/states/registry.mjs.map +1 -1
  346. package/dist/esm/types/index.mjs +2 -1
  347. package/dist/esm/types/index.mjs.map +1 -1
  348. package/dist/esm/types/record.mjs +52 -1
  349. package/dist/esm/types/record.mjs.map +1 -1
  350. package/dist/esm/types/validation.mjs +10 -1
  351. package/dist/esm/types/validation.mjs.map +1 -1
  352. package/dist/esm/utils/assertTldSupported.mjs +24 -0
  353. package/dist/esm/utils/assertTldSupported.mjs.map +1 -0
  354. package/dist/esm/utils/check.mjs +16 -1
  355. package/dist/esm/utils/check.mjs.map +1 -1
  356. package/dist/esm/utils/checkAddressOnCurve/ed25519.mjs +76 -2
  357. package/dist/esm/utils/checkAddressOnCurve/ed25519.mjs.map +1 -1
  358. package/dist/esm/utils/checkAddressOnCurve/index.mjs +38 -1
  359. package/dist/esm/utils/checkAddressOnCurve/index.mjs.map +1 -1
  360. package/dist/esm/utils/deriveAddress.mjs +51 -1
  361. package/dist/esm/utils/deriveAddress.mjs.map +1 -1
  362. package/dist/esm/utils/deserializers/deserializeRecordContent.mjs +60 -1
  363. package/dist/esm/utils/deserializers/deserializeRecordContent.mjs.map +1 -1
  364. package/dist/esm/utils/deserializers/deserializeReverse.mjs +13 -1
  365. package/dist/esm/utils/deserializers/deserializeReverse.mjs.map +1 -1
  366. package/dist/esm/utils/getPythFeedAddress.mjs +28 -1
  367. package/dist/esm/utils/getPythFeedAddress.mjs.map +1 -1
  368. package/dist/esm/utils/getReverseAddress.mjs +25 -1
  369. package/dist/esm/utils/getReverseAddress.mjs.map +1 -1
  370. package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs +21 -1
  371. package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs.map +1 -1
  372. package/dist/esm/utils/index.mjs +10 -1
  373. package/dist/esm/utils/index.mjs.map +1 -1
  374. package/dist/esm/utils/parseSnsDomain.mjs +60 -0
  375. package/dist/esm/utils/parseSnsDomain.mjs.map +1 -0
  376. package/dist/esm/utils/reverseLookup.mjs +36 -1
  377. package/dist/esm/utils/reverseLookup.mjs.map +1 -1
  378. package/dist/esm/utils/reverseLookupBatch.mjs +26 -1
  379. package/dist/esm/utils/reverseLookupBatch.mjs.map +1 -1
  380. package/dist/esm/utils/serializers/serializeRecordContent.mjs +86 -1
  381. package/dist/esm/utils/serializers/serializeRecordContent.mjs.map +1 -1
  382. package/dist/esm/utils/tld.mjs +58 -0
  383. package/dist/esm/utils/tld.mjs.map +1 -0
  384. package/dist/esm/utils/uint8Array/uint8ArrayFromHex.mjs +16 -1
  385. package/dist/esm/utils/uint8Array/uint8ArrayFromHex.mjs.map +1 -1
  386. package/dist/esm/utils/uint8Array/uint8ArrayToHex.mjs +12 -1
  387. package/dist/esm/utils/uint8Array/uint8ArrayToHex.mjs.map +1 -1
  388. package/dist/esm/utils/uint8Array/uint8ArraysEqual.mjs +16 -1
  389. package/dist/esm/utils/uint8Array/uint8ArraysEqual.mjs.map +1 -1
  390. package/dist/types/address/index.d.ts +193 -4
  391. package/dist/types/bindings/index.d.ts +821 -17
  392. package/dist/types/codecs.d.ts +16 -5
  393. package/dist/types/constants/index.d.ts +141 -3
  394. package/dist/types/domain/index.d.ts +559 -7
  395. package/dist/types/errors.d.ts +73 -85
  396. package/dist/types/index.d.ts +3038 -74
  397. package/dist/types/instructions/index.d.ts +523 -19
  398. package/dist/types/nft/index.d.ts +59 -2
  399. package/dist/types/record/index.d.ts +254 -4
  400. package/dist/types/states/index.d.ts +235 -4
  401. package/dist/types/types/index.d.ts +50 -2
  402. package/dist/types/utils/index.d.ts +346 -10
  403. package/package.json +47 -41
  404. package/dist/cjs/_virtual/ipaddr.cjs +0 -2
  405. package/dist/cjs/_virtual/ipaddr.cjs.map +0 -1
  406. package/dist/cjs/_virtual/ipaddr2.cjs +0 -2
  407. package/dist/cjs/_virtual/ipaddr2.cjs.map +0 -1
  408. package/dist/cjs/address/getDomainsForAddress.cjs +0 -2
  409. package/dist/cjs/address/getDomainsForAddress.cjs.map +0 -1
  410. package/dist/cjs/address/getNftsForAddress.cjs +0 -2
  411. package/dist/cjs/address/getNftsForAddress.cjs.map +0 -1
  412. package/dist/cjs/bindings/registerWithNft.cjs +0 -2
  413. package/dist/cjs/bindings/registerWithNft.cjs.map +0 -1
  414. package/dist/cjs/bindings/validateRoa.cjs +0 -2
  415. package/dist/cjs/bindings/validateRoa.cjs.map +0 -1
  416. package/dist/cjs/bindings/validateRoaEthereum.cjs +0 -2
  417. package/dist/cjs/bindings/validateRoaEthereum.cjs.map +0 -1
  418. package/dist/cjs/bindings/writeRoa.cjs +0 -2
  419. package/dist/cjs/bindings/writeRoa.cjs.map +0 -1
  420. package/dist/cjs/domain/getAllDomains.cjs +0 -2
  421. package/dist/cjs/domain/getAllDomains.cjs.map +0 -1
  422. package/dist/cjs/domain/getDomainAddress.cjs +0 -2
  423. package/dist/cjs/domain/getDomainAddress.cjs.map +0 -1
  424. package/dist/cjs/domain/resolveDomain.cjs +0 -2
  425. package/dist/cjs/domain/resolveDomain.cjs.map +0 -1
  426. package/dist/cjs/instructions/createAtaInstruction.cjs +0 -2
  427. package/dist/cjs/instructions/createAtaInstruction.cjs.map +0 -1
  428. package/dist/cjs/instructions/createInstructionV3.cjs +0 -2
  429. package/dist/cjs/instructions/createInstructionV3.cjs.map +0 -1
  430. package/dist/cjs/instructions/createV2Instruction.cjs +0 -2
  431. package/dist/cjs/instructions/createV2Instruction.cjs.map +0 -1
  432. package/dist/cjs/instructions/registerFavoriteInstruction.cjs +0 -2
  433. package/dist/cjs/instructions/registerFavoriteInstruction.cjs.map +0 -1
  434. package/dist/cjs/instructions/validateRoaEthereumInstruction.cjs +0 -2
  435. package/dist/cjs/instructions/validateRoaEthereumInstruction.cjs.map +0 -1
  436. package/dist/cjs/instructions/validateRoaInstruction.cjs +0 -2
  437. package/dist/cjs/instructions/validateRoaInstruction.cjs.map +0 -1
  438. package/dist/cjs/instructions/writeRoaInstruction.cjs +0 -2
  439. package/dist/cjs/instructions/writeRoaInstruction.cjs.map +0 -1
  440. package/dist/cjs/nft/getNftMint.cjs +0 -2
  441. package/dist/cjs/nft/getNftMint.cjs.map +0 -1
  442. package/dist/cjs/nft/getNftOwner.cjs +0 -2
  443. package/dist/cjs/nft/getNftOwner.cjs.map +0 -1
  444. package/dist/cjs/node_modules/@scure/base/lib/esm/index.cjs +0 -3
  445. package/dist/cjs/node_modules/@scure/base/lib/esm/index.cjs.map +0 -1
  446. package/dist/cjs/node_modules/@solana-program/token/dist/src/index.cjs +0 -2
  447. package/dist/cjs/node_modules/@solana-program/token/dist/src/index.cjs.map +0 -1
  448. package/dist/cjs/node_modules/borsh/lib/esm/buffer.cjs +0 -2
  449. package/dist/cjs/node_modules/borsh/lib/esm/buffer.cjs.map +0 -1
  450. package/dist/cjs/node_modules/borsh/lib/esm/deserialize.cjs +0 -2
  451. package/dist/cjs/node_modules/borsh/lib/esm/deserialize.cjs.map +0 -1
  452. package/dist/cjs/node_modules/borsh/lib/esm/index.cjs +0 -2
  453. package/dist/cjs/node_modules/borsh/lib/esm/index.cjs.map +0 -1
  454. package/dist/cjs/node_modules/borsh/lib/esm/serialize.cjs +0 -2
  455. package/dist/cjs/node_modules/borsh/lib/esm/serialize.cjs.map +0 -1
  456. package/dist/cjs/node_modules/borsh/lib/esm/types.cjs +0 -2
  457. package/dist/cjs/node_modules/borsh/lib/esm/types.cjs.map +0 -1
  458. package/dist/cjs/node_modules/borsh/lib/esm/utils.cjs +0 -2
  459. package/dist/cjs/node_modules/borsh/lib/esm/utils.cjs.map +0 -1
  460. package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.cjs +0 -2
  461. package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.cjs.map +0 -1
  462. package/dist/cjs/node_modules/punycode/punycode.es6.cjs +0 -2
  463. package/dist/cjs/node_modules/punycode/punycode.es6.cjs.map +0 -1
  464. package/dist/esm/_virtual/ipaddr.mjs +0 -2
  465. package/dist/esm/_virtual/ipaddr.mjs.map +0 -1
  466. package/dist/esm/_virtual/ipaddr2.mjs +0 -2
  467. package/dist/esm/_virtual/ipaddr2.mjs.map +0 -1
  468. package/dist/esm/address/getDomainsForAddress.mjs +0 -2
  469. package/dist/esm/address/getDomainsForAddress.mjs.map +0 -1
  470. package/dist/esm/address/getNftsForAddress.mjs +0 -2
  471. package/dist/esm/address/getNftsForAddress.mjs.map +0 -1
  472. package/dist/esm/bindings/registerWithNft.mjs +0 -2
  473. package/dist/esm/bindings/registerWithNft.mjs.map +0 -1
  474. package/dist/esm/bindings/validateRoa.mjs +0 -2
  475. package/dist/esm/bindings/validateRoa.mjs.map +0 -1
  476. package/dist/esm/bindings/validateRoaEthereum.mjs +0 -2
  477. package/dist/esm/bindings/validateRoaEthereum.mjs.map +0 -1
  478. package/dist/esm/bindings/writeRoa.mjs +0 -2
  479. package/dist/esm/bindings/writeRoa.mjs.map +0 -1
  480. package/dist/esm/domain/getAllDomains.mjs +0 -2
  481. package/dist/esm/domain/getAllDomains.mjs.map +0 -1
  482. package/dist/esm/domain/getDomainAddress.mjs +0 -2
  483. package/dist/esm/domain/getDomainAddress.mjs.map +0 -1
  484. package/dist/esm/domain/resolveDomain.mjs +0 -2
  485. package/dist/esm/domain/resolveDomain.mjs.map +0 -1
  486. package/dist/esm/instructions/createAtaInstruction.mjs +0 -2
  487. package/dist/esm/instructions/createAtaInstruction.mjs.map +0 -1
  488. package/dist/esm/instructions/createInstructionV3.mjs +0 -2
  489. package/dist/esm/instructions/createInstructionV3.mjs.map +0 -1
  490. package/dist/esm/instructions/createV2Instruction.mjs +0 -2
  491. package/dist/esm/instructions/createV2Instruction.mjs.map +0 -1
  492. package/dist/esm/instructions/registerFavoriteInstruction.mjs +0 -2
  493. package/dist/esm/instructions/registerFavoriteInstruction.mjs.map +0 -1
  494. package/dist/esm/instructions/validateRoaEthereumInstruction.mjs +0 -2
  495. package/dist/esm/instructions/validateRoaEthereumInstruction.mjs.map +0 -1
  496. package/dist/esm/instructions/validateRoaInstruction.mjs +0 -2
  497. package/dist/esm/instructions/validateRoaInstruction.mjs.map +0 -1
  498. package/dist/esm/instructions/writeRoaInstruction.mjs +0 -2
  499. package/dist/esm/instructions/writeRoaInstruction.mjs.map +0 -1
  500. package/dist/esm/nft/getNftMint.mjs +0 -2
  501. package/dist/esm/nft/getNftMint.mjs.map +0 -1
  502. package/dist/esm/nft/getNftOwner.mjs +0 -2
  503. package/dist/esm/nft/getNftOwner.mjs.map +0 -1
  504. package/dist/esm/node_modules/@scure/base/lib/esm/index.mjs +0 -3
  505. package/dist/esm/node_modules/@scure/base/lib/esm/index.mjs.map +0 -1
  506. package/dist/esm/node_modules/@solana-program/token/dist/src/index.mjs +0 -2
  507. package/dist/esm/node_modules/@solana-program/token/dist/src/index.mjs.map +0 -1
  508. package/dist/esm/node_modules/borsh/lib/esm/buffer.mjs +0 -2
  509. package/dist/esm/node_modules/borsh/lib/esm/buffer.mjs.map +0 -1
  510. package/dist/esm/node_modules/borsh/lib/esm/deserialize.mjs +0 -2
  511. package/dist/esm/node_modules/borsh/lib/esm/deserialize.mjs.map +0 -1
  512. package/dist/esm/node_modules/borsh/lib/esm/index.mjs +0 -2
  513. package/dist/esm/node_modules/borsh/lib/esm/index.mjs.map +0 -1
  514. package/dist/esm/node_modules/borsh/lib/esm/serialize.mjs +0 -2
  515. package/dist/esm/node_modules/borsh/lib/esm/serialize.mjs.map +0 -1
  516. package/dist/esm/node_modules/borsh/lib/esm/types.mjs +0 -2
  517. package/dist/esm/node_modules/borsh/lib/esm/types.mjs.map +0 -1
  518. package/dist/esm/node_modules/borsh/lib/esm/utils.mjs +0 -2
  519. package/dist/esm/node_modules/borsh/lib/esm/utils.mjs.map +0 -1
  520. package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.mjs +0 -2
  521. package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.mjs.map +0 -1
  522. package/dist/esm/node_modules/punycode/punycode.es6.mjs +0 -2
  523. package/dist/esm/node_modules/punycode/punycode.es6.mjs.map +0 -1
  524. package/dist/types/address/getDomainsForAddress.d.ts +0 -19
  525. package/dist/types/address/getNftsForAddress.d.ts +0 -20
  526. package/dist/types/address/getPrimaryDomain.d.ts +0 -22
  527. package/dist/types/address/getPrimaryDomainsBatch.d.ts +0 -16
  528. package/dist/types/bindings/burnDomain.d.ts +0 -17
  529. package/dist/types/bindings/createNameRegistry.d.ts +0 -28
  530. package/dist/types/bindings/createRecord.d.ts +0 -23
  531. package/dist/types/bindings/createReverse.d.ts +0 -21
  532. package/dist/types/bindings/createSubdomain.d.ts +0 -23
  533. package/dist/types/bindings/deleteNameRegistry.d.ts +0 -21
  534. package/dist/types/bindings/deleteRecord.d.ts +0 -20
  535. package/dist/types/bindings/registerDomain.d.ts +0 -25
  536. package/dist/types/bindings/registerWithNft.d.ts +0 -21
  537. package/dist/types/bindings/setPrimaryDomain.d.ts +0 -16
  538. package/dist/types/bindings/transferDomain.d.ts +0 -23
  539. package/dist/types/bindings/transferSubdomain.d.ts +0 -25
  540. package/dist/types/bindings/updateNameRegistry.d.ts +0 -22
  541. package/dist/types/bindings/updateRecord.d.ts +0 -22
  542. package/dist/types/bindings/validateRoa.d.ts +0 -24
  543. package/dist/types/bindings/validateRoaEthereum.d.ts +0 -24
  544. package/dist/types/bindings/writeRoa.d.ts +0 -22
  545. package/dist/types/constants/addresses.d.ts +0 -53
  546. package/dist/types/constants/pythFeeds.d.ts +0 -3
  547. package/dist/types/constants/records.d.ts +0 -23
  548. package/dist/types/domain/getAllDomains.d.ts +0 -16
  549. package/dist/types/domain/getDomainAddress.d.ts +0 -30
  550. package/dist/types/domain/getDomainOwner.d.ts +0 -16
  551. package/dist/types/domain/getDomainRecord.d.ts +0 -35
  552. package/dist/types/domain/getDomainRecords.d.ts +0 -39
  553. package/dist/types/domain/getSubdomains.d.ts +0 -19
  554. package/dist/types/domain/resolveDomain.d.ts +0 -26
  555. package/dist/types/instructions/allocateAndPostRecordInstruction.d.ts +0 -23
  556. package/dist/types/instructions/burnDomainInstruction.d.ts +0 -12
  557. package/dist/types/instructions/createAtaInstruction.d.ts +0 -2
  558. package/dist/types/instructions/createInstructionV3.d.ts +0 -24
  559. package/dist/types/instructions/createNameRegistryInstruction.d.ts +0 -26
  560. package/dist/types/instructions/createReverseInstruction.d.ts +0 -16
  561. package/dist/types/instructions/createSplitV2Instruction.d.ts +0 -24
  562. package/dist/types/instructions/createV2Instruction.d.ts +0 -19
  563. package/dist/types/instructions/createWithNftInstruction.d.ts +0 -19
  564. package/dist/types/instructions/deleteNameRegistryInstruction.d.ts +0 -12
  565. package/dist/types/instructions/deleteRecordInstruction.d.ts +0 -12
  566. package/dist/types/instructions/reallocInstruction.d.ts +0 -16
  567. package/dist/types/instructions/registerFavoriteInstruction.d.ts +0 -12
  568. package/dist/types/instructions/transferInstruction.d.ts +0 -21
  569. package/dist/types/instructions/updateNameRegistryInstruction.d.ts +0 -23
  570. package/dist/types/instructions/updateRecordInstruction.d.ts +0 -23
  571. package/dist/types/instructions/validateRoaEthereumInstruction.d.ts +0 -30
  572. package/dist/types/instructions/validateRoaInstruction.d.ts +0 -16
  573. package/dist/types/instructions/writeRoaInstruction.d.ts +0 -20
  574. package/dist/types/nft/getNftMint.d.ts +0 -13
  575. package/dist/types/nft/getNftOwner.d.ts +0 -15
  576. package/dist/types/record/getRecordV1Address.d.ts +0 -15
  577. package/dist/types/record/getRecordV2Address.d.ts +0 -16
  578. package/dist/types/record/verifyRecordRightOfAssociation.d.ts +0 -40
  579. package/dist/types/record/verifyRecordStaleness.d.ts +0 -31
  580. package/dist/types/states/nft.d.ts +0 -50
  581. package/dist/types/states/primaryDomain.d.ts +0 -25
  582. package/dist/types/states/record.d.ts +0 -30
  583. package/dist/types/states/registry.d.ts +0 -39
  584. package/dist/types/types/record.d.ts +0 -38
  585. package/dist/types/types/validation.d.ts +0 -6
  586. package/dist/types/utils/check.d.ts +0 -10
  587. package/dist/types/utils/checkAddressOnCurve/ed25519.d.ts +0 -1
  588. package/dist/types/utils/checkAddressOnCurve/index.d.ts +0 -2
  589. package/dist/types/utils/deriveAddress.d.ts +0 -28
  590. package/dist/types/utils/deserializers/deserializeRecordContent.d.ts +0 -17
  591. package/dist/types/utils/deserializers/deserializeReverse.d.ts +0 -16
  592. package/dist/types/utils/getPythFeedAddress.d.ts +0 -14
  593. package/dist/types/utils/getReverseAddress.d.ts +0 -1
  594. package/dist/types/utils/getReverseAddressFromDomainAddress.d.ts +0 -15
  595. package/dist/types/utils/reverseLookup.d.ts +0 -18
  596. package/dist/types/utils/reverseLookupBatch.d.ts +0 -16
  597. package/dist/types/utils/serializers/serializeRecordContent.d.ts +0 -16
  598. package/dist/types/utils/uint8Array/uint8ArrayFromHex.d.ts +0 -6
  599. package/dist/types/utils/uint8Array/uint8ArrayToHex.d.ts +0 -7
  600. package/dist/types/utils/uint8Array/uint8ArraysConcat.d.ts +0 -8
  601. package/dist/types/utils/uint8Array/uint8ArraysEqual.d.ts +0 -9
@@ -1,28 +0,0 @@
1
- import { Address, GetAccountInfoApi, GetMinimumBalanceForRentExemptionApi, Instruction, Rpc } from "@solana/kit";
2
- interface CreateNameRegistryParams {
3
- rpc: Rpc<GetAccountInfoApi & GetMinimumBalanceForRentExemptionApi>;
4
- name: string;
5
- space: number;
6
- payer: Address;
7
- owner: Address;
8
- lamports?: bigint;
9
- classAddress?: Address;
10
- parentAddress?: Address;
11
- }
12
- /**
13
- * Creates a name registry with the given rent budget, allocated space, owner, and class.
14
- *
15
- * @param params - An object containing the following properties:
16
- * - `rpc`: An RPC interface implementing GetAccountInfoApi and GetMinimumBalanceForRentExemptionApi.
17
- * - `name`: The name of the new account.
18
- * - `space`: The space in bytes allocated to the account.
19
- * - `payer`: The allocation cost payer.
20
- * - `owner`: The address to be set as the owner of the new name account.
21
- * - `lamports`: (Optional) The budget to be set for the name account. If not specified,
22
- * it'll be the minimum for rent exemption.
23
- * - `classAddress`: (Optional) The address of the class associated with the registry.
24
- * - `parentAddress`: (Optional) The address of the parent registry.
25
- * @returns A promise which resolves to the create name registry instruction.
26
- */
27
- export declare const createNameRegistry: ({ rpc, name, space, payer, owner, lamports, classAddress, parentAddress, }: CreateNameRegistryParams) => Promise<Instruction>;
28
- export {};
@@ -1,23 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- interface CreateRecordParams {
4
- domain: string;
5
- record: Record;
6
- content: string;
7
- owner: Address;
8
- payer: Address;
9
- }
10
- /**
11
- * Creates a record for the specified domain. The record data will be serialized
12
- * in compliance with the SNS-IP 1 guidelines.
13
- *
14
- * @param params - An object containing the following properties:
15
- * - `domain`: The domain under which the record will be created.
16
- * - `record`: A record enum representing the type of record to be created.
17
- * - `content`: The record content.
18
- * - `owner`: The address of the domain's owner.
19
- * - `payer`: The address funding the record creation.
20
- * @returns A promise which resolves to the create record instruction.
21
- */
22
- export declare const createRecord: ({ domain, record, content, owner, payer, }: CreateRecordParams) => Promise<Instruction>;
23
- export {};
@@ -1,21 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- interface CreateReverseParams {
3
- domainAddress: Address;
4
- domain: string;
5
- payer: Address;
6
- parentAddress?: Address;
7
- parentOwner?: Address;
8
- }
9
- /**
10
- * Creates a reverse lookup record for the specified domain.
11
- *
12
- * @param params - An object containing the following properties:
13
- * - `domainAddress`: The address of the domain for which the reverse lookup record is created.
14
- * - `domain`: The domain name to be associated with the reverse lookup record.
15
- * - `payer`: The address funding the creation of the reverse lookup record.
16
- * - `parentAddress`: (Optional) The address of the parent domain, if applicable.
17
- * - `parentOwner`: (Optional) The address of the parent domain owner, if applicable.
18
- * @returns A promise which resolves to the create reverse lookup instruction.
19
- */
20
- export declare const createReverse: ({ domainAddress, domain, payer, parentAddress, parentOwner, }: CreateReverseParams) => Promise<Instruction>;
21
- export {};
@@ -1,23 +0,0 @@
1
- import { Address, GetAccountInfoApi, GetMinimumBalanceForRentExemptionApi, Instruction, Rpc } from "@solana/kit";
2
- interface CreateSubdomainParams {
3
- rpc: Rpc<GetAccountInfoApi & GetMinimumBalanceForRentExemptionApi>;
4
- subdomain: string;
5
- owner: Address;
6
- space?: number;
7
- feePayer?: Address;
8
- }
9
- /**
10
- * Creates a subdomain for the specified domain. This includes setting up the subdomain
11
- * registry and its reverse lookup record if not already existing.
12
- *
13
- * @param params - An object containing the following properties:
14
- * - `rpc`: An RPC interface implementing GetAccountInfoApi and GetMinimumBalanceForRentExemptionApi.
15
- * - `subdomain`: The subdomain to create, with or without .sol (e.g., something.sns.sol or something.sns).
16
- * - `owner`: The address of the owner of the parent domain.
17
- * - `space`: (Optional) The space in bytes allocated to the subdomain account (default: 2,000).
18
- * - `feePayer`: (Optional) The address funding the subdomain creation (default: owner address).
19
- * @returns A promise that resolves to an array of instructions required to create the subdomain
20
- * and its reverse lookup record.
21
- */
22
- export declare const createSubdomain: ({ rpc, subdomain, owner, space, feePayer, }: CreateSubdomainParams) => Promise<Instruction[]>;
23
- export {};
@@ -1,21 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc } from "@solana/kit";
2
- interface DeleteNameRegistryParams {
3
- rpc: Rpc<GetAccountInfoApi>;
4
- name: string;
5
- refundAddress: Address;
6
- classAddress?: Address;
7
- parentAddress?: Address;
8
- }
9
- /**
10
- * Deletes a name registry and refunds the associated rent balance to the specified target.
11
- *
12
- * @param params - An object containing the following properties:
13
- * - `rpc`: An RPC interface implementing GetAccountInfoApi.
14
- * - `name`: The name of the registry to be deleted.
15
- * - `refundTarget`: The address to which the refunded rent balance will be sent.
16
- * - `classAddress`: (Optional) The address of the class associated with the registry.
17
- * - `parentAddress`: (Optional) The address of the parent registry.
18
- * @returns A promise which resolves to the delete name registry instruction.
19
- */
20
- export declare const deleteNameRegistry: ({ rpc, name, refundAddress, classAddress, parentAddress, }: DeleteNameRegistryParams) => Promise<Instruction>;
21
- export {};
@@ -1,20 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- interface DeleteRecordParams {
4
- domain: string;
5
- record: Record;
6
- owner: Address;
7
- payer: Address;
8
- }
9
- /**
10
- * Deletes a record under the specified domain and refunds the rent to the payer.
11
- *
12
- * @param params - An object containing the following properties:
13
- * - `domain`: The domain under which the record resides.
14
- * - `record`: An enumeration representing the type of record to be deleted.
15
- * - `owner`: The address of the domain's owner.
16
- * - `payer`: The address funding the record deletion.
17
- * @returns A promise which resolves to the delete record instruction.
18
- */
19
- export declare const deleteRecord: ({ domain, record, owner, payer, }: DeleteRecordParams) => Promise<Instruction>;
20
- export {};
@@ -1,25 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc } from "@solana/kit";
2
- interface RegisterDomainParams {
3
- rpc: Rpc<GetAccountInfoApi>;
4
- domain: string;
5
- space: number;
6
- buyer: Address;
7
- buyerTokenAccount: Address;
8
- mint?: Address;
9
- referrer?: Address;
10
- }
11
- /**
12
- * Registers a .sol domain.
13
- *
14
- * @param params - An object containing the following properties:
15
- * - `rpc`: An RPC interface implementing GetAccountInfoApi.
16
- * - `domain`: The domain name to be registered in lowercase.
17
- * - `space`: The space in bytes to be allocated for the domain registry (max: 10,000).
18
- * - `buyer`: The address of the buyer registering the domain.
19
- * - `buyerTokenAccount`: The associated token account of the buyer.
20
- * - `mint`: (Optional) The token mint used for payment. Defaults to USDC.
21
- * - `referrer`: (Optional) The address of the referrer.
22
- * @returns A promise which resolves to an array of instructions required for domain registration.
23
- */
24
- export declare const registerDomain: ({ rpc, domain, space, buyer, buyerTokenAccount, mint, referrer, }: RegisterDomainParams) => Promise<Instruction[]>;
25
- export {};
@@ -1,21 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- interface RegisterWithNftParams {
3
- domain: string;
4
- space: number;
5
- buyer: Address;
6
- nftSource: Address;
7
- nftMint: Address;
8
- }
9
- /**
10
- * Registers a .sol domain using a Bonfida Wolves NFT.
11
- *
12
- * @param params - An object containing the following properties:
13
- * - `domain`: The domain name to be registered.
14
- * - `space`: The space in bytes to be allocated for the domain registry.
15
- * - `buyer`: The address of the buyer registering the domain.
16
- * - `nftSource`: The address of the NFT source account.
17
- * - `nftMint`: The mint address of the NFT used for registration.
18
- * @returns A promise which resolves to the register with NFT instruction.
19
- */
20
- export declare const registerWithNft: ({ domain, space, buyer, nftSource, nftMint, }: RegisterWithNftParams) => Promise<Instruction>;
21
- export {};
@@ -1,16 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc } from "@solana/kit";
2
- export interface SetPrimaryDomainParams {
3
- rpc: Rpc<GetAccountInfoApi>;
4
- domainAddress: Address;
5
- owner: Address;
6
- }
7
- /**
8
- * Sets the primary domain for the specified owner.
9
- *
10
- * @param params - An object containing the following properties:
11
- * - `rpc`: An RPC interface implementing GetAccountInfoApi.
12
- * - `domainAddress`: The address of the domain to be set as primary.
13
- * - `owner`: The address of the domain owner.
14
- * @returns A promise which resolves to the set primary domain instruction.
15
- */
16
- export declare const setPrimaryDomain: ({ rpc, domainAddress, owner, }: SetPrimaryDomainParams) => Promise<Instruction>;
@@ -1,23 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc } from "@solana/kit";
2
- interface TransferDomainParams {
3
- rpc: Rpc<GetAccountInfoApi>;
4
- domain: string;
5
- newOwner: Address;
6
- classAddress?: Address;
7
- parentAddress?: Address;
8
- parentOwner?: Address;
9
- }
10
- /**
11
- * Transfers a domain to a new owner.
12
- *
13
- * @param params - An object containing the following properties:
14
- * - `rpc`: An RPC interface implementing GetAccountInfoApi.
15
- * - `domain`: The name of the domain to be transferred.
16
- * - `newOwner`: The address of the new owner of the domain.
17
- * - `classAddress`: (Optional) The address of the class associated with the domain.
18
- * - `parentAddress`: (Optional) The address of the parent domain.
19
- * - `parentOwner`: (Optional) The address of the parent domain owner.
20
- * @returns A promise that resolves to the transfer domain instruction.
21
- */
22
- export declare const transferDomain: ({ rpc, domain, newOwner, classAddress, parentAddress, parentOwner, }: TransferDomainParams) => Promise<Instruction>;
23
- export {};
@@ -1,25 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc } from "@solana/kit";
2
- interface TransferSubdomainParams {
3
- rpc: Rpc<GetAccountInfoApi>;
4
- subdomain: string;
5
- newOwner: Address;
6
- isParentOwnerSigner?: boolean;
7
- currentOwner?: Address;
8
- }
9
- /**
10
- * Transfers a subdomain to a new owner.
11
- *
12
- * @param params - An object containing the following properties:
13
- * - `rpc`: An RPC interface implementing GetAccountInfoApi.
14
- * - `subdomain`: The subdomain to transfer. This can include or omit the .sol suffix
15
- * (e.g., 'something.sns.sol' or 'something.sns').
16
- * - `newOwner`: The address of the new owner.
17
- * - `isParentOwnerSigner`: (Optional) Specifies if the parent domain owner is a signer
18
- * for this transaction.
19
- * - `currentOwner`: (Optional) The current owner of the subdomain. If not provided, it
20
- * will be resolved automatically. This is useful for building transactions when the subdomain
21
- * does not yet exist.
22
- * @returns A promise that resolves to the transfer subdomain instruction.
23
- */
24
- export declare const transferSubdomain: ({ rpc, subdomain, newOwner, isParentOwnerSigner, currentOwner, }: TransferSubdomainParams) => Promise<Instruction>;
25
- export {};
@@ -1,22 +0,0 @@
1
- import { Address, GetAccountInfoApi, Instruction, Rpc } from "@solana/kit";
2
- export interface UpdateNameRegistryParams {
3
- rpc: Rpc<GetAccountInfoApi>;
4
- domain: string;
5
- offset: number;
6
- data: Uint8Array;
7
- classAddress?: Address;
8
- parentAddress?: Address;
9
- }
10
- /**
11
- * Update the data of the given name registry.
12
- *
13
- * @param params - An object containing the following properties:
14
- * - `rpc`: An RPC interface implementing GetAccountInfoApi.
15
- * - `domain`: The name of the domain whose registry will be updated.
16
- * - `offset`: The offset in bytes where the update should begin.
17
- * - `data`: The data to be written to the registry.
18
- * - `classAddress`: (Optional) The address of the class associated with the registry.
19
- * - `parentAddress`: (Optional) The address of the parent registry.
20
- * @returns A promise that resolves to the update name registry instruction.
21
- */
22
- export declare function updateNameRegistry({ rpc, domain, offset, data, classAddress, parentAddress, }: UpdateNameRegistryParams): Promise<Instruction>;
@@ -1,22 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- interface UpdateRecordParams {
4
- domain: string;
5
- record: Record;
6
- content: string;
7
- owner: Address;
8
- payer: Address;
9
- }
10
- /**
11
- * Updates an existing record under the specified domain.
12
- *
13
- * @param params - An object containing the following properties:
14
- * - `domain`: The domain under which the record resides.
15
- * - `record`: An enumeration representing the type of record to be updated.
16
- * - `content`: The updated content to be associated with the record.
17
- * - `owner`: The address of the domain's owner.
18
- * - `payer`: The address funding the record update.
19
- * @returns A promise that resolves to the update record instruction.
20
- */
21
- export declare const updateRecord: ({ domain, record, content, owner, payer, }: UpdateRecordParams) => Promise<Instruction>;
22
- export {};
@@ -1,24 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- interface ValidateRoaParams {
4
- staleness: boolean;
5
- domain: string;
6
- record: Record;
7
- owner: Address;
8
- payer: Address;
9
- verifier: Address;
10
- }
11
- /**
12
- * Validates the right of association of a record.
13
- *
14
- * @param params - An object containing the following properties:
15
- * - `staleness`: Indicates whether the record validation is stale.
16
- * - `domain`: The domain under which the record resides.
17
- * - `record`: An enumeration representing the type of record to validate.
18
- * - `owner`: The address of the domain's owner.
19
- * - `payer`: The address funding the validation process.
20
- * - `verifier`: The address responsible for verifying the record.
21
- * @returns A promise that resolves to the validate ROA instruction.
22
- */
23
- export declare const validateRoa: ({ staleness, domain, record, owner, payer, verifier, }: ValidateRoaParams) => Promise<Instruction>;
24
- export {};
@@ -1,24 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- interface ValidateRoaEthereumParams {
4
- domain: string;
5
- record: Record;
6
- owner: Address;
7
- payer: Address;
8
- signature: Uint8Array;
9
- expectedPubkey: Uint8Array;
10
- }
11
- /**
12
- * Validates the right of association of a record using an Ethereum signature.
13
- *
14
- * @param params - An object containing the following properties:
15
- * - `domain`: The domain under which the record resides.
16
- * - `record`: An enumeration representing the type of record to validate.
17
- * - `owner`: The address of the domain's owner.
18
- * - `payer`: The address funding the validation process.
19
- * - `signature`: The signature used for validation.
20
- * - `expectedPubkey`: The expected public key associated with the validation.
21
- * @returns A promise that resolves to the validate ROA Ethereum instruction.
22
- */
23
- export declare const validateRoaEthereum: ({ domain, record, owner, payer, signature, expectedPubkey, }: ValidateRoaEthereumParams) => Promise<Instruction>;
24
- export {};
@@ -1,22 +0,0 @@
1
- import { Address, Instruction } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- interface WriteRoaParams {
4
- domain: string;
5
- record: Record;
6
- owner: Address;
7
- payer: Address;
8
- roaId: Address;
9
- }
10
- /**
11
- * Writes a ROA (Right of association) in a record.
12
- *
13
- * @param params - An object containing the following properties:
14
- * - `domain`: The domain under which the record will be written.
15
- * - `record`: An enumeration representing the type of record to be written.
16
- * - `owner`: The address of the domain's owner.
17
- * - `payer`: The address funding the operation.
18
- * - `roaId`: The identifier for the ROA.
19
- * @returns A promise that resolves to the write ROA instruction.
20
- */
21
- export declare const writeRoa: ({ domain, record, owner, payer, roaId, }: WriteRoaParams) => Promise<Instruction>;
22
- export {};
@@ -1,53 +0,0 @@
1
- import { Address } from "@solana/addresses";
2
- export declare const SYSTEM_PROGRAM_ADDRESS: Address;
3
- export declare const SYSVAR_RENT_ADDRESS: Address;
4
- export declare const DEFAULT_ADDRESS: Address;
5
- /** Address of the SPL Token program */
6
- export declare const TOKEN_PROGRAM_ADDRESS: Address;
7
- /**
8
- * The Solana Name Service program address
9
- */
10
- export declare const NAME_PROGRAM_ADDRESS: Address;
11
- /**
12
- * The `.sol` TLD
13
- */
14
- export declare const ROOT_DOMAIN_ADDRESS: Address;
15
- /**
16
- * The SNS Registry program address
17
- */
18
- export declare const REGISTRY_PROGRAM_ADDRESS: Address;
19
- /**
20
- * The SNS Name Tokenizer program address
21
- */
22
- export declare const NAME_TOKENIZER_ADDRESS: Address;
23
- /**
24
- * The SNS Offers program address
25
- */
26
- export declare const NAME_OFFERS_ADDRESS: Address;
27
- /**
28
- * The SNS Records program address (SNS_RECORDS_ID)
29
- */
30
- export declare const RECORDS_PROGRAM_ADDRESS: Address;
31
- /**
32
- * The reverse look up class
33
- */
34
- export declare const REVERSE_LOOKUP_CLASS: Address;
35
- export declare const CENTRAL_STATE: Address;
36
- /**
37
- * The central state for domain records (CENTRAL_STATE_SNS_RECORDS)
38
- */
39
- export declare const CENTRAL_STATE_DOMAIN_RECORDS: Address;
40
- /**
41
- * The `.twitter` TLD authority
42
- */
43
- export declare const TWITTER_VERIFICATION_AUTHORITY: Address;
44
- /**
45
- * The `.twitter` TLD
46
- */
47
- export declare const TWITTER_ROOT_PARENT_REGISTRY_ADDRESS: Address;
48
- export declare const VAULT_OWNER: Address;
49
- export declare const USDC_MINT: Address;
50
- export declare const FIDA_MINT: Address;
51
- export declare const METAPLEX_PROGRAM_ADDRESS: Address;
52
- export declare const WOLVES_COLLECTION_METADATA: Address;
53
- export declare const REFERRERS: Address[];
@@ -1,3 +0,0 @@
1
- import { Address } from "@solana/kit";
2
- export declare const PYTH_PROGRAM_ID: Address;
3
- export declare const PYTH_FEEDS: Map<string, number[]>;
@@ -1,23 +0,0 @@
1
- import { Address } from "@solana/kit";
2
- import { Record } from "../types/record";
3
- /**
4
- * A map that associates each record type with a public key, known as guardians.
5
- */
6
- export declare const GUARDIANS: Map<Record, Address>;
7
- /**
8
- * Set of records that utilize secp256k1 for verification purposes
9
- */
10
- export declare const ETH_ROA_RECORDS: Set<Record>;
11
- /**
12
- * Set of records which correspond to eth addresses with the prefix 0x
13
- */
14
- export declare const EVM_RECORDS: Set<Record>;
15
- /**
16
- * Set of records that are UTF-8 encoded strings
17
- */
18
- export declare const UTF8_ENCODED_RECORDS: Set<Record>;
19
- /**
20
- * Set of records that are self signed i.e signed by the public key contained
21
- * in the record itself.
22
- */
23
- export declare const SELF_SIGNED_RECORDS: Set<Record>;
@@ -1,16 +0,0 @@
1
- import { GetProgramAccountsApi, Rpc } from "@solana/kit";
2
- interface GetAllDomainsParams {
3
- rpc: Rpc<GetProgramAccountsApi>;
4
- }
5
- /**
6
- * Retrieves the addresses of all .sol domains.
7
- *
8
- * @param params - An object containing the following properties:
9
- * - `rpc`: An RPC interface implementing GetProgramAccountsApi.
10
- * @returns A promise that resolves to an array of objects representing domain addresses and owners.
11
- */
12
- export declare const getAllDomains: ({ rpc }: GetAllDomainsParams) => Promise<{
13
- domainAddress: import("@solana/addresses").Address;
14
- owner: import("@solana/addresses").Address<string>;
15
- }[]>;
16
- export {};
@@ -1,30 +0,0 @@
1
- import { RecordVersion } from "../types/record";
2
- interface GetDomainAddressParams {
3
- domain: string;
4
- record?: RecordVersion;
5
- }
6
- /**
7
- * Derives the address of a domain, a subdomain, or a record.
8
- *
9
- * @param params - An object containing the following properties:
10
- * - `domain`: The (sub)domain to process, with or without the .sol suffix.
11
- * - `record`: (Optional) The record version. Only provide if the domain being resolved is a record.
12
- * @returns A promise that resolves to an object containing the derived address and additional metadata.
13
- */
14
- export declare const getDomainAddress: ({ domain, record, }: GetDomainAddressParams) => Promise<{
15
- domainAddress: import("@solana/addresses").Address;
16
- parentAddress: import("@solana/addresses").Address;
17
- isSub: boolean;
18
- isSubRecord?: undefined;
19
- } | {
20
- domainAddress: import("@solana/addresses").Address;
21
- parentAddress: import("@solana/addresses").Address;
22
- isSub: boolean;
23
- isSubRecord: boolean;
24
- } | {
25
- domainAddress: import("@solana/addresses").Address;
26
- isSub: boolean;
27
- parentAddress?: undefined;
28
- isSubRecord?: undefined;
29
- }>;
30
- export {};
@@ -1,16 +0,0 @@
1
- import { GetAccountInfoApi, GetTokenLargestAccountsApi, Rpc } from "@solana/kit";
2
- interface GetDomainOwnerParams {
3
- rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;
4
- domain: string;
5
- }
6
- /**
7
- * Retrieves the owner of the specified domain. If the domain is tokenized,
8
- * the NFT's owner is returned; otherwise, the registry owner is returned.
9
- *
10
- * @param params - An object containing the following properties:
11
- * - `rpc`: An RPC interface implementing GetAccountInfoApi and GetTokenLargestAccountsApi.
12
- * - `domain`: The domain whose owner is to be retrieved.
13
- * @returns A promise that resolves to the owner of the domain.
14
- */
15
- export declare const getDomainOwner: ({ rpc, domain }: GetDomainOwnerParams) => Promise<import("@solana/addresses").Address>;
16
- export {};
@@ -1,35 +0,0 @@
1
- import { GetAccountInfoApi, GetMultipleAccountsApi, GetTokenLargestAccountsApi, ReadonlyUint8Array, Rpc } from "@solana/kit";
2
- import { RecordState } from "../states/record";
3
- import { Record } from "../types/record";
4
- interface GetDomainRecordParams {
5
- rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi>;
6
- domain: string;
7
- record: Record;
8
- options?: {
9
- deserialize?: boolean;
10
- verifier?: ReadonlyUint8Array;
11
- };
12
- }
13
- interface Result {
14
- record: Record;
15
- retrievedRecord: RecordState;
16
- verified: {
17
- staleness: boolean;
18
- roa?: boolean;
19
- };
20
- deserializedContent?: string;
21
- }
22
- /**
23
- * Retrieves a specific record under a domain, verifies its state, and optionally deserializes its content.
24
- *
25
- * @param params - An object containing the following properties:
26
- * - `rpc`: An RPC interface implementing GetAccountInfoApi, GetMultipleAccountsApi, and GetTokenLargestAccountsApi.
27
- * - `domain`: The domain whose record is to be retrieved.
28
- * - `record`: The type of record to retrieve.
29
- * - `options`: (Optional) Additional options for processing:
30
- * - `deserialize`: Whether to deserialize the record content.
31
- * - `verifier`: A custom verifier for the record.
32
- * @returns A promise that resolves to the retrieved record, its verification status, and optionally its deserialized content.
33
- */
34
- export declare function getDomainRecord({ rpc, domain, record, options, }: GetDomainRecordParams): Promise<Result>;
35
- export {};
@@ -1,39 +0,0 @@
1
- import { GetAccountInfoApi, GetMultipleAccountsApi, GetTokenLargestAccountsApi, ReadonlyUint8Array, Rpc } from "@solana/kit";
2
- import { RecordState } from "../states/record";
3
- import { Record } from "../types/record";
4
- interface GetDomainRecordsParams<T extends Record[], U extends {
5
- [K in keyof T]: ReadonlyUint8Array | undefined;
6
- }> {
7
- rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi>;
8
- domain: string;
9
- records: [...T];
10
- options?: {
11
- deserialize?: boolean;
12
- verifiers?: [...U];
13
- };
14
- }
15
- interface Result {
16
- record: Record;
17
- retrievedRecord: RecordState;
18
- verified: {
19
- staleness: boolean;
20
- roa?: boolean;
21
- };
22
- deserializedContent?: string;
23
- }
24
- /**
25
- * Retrieves multiple records under a domain, verifies their state, and optionally deserializes their content.
26
- *
27
- * @param params - An object containing the following properties:
28
- * - `rpc`: An RPC interface implementing GetAccountInfoApi, GetMultipleAccountsApi, and GetTokenLargestAccountsApi.
29
- * - `domain`: The domain whose records are to be retrieved.
30
- * - `records`: An array of record types to retrieve.
31
- * - `options`: (Optional) Additional options for processing:
32
- * - `deserialize`: Whether to deserialize the record content.
33
- * - `verifiers`: An array of custom verifiers for the records.
34
- * @returns A promise that resolves to an array of results for the retrieved records, including their verification status and optionally their deserialized content.
35
- */
36
- export declare function getDomainRecords<T extends Record[], U extends {
37
- [K in keyof T]: ReadonlyUint8Array | undefined;
38
- }>({ rpc, domain, records, options, }: GetDomainRecordsParams<T, U>): Promise<(Result | undefined)[]>;
39
- export {};
@@ -1,19 +0,0 @@
1
- import { Address, GetProgramAccountsApi, Rpc } from "@solana/kit";
2
- interface GetSubdomainsParams {
3
- rpc: Rpc<GetProgramAccountsApi>;
4
- domain: string;
5
- }
6
- interface Result {
7
- subdomain: string;
8
- owner: Address;
9
- }
10
- /**
11
- * Retrieves all subdomains under the specified domain, including their owners.
12
- *
13
- * @param params - An object containing the following properties:
14
- * - `rpc`: An RPC interface implementing GetProgramAccountsApi.
15
- * - `domain`: The domain whose subdomains are to be retrieved.
16
- * @returns A promise that resolves to an array of subdomain objects, each containing the subdomain name and owner address.
17
- */
18
- export declare const getSubdomains: ({ rpc, domain, }: GetSubdomainsParams) => Promise<Result[]>;
19
- export {};
@@ -1,26 +0,0 @@
1
- import { Address, GetAccountInfoApi, GetMultipleAccountsApi, GetTokenLargestAccountsApi, Rpc } from "@solana/kit";
2
- interface ResolveDomainParams {
3
- rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi>;
4
- domain: string;
5
- options?: ResolveOptions;
6
- }
7
- export type AllowPda = "any" | boolean;
8
- type ResolveOptions = AllowPda extends true ? {
9
- allowPda: true;
10
- programIds: Address[];
11
- } : {
12
- allowPda: AllowPda;
13
- programIds?: Address[];
14
- };
15
- /**
16
- * Resolves domain according to SNS-IP 5.
17
- *
18
- * @param params - An object containing the following properties:
19
- * - `rpc`: An RPC interface implementing GetAccountInfoApi, GetMultipleAccountsApi, and GetTokenLargestAccountsApi.
20
- * - `domain`: The domain to resolve.
21
- * - `config`: (Optional) Configuration for resolving the domain, including whether to allow PDA owners
22
- * and permissible program IDs.
23
- * @returns A promise that resolves to the target address.
24
- */
25
- export declare const resolveDomain: ({ rpc, domain, options, }: ResolveDomainParams) => Promise<Address>;
26
- export {};