@solana-name-service/sns-sdk-kit 0.9.0-beta → 0.9.2-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 (290) 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/addresses.cjs +1 -1
  49. package/dist/cjs/constants/addresses.cjs.map +1 -1
  50. package/dist/cjs/constants/index.cjs +2 -0
  51. package/dist/cjs/constants/index.cjs.map +1 -0
  52. package/dist/cjs/domain/getAllDomains.cjs +1 -1
  53. package/dist/cjs/domain/getAllDomains.cjs.map +1 -1
  54. package/dist/cjs/domain/getDomainAddress.cjs +1 -1
  55. package/dist/cjs/domain/getDomainAddress.cjs.map +1 -1
  56. package/dist/cjs/domain/getDomainOwner.cjs +1 -1
  57. package/dist/cjs/domain/getDomainOwner.cjs.map +1 -1
  58. package/dist/cjs/domain/getDomainRecord.cjs +1 -1
  59. package/dist/cjs/domain/getDomainRecord.cjs.map +1 -1
  60. package/dist/cjs/domain/getDomainRecords.cjs +1 -1
  61. package/dist/cjs/domain/getDomainRecords.cjs.map +1 -1
  62. package/dist/cjs/domain/getSubdomains.cjs +1 -1
  63. package/dist/cjs/domain/getSubdomains.cjs.map +1 -1
  64. package/dist/cjs/domain/index.cjs +2 -0
  65. package/dist/cjs/domain/index.cjs.map +1 -0
  66. package/dist/cjs/domain/resolveDomain.cjs +1 -1
  67. package/dist/cjs/domain/resolveDomain.cjs.map +1 -1
  68. package/dist/cjs/index.cjs +1 -1
  69. package/dist/cjs/instructions/{allocateAndPostRecordInstructio.cjs → allocateAndPostRecordInstruction.cjs} +1 -1
  70. package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs.map +1 -0
  71. package/dist/cjs/instructions/index.cjs +2 -0
  72. package/dist/cjs/instructions/index.cjs.map +1 -0
  73. package/dist/cjs/nft/getNftMint.cjs +1 -1
  74. package/dist/cjs/nft/getNftMint.cjs.map +1 -1
  75. package/dist/cjs/nft/getNftOwner.cjs +1 -1
  76. package/dist/cjs/nft/getNftOwner.cjs.map +1 -1
  77. package/dist/cjs/nft/index.cjs +2 -0
  78. package/dist/cjs/nft/index.cjs.map +1 -0
  79. package/dist/cjs/record/getRecordV1Address.cjs +1 -1
  80. package/dist/cjs/record/getRecordV1Address.cjs.map +1 -1
  81. package/dist/cjs/record/getRecordV2Address.cjs +1 -1
  82. package/dist/cjs/record/getRecordV2Address.cjs.map +1 -1
  83. package/dist/cjs/record/index.cjs +2 -0
  84. package/dist/cjs/record/index.cjs.map +1 -0
  85. package/dist/cjs/record/verifyRecordRightOfAssociation.cjs +1 -1
  86. package/dist/cjs/record/verifyRecordRightOfAssociation.cjs.map +1 -1
  87. package/dist/cjs/record/verifyRecordStaleness.cjs +1 -1
  88. package/dist/cjs/record/verifyRecordStaleness.cjs.map +1 -1
  89. package/dist/cjs/states/index.cjs +2 -0
  90. package/dist/cjs/states/index.cjs.map +1 -0
  91. package/dist/cjs/states/nft.cjs +1 -1
  92. package/dist/cjs/states/nft.cjs.map +1 -1
  93. package/dist/cjs/states/record.cjs +1 -1
  94. package/dist/cjs/states/record.cjs.map +1 -1
  95. package/dist/cjs/states/registry.cjs +1 -1
  96. package/dist/cjs/states/registry.cjs.map +1 -1
  97. package/dist/cjs/types/index.cjs +2 -0
  98. package/dist/cjs/types/index.cjs.map +1 -0
  99. package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs +1 -1
  100. package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs.map +1 -1
  101. package/dist/cjs/utils/deserializers/deserializeReverse.cjs +1 -1
  102. package/dist/cjs/utils/deserializers/deserializeReverse.cjs.map +1 -1
  103. package/dist/cjs/utils/getPythFeedAddress.cjs +1 -1
  104. package/dist/cjs/utils/getPythFeedAddress.cjs.map +1 -1
  105. package/dist/cjs/utils/getReverseAddress.cjs +1 -1
  106. package/dist/cjs/utils/getReverseAddress.cjs.map +1 -1
  107. package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs +1 -1
  108. package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs.map +1 -1
  109. package/dist/cjs/utils/index.cjs +2 -0
  110. package/dist/cjs/utils/index.cjs.map +1 -0
  111. package/dist/cjs/utils/reverseLookup.cjs +1 -1
  112. package/dist/cjs/utils/reverseLookup.cjs.map +1 -1
  113. package/dist/cjs/utils/reverseLookupBatch.cjs +1 -1
  114. package/dist/cjs/utils/reverseLookupBatch.cjs.map +1 -1
  115. package/dist/cjs/utils/serializers/serializeRecordContent.cjs +1 -1
  116. package/dist/cjs/utils/serializers/serializeRecordContent.cjs.map +1 -1
  117. package/dist/esm/address/getDomainsForAddress.mjs +1 -1
  118. package/dist/esm/address/getDomainsForAddress.mjs.map +1 -1
  119. package/dist/esm/address/getNftsForAddress.mjs +1 -1
  120. package/dist/esm/address/getNftsForAddress.mjs.map +1 -1
  121. package/dist/esm/address/getPrimaryDomain.mjs +1 -1
  122. package/dist/esm/address/getPrimaryDomain.mjs.map +1 -1
  123. package/dist/esm/address/getPrimaryDomainsBatch.mjs +1 -1
  124. package/dist/esm/address/getPrimaryDomainsBatch.mjs.map +1 -1
  125. package/dist/esm/address/index.mjs +2 -0
  126. package/dist/esm/address/index.mjs.map +1 -0
  127. package/dist/esm/bindings/burnDomain.mjs +1 -1
  128. package/dist/esm/bindings/burnDomain.mjs.map +1 -1
  129. package/dist/esm/bindings/createNameRegistry.mjs +1 -1
  130. package/dist/esm/bindings/createNameRegistry.mjs.map +1 -1
  131. package/dist/esm/bindings/createRecord.mjs +1 -1
  132. package/dist/esm/bindings/createRecord.mjs.map +1 -1
  133. package/dist/esm/bindings/createReverse.mjs +1 -1
  134. package/dist/esm/bindings/createReverse.mjs.map +1 -1
  135. package/dist/esm/bindings/createSubdomain.mjs +1 -1
  136. package/dist/esm/bindings/createSubdomain.mjs.map +1 -1
  137. package/dist/esm/bindings/deleteNameRegistry.mjs +1 -1
  138. package/dist/esm/bindings/deleteNameRegistry.mjs.map +1 -1
  139. package/dist/esm/bindings/deleteRecord.mjs +1 -1
  140. package/dist/esm/bindings/deleteRecord.mjs.map +1 -1
  141. package/dist/esm/bindings/index.mjs +2 -0
  142. package/dist/esm/bindings/index.mjs.map +1 -0
  143. package/dist/esm/bindings/registerDomain.mjs +1 -1
  144. package/dist/esm/bindings/registerDomain.mjs.map +1 -1
  145. package/dist/esm/bindings/registerWithNft.mjs +1 -1
  146. package/dist/esm/bindings/registerWithNft.mjs.map +1 -1
  147. package/dist/esm/bindings/setPrimaryDomain.mjs +1 -1
  148. package/dist/esm/bindings/setPrimaryDomain.mjs.map +1 -1
  149. package/dist/esm/bindings/transferDomain.mjs +1 -1
  150. package/dist/esm/bindings/transferDomain.mjs.map +1 -1
  151. package/dist/esm/bindings/transferSubdomain.mjs +1 -1
  152. package/dist/esm/bindings/transferSubdomain.mjs.map +1 -1
  153. package/dist/esm/bindings/updateNameRegistry.mjs +1 -1
  154. package/dist/esm/bindings/updateNameRegistry.mjs.map +1 -1
  155. package/dist/esm/bindings/updateRecord.mjs +1 -1
  156. package/dist/esm/bindings/updateRecord.mjs.map +1 -1
  157. package/dist/esm/bindings/validateRoa.mjs +1 -1
  158. package/dist/esm/bindings/validateRoa.mjs.map +1 -1
  159. package/dist/esm/bindings/validateRoaEthereum.mjs +1 -1
  160. package/dist/esm/bindings/validateRoaEthereum.mjs.map +1 -1
  161. package/dist/esm/bindings/writeRoa.mjs +1 -1
  162. package/dist/esm/bindings/writeRoa.mjs.map +1 -1
  163. package/dist/esm/constants/addresses.mjs +1 -1
  164. package/dist/esm/constants/addresses.mjs.map +1 -1
  165. package/dist/esm/constants/index.mjs +2 -0
  166. package/dist/esm/constants/index.mjs.map +1 -0
  167. package/dist/esm/domain/getAllDomains.mjs +1 -1
  168. package/dist/esm/domain/getAllDomains.mjs.map +1 -1
  169. package/dist/esm/domain/getDomainAddress.mjs +1 -1
  170. package/dist/esm/domain/getDomainAddress.mjs.map +1 -1
  171. package/dist/esm/domain/getDomainOwner.mjs +1 -1
  172. package/dist/esm/domain/getDomainOwner.mjs.map +1 -1
  173. package/dist/esm/domain/getDomainRecord.mjs +1 -1
  174. package/dist/esm/domain/getDomainRecord.mjs.map +1 -1
  175. package/dist/esm/domain/getDomainRecords.mjs +1 -1
  176. package/dist/esm/domain/getDomainRecords.mjs.map +1 -1
  177. package/dist/esm/domain/getSubdomains.mjs +1 -1
  178. package/dist/esm/domain/getSubdomains.mjs.map +1 -1
  179. package/dist/esm/domain/index.mjs +2 -0
  180. package/dist/esm/domain/index.mjs.map +1 -0
  181. package/dist/esm/domain/resolveDomain.mjs +1 -1
  182. package/dist/esm/domain/resolveDomain.mjs.map +1 -1
  183. package/dist/esm/index.mjs +1 -1
  184. package/dist/esm/instructions/{allocateAndPostRecordInstructio.mjs → allocateAndPostRecordInstruction.mjs} +1 -1
  185. package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs.map +1 -0
  186. package/dist/esm/instructions/index.mjs +2 -0
  187. package/dist/esm/instructions/index.mjs.map +1 -0
  188. package/dist/esm/nft/getNftMint.mjs +1 -1
  189. package/dist/esm/nft/getNftMint.mjs.map +1 -1
  190. package/dist/esm/nft/getNftOwner.mjs +1 -1
  191. package/dist/esm/nft/getNftOwner.mjs.map +1 -1
  192. package/dist/esm/nft/index.mjs +2 -0
  193. package/dist/esm/nft/index.mjs.map +1 -0
  194. package/dist/esm/record/getRecordV1Address.mjs +1 -1
  195. package/dist/esm/record/getRecordV1Address.mjs.map +1 -1
  196. package/dist/esm/record/getRecordV2Address.mjs +1 -1
  197. package/dist/esm/record/getRecordV2Address.mjs.map +1 -1
  198. package/dist/esm/record/index.mjs +2 -0
  199. package/dist/esm/record/index.mjs.map +1 -0
  200. package/dist/esm/record/verifyRecordRightOfAssociation.mjs +1 -1
  201. package/dist/esm/record/verifyRecordRightOfAssociation.mjs.map +1 -1
  202. package/dist/esm/record/verifyRecordStaleness.mjs +1 -1
  203. package/dist/esm/record/verifyRecordStaleness.mjs.map +1 -1
  204. package/dist/esm/states/index.mjs +2 -0
  205. package/dist/esm/states/index.mjs.map +1 -0
  206. package/dist/esm/states/nft.mjs +1 -1
  207. package/dist/esm/states/nft.mjs.map +1 -1
  208. package/dist/esm/states/record.mjs +1 -1
  209. package/dist/esm/states/record.mjs.map +1 -1
  210. package/dist/esm/states/registry.mjs +1 -1
  211. package/dist/esm/states/registry.mjs.map +1 -1
  212. package/dist/esm/types/index.mjs +2 -0
  213. package/dist/esm/types/index.mjs.map +1 -0
  214. package/dist/esm/utils/deserializers/deserializeRecordContent.mjs +1 -1
  215. package/dist/esm/utils/deserializers/deserializeRecordContent.mjs.map +1 -1
  216. package/dist/esm/utils/deserializers/deserializeReverse.mjs +1 -1
  217. package/dist/esm/utils/deserializers/deserializeReverse.mjs.map +1 -1
  218. package/dist/esm/utils/getPythFeedAddress.mjs +1 -1
  219. package/dist/esm/utils/getPythFeedAddress.mjs.map +1 -1
  220. package/dist/esm/utils/getReverseAddress.mjs +1 -1
  221. package/dist/esm/utils/getReverseAddress.mjs.map +1 -1
  222. package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs +1 -1
  223. package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs.map +1 -1
  224. package/dist/esm/utils/index.mjs +2 -0
  225. package/dist/esm/utils/index.mjs.map +1 -0
  226. package/dist/esm/utils/reverseLookup.mjs +1 -1
  227. package/dist/esm/utils/reverseLookup.mjs.map +1 -1
  228. package/dist/esm/utils/reverseLookupBatch.mjs +1 -1
  229. package/dist/esm/utils/reverseLookupBatch.mjs.map +1 -1
  230. package/dist/esm/utils/serializers/serializeRecordContent.mjs +1 -1
  231. package/dist/esm/utils/serializers/serializeRecordContent.mjs.map +1 -1
  232. package/dist/types/address/getDomainsForAddress.d.ts +8 -3
  233. package/dist/types/address/getNftsForAddress.d.ts +8 -3
  234. package/dist/types/address/getPrimaryDomain.d.ts +12 -6
  235. package/dist/types/address/getPrimaryDomainsBatch.d.ts +10 -4
  236. package/dist/types/address/index.d.ts +4 -0
  237. package/dist/types/bindings/burnDomain.d.ts +12 -5
  238. package/dist/types/bindings/createNameRegistry.d.ts +22 -10
  239. package/dist/types/bindings/createRecord.d.ts +16 -7
  240. package/dist/types/bindings/createReverse.d.ts +16 -7
  241. package/dist/types/bindings/createSubdomain.d.ts +15 -6
  242. package/dist/types/bindings/deleteNameRegistry.d.ts +15 -6
  243. package/dist/types/bindings/deleteRecord.d.ts +14 -6
  244. package/dist/types/bindings/index.d.ts +17 -0
  245. package/dist/types/bindings/registerDomain.d.ts +19 -8
  246. package/dist/types/bindings/registerWithNft.d.ts +16 -7
  247. package/dist/types/bindings/setPrimaryDomain.d.ts +11 -5
  248. package/dist/types/bindings/transferDomain.d.ts +17 -7
  249. package/dist/types/bindings/transferSubdomain.d.ts +19 -10
  250. package/dist/types/bindings/updateNameRegistry.d.ts +16 -7
  251. package/dist/types/bindings/updateRecord.d.ts +16 -7
  252. package/dist/types/bindings/validateRoa.d.ts +18 -8
  253. package/dist/types/bindings/validateRoaEthereum.d.ts +18 -8
  254. package/dist/types/bindings/writeRoa.d.ts +16 -7
  255. package/dist/types/constants/index.d.ts +3 -0
  256. package/dist/types/domain/getAllDomains.d.ts +8 -3
  257. package/dist/types/domain/getDomainAddress.d.ts +13 -6
  258. package/dist/types/domain/getDomainOwner.d.ts +9 -3
  259. package/dist/types/domain/getDomainRecord.d.ts +17 -10
  260. package/dist/types/domain/getDomainRecords.d.ts +19 -10
  261. package/dist/types/domain/getSubdomains.d.ts +8 -3
  262. package/dist/types/domain/index.d.ts +7 -0
  263. package/dist/types/domain/resolveDomain.d.ts +13 -7
  264. package/dist/types/index.d.ts +1 -1
  265. package/dist/types/instructions/index.d.ts +19 -0
  266. package/dist/types/nft/getNftMint.d.ts +7 -2
  267. package/dist/types/nft/getNftOwner.d.ts +10 -4
  268. package/dist/types/nft/index.d.ts +2 -0
  269. package/dist/types/record/getRecordV1Address.d.ts +9 -3
  270. package/dist/types/record/getRecordV2Address.d.ts +9 -3
  271. package/dist/types/record/index.d.ts +4 -0
  272. package/dist/types/record/verifyRecordRightOfAssociation.d.ts +11 -4
  273. package/dist/types/record/verifyRecordStaleness.d.ts +16 -6
  274. package/dist/types/states/index.d.ts +4 -0
  275. package/dist/types/states/nft.d.ts +1 -1
  276. package/dist/types/states/record.d.ts +1 -1
  277. package/dist/types/states/registry.d.ts +1 -1
  278. package/dist/types/types/index.d.ts +2 -0
  279. package/dist/types/utils/deserializers/deserializeRecordContent.d.ts +13 -6
  280. package/dist/types/utils/deserializers/deserializeReverse.d.ts +13 -7
  281. package/dist/types/utils/getPythFeedAddress.d.ts +14 -1
  282. package/dist/types/utils/getReverseAddressFromDomainAddress.d.ts +11 -5
  283. package/dist/types/utils/index.d.ts +10 -0
  284. package/dist/types/utils/reverseLookup.d.ts +13 -6
  285. package/dist/types/utils/reverseLookupBatch.d.ts +11 -4
  286. package/dist/types/utils/serializers/serializeRecordContent.d.ts +14 -1
  287. package/package.json +74 -4
  288. package/dist/cjs/instructions/allocateAndPostRecordInstructio.cjs.map +0 -1
  289. package/dist/esm/instructions/allocateAndPostRecordInstructio.mjs.map +0 -1
  290. /package/dist/types/instructions/{allocateAndPostRecordInstructio.d.ts → allocateAndPostRecordInstruction.d.ts} +0 -0
@@ -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 {};
@@ -1,10 +1,16 @@
1
1
  import { GetAccountInfoApi, GetTokenLargestAccountsApi, Rpc } from "@solana/kit";
2
+ interface GetDomainOwnerParams {
3
+ rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;
4
+ domain: string;
5
+ }
2
6
  /**
3
7
  * Retrieves the owner of the specified domain. If the domain is tokenized,
4
8
  * the NFT's owner is returned; otherwise, the registry owner is returned.
5
9
  *
6
- * @param rpc - An RPC interface implementing GetAccountInfoApi and GetTokenLargestAccountsApi.
7
- * @param domain - The domain whose owner is to be retrieved.
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.
8
13
  * @returns A promise that resolves to the owner of the domain.
9
14
  */
10
- export declare const getDomainOwner: (rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>, domain: string) => Promise<import("@solana/addresses").Address>;
15
+ export declare const getDomainOwner: ({ rpc, domain }: GetDomainOwnerParams) => Promise<import("@solana/addresses").Address>;
16
+ export {};
@@ -1,6 +1,15 @@
1
1
  import { GetAccountInfoApi, GetMultipleAccountsApi, GetTokenLargestAccountsApi, ReadonlyUint8Array, Rpc } from "@solana/kit";
2
2
  import { RecordState } from "../states/record";
3
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
+ }
4
13
  interface Result {
5
14
  record: Record;
6
15
  retrievedRecord: RecordState;
@@ -13,16 +22,14 @@ interface Result {
13
22
  /**
14
23
  * Retrieves a specific record under a domain, verifies its state, and optionally deserializes its content.
15
24
  *
16
- * @param rpc - An RPC interface implementing GetAccountInfoApi, GetMultipleAccountsApi, and GetTokenLargestAccountsApi.
17
- * @param domain - The domain whose record is to be retrieved.
18
- * @param record - The type of record to retrieve.
19
- * @param options - (Optional) Additional options for processing:
20
- * - deserialize: Whether to deserialize the record content.
21
- * - verifier: A custom verifier for the record.
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.
22
32
  * @returns A promise that resolves to the retrieved record, its verification status, and optionally its deserialized content.
23
33
  */
24
- export declare function getDomainRecord(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi>, domain: string, record: Record, options?: {
25
- deserialize?: boolean;
26
- verifier?: ReadonlyUint8Array;
27
- }): Promise<Result>;
34
+ export declare function getDomainRecord({ rpc, domain, record, options, }: GetDomainRecordParams): Promise<Result>;
28
35
  export {};
@@ -1,6 +1,17 @@
1
1
  import { GetAccountInfoApi, GetMultipleAccountsApi, GetTokenLargestAccountsApi, ReadonlyUint8Array, Rpc } from "@solana/kit";
2
2
  import { RecordState } from "../states/record";
3
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
+ }
4
15
  interface Result {
5
16
  record: Record;
6
17
  retrievedRecord: RecordState;
@@ -13,18 +24,16 @@ interface Result {
13
24
  /**
14
25
  * Retrieves multiple records under a domain, verifies their state, and optionally deserializes their content.
15
26
  *
16
- * @param rpc - An RPC interface implementing GetAccountInfoApi, GetMultipleAccountsApi, and GetTokenLargestAccountsApi.
17
- * @param domain - The domain whose records are to be retrieved.
18
- * @param records - An array of record types to retrieve.
19
- * @param options - (Optional) Additional options for processing:
20
- * - deserialize: Whether to deserialize the record content.
21
- * - verifiers: An array of custom verifiers for the records.
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.
22
34
  * @returns A promise that resolves to an array of results for the retrieved records, including their verification status and optionally their deserialized content.
23
35
  */
24
36
  export declare function getDomainRecords<T extends Record[], U extends {
25
37
  [K in keyof T]: ReadonlyUint8Array | undefined;
26
- }>(rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi>, domain: string, records: [...T], options?: {
27
- deserialize?: boolean;
28
- verifiers?: [...U];
29
- }): Promise<(Result | undefined)[]>;
38
+ }>({ rpc, domain, records, options, }: GetDomainRecordsParams<T, U>): Promise<(Result | undefined)[]>;
30
39
  export {};
@@ -1,4 +1,8 @@
1
1
  import { Address, GetProgramAccountsApi, Rpc } from "@solana/kit";
2
+ interface GetSubdomainsParams {
3
+ rpc: Rpc<GetProgramAccountsApi>;
4
+ domain: string;
5
+ }
2
6
  interface Result {
3
7
  subdomain: string;
4
8
  owner: Address;
@@ -6,9 +10,10 @@ interface Result {
6
10
  /**
7
11
  * Retrieves all subdomains under the specified domain, including their owners.
8
12
  *
9
- * @param rpc - An RPC interface implementing GetProgramAccountsApi.
10
- * @param domain - The domain whose subdomains are to be retrieved.
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.
11
16
  * @returns A promise that resolves to an array of subdomain objects, each containing the subdomain name and owner address.
12
17
  */
13
- export declare const getSubdomains: (rpc: Rpc<GetProgramAccountsApi>, domain: string) => Promise<Result[]>;
18
+ export declare const getSubdomains: ({ rpc, domain, }: GetSubdomainsParams) => Promise<Result[]>;
14
19
  export {};
@@ -0,0 +1,7 @@
1
+ export * from "./getAllDomains";
2
+ export * from "./getDomainAddress";
3
+ export * from "./getDomainOwner";
4
+ export * from "./getDomainRecord";
5
+ export * from "./getDomainRecords";
6
+ export * from "./getSubdomains";
7
+ export * from "./resolveDomain";
@@ -1,6 +1,11 @@
1
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
+ }
2
7
  export type AllowPda = "any" | boolean;
3
- type ResolveConfig = AllowPda extends true ? {
8
+ type ResolveOptions = AllowPda extends true ? {
4
9
  allowPda: true;
5
10
  programIds: Address[];
6
11
  } : {
@@ -8,13 +13,14 @@ type ResolveConfig = AllowPda extends true ? {
8
13
  programIds?: Address[];
9
14
  };
10
15
  /**
11
- * Resolves domain according to SNS-IP 5
16
+ * Resolves domain according to SNS-IP 5.
12
17
  *
13
- * @param rpc - An RPC interface implementing GetAccountInfoApi, GetMultipleAccountsApi, and GetTokenLargestAccountsApi.
14
- * @param domain - The domain to resolve.
15
- * @param config - (Optional) Configuration for resolving the domain, including whether to allow PDA owners
16
- * and permissible program IDs.
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.
17
23
  * @returns A promise that resolves to the target address.
18
24
  */
19
- export declare const resolveDomain: (rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi>, domain: string, config?: ResolveConfig) => Promise<Address>;
25
+ export declare const resolveDomain: ({ rpc, domain, options, }: ResolveDomainParams) => Promise<Address>;
20
26
  export {};
@@ -31,7 +31,7 @@ export * from "./domain/getDomainRecords";
31
31
  export * from "./domain/getSubdomains";
32
32
  export * from "./domain/resolveDomain";
33
33
  export * from "./errors";
34
- export * from "./instructions/allocateAndPostRecordInstructio";
34
+ export * from "./instructions/allocateAndPostRecordInstruction";
35
35
  export * from "./instructions/burnDomainInstruction";
36
36
  export * from "./instructions/createAtaInstruction";
37
37
  export * from "./instructions/createInstructionV3";
@@ -0,0 +1,19 @@
1
+ export * from "./allocateAndPostRecordInstruction";
2
+ export * from "./burnDomainInstruction";
3
+ export * from "./createAtaInstruction";
4
+ export * from "./createInstructionV3";
5
+ export * from "./createNameRegistryInstruction";
6
+ export * from "./createReverseInstruction";
7
+ export * from "./createSplitV2Instruction";
8
+ export * from "./createV2Instruction";
9
+ export * from "./createWithNftInstruction";
10
+ export * from "./deleteNameRegistryInstruction";
11
+ export * from "./deleteRecordInstruction";
12
+ export * from "./reallocInstruction";
13
+ export * from "./registerFavoriteInstruction";
14
+ export * from "./transferInstruction";
15
+ export * from "./updateNameRegistryInstruction";
16
+ export * from "./updateRecordInstruction";
17
+ export * from "./validateRoaEthereumInstruction";
18
+ export * from "./validateRoaInstruction";
19
+ export * from "./writeRoaInstruction";
@@ -1,8 +1,13 @@
1
1
  import { Address } from "@solana/kit";
2
+ interface GetNftMintParams {
3
+ domainAddress: Address;
4
+ }
2
5
  /**
3
6
  * Retrieves the mint address of a tokenized domain.
4
7
  *
5
- * @param domainAddress - The address of the domain to derive the NFT mint from.
8
+ * @param params - An object containing the following properties:
9
+ * - `domainAddress`: The address of the domain to derive the NFT mint from.
6
10
  * @returns A promise that resolves to the mint address of the NFT.
7
11
  */
8
- export declare const getNftMint: (domainAddress: Address) => Promise<Address<string>>;
12
+ export declare const getNftMint: ({ domainAddress }: GetNftMintParams) => Promise<Address<string>>;
13
+ export {};
@@ -1,9 +1,15 @@
1
1
  import { Address, GetAccountInfoApi, GetTokenLargestAccountsApi, Rpc } from "@solana/kit";
2
+ interface GetNftOwnerParams {
3
+ rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;
4
+ domainAddress: Address;
5
+ }
2
6
  /**
3
- * Retrieves the owner of a toknized domain.
7
+ * Retrieves the owner of a tokenized domain.
4
8
  *
5
- * @param rpc - An RPC interface implementing GetAccountInfoApi and GetTokenLargestAccountsApi.
6
- * @param domainAddress - The address of the domain whose owner is to be retrieved.
9
+ * @param params - An object containing the following properties:
10
+ * - `rpc`: An RPC interface implementing GetAccountInfoApi and GetTokenLargestAccountsApi.
11
+ * - `domainAddress`: The address of the domain whose owner is to be retrieved.
7
12
  * @returns A promise that resolves to the NFT owner's address, or null if no owner is found.
8
13
  */
9
- export declare const getNftOwner: (rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>, domainAddress: Address) => Promise<Address | null>;
14
+ export declare const getNftOwner: ({ rpc, domainAddress, }: GetNftOwnerParams) => Promise<Address | null>;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./getNftMint";
2
+ export * from "./getNftOwner";
@@ -1,9 +1,15 @@
1
1
  import { Record } from "../types/record";
2
+ interface GetRecordV1AddressParams {
3
+ domain: string;
4
+ record: Record;
5
+ }
2
6
  /**
3
7
  * Derives the address of a version 1 record.
4
8
  *
5
- * @param domain - The domain under which the record resides.
6
- * @param record - The type of record to derive the address for.
9
+ * @param params - An object containing the following properties:
10
+ * - `domain`: The domain under which the record resides.
11
+ * - `record`: The type of record to derive the address for.
7
12
  * @returns A promise that resolves to the derived record address.
8
13
  */
9
- export declare const getRecordV1Address: (domain: string, record: Record) => Promise<import("@solana/addresses").Address>;
14
+ export declare const getRecordV1Address: ({ domain, record, }: GetRecordV1AddressParams) => Promise<import("@solana/addresses").Address>;
15
+ export {};
@@ -1,10 +1,16 @@
1
1
  import { Address } from "@solana/kit";
2
2
  import { Record } from "../types/record";
3
+ interface GetRecordV2AddressParams {
4
+ domain: string;
5
+ record: Record;
6
+ }
3
7
  /**
4
8
  * Derives the address of a version 2 record.
5
9
  *
6
- * @param domain - The domain under which the record resides.
7
- * @param record - The type of record to derive the address for.
10
+ * @param params - An object containing the following properties:
11
+ * - `domain`: The domain under which the record resides.
12
+ * - `record`: The type of record to derive the address for.
8
13
  * @returns A promise that resolves to the derived record address.
9
14
  */
10
- export declare const getRecordV2Address: (domain: string, record: Record) => Promise<Address>;
15
+ export declare const getRecordV2Address: ({ domain, record, }: GetRecordV2AddressParams) => Promise<Address>;
16
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./getRecordV1Address";
2
+ export * from "./getRecordV2Address";
3
+ export * from "./verifyRecordRightOfAssociation";
4
+ export * from "./verifyRecordStaleness";
@@ -6,20 +6,27 @@ import { Record } from "../types/record";
6
6
  * This is an internal utility function.
7
7
  *
8
8
  * @param record - The record whose verifier is to be determined.
9
- * @param recordState - The state of the record.
9
+ * @param state - The state of the record.
10
10
  * @returns The default verifier as a ReadonlyUint8Array or undefined if no verifier is found.
11
11
  */
12
- export declare const _getDefaultVerifier: (record: Record, recordState: RecordState) => ReadonlyUint8Array | undefined;
12
+ export declare const _getDefaultVerifier: ({ record, state, }: {
13
+ record: Record;
14
+ state: RecordState;
15
+ }) => ReadonlyUint8Array | undefined;
13
16
  /**
14
17
  * Verifies the right of association for a record synchronously.
15
18
  * This function is intended for internal use only.
16
19
  *
17
20
  * @param record - The record to verify.
18
- * @param recordState - The state of the record.
21
+ * @param state - The state of the record.
19
22
  * @param verifier - The verifier for the record.
20
23
  * @returns True if the association is valid, false otherwise.
21
24
  */
22
- export declare const _verifyRoaSync: (record: Record, recordState: RecordState, verifier: ReadonlyUint8Array) => boolean;
25
+ export declare const _verifyRoaSync: ({ record, state, verifier, }: {
26
+ record: Record;
27
+ state: RecordState;
28
+ verifier: ReadonlyUint8Array;
29
+ }) => boolean;
23
30
  /**
24
31
  * Verifies the right of association for a record asynchronously.
25
32
  *
@@ -6,16 +6,26 @@ import { Record } from "../types/record";
6
6
  * This is intended for internal use only.
7
7
  *
8
8
  * @param domainOwner - The address of the domain's owner.
9
- * @param recordState - The state of the record to verify.
9
+ * @param state - The state of the record to verify.
10
10
  * @returns True if the record's staleness validation passes, false otherwise.
11
11
  */
12
- export declare const _verifyStalenessSync: (domainOwner: Address, recordState: RecordState) => boolean;
12
+ export declare const _verifyStalenessSync: ({ domainOwner, state, }: {
13
+ domainOwner: Address;
14
+ state: RecordState;
15
+ }) => boolean;
16
+ interface VerifyRecordStalenessParams {
17
+ rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;
18
+ domain: string;
19
+ record: Record;
20
+ }
13
21
  /**
14
22
  * Verifies the staleness of a record asynchronously.
15
23
  *
16
- * @param rpc - The RPC interface implementing GetAccountInfoApi and GetTokenLargestAccountsApi.
17
- * @param domain - The domain under which the record resides.
18
- * @param record - The record to verify.
24
+ * @param params - An object containing the following properties:
25
+ * - `rpc`: The RPC interface implementing GetAccountInfoApi and GetTokenLargestAccountsApi.
26
+ * - `domain`: The domain under which the record resides.
27
+ * - `record`: The record to verify.
19
28
  * @returns A promise that resolves to true if the record is stale, false otherwise.
20
29
  */
21
- export declare const verifyRecordStaleness: (rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>, domain: string, record: Record) => Promise<boolean>;
30
+ export declare const verifyRecordStaleness: ({ rpc, domain, record, }: VerifyRecordStalenessParams) => Promise<boolean>;
31
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./nft";
2
+ export * from "./primaryDomain";
3
+ export * from "./record";
4
+ export * from "./registry";
@@ -11,7 +11,6 @@ export declare class NftState {
11
11
  nameAccount: Address;
12
12
  owner: Address;
13
13
  nftMint: Address;
14
- static LEN: number;
15
14
  static schema: {
16
15
  struct: {
17
16
  tag: string;
@@ -36,6 +35,7 @@ export declare class NftState {
36
35
  };
37
36
  };
38
37
  };
38
+ static LEN: number;
39
39
  constructor(obj: {
40
40
  tag: number;
41
41
  nonce: number;
@@ -7,8 +7,8 @@ export declare class RecordHeaderState {
7
7
  stalenessValidation: number;
8
8
  rightOfAssociationValidation: number;
9
9
  contentLength: number;
10
- static LEN: number;
11
10
  static schema: Schema;
11
+ static LEN: number;
12
12
  constructor(obj: {
13
13
  stalenessValidation: number;
14
14
  rightOfAssociationValidation: number;
@@ -1,6 +1,5 @@
1
1
  import { Address, GetAccountInfoApi, GetMultipleAccountsApi, Rpc } from "@solana/kit";
2
2
  export declare class RegistryState {
3
- static HEADER_LEN: number;
4
3
  parentName: Address;
5
4
  owner: Address;
6
5
  class: Address;
@@ -27,6 +26,7 @@ export declare class RegistryState {
27
26
  };
28
27
  };
29
28
  };
29
+ static HEADER_LEN: number;
30
30
  constructor(obj: {
31
31
  parentName: Uint8Array;
32
32
  owner: Uint8Array;
@@ -0,0 +1,2 @@
1
+ export * from "./record";
2
+ export * from "./validation";
@@ -1,10 +1,17 @@
1
1
  import { ReadonlyUint8Array } from "@solana/kit";
2
2
  import { Record } from "../../types/record";
3
+ interface DeserializeRecordContentParams {
4
+ content: ReadonlyUint8Array;
5
+ record: Record;
6
+ }
3
7
  /**
4
- * This function deserializes a buffer based on the type of record it corresponds to
5
- * If the record is not properly serialized according to SNS-IP 1 this function will throw an error
6
- * @param content The content to deserialize
7
- * @param record The type of record
8
- * @returns The deserialized content as a string
8
+ * This function deserializes a buffer based on the type of record it corresponds to.
9
+ * If the record is not properly serialized according to SNS-IP 1, this function will throw an error.
10
+ *
11
+ * @param params - An object containing the following properties:
12
+ * - `content`: The content to deserialize.
13
+ * - `record`: The type of record.
14
+ * @returns The deserialized content as a string.
9
15
  */
10
- export declare const deserializeRecordContent: (content: ReadonlyUint8Array, record: Record) => string;
16
+ export declare const deserializeRecordContent: ({ content, record, }: DeserializeRecordContentParams) => string;
17
+ export {};