@solana-name-service/sns-sdk-kit 0.10.1 → 1.0.1
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.
- package/README.md +296 -64
- package/dist/cjs/address/getPrimaryDomain.cjs +54 -1
- package/dist/cjs/address/getPrimaryDomain.cjs.map +1 -1
- package/dist/cjs/address/getPrimaryDomainsBatch.cjs +108 -1
- package/dist/cjs/address/getPrimaryDomainsBatch.cjs.map +1 -1
- package/dist/cjs/address/getSnsDomainsForAddress.cjs +65 -0
- package/dist/cjs/address/getSnsDomainsForAddress.cjs.map +1 -0
- package/dist/cjs/address/getSnsNftsForAddress.cjs +94 -0
- package/dist/cjs/address/getSnsNftsForAddress.cjs.map +1 -0
- package/dist/cjs/address/index.cjs +15 -1
- package/dist/cjs/address/index.cjs.map +1 -1
- package/dist/cjs/bindings/burnDomain.cjs +46 -1
- package/dist/cjs/bindings/burnDomain.cjs.map +1 -1
- package/dist/cjs/bindings/createNameRegistry.cjs +54 -1
- package/dist/cjs/bindings/createNameRegistry.cjs.map +1 -1
- package/dist/cjs/bindings/createRecord.cjs +57 -1
- package/dist/cjs/bindings/createRecord.cjs.map +1 -1
- package/dist/cjs/bindings/createReverse.cjs +36 -1
- package/dist/cjs/bindings/createReverse.cjs.map +1 -1
- package/dist/cjs/bindings/createSubdomain.cjs +69 -1
- package/dist/cjs/bindings/createSubdomain.cjs.map +1 -1
- package/dist/cjs/bindings/deleteNameRegistry.cjs +37 -1
- package/dist/cjs/bindings/deleteNameRegistry.cjs.map +1 -1
- package/dist/cjs/bindings/deleteRecord.cjs +49 -1
- package/dist/cjs/bindings/deleteRecord.cjs.map +1 -1
- package/dist/cjs/bindings/index.cjs +43 -1
- package/dist/cjs/bindings/index.cjs.map +1 -1
- package/dist/cjs/bindings/recordValidation.cjs +60 -0
- package/dist/cjs/bindings/recordValidation.cjs.map +1 -0
- package/dist/cjs/bindings/registerDomain.cjs +86 -1
- package/dist/cjs/bindings/registerDomain.cjs.map +1 -1
- package/dist/cjs/bindings/registerDomainWithNft.cjs +67 -0
- package/dist/cjs/bindings/registerDomainWithNft.cjs.map +1 -0
- package/dist/cjs/bindings/setPrimaryDomain.cjs +39 -1
- package/dist/cjs/bindings/setPrimaryDomain.cjs.map +1 -1
- package/dist/cjs/bindings/setRecordRoaVerifier.cjs +44 -0
- package/dist/cjs/bindings/setRecordRoaVerifier.cjs.map +1 -0
- package/dist/cjs/bindings/setRecordStalenessVerifier.cjs +32 -0
- package/dist/cjs/bindings/setRecordStalenessVerifier.cjs.map +1 -0
- package/dist/cjs/bindings/transferDomain.cjs +33 -1
- package/dist/cjs/bindings/transferDomain.cjs.map +1 -1
- package/dist/cjs/bindings/transferSubdomain.cjs +48 -1
- package/dist/cjs/bindings/transferSubdomain.cjs.map +1 -1
- package/dist/cjs/bindings/updateNameRegistry.cjs +45 -1
- package/dist/cjs/bindings/updateNameRegistry.cjs.map +1 -1
- package/dist/cjs/bindings/updateRecord.cjs +57 -1
- package/dist/cjs/bindings/updateRecord.cjs.map +1 -1
- package/dist/cjs/bindings/validateRecordRoa.cjs +32 -0
- package/dist/cjs/bindings/validateRecordRoa.cjs.map +1 -0
- package/dist/cjs/bindings/validateRecordRoaEthereum.cjs +49 -0
- package/dist/cjs/bindings/validateRecordRoaEthereum.cjs.map +1 -0
- package/dist/cjs/codecs.cjs +27 -1
- package/dist/cjs/codecs.cjs.map +1 -1
- package/dist/cjs/config.cjs +18 -0
- package/dist/cjs/config.cjs.map +1 -0
- package/dist/cjs/constants/addresses.cjs +124 -1
- package/dist/cjs/constants/addresses.cjs.map +1 -1
- package/dist/cjs/constants/index.cjs +40 -1
- package/dist/cjs/constants/index.cjs.map +1 -1
- package/dist/cjs/constants/pythFeeds.cjs +91 -1
- package/dist/cjs/constants/pythFeeds.cjs.map +1 -1
- package/dist/cjs/constants/records.cjs +71 -1
- package/dist/cjs/constants/records.cjs.map +1 -1
- package/dist/cjs/domain/getAllSnsDomains.cjs +43 -0
- package/dist/cjs/domain/getAllSnsDomains.cjs.map +1 -0
- package/dist/cjs/domain/getDomainOwner.cjs +27 -1
- package/dist/cjs/domain/getDomainOwner.cjs.map +1 -1
- package/dist/cjs/domain/getDomainRecord.cjs +54 -1
- package/dist/cjs/domain/getDomainRecord.cjs.map +1 -1
- package/dist/cjs/domain/getDomainRecords.cjs +64 -1
- package/dist/cjs/domain/getDomainRecords.cjs.map +1 -1
- package/dist/cjs/domain/getSnsDomainAddress.cjs +52 -0
- package/dist/cjs/domain/getSnsDomainAddress.cjs.map +1 -0
- package/dist/cjs/domain/getSnsDomainOwner.cjs +31 -0
- package/dist/cjs/domain/getSnsDomainOwner.cjs.map +1 -0
- package/dist/cjs/domain/getSrsDomainAddress.cjs +36 -0
- package/dist/cjs/domain/getSrsDomainAddress.cjs.map +1 -0
- package/dist/cjs/domain/getSubdomains.cjs +95 -1
- package/dist/cjs/domain/getSubdomains.cjs.map +1 -1
- package/dist/cjs/domain/index.cjs +24 -1
- package/dist/cjs/domain/index.cjs.map +1 -1
- package/dist/cjs/domain/resolve.cjs +67 -0
- package/dist/cjs/domain/resolve.cjs.map +1 -0
- package/dist/cjs/domain/resolveSns.cjs +113 -0
- package/dist/cjs/domain/resolveSns.cjs.map +1 -0
- package/dist/cjs/errors.cjs +250 -1
- package/dist/cjs/errors.cjs.map +1 -1
- package/dist/cjs/index.cjs +245 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs +71 -1
- package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/burnDomainInstruction.cjs +71 -1
- package/dist/cjs/instructions/burnDomainInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createAtaIdempotentInstruction.cjs +71 -0
- package/dist/cjs/instructions/createAtaIdempotentInstruction.cjs.map +1 -0
- package/dist/cjs/instructions/createNameRegistryInstruction.cjs +94 -1
- package/dist/cjs/instructions/createNameRegistryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createReverseInstruction.cjs +79 -1
- package/dist/cjs/instructions/createReverseInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createSplitV2Instruction.cjs +113 -1
- package/dist/cjs/instructions/createSplitV2Instruction.cjs.map +1 -1
- package/dist/cjs/instructions/createWithNftInstruction.cjs +107 -1
- package/dist/cjs/instructions/createWithNftInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/deleteNameRegistryInstruction.cjs +47 -1
- package/dist/cjs/instructions/deleteNameRegistryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/deleteRecordInstruction.cjs +63 -1
- package/dist/cjs/instructions/deleteRecordInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/index.cjs +41 -1
- package/dist/cjs/instructions/index.cjs.map +1 -1
- package/dist/cjs/instructions/reallocInstruction.cjs +55 -1
- package/dist/cjs/instructions/reallocInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/registerPrimaryInstruction.cjs +58 -0
- package/dist/cjs/instructions/registerPrimaryInstruction.cjs.map +1 -0
- package/dist/cjs/instructions/setRecordRoaVerifierInstruction.cjs +69 -0
- package/dist/cjs/instructions/setRecordRoaVerifierInstruction.cjs.map +1 -0
- package/dist/cjs/instructions/transferInstruction.cjs +67 -1
- package/dist/cjs/instructions/transferInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/updateNameRegistryInstruction.cjs +51 -1
- package/dist/cjs/instructions/updateNameRegistryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/updateRecordInstruction.cjs +71 -1
- package/dist/cjs/instructions/updateRecordInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/validateEthereumSignatureInstruction.cjs +76 -0
- package/dist/cjs/instructions/validateEthereumSignatureInstruction.cjs.map +1 -0
- package/dist/cjs/instructions/validateSolanaSignatureInstruction.cjs +72 -0
- package/dist/cjs/instructions/validateSolanaSignatureInstruction.cjs.map +1 -0
- package/dist/cjs/nft/getSnsNftMint.cjs +31 -0
- package/dist/cjs/nft/getSnsNftMint.cjs.map +1 -0
- package/dist/cjs/nft/getSnsNftOwner.cjs +48 -0
- package/dist/cjs/nft/getSnsNftOwner.cjs.map +1 -0
- package/dist/cjs/nft/index.cjs +11 -1
- package/dist/cjs/nft/index.cjs.map +1 -1
- package/dist/cjs/record/getRecordV1Address.cjs +31 -1
- package/dist/cjs/record/getRecordV1Address.cjs.map +1 -1
- package/dist/cjs/record/getRecordV2Address.cjs +27 -1
- package/dist/cjs/record/getRecordV2Address.cjs.map +1 -1
- package/dist/cjs/record/index.cjs +18 -1
- package/dist/cjs/record/index.cjs.map +1 -1
- package/dist/cjs/record/verifyRecordRightOfAssociation.cjs +95 -1
- package/dist/cjs/record/verifyRecordRightOfAssociation.cjs.map +1 -1
- package/dist/cjs/record/verifyRecordStaleness.cjs +55 -1
- package/dist/cjs/record/verifyRecordStaleness.cjs.map +1 -1
- package/dist/cjs/states/index.cjs +22 -1
- package/dist/cjs/states/index.cjs.map +1 -1
- package/dist/cjs/states/nft.cjs +109 -1
- package/dist/cjs/states/nft.cjs.map +1 -1
- package/dist/cjs/states/primaryDomain.cjs +65 -1
- package/dist/cjs/states/primaryDomain.cjs.map +1 -1
- package/dist/cjs/states/record.cjs +120 -1
- package/dist/cjs/states/record.cjs.map +1 -1
- package/dist/cjs/states/registry.cjs +68 -1
- package/dist/cjs/states/registry.cjs.map +1 -1
- package/dist/cjs/types/index.cjs +22 -1
- package/dist/cjs/types/index.cjs.map +1 -1
- package/dist/cjs/types/record.cjs +56 -1
- package/dist/cjs/types/record.cjs.map +1 -1
- package/dist/cjs/types/validation.cjs +12 -1
- package/dist/cjs/types/validation.cjs.map +1 -1
- package/dist/cjs/utils/assertTldSupported.cjs +28 -0
- package/dist/cjs/utils/assertTldSupported.cjs.map +1 -0
- package/dist/cjs/utils/check.cjs +20 -1
- package/dist/cjs/utils/check.cjs.map +1 -1
- package/dist/cjs/utils/checkAddressOnCurve/ed25519.cjs +81 -3
- package/dist/cjs/utils/checkAddressOnCurve/ed25519.cjs.map +1 -1
- package/dist/cjs/utils/checkAddressOnCurve/index.cjs +42 -1
- package/dist/cjs/utils/checkAddressOnCurve/index.cjs.map +1 -1
- package/dist/cjs/utils/deriveAddress.cjs +57 -1
- package/dist/cjs/utils/deriveAddress.cjs.map +1 -1
- package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs +64 -1
- package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs.map +1 -1
- package/dist/cjs/utils/deserializers/deserializeReverse.cjs +17 -1
- package/dist/cjs/utils/deserializers/deserializeReverse.cjs.map +1 -1
- package/dist/cjs/utils/getPythFeedAddress.cjs +32 -1
- package/dist/cjs/utils/getPythFeedAddress.cjs.map +1 -1
- package/dist/cjs/utils/getReverseAddress.cjs +29 -1
- package/dist/cjs/utils/getReverseAddress.cjs.map +1 -1
- package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs +25 -1
- package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs.map +1 -1
- package/dist/cjs/utils/index.cjs +32 -1
- package/dist/cjs/utils/index.cjs.map +1 -1
- package/dist/cjs/utils/parseSnsDomain.cjs +66 -0
- package/dist/cjs/utils/parseSnsDomain.cjs.map +1 -0
- package/dist/cjs/utils/reverseLookup.cjs +40 -1
- package/dist/cjs/utils/reverseLookup.cjs.map +1 -1
- package/dist/cjs/utils/reverseLookupBatch.cjs +30 -1
- package/dist/cjs/utils/reverseLookupBatch.cjs.map +1 -1
- package/dist/cjs/utils/serializers/serializeRecordContent.cjs +90 -1
- package/dist/cjs/utils/serializers/serializeRecordContent.cjs.map +1 -1
- package/dist/cjs/utils/tld.cjs +67 -0
- package/dist/cjs/utils/tld.cjs.map +1 -0
- package/dist/cjs/utils/uint8Array/uint8ArrayFromHex.cjs +20 -1
- package/dist/cjs/utils/uint8Array/uint8ArrayFromHex.cjs.map +1 -1
- package/dist/cjs/utils/uint8Array/uint8ArrayToHex.cjs +16 -1
- package/dist/cjs/utils/uint8Array/uint8ArrayToHex.cjs.map +1 -1
- package/dist/cjs/utils/uint8Array/uint8ArraysEqual.cjs +20 -1
- package/dist/cjs/utils/uint8Array/uint8ArraysEqual.cjs.map +1 -1
- package/dist/esm/address/getPrimaryDomain.mjs +50 -1
- package/dist/esm/address/getPrimaryDomain.mjs.map +1 -1
- package/dist/esm/address/getPrimaryDomainsBatch.mjs +104 -1
- package/dist/esm/address/getPrimaryDomainsBatch.mjs.map +1 -1
- package/dist/esm/address/getSnsDomainsForAddress.mjs +61 -0
- package/dist/esm/address/getSnsDomainsForAddress.mjs.map +1 -0
- package/dist/esm/address/getSnsNftsForAddress.mjs +90 -0
- package/dist/esm/address/getSnsNftsForAddress.mjs.map +1 -0
- package/dist/esm/address/index.mjs +4 -1
- package/dist/esm/address/index.mjs.map +1 -1
- package/dist/esm/bindings/burnDomain.mjs +42 -1
- package/dist/esm/bindings/burnDomain.mjs.map +1 -1
- package/dist/esm/bindings/createNameRegistry.mjs +50 -1
- package/dist/esm/bindings/createNameRegistry.mjs.map +1 -1
- package/dist/esm/bindings/createRecord.mjs +53 -1
- package/dist/esm/bindings/createRecord.mjs.map +1 -1
- package/dist/esm/bindings/createReverse.mjs +32 -1
- package/dist/esm/bindings/createReverse.mjs.map +1 -1
- package/dist/esm/bindings/createSubdomain.mjs +65 -1
- package/dist/esm/bindings/createSubdomain.mjs.map +1 -1
- package/dist/esm/bindings/deleteNameRegistry.mjs +33 -1
- package/dist/esm/bindings/deleteNameRegistry.mjs.map +1 -1
- package/dist/esm/bindings/deleteRecord.mjs +45 -1
- package/dist/esm/bindings/deleteRecord.mjs.map +1 -1
- package/dist/esm/bindings/index.mjs +18 -1
- package/dist/esm/bindings/index.mjs.map +1 -1
- package/dist/esm/bindings/recordValidation.mjs +55 -0
- package/dist/esm/bindings/recordValidation.mjs.map +1 -0
- package/dist/esm/bindings/registerDomain.mjs +82 -1
- package/dist/esm/bindings/registerDomain.mjs.map +1 -1
- package/dist/esm/bindings/registerDomainWithNft.mjs +63 -0
- package/dist/esm/bindings/registerDomainWithNft.mjs.map +1 -0
- package/dist/esm/bindings/setPrimaryDomain.mjs +35 -1
- package/dist/esm/bindings/setPrimaryDomain.mjs.map +1 -1
- package/dist/esm/bindings/setRecordRoaVerifier.mjs +40 -0
- package/dist/esm/bindings/setRecordRoaVerifier.mjs.map +1 -0
- package/dist/esm/bindings/setRecordStalenessVerifier.mjs +28 -0
- package/dist/esm/bindings/setRecordStalenessVerifier.mjs.map +1 -0
- package/dist/esm/bindings/transferDomain.mjs +29 -1
- package/dist/esm/bindings/transferDomain.mjs.map +1 -1
- package/dist/esm/bindings/transferSubdomain.mjs +44 -1
- package/dist/esm/bindings/transferSubdomain.mjs.map +1 -1
- package/dist/esm/bindings/updateNameRegistry.mjs +41 -1
- package/dist/esm/bindings/updateNameRegistry.mjs.map +1 -1
- package/dist/esm/bindings/updateRecord.mjs +53 -1
- package/dist/esm/bindings/updateRecord.mjs.map +1 -1
- package/dist/esm/bindings/validateRecordRoa.mjs +28 -0
- package/dist/esm/bindings/validateRecordRoa.mjs.map +1 -0
- package/dist/esm/bindings/validateRecordRoaEthereum.mjs +45 -0
- package/dist/esm/bindings/validateRecordRoaEthereum.mjs.map +1 -0
- package/dist/esm/codecs.mjs +19 -1
- package/dist/esm/codecs.mjs.map +1 -1
- package/dist/esm/config.mjs +11 -0
- package/dist/esm/config.mjs.map +1 -0
- package/dist/esm/constants/addresses.mjs +98 -1
- package/dist/esm/constants/addresses.mjs.map +1 -1
- package/dist/esm/constants/index.mjs +3 -1
- package/dist/esm/constants/index.mjs.map +1 -1
- package/dist/esm/constants/pythFeeds.mjs +86 -1
- package/dist/esm/constants/pythFeeds.mjs.map +1 -1
- package/dist/esm/constants/records.mjs +63 -1
- package/dist/esm/constants/records.mjs.map +1 -1
- package/dist/esm/domain/getAllSnsDomains.mjs +39 -0
- package/dist/esm/domain/getAllSnsDomains.mjs.map +1 -0
- package/dist/esm/domain/getDomainOwner.mjs +23 -1
- package/dist/esm/domain/getDomainOwner.mjs.map +1 -1
- package/dist/esm/domain/getDomainRecord.mjs +50 -1
- package/dist/esm/domain/getDomainRecord.mjs.map +1 -1
- package/dist/esm/domain/getDomainRecords.mjs +60 -1
- package/dist/esm/domain/getDomainRecords.mjs.map +1 -1
- package/dist/esm/domain/getSnsDomainAddress.mjs +48 -0
- package/dist/esm/domain/getSnsDomainAddress.mjs.map +1 -0
- package/dist/esm/domain/getSnsDomainOwner.mjs +27 -0
- package/dist/esm/domain/getSnsDomainOwner.mjs.map +1 -0
- package/dist/esm/domain/getSrsDomainAddress.mjs +32 -0
- package/dist/esm/domain/getSrsDomainAddress.mjs.map +1 -0
- package/dist/esm/domain/getSubdomains.mjs +91 -1
- package/dist/esm/domain/getSubdomains.mjs.map +1 -1
- package/dist/esm/domain/index.mjs +8 -1
- package/dist/esm/domain/index.mjs.map +1 -1
- package/dist/esm/domain/resolve.mjs +62 -0
- package/dist/esm/domain/resolve.mjs.map +1 -0
- package/dist/esm/domain/resolveSns.mjs +109 -0
- package/dist/esm/domain/resolveSns.mjs.map +1 -0
- package/dist/esm/errors.mjs +218 -1
- package/dist/esm/errors.mjs.map +1 -1
- package/dist/esm/index.mjs +74 -1
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs +67 -1
- package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs.map +1 -1
- package/dist/esm/instructions/burnDomainInstruction.mjs +67 -1
- package/dist/esm/instructions/burnDomainInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createAtaIdempotentInstruction.mjs +67 -0
- package/dist/esm/instructions/createAtaIdempotentInstruction.mjs.map +1 -0
- package/dist/esm/instructions/createNameRegistryInstruction.mjs +90 -1
- package/dist/esm/instructions/createNameRegistryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createReverseInstruction.mjs +75 -1
- package/dist/esm/instructions/createReverseInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createSplitV2Instruction.mjs +109 -1
- package/dist/esm/instructions/createSplitV2Instruction.mjs.map +1 -1
- package/dist/esm/instructions/createWithNftInstruction.mjs +103 -1
- package/dist/esm/instructions/createWithNftInstruction.mjs.map +1 -1
- package/dist/esm/instructions/deleteNameRegistryInstruction.mjs +43 -1
- package/dist/esm/instructions/deleteNameRegistryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/deleteRecordInstruction.mjs +59 -1
- package/dist/esm/instructions/deleteRecordInstruction.mjs.map +1 -1
- package/dist/esm/instructions/index.mjs +17 -1
- package/dist/esm/instructions/index.mjs.map +1 -1
- package/dist/esm/instructions/reallocInstruction.mjs +51 -1
- package/dist/esm/instructions/reallocInstruction.mjs.map +1 -1
- package/dist/esm/instructions/registerPrimaryInstruction.mjs +54 -0
- package/dist/esm/instructions/registerPrimaryInstruction.mjs.map +1 -0
- package/dist/esm/instructions/setRecordRoaVerifierInstruction.mjs +65 -0
- package/dist/esm/instructions/setRecordRoaVerifierInstruction.mjs.map +1 -0
- package/dist/esm/instructions/transferInstruction.mjs +63 -1
- package/dist/esm/instructions/transferInstruction.mjs.map +1 -1
- package/dist/esm/instructions/updateNameRegistryInstruction.mjs +47 -1
- package/dist/esm/instructions/updateNameRegistryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/updateRecordInstruction.mjs +67 -1
- package/dist/esm/instructions/updateRecordInstruction.mjs.map +1 -1
- package/dist/esm/instructions/validateEthereumSignatureInstruction.mjs +72 -0
- package/dist/esm/instructions/validateEthereumSignatureInstruction.mjs.map +1 -0
- package/dist/esm/instructions/validateSolanaSignatureInstruction.mjs +68 -0
- package/dist/esm/instructions/validateSolanaSignatureInstruction.mjs.map +1 -0
- package/dist/esm/nft/getSnsNftMint.mjs +27 -0
- package/dist/esm/nft/getSnsNftMint.mjs.map +1 -0
- package/dist/esm/nft/getSnsNftOwner.mjs +44 -0
- package/dist/esm/nft/getSnsNftOwner.mjs.map +1 -0
- package/dist/esm/nft/index.mjs +2 -1
- package/dist/esm/nft/index.mjs.map +1 -1
- package/dist/esm/record/getRecordV1Address.mjs +27 -1
- package/dist/esm/record/getRecordV1Address.mjs.map +1 -1
- package/dist/esm/record/getRecordV2Address.mjs +23 -1
- package/dist/esm/record/getRecordV2Address.mjs.map +1 -1
- package/dist/esm/record/index.mjs +4 -1
- package/dist/esm/record/index.mjs.map +1 -1
- package/dist/esm/record/verifyRecordRightOfAssociation.mjs +89 -1
- package/dist/esm/record/verifyRecordRightOfAssociation.mjs.map +1 -1
- package/dist/esm/record/verifyRecordStaleness.mjs +50 -1
- package/dist/esm/record/verifyRecordStaleness.mjs.map +1 -1
- package/dist/esm/states/index.mjs +4 -1
- package/dist/esm/states/index.mjs.map +1 -1
- package/dist/esm/states/nft.mjs +105 -1
- package/dist/esm/states/nft.mjs.map +1 -1
- package/dist/esm/states/primaryDomain.mjs +61 -1
- package/dist/esm/states/primaryDomain.mjs.map +1 -1
- package/dist/esm/states/record.mjs +113 -1
- package/dist/esm/states/record.mjs.map +1 -1
- package/dist/esm/states/registry.mjs +64 -1
- package/dist/esm/states/registry.mjs.map +1 -1
- package/dist/esm/types/index.mjs +2 -1
- package/dist/esm/types/index.mjs.map +1 -1
- package/dist/esm/types/record.mjs +52 -1
- package/dist/esm/types/record.mjs.map +1 -1
- package/dist/esm/types/validation.mjs +10 -1
- package/dist/esm/types/validation.mjs.map +1 -1
- package/dist/esm/utils/assertTldSupported.mjs +24 -0
- package/dist/esm/utils/assertTldSupported.mjs.map +1 -0
- package/dist/esm/utils/check.mjs +16 -1
- package/dist/esm/utils/check.mjs.map +1 -1
- package/dist/esm/utils/checkAddressOnCurve/ed25519.mjs +76 -2
- package/dist/esm/utils/checkAddressOnCurve/ed25519.mjs.map +1 -1
- package/dist/esm/utils/checkAddressOnCurve/index.mjs +38 -1
- package/dist/esm/utils/checkAddressOnCurve/index.mjs.map +1 -1
- package/dist/esm/utils/deriveAddress.mjs +51 -1
- package/dist/esm/utils/deriveAddress.mjs.map +1 -1
- package/dist/esm/utils/deserializers/deserializeRecordContent.mjs +60 -1
- package/dist/esm/utils/deserializers/deserializeRecordContent.mjs.map +1 -1
- package/dist/esm/utils/deserializers/deserializeReverse.mjs +13 -1
- package/dist/esm/utils/deserializers/deserializeReverse.mjs.map +1 -1
- package/dist/esm/utils/getPythFeedAddress.mjs +28 -1
- package/dist/esm/utils/getPythFeedAddress.mjs.map +1 -1
- package/dist/esm/utils/getReverseAddress.mjs +25 -1
- package/dist/esm/utils/getReverseAddress.mjs.map +1 -1
- package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs +21 -1
- package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs.map +1 -1
- package/dist/esm/utils/index.mjs +10 -1
- package/dist/esm/utils/index.mjs.map +1 -1
- package/dist/esm/utils/parseSnsDomain.mjs +60 -0
- package/dist/esm/utils/parseSnsDomain.mjs.map +1 -0
- package/dist/esm/utils/reverseLookup.mjs +36 -1
- package/dist/esm/utils/reverseLookup.mjs.map +1 -1
- package/dist/esm/utils/reverseLookupBatch.mjs +26 -1
- package/dist/esm/utils/reverseLookupBatch.mjs.map +1 -1
- package/dist/esm/utils/serializers/serializeRecordContent.mjs +86 -1
- package/dist/esm/utils/serializers/serializeRecordContent.mjs.map +1 -1
- package/dist/esm/utils/tld.mjs +58 -0
- package/dist/esm/utils/tld.mjs.map +1 -0
- package/dist/esm/utils/uint8Array/uint8ArrayFromHex.mjs +16 -1
- package/dist/esm/utils/uint8Array/uint8ArrayFromHex.mjs.map +1 -1
- package/dist/esm/utils/uint8Array/uint8ArrayToHex.mjs +12 -1
- package/dist/esm/utils/uint8Array/uint8ArrayToHex.mjs.map +1 -1
- package/dist/esm/utils/uint8Array/uint8ArraysEqual.mjs +16 -1
- package/dist/esm/utils/uint8Array/uint8ArraysEqual.mjs.map +1 -1
- package/dist/types/address/index.d.ts +193 -4
- package/dist/types/bindings/index.d.ts +821 -17
- package/dist/types/codecs.d.ts +16 -5
- package/dist/types/constants/index.d.ts +141 -3
- package/dist/types/domain/index.d.ts +559 -7
- package/dist/types/errors.d.ts +73 -85
- package/dist/types/index.d.ts +3038 -74
- package/dist/types/instructions/index.d.ts +523 -19
- package/dist/types/nft/index.d.ts +59 -2
- package/dist/types/record/index.d.ts +254 -4
- package/dist/types/states/index.d.ts +235 -4
- package/dist/types/types/index.d.ts +50 -2
- package/dist/types/utils/index.d.ts +346 -10
- package/package.json +47 -41
- package/dist/cjs/_virtual/ipaddr.cjs +0 -2
- package/dist/cjs/_virtual/ipaddr.cjs.map +0 -1
- package/dist/cjs/_virtual/ipaddr2.cjs +0 -2
- package/dist/cjs/_virtual/ipaddr2.cjs.map +0 -1
- package/dist/cjs/address/getDomainsForAddress.cjs +0 -2
- package/dist/cjs/address/getDomainsForAddress.cjs.map +0 -1
- package/dist/cjs/address/getNftsForAddress.cjs +0 -2
- package/dist/cjs/address/getNftsForAddress.cjs.map +0 -1
- package/dist/cjs/bindings/registerWithNft.cjs +0 -2
- package/dist/cjs/bindings/registerWithNft.cjs.map +0 -1
- package/dist/cjs/bindings/validateRoa.cjs +0 -2
- package/dist/cjs/bindings/validateRoa.cjs.map +0 -1
- package/dist/cjs/bindings/validateRoaEthereum.cjs +0 -2
- package/dist/cjs/bindings/validateRoaEthereum.cjs.map +0 -1
- package/dist/cjs/bindings/writeRoa.cjs +0 -2
- package/dist/cjs/bindings/writeRoa.cjs.map +0 -1
- package/dist/cjs/domain/getAllDomains.cjs +0 -2
- package/dist/cjs/domain/getAllDomains.cjs.map +0 -1
- package/dist/cjs/domain/getDomainAddress.cjs +0 -2
- package/dist/cjs/domain/getDomainAddress.cjs.map +0 -1
- package/dist/cjs/domain/resolveDomain.cjs +0 -2
- package/dist/cjs/domain/resolveDomain.cjs.map +0 -1
- package/dist/cjs/instructions/createAtaInstruction.cjs +0 -2
- package/dist/cjs/instructions/createAtaInstruction.cjs.map +0 -1
- package/dist/cjs/instructions/createInstructionV3.cjs +0 -2
- package/dist/cjs/instructions/createInstructionV3.cjs.map +0 -1
- package/dist/cjs/instructions/createV2Instruction.cjs +0 -2
- package/dist/cjs/instructions/createV2Instruction.cjs.map +0 -1
- package/dist/cjs/instructions/registerFavoriteInstruction.cjs +0 -2
- package/dist/cjs/instructions/registerFavoriteInstruction.cjs.map +0 -1
- package/dist/cjs/instructions/validateRoaEthereumInstruction.cjs +0 -2
- package/dist/cjs/instructions/validateRoaEthereumInstruction.cjs.map +0 -1
- package/dist/cjs/instructions/validateRoaInstruction.cjs +0 -2
- package/dist/cjs/instructions/validateRoaInstruction.cjs.map +0 -1
- package/dist/cjs/instructions/writeRoaInstruction.cjs +0 -2
- package/dist/cjs/instructions/writeRoaInstruction.cjs.map +0 -1
- package/dist/cjs/nft/getNftMint.cjs +0 -2
- package/dist/cjs/nft/getNftMint.cjs.map +0 -1
- package/dist/cjs/nft/getNftOwner.cjs +0 -2
- package/dist/cjs/nft/getNftOwner.cjs.map +0 -1
- package/dist/cjs/node_modules/@scure/base/lib/esm/index.cjs +0 -3
- package/dist/cjs/node_modules/@scure/base/lib/esm/index.cjs.map +0 -1
- package/dist/cjs/node_modules/@solana-program/token/dist/src/index.cjs +0 -2
- package/dist/cjs/node_modules/@solana-program/token/dist/src/index.cjs.map +0 -1
- package/dist/cjs/node_modules/borsh/lib/esm/buffer.cjs +0 -2
- package/dist/cjs/node_modules/borsh/lib/esm/buffer.cjs.map +0 -1
- package/dist/cjs/node_modules/borsh/lib/esm/deserialize.cjs +0 -2
- package/dist/cjs/node_modules/borsh/lib/esm/deserialize.cjs.map +0 -1
- package/dist/cjs/node_modules/borsh/lib/esm/index.cjs +0 -2
- package/dist/cjs/node_modules/borsh/lib/esm/index.cjs.map +0 -1
- package/dist/cjs/node_modules/borsh/lib/esm/serialize.cjs +0 -2
- package/dist/cjs/node_modules/borsh/lib/esm/serialize.cjs.map +0 -1
- package/dist/cjs/node_modules/borsh/lib/esm/types.cjs +0 -2
- package/dist/cjs/node_modules/borsh/lib/esm/types.cjs.map +0 -1
- package/dist/cjs/node_modules/borsh/lib/esm/utils.cjs +0 -2
- package/dist/cjs/node_modules/borsh/lib/esm/utils.cjs.map +0 -1
- package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.cjs +0 -2
- package/dist/cjs/node_modules/ipaddr.js/lib/ipaddr.cjs.map +0 -1
- package/dist/cjs/node_modules/punycode/punycode.es6.cjs +0 -2
- package/dist/cjs/node_modules/punycode/punycode.es6.cjs.map +0 -1
- package/dist/esm/_virtual/ipaddr.mjs +0 -2
- package/dist/esm/_virtual/ipaddr.mjs.map +0 -1
- package/dist/esm/_virtual/ipaddr2.mjs +0 -2
- package/dist/esm/_virtual/ipaddr2.mjs.map +0 -1
- package/dist/esm/address/getDomainsForAddress.mjs +0 -2
- package/dist/esm/address/getDomainsForAddress.mjs.map +0 -1
- package/dist/esm/address/getNftsForAddress.mjs +0 -2
- package/dist/esm/address/getNftsForAddress.mjs.map +0 -1
- package/dist/esm/bindings/registerWithNft.mjs +0 -2
- package/dist/esm/bindings/registerWithNft.mjs.map +0 -1
- package/dist/esm/bindings/validateRoa.mjs +0 -2
- package/dist/esm/bindings/validateRoa.mjs.map +0 -1
- package/dist/esm/bindings/validateRoaEthereum.mjs +0 -2
- package/dist/esm/bindings/validateRoaEthereum.mjs.map +0 -1
- package/dist/esm/bindings/writeRoa.mjs +0 -2
- package/dist/esm/bindings/writeRoa.mjs.map +0 -1
- package/dist/esm/domain/getAllDomains.mjs +0 -2
- package/dist/esm/domain/getAllDomains.mjs.map +0 -1
- package/dist/esm/domain/getDomainAddress.mjs +0 -2
- package/dist/esm/domain/getDomainAddress.mjs.map +0 -1
- package/dist/esm/domain/resolveDomain.mjs +0 -2
- package/dist/esm/domain/resolveDomain.mjs.map +0 -1
- package/dist/esm/instructions/createAtaInstruction.mjs +0 -2
- package/dist/esm/instructions/createAtaInstruction.mjs.map +0 -1
- package/dist/esm/instructions/createInstructionV3.mjs +0 -2
- package/dist/esm/instructions/createInstructionV3.mjs.map +0 -1
- package/dist/esm/instructions/createV2Instruction.mjs +0 -2
- package/dist/esm/instructions/createV2Instruction.mjs.map +0 -1
- package/dist/esm/instructions/registerFavoriteInstruction.mjs +0 -2
- package/dist/esm/instructions/registerFavoriteInstruction.mjs.map +0 -1
- package/dist/esm/instructions/validateRoaEthereumInstruction.mjs +0 -2
- package/dist/esm/instructions/validateRoaEthereumInstruction.mjs.map +0 -1
- package/dist/esm/instructions/validateRoaInstruction.mjs +0 -2
- package/dist/esm/instructions/validateRoaInstruction.mjs.map +0 -1
- package/dist/esm/instructions/writeRoaInstruction.mjs +0 -2
- package/dist/esm/instructions/writeRoaInstruction.mjs.map +0 -1
- package/dist/esm/nft/getNftMint.mjs +0 -2
- package/dist/esm/nft/getNftMint.mjs.map +0 -1
- package/dist/esm/nft/getNftOwner.mjs +0 -2
- package/dist/esm/nft/getNftOwner.mjs.map +0 -1
- package/dist/esm/node_modules/@scure/base/lib/esm/index.mjs +0 -3
- package/dist/esm/node_modules/@scure/base/lib/esm/index.mjs.map +0 -1
- package/dist/esm/node_modules/@solana-program/token/dist/src/index.mjs +0 -2
- package/dist/esm/node_modules/@solana-program/token/dist/src/index.mjs.map +0 -1
- package/dist/esm/node_modules/borsh/lib/esm/buffer.mjs +0 -2
- package/dist/esm/node_modules/borsh/lib/esm/buffer.mjs.map +0 -1
- package/dist/esm/node_modules/borsh/lib/esm/deserialize.mjs +0 -2
- package/dist/esm/node_modules/borsh/lib/esm/deserialize.mjs.map +0 -1
- package/dist/esm/node_modules/borsh/lib/esm/index.mjs +0 -2
- package/dist/esm/node_modules/borsh/lib/esm/index.mjs.map +0 -1
- package/dist/esm/node_modules/borsh/lib/esm/serialize.mjs +0 -2
- package/dist/esm/node_modules/borsh/lib/esm/serialize.mjs.map +0 -1
- package/dist/esm/node_modules/borsh/lib/esm/types.mjs +0 -2
- package/dist/esm/node_modules/borsh/lib/esm/types.mjs.map +0 -1
- package/dist/esm/node_modules/borsh/lib/esm/utils.mjs +0 -2
- package/dist/esm/node_modules/borsh/lib/esm/utils.mjs.map +0 -1
- package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.mjs +0 -2
- package/dist/esm/node_modules/ipaddr.js/lib/ipaddr.mjs.map +0 -1
- package/dist/esm/node_modules/punycode/punycode.es6.mjs +0 -2
- package/dist/esm/node_modules/punycode/punycode.es6.mjs.map +0 -1
- package/dist/types/address/getDomainsForAddress.d.ts +0 -19
- package/dist/types/address/getNftsForAddress.d.ts +0 -20
- package/dist/types/address/getPrimaryDomain.d.ts +0 -22
- package/dist/types/address/getPrimaryDomainsBatch.d.ts +0 -16
- package/dist/types/bindings/burnDomain.d.ts +0 -17
- package/dist/types/bindings/createNameRegistry.d.ts +0 -28
- package/dist/types/bindings/createRecord.d.ts +0 -23
- package/dist/types/bindings/createReverse.d.ts +0 -21
- package/dist/types/bindings/createSubdomain.d.ts +0 -23
- package/dist/types/bindings/deleteNameRegistry.d.ts +0 -21
- package/dist/types/bindings/deleteRecord.d.ts +0 -20
- package/dist/types/bindings/registerDomain.d.ts +0 -25
- package/dist/types/bindings/registerWithNft.d.ts +0 -21
- package/dist/types/bindings/setPrimaryDomain.d.ts +0 -16
- package/dist/types/bindings/transferDomain.d.ts +0 -23
- package/dist/types/bindings/transferSubdomain.d.ts +0 -25
- package/dist/types/bindings/updateNameRegistry.d.ts +0 -22
- package/dist/types/bindings/updateRecord.d.ts +0 -22
- package/dist/types/bindings/validateRoa.d.ts +0 -24
- package/dist/types/bindings/validateRoaEthereum.d.ts +0 -24
- package/dist/types/bindings/writeRoa.d.ts +0 -22
- package/dist/types/constants/addresses.d.ts +0 -53
- package/dist/types/constants/pythFeeds.d.ts +0 -3
- package/dist/types/constants/records.d.ts +0 -23
- package/dist/types/domain/getAllDomains.d.ts +0 -16
- package/dist/types/domain/getDomainAddress.d.ts +0 -30
- package/dist/types/domain/getDomainOwner.d.ts +0 -16
- package/dist/types/domain/getDomainRecord.d.ts +0 -35
- package/dist/types/domain/getDomainRecords.d.ts +0 -39
- package/dist/types/domain/getSubdomains.d.ts +0 -19
- package/dist/types/domain/resolveDomain.d.ts +0 -26
- package/dist/types/instructions/allocateAndPostRecordInstruction.d.ts +0 -23
- package/dist/types/instructions/burnDomainInstruction.d.ts +0 -12
- package/dist/types/instructions/createAtaInstruction.d.ts +0 -2
- package/dist/types/instructions/createInstructionV3.d.ts +0 -24
- package/dist/types/instructions/createNameRegistryInstruction.d.ts +0 -26
- package/dist/types/instructions/createReverseInstruction.d.ts +0 -16
- package/dist/types/instructions/createSplitV2Instruction.d.ts +0 -24
- package/dist/types/instructions/createV2Instruction.d.ts +0 -19
- package/dist/types/instructions/createWithNftInstruction.d.ts +0 -19
- package/dist/types/instructions/deleteNameRegistryInstruction.d.ts +0 -12
- package/dist/types/instructions/deleteRecordInstruction.d.ts +0 -12
- package/dist/types/instructions/reallocInstruction.d.ts +0 -16
- package/dist/types/instructions/registerFavoriteInstruction.d.ts +0 -12
- package/dist/types/instructions/transferInstruction.d.ts +0 -21
- package/dist/types/instructions/updateNameRegistryInstruction.d.ts +0 -23
- package/dist/types/instructions/updateRecordInstruction.d.ts +0 -23
- package/dist/types/instructions/validateRoaEthereumInstruction.d.ts +0 -30
- package/dist/types/instructions/validateRoaInstruction.d.ts +0 -16
- package/dist/types/instructions/writeRoaInstruction.d.ts +0 -20
- package/dist/types/nft/getNftMint.d.ts +0 -13
- package/dist/types/nft/getNftOwner.d.ts +0 -15
- package/dist/types/record/getRecordV1Address.d.ts +0 -15
- package/dist/types/record/getRecordV2Address.d.ts +0 -16
- package/dist/types/record/verifyRecordRightOfAssociation.d.ts +0 -40
- package/dist/types/record/verifyRecordStaleness.d.ts +0 -31
- package/dist/types/states/nft.d.ts +0 -50
- package/dist/types/states/primaryDomain.d.ts +0 -25
- package/dist/types/states/record.d.ts +0 -30
- package/dist/types/states/registry.d.ts +0 -39
- package/dist/types/types/record.d.ts +0 -38
- package/dist/types/types/validation.d.ts +0 -6
- package/dist/types/utils/check.d.ts +0 -10
- package/dist/types/utils/checkAddressOnCurve/ed25519.d.ts +0 -1
- package/dist/types/utils/checkAddressOnCurve/index.d.ts +0 -2
- package/dist/types/utils/deriveAddress.d.ts +0 -28
- package/dist/types/utils/deserializers/deserializeRecordContent.d.ts +0 -17
- package/dist/types/utils/deserializers/deserializeReverse.d.ts +0 -16
- package/dist/types/utils/getPythFeedAddress.d.ts +0 -14
- package/dist/types/utils/getReverseAddress.d.ts +0 -1
- package/dist/types/utils/getReverseAddressFromDomainAddress.d.ts +0 -15
- package/dist/types/utils/reverseLookup.d.ts +0 -18
- package/dist/types/utils/reverseLookupBatch.d.ts +0 -16
- package/dist/types/utils/serializers/serializeRecordContent.d.ts +0 -16
- package/dist/types/utils/uint8Array/uint8ArrayFromHex.d.ts +0 -6
- package/dist/types/utils/uint8Array/uint8ArrayToHex.d.ts +0 -7
- package/dist/types/utils/uint8Array/uint8ArraysConcat.d.ts +0 -8
- package/dist/types/utils/uint8Array/uint8ArraysEqual.d.ts +0 -9
|
@@ -1,7 +1,559 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Rpc, GetProgramAccountsApi, Address, GetAccountInfoApi, GetTokenLargestAccountsApi, GetSlotApi, GetMultipleAccountsApi, ReadonlyUint8Array } from '@solana/kit';
|
|
2
|
+
import * as _solana_addresses from '@solana/addresses';
|
|
3
|
+
import { Schema } from 'borsh';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for retrieving all SNS domains.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const params: GetAllSnsDomainsParams = { rpc };
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
interface GetAllSnsDomainsParams {
|
|
14
|
+
/** RPC client. */
|
|
15
|
+
rpc: Rpc<GetProgramAccountsApi>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A top-level SNS domain account.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const domain: GetAllSnsDomainsResult = { domainAddress, owner };
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
interface GetAllSnsDomainsResult {
|
|
26
|
+
/** Domain account address. */
|
|
27
|
+
domainAddress: Address;
|
|
28
|
+
/** Registry owner address. */
|
|
29
|
+
owner: Address;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves all top-level SNS domain accounts.
|
|
33
|
+
*
|
|
34
|
+
* @param params Domain retrieval parameters
|
|
35
|
+
* @param params.rpc RPC client implementing program account lookup
|
|
36
|
+
* @returns Domain account addresses and owners.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const domains = await getAllSnsDomains({ rpc });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const getAllSnsDomains: ({ rpc, }: GetAllSnsDomainsParams) => Promise<GetAllSnsDomainsResult[]>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Supported SNS record identifiers.
|
|
47
|
+
*/
|
|
48
|
+
declare enum Record {
|
|
49
|
+
IPFS = "IPFS",
|
|
50
|
+
ARWV = "ARWV",
|
|
51
|
+
SOL = "SOL",
|
|
52
|
+
ETH = "ETH",
|
|
53
|
+
BTC = "BTC",
|
|
54
|
+
LTC = "LTC",
|
|
55
|
+
DOGE = "DOGE",
|
|
56
|
+
Email = "email",
|
|
57
|
+
Url = "url",
|
|
58
|
+
Discord = "discord",
|
|
59
|
+
Github = "github",
|
|
60
|
+
Reddit = "reddit",
|
|
61
|
+
Twitter = "twitter",
|
|
62
|
+
Telegram = "telegram",
|
|
63
|
+
Pic = "pic",
|
|
64
|
+
SHDW = "SHDW",
|
|
65
|
+
POINT = "POINT",
|
|
66
|
+
BSC = "BSC",
|
|
67
|
+
Injective = "INJ",
|
|
68
|
+
Backpack = "backpack",
|
|
69
|
+
A = "A",
|
|
70
|
+
AAAA = "AAAA",
|
|
71
|
+
CNAME = "CNAME",
|
|
72
|
+
TXT = "TXT",
|
|
73
|
+
Background = "background",
|
|
74
|
+
BASE = "BASE",
|
|
75
|
+
IPNS = "IPNS",
|
|
76
|
+
Bio = "bio"
|
|
77
|
+
}
|
|
78
|
+
/** Versions of the SNS record account layout. */
|
|
79
|
+
declare enum RecordVersion {
|
|
80
|
+
V1 = 1,
|
|
81
|
+
V2 = 2
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Parameters for deriving an SNS domain address.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const params: GetSnsDomainAddressParams = { domain: "example" };
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
interface GetSnsDomainAddressParams {
|
|
93
|
+
/** TLD-less domain name. */
|
|
94
|
+
domain: string;
|
|
95
|
+
/** Record version. */
|
|
96
|
+
record?: RecordVersion;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A derived SNS domain address.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const derived: GetSnsDomainAddressResult = {
|
|
104
|
+
* domainAddress,
|
|
105
|
+
* isSub: false,
|
|
106
|
+
* };
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
interface GetSnsDomainAddressResult {
|
|
110
|
+
/** Derived account address. */
|
|
111
|
+
domainAddress: Address;
|
|
112
|
+
/** Parent domain address for subdomains. */
|
|
113
|
+
parentAddress?: Address;
|
|
114
|
+
/** Whether the input is a subdomain. */
|
|
115
|
+
isSub: boolean;
|
|
116
|
+
/** Whether the input is a subdomain record. */
|
|
117
|
+
isSubRecord?: boolean;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Derives the address of a domain, subdomain, or record account.
|
|
121
|
+
*
|
|
122
|
+
* @param params Derivation parameters
|
|
123
|
+
* @param params.domain TLD-trimmed SNS domain name
|
|
124
|
+
* @param params.record Optional record account version for record derivation
|
|
125
|
+
* @returns Derived account address and metadata describing top-level, subdomain, or sub-record derivation.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```ts
|
|
129
|
+
* const derived = await getSnsDomainAddress({ domain: "example" });
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
declare const getSnsDomainAddress: ({ domain, record, }: GetSnsDomainAddressParams) => Promise<GetSnsDomainAddressResult>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Parameters for deriving an SRS domain address.
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* ```ts
|
|
139
|
+
* const params: GetSrsDomainAddressParams = { domain: "example" };
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
interface GetSrsDomainAddressParams {
|
|
143
|
+
/** TLD-less `.sol` domain name. */
|
|
144
|
+
domain: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A derived SRS domain address.
|
|
148
|
+
*
|
|
149
|
+
* @example
|
|
150
|
+
* ```ts
|
|
151
|
+
* const derived: GetSrsDomainAddressResult = { domainAddress, hashed };
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
interface GetSrsDomainAddressResult {
|
|
155
|
+
/** Derived SRS record address. */
|
|
156
|
+
domainAddress: Address;
|
|
157
|
+
/** SHA-256 hash of the canonical name. */
|
|
158
|
+
hashed: Uint8Array;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Derives the canonical SRS record address for a TLD-trimmed `.sol` name.
|
|
162
|
+
*
|
|
163
|
+
* @param params Derivation parameters
|
|
164
|
+
* @param params.domain TLD-trimmed `.sol` name
|
|
165
|
+
* @returns The SRS record address and canonical name hash.
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```ts
|
|
169
|
+
* const derived = await getSrsDomainAddress({ domain: "example" });
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
declare const getSrsDomainAddress: ({ domain, }: GetSrsDomainAddressParams) => Promise<GetSrsDomainAddressResult>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Parameters for retrieving a domain owner.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```ts
|
|
179
|
+
* const params: GetDomainOwnerParams = { rpc, domain: "example.sns" };
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
interface GetDomainOwnerParams {
|
|
183
|
+
/** RPC client. */
|
|
184
|
+
rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi & GetSlotApi>;
|
|
185
|
+
/** Full domain name. */
|
|
186
|
+
domain: string;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Retrieves the owner of the specified domain. If the domain is tokenized,
|
|
190
|
+
* the NFT's owner is returned; otherwise, the registry owner is returned.
|
|
191
|
+
*
|
|
192
|
+
* @param params Domain owner retrieval parameters
|
|
193
|
+
* @param params.rpc RPC client implementing account and token-largest-account APIs
|
|
194
|
+
* @param params.domain Full domain name including a `.sns` or `.sol` suffix
|
|
195
|
+
* @returns The domain owner address.
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```ts
|
|
199
|
+
* const owner = await getDomainOwner({ rpc, domain: "example.sns" });
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
declare const getDomainOwner: ({ rpc, domain }: GetDomainOwnerParams) => Promise<_solana_addresses.Address>;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Input for decoding an SNS V2 record header.
|
|
206
|
+
*
|
|
207
|
+
* @example
|
|
208
|
+
* ```ts
|
|
209
|
+
* const params: RecordHeaderStateParams = { stalenessValidation: 0, rightOfAssociationValidation: 0, contentLength: 0 };
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
interface RecordHeaderStateParams {
|
|
213
|
+
/** Staleness validation mode. */
|
|
214
|
+
stalenessValidation: number;
|
|
215
|
+
/** Right of Association validation mode. */
|
|
216
|
+
rightOfAssociationValidation: number;
|
|
217
|
+
/** Record content length in bytes. */
|
|
218
|
+
contentLength: number;
|
|
219
|
+
}
|
|
220
|
+
/** Decoded header of an SNS V2 record account. */
|
|
221
|
+
declare class RecordHeaderState {
|
|
222
|
+
/** Staleness validation mode. */
|
|
223
|
+
stalenessValidation: number;
|
|
224
|
+
/** Right of Association validation mode. */
|
|
225
|
+
rightOfAssociationValidation: number;
|
|
226
|
+
/** Record content length in bytes. */
|
|
227
|
+
contentLength: number;
|
|
228
|
+
static schema: Schema;
|
|
229
|
+
static LEN: number;
|
|
230
|
+
constructor(obj: RecordHeaderStateParams);
|
|
231
|
+
static deserialize(data: Uint8Array): RecordHeaderState;
|
|
232
|
+
static retrieve(rpc: Rpc<GetAccountInfoApi>, address: Address): Promise<RecordHeaderState>;
|
|
233
|
+
}
|
|
234
|
+
/** Decoded SNS V2 record account, including its validation data and content. */
|
|
235
|
+
declare class RecordState {
|
|
236
|
+
/** Decoded record header. */
|
|
237
|
+
header: RecordHeaderState;
|
|
238
|
+
/** Validation identifiers and record content. */
|
|
239
|
+
data: Uint8Array;
|
|
240
|
+
constructor(header: RecordHeaderState, data: Uint8Array);
|
|
241
|
+
static deserialize(data: Uint8Array): RecordState;
|
|
242
|
+
static retrieve(rpc: Rpc<GetAccountInfoApi>, address: Address): Promise<RecordState>;
|
|
243
|
+
static retrieveBatch(rpc: Rpc<GetMultipleAccountsApi>, addresses: Address[]): Promise<(RecordState | undefined)[]>;
|
|
244
|
+
getContent(): Uint8Array;
|
|
245
|
+
getStalenessId(): Uint8Array;
|
|
246
|
+
getRoAId(): Uint8Array;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Options for retrieving a domain record.
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```ts
|
|
254
|
+
* const options: GetDomainRecordOptions = { deserialize: true };
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
interface GetDomainRecordOptions {
|
|
258
|
+
/** Whether to decode record content. */
|
|
259
|
+
deserialize?: boolean;
|
|
260
|
+
/** Custom Right of Association verifier. */
|
|
261
|
+
verifier?: ReadonlyUint8Array;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Parameters for retrieving a domain record.
|
|
265
|
+
*
|
|
266
|
+
* @example
|
|
267
|
+
* ```ts
|
|
268
|
+
* const params: GetDomainRecordParams = {
|
|
269
|
+
* rpc,
|
|
270
|
+
* domain: "example.sns",
|
|
271
|
+
* record: Record.Url,
|
|
272
|
+
* };
|
|
273
|
+
* ```
|
|
274
|
+
*/
|
|
275
|
+
interface GetDomainRecordParams {
|
|
276
|
+
/** RPC client. */
|
|
277
|
+
rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi & GetSlotApi>;
|
|
278
|
+
/** Full domain name. */
|
|
279
|
+
domain: string;
|
|
280
|
+
/** Record type to retrieve. */
|
|
281
|
+
record: Record;
|
|
282
|
+
/** Record retrieval options. */
|
|
283
|
+
options?: GetDomainRecordOptions;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Verification status for a domain record.
|
|
287
|
+
*
|
|
288
|
+
* @example
|
|
289
|
+
* ```ts
|
|
290
|
+
* const verified: GetDomainRecordVerification = { staleness: true };
|
|
291
|
+
* ```
|
|
292
|
+
*/
|
|
293
|
+
interface GetDomainRecordVerification {
|
|
294
|
+
/** Whether the record is current. */
|
|
295
|
+
staleness: boolean;
|
|
296
|
+
/** Right of Association verification result. */
|
|
297
|
+
roa?: boolean;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A retrieved domain record.
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```ts
|
|
304
|
+
* const result: GetDomainRecordResult = {
|
|
305
|
+
* record: Record.Url,
|
|
306
|
+
* retrievedRecord,
|
|
307
|
+
* verified: { staleness: true },
|
|
308
|
+
* };
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
interface GetDomainRecordResult {
|
|
312
|
+
/** Record type. */
|
|
313
|
+
record: Record;
|
|
314
|
+
/** Retrieved record state. */
|
|
315
|
+
retrievedRecord: RecordState;
|
|
316
|
+
/** Verification status. */
|
|
317
|
+
verified: GetDomainRecordVerification;
|
|
318
|
+
/** Decoded record content. */
|
|
319
|
+
deserializedContent?: string;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Retrieves a V2 record under a domain, verifies it, and optionally decodes its content.
|
|
323
|
+
*
|
|
324
|
+
* @param params Record retrieval parameters
|
|
325
|
+
* @param params.rpc RPC client implementing account, multiple-account, and token-largest-account APIs
|
|
326
|
+
* @param params.domain Full domain name including a `.sns` or `.sol` suffix
|
|
327
|
+
* @param params.record Record type to retrieve
|
|
328
|
+
* @param params.options Optional record processing options
|
|
329
|
+
* @returns The V2 record state, its verification result, and optional decoded content
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```ts
|
|
333
|
+
* const result = await getDomainRecord({ rpc, domain: "example.sns", record: Record.Url });
|
|
334
|
+
* ```
|
|
335
|
+
*/
|
|
336
|
+
declare function getDomainRecord({ rpc, domain, record, options, }: GetDomainRecordParams): Promise<GetDomainRecordResult>;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Options for retrieving domain records.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* ```ts
|
|
343
|
+
* const options: GetDomainRecordsOptions<[Record.Url], [undefined]> = {
|
|
344
|
+
* deserialize: true,
|
|
345
|
+
* verifiers: [undefined],
|
|
346
|
+
* };
|
|
347
|
+
* ```
|
|
348
|
+
*/
|
|
349
|
+
interface GetDomainRecordsOptions<T extends Record[], U extends {
|
|
350
|
+
[K in keyof T]: ReadonlyUint8Array | undefined;
|
|
351
|
+
}> {
|
|
352
|
+
/** Whether to decode record content. */
|
|
353
|
+
deserialize?: boolean;
|
|
354
|
+
/** Right of Association verifiers by record position. */
|
|
355
|
+
verifiers?: [...U];
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Parameters for retrieving domain records.
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```ts
|
|
362
|
+
* const params: GetDomainRecordsParams<[Record.Url], [undefined]> = {
|
|
363
|
+
* rpc,
|
|
364
|
+
* domain: "example.sns",
|
|
365
|
+
* records: [Record.Url],
|
|
366
|
+
* };
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
interface GetDomainRecordsParams<T extends Record[], U extends {
|
|
370
|
+
[K in keyof T]: ReadonlyUint8Array | undefined;
|
|
371
|
+
}> {
|
|
372
|
+
/** RPC client. */
|
|
373
|
+
rpc: Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi & GetSlotApi>;
|
|
374
|
+
/** Full domain name. */
|
|
375
|
+
domain: string;
|
|
376
|
+
/** Record types to retrieve. */
|
|
377
|
+
records: [...T];
|
|
378
|
+
/** Record retrieval options. */
|
|
379
|
+
options?: GetDomainRecordsOptions<T, U>;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Verification status for a domain record.
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```ts
|
|
386
|
+
* const verified: GetDomainRecordsVerification = { staleness: true };
|
|
387
|
+
* ```
|
|
388
|
+
*/
|
|
389
|
+
interface GetDomainRecordsVerification {
|
|
390
|
+
/** Whether the record is current. */
|
|
391
|
+
staleness: boolean;
|
|
392
|
+
/** Right of Association verification result. */
|
|
393
|
+
roa?: boolean;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* A retrieved domain record.
|
|
397
|
+
*
|
|
398
|
+
* @example
|
|
399
|
+
* ```ts
|
|
400
|
+
* const result: GetDomainRecordsResult = {
|
|
401
|
+
* record: Record.Url,
|
|
402
|
+
* retrievedRecord,
|
|
403
|
+
* verified: { staleness: true },
|
|
404
|
+
* };
|
|
405
|
+
* ```
|
|
406
|
+
*/
|
|
407
|
+
interface GetDomainRecordsResult {
|
|
408
|
+
/** Record type. */
|
|
409
|
+
record: Record;
|
|
410
|
+
/** Retrieved record state. */
|
|
411
|
+
retrievedRecord: RecordState;
|
|
412
|
+
/** Verification status. */
|
|
413
|
+
verified: GetDomainRecordsVerification;
|
|
414
|
+
/** Decoded record content. */
|
|
415
|
+
deserializedContent?: string;
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Retrieves V2 records under a domain, verifies them, and optionally decodes their content.
|
|
419
|
+
*
|
|
420
|
+
* @param params Record retrieval parameters
|
|
421
|
+
* @param params.rpc RPC client implementing account, multiple-account, and token-largest-account APIs
|
|
422
|
+
* @param params.domain Full domain name including a `.sns` or `.sol` suffix
|
|
423
|
+
* @param params.records Record types to retrieve
|
|
424
|
+
* @param params.options Optional record processing options
|
|
425
|
+
* @returns Results aligned with `records`; missing V2 record accounts produce `undefined`
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* ```ts
|
|
429
|
+
* const results = await getDomainRecords({ rpc, domain: "example.sns", records: [Record.Url] });
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
declare function getDomainRecords<T extends Record[], U extends {
|
|
433
|
+
[K in keyof T]: ReadonlyUint8Array | undefined;
|
|
434
|
+
}>({ rpc, domain, records, options, }: GetDomainRecordsParams<T, U>): Promise<(GetDomainRecordsResult | undefined)[]>;
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Parameters for retrieving subdomains under a parent domain.
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* ```ts
|
|
441
|
+
* const params: GetSubdomainsParams = {
|
|
442
|
+
* rpc,
|
|
443
|
+
* domain: "example.sns",
|
|
444
|
+
* };
|
|
445
|
+
* ```
|
|
446
|
+
*/
|
|
447
|
+
interface GetSubdomainsParams {
|
|
448
|
+
/** RPC client. */
|
|
449
|
+
rpc: Rpc<GetProgramAccountsApi & GetSlotApi>;
|
|
450
|
+
/** Full parent domain name, including its `.sns` or `.sol` suffix. */
|
|
451
|
+
domain: string;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* A subdomain and the owner recorded in its name registry.
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* ```ts
|
|
458
|
+
* const subdomain: GetSubdomainsResult = {
|
|
459
|
+
* subdomain: "blog",
|
|
460
|
+
* owner: "Fxuoy3gFjfJALhwkRcuKjRdechcgffUApeYAfMWck6w8" as Address,
|
|
461
|
+
* };
|
|
462
|
+
* ```
|
|
463
|
+
*/
|
|
464
|
+
interface GetSubdomainsResult {
|
|
465
|
+
/** TLD-less label recorded by the subdomain's reverse lookup account. */
|
|
466
|
+
subdomain: string;
|
|
467
|
+
/** Owner address stored in the subdomain's name registry account. */
|
|
468
|
+
owner: Address;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Retrieves subdomains under a parent domain, including their owners.
|
|
472
|
+
*
|
|
473
|
+
* Entries without reverse lookup data are omitted. Passing a subdomain returns
|
|
474
|
+
* an empty array.
|
|
475
|
+
*
|
|
476
|
+
* @param params Subdomain retrieval parameters
|
|
477
|
+
* @param params.rpc RPC client implementing program account lookup
|
|
478
|
+
* @param params.domain Full parent domain name including a `.sns` or `.sol` suffix
|
|
479
|
+
* @returns Subdomain names and owner addresses.
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```ts
|
|
483
|
+
* const subdomains = await getSubdomains({ rpc, domain: "example.sns" });
|
|
484
|
+
* ```
|
|
485
|
+
*/
|
|
486
|
+
declare const getSubdomains: ({ rpc, domain, }: GetSubdomainsParams) => Promise<GetSubdomainsResult[]>;
|
|
487
|
+
|
|
488
|
+
/** Controls whether resolution may return program-derived addresses. */
|
|
489
|
+
type ResolveOptions = {
|
|
490
|
+
allowPda: false;
|
|
491
|
+
programIds?: never;
|
|
492
|
+
} | {
|
|
493
|
+
allowPda: "any";
|
|
494
|
+
programIds?: never;
|
|
495
|
+
} | {
|
|
496
|
+
allowPda: true;
|
|
497
|
+
programIds: Address[];
|
|
498
|
+
};
|
|
499
|
+
/** RPC client type for domain resolution. */
|
|
500
|
+
type ResolveRpc = Rpc<GetAccountInfoApi & GetMultipleAccountsApi & GetTokenLargestAccountsApi & GetSlotApi>;
|
|
501
|
+
/**
|
|
502
|
+
* Parameters for resolving a domain.
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* ```ts
|
|
506
|
+
* const params: ResolveParams = { rpc, domain: "example.sns" };
|
|
507
|
+
* ```
|
|
508
|
+
*/
|
|
509
|
+
interface ResolveParams {
|
|
510
|
+
/** RPC client. */
|
|
511
|
+
rpc: ResolveRpc;
|
|
512
|
+
/** Full domain name. */
|
|
513
|
+
domain: string;
|
|
514
|
+
/** Resolution options. */
|
|
515
|
+
options?: ResolveOptions;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Resolves a `.sns` or `.sol` domain to its target address.
|
|
520
|
+
*
|
|
521
|
+
* @param params Resolution parameters
|
|
522
|
+
* @param params.rpc RPC client implementing account, multiple-account, token-largest-account, and slot APIs
|
|
523
|
+
* @param params.domain Full domain name including a `.sns` or `.sol` suffix
|
|
524
|
+
* @param params.options Optional PDA owner resolution options. Defaults to `{ allowPda: false }`
|
|
525
|
+
* @returns The resolved target address.
|
|
526
|
+
*
|
|
527
|
+
* @see {@link safeResolve} for `.sol` resolution that verifies the SRS and
|
|
528
|
+
* corresponding SNS targets match when SRS-backed resolution is enabled.
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* ```ts
|
|
532
|
+
* const address = await resolve({ rpc, domain: "example.sns" });
|
|
533
|
+
* ```
|
|
534
|
+
*/
|
|
535
|
+
declare const resolve: ({ rpc, domain, options, }: ResolveParams) => Promise<Address>;
|
|
536
|
+
/**
|
|
537
|
+
* Resolves a `.sns` or `.sol` domain using the same routing as {@link resolve}.
|
|
538
|
+
*
|
|
539
|
+
* When SRS-backed `.sol` resolution is enabled, both the `.sol` domain and its
|
|
540
|
+
* corresponding `.sns` domain must resolve to the same target; otherwise,
|
|
541
|
+
* {@link Errors.SnsSolResolutionMismatchError} is thrown.
|
|
542
|
+
*
|
|
543
|
+
* @param params Resolution parameters
|
|
544
|
+
* @param params.rpc RPC client implementing account, multiple-account, token-largest-account, and slot APIs
|
|
545
|
+
* @param params.domain Full domain name including a `.sns` or `.sol` suffix
|
|
546
|
+
* @param params.options Optional PDA owner resolution options. Defaults to `{ allowPda: false }`
|
|
547
|
+
* @returns The matching SRS and SNS target when compared; otherwise the target returned by {@link resolve}
|
|
548
|
+
* @throws
|
|
549
|
+
* - {@link Errors.SnsSolResolutionMismatchError} when SRS and SNS resolve a `.sol` domain to different addresses.
|
|
550
|
+
* - Any resolution error propagated by {@link resolve}, `resolveSol`, or `resolveSns`.
|
|
551
|
+
* @example
|
|
552
|
+
* ```ts
|
|
553
|
+
* const address = await safeResolve({ rpc, domain: "example.sol" });
|
|
554
|
+
* ```
|
|
555
|
+
*/
|
|
556
|
+
declare const safeResolve: ({ rpc, domain, options, }: ResolveParams) => Promise<Address>;
|
|
557
|
+
|
|
558
|
+
export { getAllSnsDomains, getDomainOwner, getDomainRecord, getDomainRecords, getSnsDomainAddress, getSrsDomainAddress, getSubdomains, resolve, safeResolve };
|
|
559
|
+
export type { GetAllSnsDomainsParams, GetAllSnsDomainsResult, GetDomainOwnerParams, GetDomainRecordOptions, GetDomainRecordParams, GetDomainRecordResult, GetDomainRecordVerification, GetDomainRecordsOptions, GetDomainRecordsParams, GetDomainRecordsResult, GetDomainRecordsVerification, GetSnsDomainAddressParams, GetSnsDomainAddressResult, GetSrsDomainAddressParams, GetSrsDomainAddressResult, GetSubdomainsParams, GetSubdomainsResult, ResolveOptions, ResolveParams };
|