@solana-name-service/sns-sdk-kit 0.9.0-beta → 0.9.1-beta

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 (286) hide show
  1. package/README.md +11 -6
  2. package/dist/cjs/address/getDomainsForAddress.cjs +1 -1
  3. package/dist/cjs/address/getDomainsForAddress.cjs.map +1 -1
  4. package/dist/cjs/address/getNftsForAddress.cjs +1 -1
  5. package/dist/cjs/address/getNftsForAddress.cjs.map +1 -1
  6. package/dist/cjs/address/getPrimaryDomain.cjs +1 -1
  7. package/dist/cjs/address/getPrimaryDomain.cjs.map +1 -1
  8. package/dist/cjs/address/getPrimaryDomainsBatch.cjs +1 -1
  9. package/dist/cjs/address/getPrimaryDomainsBatch.cjs.map +1 -1
  10. package/dist/cjs/address/index.cjs +2 -0
  11. package/dist/cjs/address/index.cjs.map +1 -0
  12. package/dist/cjs/bindings/burnDomain.cjs +1 -1
  13. package/dist/cjs/bindings/burnDomain.cjs.map +1 -1
  14. package/dist/cjs/bindings/createNameRegistry.cjs +1 -1
  15. package/dist/cjs/bindings/createNameRegistry.cjs.map +1 -1
  16. package/dist/cjs/bindings/createRecord.cjs +1 -1
  17. package/dist/cjs/bindings/createRecord.cjs.map +1 -1
  18. package/dist/cjs/bindings/createReverse.cjs +1 -1
  19. package/dist/cjs/bindings/createReverse.cjs.map +1 -1
  20. package/dist/cjs/bindings/createSubdomain.cjs +1 -1
  21. package/dist/cjs/bindings/createSubdomain.cjs.map +1 -1
  22. package/dist/cjs/bindings/deleteNameRegistry.cjs +1 -1
  23. package/dist/cjs/bindings/deleteNameRegistry.cjs.map +1 -1
  24. package/dist/cjs/bindings/deleteRecord.cjs +1 -1
  25. package/dist/cjs/bindings/deleteRecord.cjs.map +1 -1
  26. package/dist/cjs/bindings/index.cjs +2 -0
  27. package/dist/cjs/bindings/index.cjs.map +1 -0
  28. package/dist/cjs/bindings/registerDomain.cjs +1 -1
  29. package/dist/cjs/bindings/registerDomain.cjs.map +1 -1
  30. package/dist/cjs/bindings/registerWithNft.cjs +1 -1
  31. package/dist/cjs/bindings/registerWithNft.cjs.map +1 -1
  32. package/dist/cjs/bindings/setPrimaryDomain.cjs +1 -1
  33. package/dist/cjs/bindings/setPrimaryDomain.cjs.map +1 -1
  34. package/dist/cjs/bindings/transferDomain.cjs +1 -1
  35. package/dist/cjs/bindings/transferDomain.cjs.map +1 -1
  36. package/dist/cjs/bindings/transferSubdomain.cjs +1 -1
  37. package/dist/cjs/bindings/transferSubdomain.cjs.map +1 -1
  38. package/dist/cjs/bindings/updateNameRegistry.cjs +1 -1
  39. package/dist/cjs/bindings/updateNameRegistry.cjs.map +1 -1
  40. package/dist/cjs/bindings/updateRecord.cjs +1 -1
  41. package/dist/cjs/bindings/updateRecord.cjs.map +1 -1
  42. package/dist/cjs/bindings/validateRoa.cjs +1 -1
  43. package/dist/cjs/bindings/validateRoa.cjs.map +1 -1
  44. package/dist/cjs/bindings/validateRoaEthereum.cjs +1 -1
  45. package/dist/cjs/bindings/validateRoaEthereum.cjs.map +1 -1
  46. package/dist/cjs/bindings/writeRoa.cjs +1 -1
  47. package/dist/cjs/bindings/writeRoa.cjs.map +1 -1
  48. package/dist/cjs/constants/index.cjs +2 -0
  49. package/dist/cjs/constants/index.cjs.map +1 -0
  50. package/dist/cjs/domain/getAllDomains.cjs +1 -1
  51. package/dist/cjs/domain/getAllDomains.cjs.map +1 -1
  52. package/dist/cjs/domain/getDomainAddress.cjs +1 -1
  53. package/dist/cjs/domain/getDomainAddress.cjs.map +1 -1
  54. package/dist/cjs/domain/getDomainOwner.cjs +1 -1
  55. package/dist/cjs/domain/getDomainOwner.cjs.map +1 -1
  56. package/dist/cjs/domain/getDomainRecord.cjs +1 -1
  57. package/dist/cjs/domain/getDomainRecord.cjs.map +1 -1
  58. package/dist/cjs/domain/getDomainRecords.cjs +1 -1
  59. package/dist/cjs/domain/getDomainRecords.cjs.map +1 -1
  60. package/dist/cjs/domain/getSubdomains.cjs +1 -1
  61. package/dist/cjs/domain/getSubdomains.cjs.map +1 -1
  62. package/dist/cjs/domain/index.cjs +2 -0
  63. package/dist/cjs/domain/index.cjs.map +1 -0
  64. package/dist/cjs/domain/resolveDomain.cjs +1 -1
  65. package/dist/cjs/domain/resolveDomain.cjs.map +1 -1
  66. package/dist/cjs/index.cjs +1 -1
  67. package/dist/cjs/instructions/{allocateAndPostRecordInstructio.cjs → allocateAndPostRecordInstruction.cjs} +1 -1
  68. package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs.map +1 -0
  69. package/dist/cjs/instructions/index.cjs +2 -0
  70. package/dist/cjs/instructions/index.cjs.map +1 -0
  71. package/dist/cjs/nft/getNftMint.cjs +1 -1
  72. package/dist/cjs/nft/getNftMint.cjs.map +1 -1
  73. package/dist/cjs/nft/getNftOwner.cjs +1 -1
  74. package/dist/cjs/nft/getNftOwner.cjs.map +1 -1
  75. package/dist/cjs/nft/index.cjs +2 -0
  76. package/dist/cjs/nft/index.cjs.map +1 -0
  77. package/dist/cjs/record/getRecordV1Address.cjs +1 -1
  78. package/dist/cjs/record/getRecordV1Address.cjs.map +1 -1
  79. package/dist/cjs/record/getRecordV2Address.cjs +1 -1
  80. package/dist/cjs/record/getRecordV2Address.cjs.map +1 -1
  81. package/dist/cjs/record/index.cjs +2 -0
  82. package/dist/cjs/record/index.cjs.map +1 -0
  83. package/dist/cjs/record/verifyRecordRightOfAssociation.cjs +1 -1
  84. package/dist/cjs/record/verifyRecordRightOfAssociation.cjs.map +1 -1
  85. package/dist/cjs/record/verifyRecordStaleness.cjs +1 -1
  86. package/dist/cjs/record/verifyRecordStaleness.cjs.map +1 -1
  87. package/dist/cjs/states/index.cjs +2 -0
  88. package/dist/cjs/states/index.cjs.map +1 -0
  89. package/dist/cjs/states/nft.cjs +1 -1
  90. package/dist/cjs/states/nft.cjs.map +1 -1
  91. package/dist/cjs/states/record.cjs +1 -1
  92. package/dist/cjs/states/record.cjs.map +1 -1
  93. package/dist/cjs/states/registry.cjs +1 -1
  94. package/dist/cjs/states/registry.cjs.map +1 -1
  95. package/dist/cjs/types/index.cjs +2 -0
  96. package/dist/cjs/types/index.cjs.map +1 -0
  97. package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs +1 -1
  98. package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs.map +1 -1
  99. package/dist/cjs/utils/deserializers/deserializeReverse.cjs +1 -1
  100. package/dist/cjs/utils/deserializers/deserializeReverse.cjs.map +1 -1
  101. package/dist/cjs/utils/getPythFeedAddress.cjs +1 -1
  102. package/dist/cjs/utils/getPythFeedAddress.cjs.map +1 -1
  103. package/dist/cjs/utils/getReverseAddress.cjs +1 -1
  104. package/dist/cjs/utils/getReverseAddress.cjs.map +1 -1
  105. package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs +1 -1
  106. package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs.map +1 -1
  107. package/dist/cjs/utils/index.cjs +2 -0
  108. package/dist/cjs/utils/index.cjs.map +1 -0
  109. package/dist/cjs/utils/reverseLookup.cjs +1 -1
  110. package/dist/cjs/utils/reverseLookup.cjs.map +1 -1
  111. package/dist/cjs/utils/reverseLookupBatch.cjs +1 -1
  112. package/dist/cjs/utils/reverseLookupBatch.cjs.map +1 -1
  113. package/dist/cjs/utils/serializers/serializeRecordContent.cjs +1 -1
  114. package/dist/cjs/utils/serializers/serializeRecordContent.cjs.map +1 -1
  115. package/dist/esm/address/getDomainsForAddress.mjs +1 -1
  116. package/dist/esm/address/getDomainsForAddress.mjs.map +1 -1
  117. package/dist/esm/address/getNftsForAddress.mjs +1 -1
  118. package/dist/esm/address/getNftsForAddress.mjs.map +1 -1
  119. package/dist/esm/address/getPrimaryDomain.mjs +1 -1
  120. package/dist/esm/address/getPrimaryDomain.mjs.map +1 -1
  121. package/dist/esm/address/getPrimaryDomainsBatch.mjs +1 -1
  122. package/dist/esm/address/getPrimaryDomainsBatch.mjs.map +1 -1
  123. package/dist/esm/address/index.mjs +2 -0
  124. package/dist/esm/address/index.mjs.map +1 -0
  125. package/dist/esm/bindings/burnDomain.mjs +1 -1
  126. package/dist/esm/bindings/burnDomain.mjs.map +1 -1
  127. package/dist/esm/bindings/createNameRegistry.mjs +1 -1
  128. package/dist/esm/bindings/createNameRegistry.mjs.map +1 -1
  129. package/dist/esm/bindings/createRecord.mjs +1 -1
  130. package/dist/esm/bindings/createRecord.mjs.map +1 -1
  131. package/dist/esm/bindings/createReverse.mjs +1 -1
  132. package/dist/esm/bindings/createReverse.mjs.map +1 -1
  133. package/dist/esm/bindings/createSubdomain.mjs +1 -1
  134. package/dist/esm/bindings/createSubdomain.mjs.map +1 -1
  135. package/dist/esm/bindings/deleteNameRegistry.mjs +1 -1
  136. package/dist/esm/bindings/deleteNameRegistry.mjs.map +1 -1
  137. package/dist/esm/bindings/deleteRecord.mjs +1 -1
  138. package/dist/esm/bindings/deleteRecord.mjs.map +1 -1
  139. package/dist/esm/bindings/index.mjs +2 -0
  140. package/dist/esm/bindings/index.mjs.map +1 -0
  141. package/dist/esm/bindings/registerDomain.mjs +1 -1
  142. package/dist/esm/bindings/registerDomain.mjs.map +1 -1
  143. package/dist/esm/bindings/registerWithNft.mjs +1 -1
  144. package/dist/esm/bindings/registerWithNft.mjs.map +1 -1
  145. package/dist/esm/bindings/setPrimaryDomain.mjs +1 -1
  146. package/dist/esm/bindings/setPrimaryDomain.mjs.map +1 -1
  147. package/dist/esm/bindings/transferDomain.mjs +1 -1
  148. package/dist/esm/bindings/transferDomain.mjs.map +1 -1
  149. package/dist/esm/bindings/transferSubdomain.mjs +1 -1
  150. package/dist/esm/bindings/transferSubdomain.mjs.map +1 -1
  151. package/dist/esm/bindings/updateNameRegistry.mjs +1 -1
  152. package/dist/esm/bindings/updateNameRegistry.mjs.map +1 -1
  153. package/dist/esm/bindings/updateRecord.mjs +1 -1
  154. package/dist/esm/bindings/updateRecord.mjs.map +1 -1
  155. package/dist/esm/bindings/validateRoa.mjs +1 -1
  156. package/dist/esm/bindings/validateRoa.mjs.map +1 -1
  157. package/dist/esm/bindings/validateRoaEthereum.mjs +1 -1
  158. package/dist/esm/bindings/validateRoaEthereum.mjs.map +1 -1
  159. package/dist/esm/bindings/writeRoa.mjs +1 -1
  160. package/dist/esm/bindings/writeRoa.mjs.map +1 -1
  161. package/dist/esm/constants/index.mjs +2 -0
  162. package/dist/esm/constants/index.mjs.map +1 -0
  163. package/dist/esm/domain/getAllDomains.mjs +1 -1
  164. package/dist/esm/domain/getAllDomains.mjs.map +1 -1
  165. package/dist/esm/domain/getDomainAddress.mjs +1 -1
  166. package/dist/esm/domain/getDomainAddress.mjs.map +1 -1
  167. package/dist/esm/domain/getDomainOwner.mjs +1 -1
  168. package/dist/esm/domain/getDomainOwner.mjs.map +1 -1
  169. package/dist/esm/domain/getDomainRecord.mjs +1 -1
  170. package/dist/esm/domain/getDomainRecord.mjs.map +1 -1
  171. package/dist/esm/domain/getDomainRecords.mjs +1 -1
  172. package/dist/esm/domain/getDomainRecords.mjs.map +1 -1
  173. package/dist/esm/domain/getSubdomains.mjs +1 -1
  174. package/dist/esm/domain/getSubdomains.mjs.map +1 -1
  175. package/dist/esm/domain/index.mjs +2 -0
  176. package/dist/esm/domain/index.mjs.map +1 -0
  177. package/dist/esm/domain/resolveDomain.mjs +1 -1
  178. package/dist/esm/domain/resolveDomain.mjs.map +1 -1
  179. package/dist/esm/index.mjs +1 -1
  180. package/dist/esm/instructions/{allocateAndPostRecordInstructio.mjs → allocateAndPostRecordInstruction.mjs} +1 -1
  181. package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs.map +1 -0
  182. package/dist/esm/instructions/index.mjs +2 -0
  183. package/dist/esm/instructions/index.mjs.map +1 -0
  184. package/dist/esm/nft/getNftMint.mjs +1 -1
  185. package/dist/esm/nft/getNftMint.mjs.map +1 -1
  186. package/dist/esm/nft/getNftOwner.mjs +1 -1
  187. package/dist/esm/nft/getNftOwner.mjs.map +1 -1
  188. package/dist/esm/nft/index.mjs +2 -0
  189. package/dist/esm/nft/index.mjs.map +1 -0
  190. package/dist/esm/record/getRecordV1Address.mjs +1 -1
  191. package/dist/esm/record/getRecordV1Address.mjs.map +1 -1
  192. package/dist/esm/record/getRecordV2Address.mjs +1 -1
  193. package/dist/esm/record/getRecordV2Address.mjs.map +1 -1
  194. package/dist/esm/record/index.mjs +2 -0
  195. package/dist/esm/record/index.mjs.map +1 -0
  196. package/dist/esm/record/verifyRecordRightOfAssociation.mjs +1 -1
  197. package/dist/esm/record/verifyRecordRightOfAssociation.mjs.map +1 -1
  198. package/dist/esm/record/verifyRecordStaleness.mjs +1 -1
  199. package/dist/esm/record/verifyRecordStaleness.mjs.map +1 -1
  200. package/dist/esm/states/index.mjs +2 -0
  201. package/dist/esm/states/index.mjs.map +1 -0
  202. package/dist/esm/states/nft.mjs +1 -1
  203. package/dist/esm/states/nft.mjs.map +1 -1
  204. package/dist/esm/states/record.mjs +1 -1
  205. package/dist/esm/states/record.mjs.map +1 -1
  206. package/dist/esm/states/registry.mjs +1 -1
  207. package/dist/esm/states/registry.mjs.map +1 -1
  208. package/dist/esm/types/index.mjs +2 -0
  209. package/dist/esm/types/index.mjs.map +1 -0
  210. package/dist/esm/utils/deserializers/deserializeRecordContent.mjs +1 -1
  211. package/dist/esm/utils/deserializers/deserializeRecordContent.mjs.map +1 -1
  212. package/dist/esm/utils/deserializers/deserializeReverse.mjs +1 -1
  213. package/dist/esm/utils/deserializers/deserializeReverse.mjs.map +1 -1
  214. package/dist/esm/utils/getPythFeedAddress.mjs +1 -1
  215. package/dist/esm/utils/getPythFeedAddress.mjs.map +1 -1
  216. package/dist/esm/utils/getReverseAddress.mjs +1 -1
  217. package/dist/esm/utils/getReverseAddress.mjs.map +1 -1
  218. package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs +1 -1
  219. package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs.map +1 -1
  220. package/dist/esm/utils/index.mjs +2 -0
  221. package/dist/esm/utils/index.mjs.map +1 -0
  222. package/dist/esm/utils/reverseLookup.mjs +1 -1
  223. package/dist/esm/utils/reverseLookup.mjs.map +1 -1
  224. package/dist/esm/utils/reverseLookupBatch.mjs +1 -1
  225. package/dist/esm/utils/reverseLookupBatch.mjs.map +1 -1
  226. package/dist/esm/utils/serializers/serializeRecordContent.mjs +1 -1
  227. package/dist/esm/utils/serializers/serializeRecordContent.mjs.map +1 -1
  228. package/dist/types/address/getDomainsForAddress.d.ts +8 -3
  229. package/dist/types/address/getNftsForAddress.d.ts +8 -3
  230. package/dist/types/address/getPrimaryDomain.d.ts +12 -6
  231. package/dist/types/address/getPrimaryDomainsBatch.d.ts +10 -4
  232. package/dist/types/address/index.d.ts +4 -0
  233. package/dist/types/bindings/burnDomain.d.ts +12 -5
  234. package/dist/types/bindings/createNameRegistry.d.ts +22 -10
  235. package/dist/types/bindings/createRecord.d.ts +16 -7
  236. package/dist/types/bindings/createReverse.d.ts +16 -7
  237. package/dist/types/bindings/createSubdomain.d.ts +15 -6
  238. package/dist/types/bindings/deleteNameRegistry.d.ts +15 -6
  239. package/dist/types/bindings/deleteRecord.d.ts +14 -6
  240. package/dist/types/bindings/index.d.ts +17 -0
  241. package/dist/types/bindings/registerDomain.d.ts +19 -8
  242. package/dist/types/bindings/registerWithNft.d.ts +16 -7
  243. package/dist/types/bindings/setPrimaryDomain.d.ts +11 -5
  244. package/dist/types/bindings/transferDomain.d.ts +17 -7
  245. package/dist/types/bindings/transferSubdomain.d.ts +19 -10
  246. package/dist/types/bindings/updateNameRegistry.d.ts +16 -7
  247. package/dist/types/bindings/updateRecord.d.ts +16 -7
  248. package/dist/types/bindings/validateRoa.d.ts +18 -8
  249. package/dist/types/bindings/validateRoaEthereum.d.ts +18 -8
  250. package/dist/types/bindings/writeRoa.d.ts +16 -7
  251. package/dist/types/constants/index.d.ts +3 -0
  252. package/dist/types/domain/getAllDomains.d.ts +8 -3
  253. package/dist/types/domain/getDomainAddress.d.ts +13 -6
  254. package/dist/types/domain/getDomainOwner.d.ts +9 -3
  255. package/dist/types/domain/getDomainRecord.d.ts +17 -10
  256. package/dist/types/domain/getDomainRecords.d.ts +19 -10
  257. package/dist/types/domain/getSubdomains.d.ts +8 -3
  258. package/dist/types/domain/index.d.ts +7 -0
  259. package/dist/types/domain/resolveDomain.d.ts +13 -7
  260. package/dist/types/index.d.ts +1 -1
  261. package/dist/types/instructions/index.d.ts +19 -0
  262. package/dist/types/nft/getNftMint.d.ts +7 -2
  263. package/dist/types/nft/getNftOwner.d.ts +10 -4
  264. package/dist/types/nft/index.d.ts +2 -0
  265. package/dist/types/record/getRecordV1Address.d.ts +9 -3
  266. package/dist/types/record/getRecordV2Address.d.ts +9 -3
  267. package/dist/types/record/index.d.ts +4 -0
  268. package/dist/types/record/verifyRecordRightOfAssociation.d.ts +11 -4
  269. package/dist/types/record/verifyRecordStaleness.d.ts +16 -6
  270. package/dist/types/states/index.d.ts +4 -0
  271. package/dist/types/states/nft.d.ts +1 -1
  272. package/dist/types/states/record.d.ts +1 -1
  273. package/dist/types/states/registry.d.ts +1 -1
  274. package/dist/types/types/index.d.ts +2 -0
  275. package/dist/types/utils/deserializers/deserializeRecordContent.d.ts +13 -6
  276. package/dist/types/utils/deserializers/deserializeReverse.d.ts +13 -7
  277. package/dist/types/utils/getPythFeedAddress.d.ts +14 -1
  278. package/dist/types/utils/getReverseAddressFromDomainAddress.d.ts +11 -5
  279. package/dist/types/utils/index.d.ts +10 -0
  280. package/dist/types/utils/reverseLookup.d.ts +13 -6
  281. package/dist/types/utils/reverseLookupBatch.d.ts +11 -4
  282. package/dist/types/utils/serializers/serializeRecordContent.d.ts +14 -1
  283. package/package.json +74 -4
  284. package/dist/cjs/instructions/allocateAndPostRecordInstructio.cjs.map +0 -1
  285. package/dist/esm/instructions/allocateAndPostRecordInstructio.mjs.map +0 -1
  286. /package/dist/types/instructions/{allocateAndPostRecordInstructio.d.ts → allocateAndPostRecordInstruction.d.ts} +0 -0
@@ -1,16 +1,28 @@
1
1
  import { Address, GetAccountInfoApi, GetMinimumBalanceForRentExemptionApi, IInstruction, 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
+ }
2
12
  /**
3
13
  * Creates a name registry with the given rent budget, allocated space, owner, and class.
4
14
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi and GetMinimumBalanceForRentExemptionApi.
6
- * @param name - The name of the new account.
7
- * @param space - The space in bytes allocated to the account.
8
- * @param payer - The allocation cost payer.
9
- * @param owner - The address to be set as the owner of the new name account.
10
- * @param lamports - (Optional) The budget to be set for the name account. If not specified,
11
- * it'll be the minimum for rent exemption.
12
- * @param classAddress - (Optional) The address of the class associated with the registry.
13
- * @param parentAddress - (Optional) The address of the parent registry.
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.
14
25
  * @returns A promise which resolves to the create name registry instruction.
15
26
  */
16
- export declare const createNameRegistry: (rpc: Rpc<GetAccountInfoApi & GetMinimumBalanceForRentExemptionApi>, name: string, space: number, payer: Address, owner: Address, lamports?: bigint, classAddress?: Address, parentAddress?: Address) => Promise<IInstruction>;
27
+ export declare const createNameRegistry: ({ rpc, name, space, payer, owner, lamports, classAddress, parentAddress, }: CreateNameRegistryParams) => Promise<IInstruction>;
28
+ export {};
@@ -1,14 +1,23 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
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
+ }
3
10
  /**
4
11
  * Creates a record for the specified domain. The record data will be serialized
5
12
  * in compliance with the SNS-IP 1 guidelines.
6
13
  *
7
- * @param domain - The domain under which the record will be created.
8
- * @param record - A record enum representing the type of record to be created.
9
- * @param content - The record content.
10
- * @param owner - The address of the domain's owner.
11
- * @param payer - The address funding the record creation.
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.
12
20
  * @returns A promise which resolves to the create record instruction.
13
21
  */
14
- export declare const createRecord: (domain: string, record: Record, content: string, owner: Address, payer: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
22
+ export declare const createRecord: ({ domain, record, content, owner, payer, }: CreateRecordParams) => Promise<IInstruction>;
23
+ export {};
@@ -1,12 +1,21 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
+ interface CreateReverseParams {
3
+ domainAddress: Address;
4
+ domain: string;
5
+ payer: Address;
6
+ parentAddress?: Address;
7
+ parentOwner?: Address;
8
+ }
2
9
  /**
3
10
  * Creates a reverse lookup record for the specified domain.
4
11
  *
5
- * @param domainAddress - The address of the domain for which the reverse lookup record is created.
6
- * @param domain - The domain name to be associated with the reverse lookup record.
7
- * @param payer - The address funding the creation of the reverse lookup record.
8
- * @param parentAddress - (Optional) The address of the parent domain, if applicable.
9
- * @param parentOwner - (Optional) The address of the parent domain owner, if applicable.
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.
10
18
  * @returns A promise which resolves to the create reverse lookup instruction.
11
19
  */
12
- export declare const createReverse: (domainAddress: Address, domain: string, payer: Address, parentAddress?: Address, parentOwner?: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
20
+ export declare const createReverse: ({ domainAddress, domain, payer, parentAddress, parentOwner, }: CreateReverseParams) => Promise<IInstruction>;
21
+ export {};
@@ -1,14 +1,23 @@
1
1
  import { Address, GetAccountInfoApi, GetMinimumBalanceForRentExemptionApi, IInstruction, 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
+ }
2
9
  /**
3
10
  * Creates a subdomain for the specified domain. This includes setting up the subdomain
4
11
  * registry and its reverse lookup record if not already existing.
5
12
  *
6
- * @param rpc - An RPC interface implementing GetAccountInfoApi and GetMinimumBalanceForRentExemptionApi.
7
- * @param subdomain - The subdomain to create, with or without .sol (e.g., something.sns.sol or something.sns).
8
- * @param owner - The address of the owner of the parent domain.
9
- * @param space - (Optional) The space in bytes allocated to the subdomain account (default: 2,000).
10
- * @param feePayer - (Optional) The address funding the subdomain creation. (default: owner address).
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).
11
19
  * @returns A promise that resolves to an array of instructions required to create the subdomain
12
20
  * and its reverse lookup record.
13
21
  */
14
- export declare const createSubdomain: (rpc: Rpc<GetAccountInfoApi & GetMinimumBalanceForRentExemptionApi>, subdomain: string, owner: Address, space?: number, feePayer?: Address) => Promise<IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>[]>;
22
+ export declare const createSubdomain: ({ rpc, subdomain, owner, space, feePayer, }: CreateSubdomainParams) => Promise<IInstruction[]>;
23
+ export {};
@@ -1,12 +1,21 @@
1
1
  import { Address, GetAccountInfoApi, IInstruction, Rpc } from "@solana/kit";
2
+ interface DeleteNameRegistryParams {
3
+ rpc: Rpc<GetAccountInfoApi>;
4
+ name: string;
5
+ refundAddress: Address;
6
+ classAddress?: Address;
7
+ parentAddress?: Address;
8
+ }
2
9
  /**
3
10
  * Deletes a name registry and refunds the associated rent balance to the specified target.
4
11
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi.
6
- * @param name - The name of the registry to be deleted.
7
- * @param refundTarget - The address to which the refunded rent balance will be sent.
8
- * @param classAddress - (Optional) The address of the class associated with the registry.
9
- * @param parentAddress - (Optional) The address of the parent registry.
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.
10
18
  * @returns A promise which resolves to the delete name registry instruction.
11
19
  */
12
- export declare const deleteNameRegistry: (rpc: Rpc<GetAccountInfoApi>, name: string, refundTarget: Address, classAddress?: Address, parentAddress?: Address) => Promise<IInstruction>;
20
+ export declare const deleteNameRegistry: ({ rpc, name, refundAddress, classAddress, parentAddress, }: DeleteNameRegistryParams) => Promise<IInstruction>;
21
+ export {};
@@ -1,12 +1,20 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
2
  import { Record } from "../types/record";
3
+ interface DeleteRecordParams {
4
+ domain: string;
5
+ record: Record;
6
+ owner: Address;
7
+ payer: Address;
8
+ }
3
9
  /**
4
10
  * Deletes a record under the specified domain and refunds the rent to the payer.
5
11
  *
6
- * @param domain - The domain under which the record resides.
7
- * @param record - An enumeration representing the type of record to be deleted.
8
- * @param owner - The address of the domain's owner.
9
- * @param payer - The address funding the record deletion.
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.
10
17
  * @returns A promise which resolves to the delete record instruction.
11
18
  */
12
- export declare const deleteRecord: (domain: string, record: Record, owner: Address, payer: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
19
+ export declare const deleteRecord: ({ domain, record, owner, payer, }: DeleteRecordParams) => Promise<IInstruction>;
20
+ export {};
@@ -0,0 +1,17 @@
1
+ export * from "./burnDomain";
2
+ export * from "./createNameRegistry";
3
+ export * from "./createRecord";
4
+ export * from "./createReverse";
5
+ export * from "./createSubdomain";
6
+ export * from "./deleteNameRegistry";
7
+ export * from "./deleteRecord";
8
+ export * from "./registerDomain";
9
+ export * from "./registerWithNft";
10
+ export * from "./setPrimaryDomain";
11
+ export * from "./transferDomain";
12
+ export * from "./transferSubdomain";
13
+ export * from "./updateNameRegistry";
14
+ export * from "./updateRecord";
15
+ export * from "./validateRoa";
16
+ export * from "./validateRoaEthereum";
17
+ export * from "./writeRoa";
@@ -1,14 +1,25 @@
1
1
  import { Address, GetAccountInfoApi, IInstruction, 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
+ }
2
11
  /**
3
12
  * Registers a .sol domain.
4
13
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi.
6
- * @param domain - The domain name to be registered in lowercase.
7
- * @param space - The space in bytes to be allocated for the domain registry (max: 10,000).
8
- * @param buyer - The address of the buyer registering the domain.
9
- * @param buyerTokenAccount - The associated token account of the buyer.
10
- * @param mint - (Optional) The token mint used for payment. Defaults to USDC.
11
- * @param referrer - (Optional) The address of the referrer.
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.
12
22
  * @returns A promise which resolves to an array of instructions required for domain registration.
13
23
  */
14
- export declare const registerDomain: (rpc: Rpc<GetAccountInfoApi>, domain: string, space: number, buyer: Address, buyerTokenAccount: Address, mint?: Address, referrer?: Address) => Promise<IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>[]>;
24
+ export declare const registerDomain: ({ rpc, domain, space, buyer, buyerTokenAccount, mint, referrer, }: RegisterDomainParams) => Promise<IInstruction[]>;
25
+ export {};
@@ -1,12 +1,21 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
+ interface RegisterWithNftParams {
3
+ domain: string;
4
+ space: number;
5
+ buyer: Address;
6
+ nftSource: Address;
7
+ nftMint: Address;
8
+ }
2
9
  /**
3
10
  * Registers a .sol domain using a Bonfida Wolves NFT.
4
11
  *
5
- * @param domain - The domain name to be registered.
6
- * @param space - The space in bytes to be allocated for the domain registry.
7
- * @param buyer - The address of the buyer registering the domain.
8
- * @param nftSource - The address of the NFT source account.
9
- * @param nftMint - The mint address of the NFT used for registration.
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.
10
18
  * @returns A promise which resolves to the register with NFT instruction.
11
19
  */
12
- export declare const registerWithNft: (domain: string, space: number, buyer: Address, nftSource: Address, nftMint: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
20
+ export declare const registerWithNft: ({ domain, space, buyer, nftSource, nftMint, }: RegisterWithNftParams) => Promise<IInstruction>;
21
+ export {};
@@ -1,10 +1,16 @@
1
- import { Address, GetAccountInfoApi, Rpc } from "@solana/kit";
1
+ import { Address, GetAccountInfoApi, IInstruction, Rpc } from "@solana/kit";
2
+ export interface SetPrimaryDomainParams {
3
+ rpc: Rpc<GetAccountInfoApi>;
4
+ domainAddress: Address;
5
+ owner: Address;
6
+ }
2
7
  /**
3
8
  * Sets the primary domain for the specified owner.
4
9
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi.
6
- * @param domainAddress - The address of the domain to be set as primary.
7
- * @param owner - The address of the domain owner.
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.
8
14
  * @returns A promise which resolves to the set primary domain instruction.
9
15
  */
10
- export declare const setPrimaryDomain: (rpc: Rpc<GetAccountInfoApi>, domainAddress: Address, owner: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
16
+ export declare const setPrimaryDomain: ({ rpc, domainAddress, owner, }: SetPrimaryDomainParams) => Promise<IInstruction>;
@@ -1,13 +1,23 @@
1
1
  import { Address, GetAccountInfoApi, IInstruction, 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
+ }
2
10
  /**
3
11
  * Transfers a domain to a new owner.
4
12
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi.
6
- * @param domain - The name of the domain to be transferred.
7
- * @param newOwner - The address of the new owner of the domain.
8
- * @param classAddress - (Optional) The address of the class associated with the domain.
9
- * @param parentAddress - (Optional) The address of the parent domain.
10
- * @param parentOwner - (Optional) The address of the parent domain owner.
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.
11
20
  * @returns A promise that resolves to the transfer domain instruction.
12
21
  */
13
- export declare const transferDomain: (rpc: Rpc<GetAccountInfoApi>, domain: string, newOwner: Address, classAddress?: Address, parentAddress?: Address, parentOwner?: Address) => Promise<IInstruction>;
22
+ export declare const transferDomain: ({ rpc, domain, newOwner, classAddress, parentAddress, parentOwner, }: TransferDomainParams) => Promise<IInstruction>;
23
+ export {};
@@ -1,16 +1,25 @@
1
1
  import { Address, GetAccountInfoApi, IInstruction, Rpc } from "@solana/kit";
2
+ interface TransferSubdomainParams {
3
+ rpc: Rpc<GetAccountInfoApi>;
4
+ subdomain: string;
5
+ newOwner: Address;
6
+ isParentOwnerSigner?: boolean;
7
+ currentOwner?: Address;
8
+ }
2
9
  /**
3
10
  * Transfers a subdomain to a new owner.
4
11
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi.
6
- * @param subdomain - The subdomain to transfer. This can include or omit the .sol suffix
7
- * (e.g., 'something.sns.sol' or 'something.sns').
8
- * @param newOwner - The address of the new owner.
9
- * @param isParentOwnerSigner - (Optional) Specifies if the parent domain owner is a signer
10
- * for this transaction.
11
- * @param currentOwner - (Optional) The current owner of the subdomain. If not provided, it
12
- * will be resolved automatically. This is useful for building transactions when the subdomain
13
- * does not yet exist.
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.
14
22
  * @returns A promise that resolves to the transfer subdomain instruction.
15
23
  */
16
- export declare const transferSubdomain: (rpc: Rpc<GetAccountInfoApi>, subdomain: string, newOwner: Address, isParentOwnerSigner?: boolean, currentOwner?: Address) => Promise<IInstruction>;
24
+ export declare const transferSubdomain: ({ rpc, subdomain, newOwner, isParentOwnerSigner, currentOwner, }: TransferSubdomainParams) => Promise<IInstruction>;
25
+ export {};
@@ -1,13 +1,22 @@
1
1
  import { Address, GetAccountInfoApi, IInstruction, 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
+ }
2
10
  /**
3
11
  * Update the data of the given name registry.
4
12
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi.
6
- * @param domain - The name of the domain whose registry will be updated.
7
- * @param offset - The offset in bytes where the update should begin.
8
- * @param data - The data to be written to the registry.
9
- * @param classAddress - (Optional) The address of the class associated with the registry.
10
- * @param parentAddress - (Optional) The address of the parent registry.
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.
11
20
  * @returns A promise that resolves to the update name registry instruction.
12
21
  */
13
- export declare function updateNameRegistry(rpc: Rpc<GetAccountInfoApi>, domain: string, offset: number, data: Uint8Array, classAddress?: Address, parentAddress?: Address): Promise<IInstruction>;
22
+ export declare function updateNameRegistry({ rpc, domain, offset, data, classAddress, parentAddress, }: UpdateNameRegistryParams): Promise<IInstruction>;
@@ -1,13 +1,22 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
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
+ }
3
10
  /**
4
11
  * Updates an existing record under the specified domain.
5
12
  *
6
- * @param domain - The domain under which the record resides.
7
- * @param record - An enumeration representing the type of record to be updated.
8
- * @param content - The updated content to be associated with the record.
9
- * @param owner - The address of the domain's owner.
10
- * @param payer - The address funding the record update.
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.
11
19
  * @returns A promise that resolves to the update record instruction.
12
20
  */
13
- export declare const updateRecord: (domain: string, record: Record, content: string, owner: Address, payer: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
21
+ export declare const updateRecord: ({ domain, record, content, owner, payer, }: UpdateRecordParams) => Promise<IInstruction>;
22
+ export {};
@@ -1,14 +1,24 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
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
+ }
3
11
  /**
4
12
  * Validates the right of association of a record.
5
13
  *
6
- * @param staleness - Indicates whether the record validation is stale.
7
- * @param domain - The domain under which the record resides.
8
- * @param record - An enumeration representing the type of record to validate.
9
- * @param owner - The address of the domain's owner.
10
- * @param payer - The address funding the validation process.
11
- * @param verifier - The address responsible for verifying the record.
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.
12
21
  * @returns A promise that resolves to the validate ROA instruction.
13
22
  */
14
- export declare const validateRoa: (staleness: boolean, domain: string, record: Record, owner: Address, payer: Address, verifier: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
23
+ export declare const validateRoa: ({ staleness, domain, record, owner, payer, verifier, }: ValidateRoaParams) => Promise<IInstruction>;
24
+ export {};
@@ -1,14 +1,24 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
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
+ }
3
11
  /**
4
12
  * Validates the right of association of a record using an Ethereum signature.
5
13
  *
6
- * @param domain - The domain under which the record resides.
7
- * @param record - An enumeration representing the type of record to validate.
8
- * @param owner - The address of the domain's owner.
9
- * @param payer - The address funding the validation process.
10
- * @param signature - The signature used for validation.
11
- * @param expectedPubkey - The expected public key associated with the validation.
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.
12
21
  * @returns A promise that resolves to the validate ROA Ethereum instruction.
13
22
  */
14
- export declare const validateRoaEthereum: (domain: string, record: Record, owner: Address, payer: Address, signature: Uint8Array, expectedPubkey: Uint8Array) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
23
+ export declare const validateRoaEthereum: ({ domain, record, owner, payer, signature, expectedPubkey, }: ValidateRoaEthereumParams) => Promise<IInstruction>;
24
+ export {};
@@ -1,13 +1,22 @@
1
- import { Address } from "@solana/kit";
1
+ import { Address, IInstruction } from "@solana/kit";
2
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
+ }
3
10
  /**
4
11
  * Writes a ROA (Right of association) in a record.
5
12
  *
6
- * @param domain - The domain under which the record will be written.
7
- * @param record - An enumeration representing the type of record to be written.
8
- * @param owner - The address of the domain's owner.
9
- * @param payer - The address funding the operation.
10
- * @param roaId - The identifier for the ROA.
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.
11
19
  * @returns A promise that resolves to the write ROA instruction.
12
20
  */
13
- export declare const writeRoa: (domain: string, record: Record, owner: Address, payer: Address, roaId: Address) => Promise<import("@solana/instructions").IInstruction<string, readonly (import("@solana/instructions").IAccountLookupMeta<string, string> | import("@solana/instructions").IAccountMeta<string>)[]>>;
21
+ export declare const writeRoa: ({ domain, record, owner, payer, roaId, }: WriteRoaParams) => Promise<IInstruction>;
22
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from "./addresses";
2
+ export * from "./pythFeeds";
3
+ export * from "./records";
@@ -1,11 +1,16 @@
1
1
  import { GetProgramAccountsApi, Rpc } from "@solana/kit";
2
+ interface GetAllDomainsParams {
3
+ rpc: Rpc<GetProgramAccountsApi>;
4
+ }
2
5
  /**
3
- * Retrieves the addresses of all .sol domains .
6
+ * Retrieves the addresses of all .sol domains.
4
7
  *
5
- * @param rpc - An RPC interface implementing GetProgramAccountsApi.
8
+ * @param params - An object containing the following properties:
9
+ * - `rpc`: An RPC interface implementing GetProgramAccountsApi.
6
10
  * @returns A promise that resolves to an array of objects representing domain addresses and owners.
7
11
  */
8
- export declare const getAllDomains: (rpc: Rpc<GetProgramAccountsApi>) => Promise<{
12
+ export declare const getAllDomains: ({ rpc }: GetAllDomainsParams) => Promise<{
9
13
  domainAddress: import("@solana/addresses").Address;
10
14
  owner: import("@solana/rpc-types").Base58EncodedBytes;
11
15
  }[]>;
16
+ export {};
@@ -1,23 +1,30 @@
1
1
  import { RecordVersion } from "../types/record";
2
+ interface GetDomainAddressParams {
3
+ domain: string;
4
+ record?: RecordVersion;
5
+ }
2
6
  /**
3
7
  * Derives the address of a domain, a subdomain, or a record.
4
- * @param domain - The (sub)domain to process, with or without the .sol suffix.
5
- * @param record - (Optional) The record version. Only provide if the domain being resolved is 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.
6
12
  * @returns A promise that resolves to an object containing the derived address and additional metadata.
7
13
  */
8
- export declare const getDomainAddress: (domain: string, record?: RecordVersion) => Promise<{
9
- address: import("@solana/addresses").Address;
14
+ export declare const getDomainAddress: ({ domain, record, }: GetDomainAddressParams) => Promise<{
15
+ domainAddress: import("@solana/addresses").Address;
10
16
  parentAddress: import("@solana/addresses").Address;
11
17
  isSub: boolean;
12
18
  isSubRecord?: undefined;
13
19
  } | {
14
- address: import("@solana/addresses").Address;
20
+ domainAddress: import("@solana/addresses").Address;
15
21
  parentAddress: import("@solana/addresses").Address;
16
22
  isSub: boolean;
17
23
  isSubRecord: boolean;
18
24
  } | {
19
- address: import("@solana/addresses").Address;
25
+ domainAddress: import("@solana/addresses").Address;
20
26
  isSub: boolean;
21
27
  parentAddress?: undefined;
22
28
  isSubRecord?: undefined;
23
29
  }>;
30
+ export {};