@solana-name-service/sns-sdk-kit 0.10.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +322 -90
- 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,19 +1,523 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { ReadonlyUint8Array, Address, Instruction } from '@solana/kit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Input for allocating and writing an SNS V2 record.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const params: AllocateAndPostRecordInstructionParams = { record, content };
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
interface AllocateAndPostRecordInstructionParams {
|
|
12
|
+
/** Encoded V2 record label. */
|
|
13
|
+
record: string;
|
|
14
|
+
/** Serialized record content. */
|
|
15
|
+
content: ReadonlyUint8Array;
|
|
16
|
+
}
|
|
17
|
+
/** Builder for allocating and writing an SNS V2 record account. */
|
|
18
|
+
declare class AllocateAndPostRecordInstruction {
|
|
19
|
+
/** Instruction discriminator. */
|
|
20
|
+
tag: number;
|
|
21
|
+
/** Encoded V2 record label. */
|
|
22
|
+
record: string;
|
|
23
|
+
/** Serialized record content. */
|
|
24
|
+
content: ReadonlyUint8Array;
|
|
25
|
+
static schema: {
|
|
26
|
+
struct: {
|
|
27
|
+
tag: string;
|
|
28
|
+
record: string;
|
|
29
|
+
content: {
|
|
30
|
+
array: {
|
|
31
|
+
type: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
constructor(obj: AllocateAndPostRecordInstructionParams);
|
|
37
|
+
serialize(): Uint8Array;
|
|
38
|
+
getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, payer: Address, record: Address, domainAddress: Address, domainOwner: Address, centralState: Address): Instruction;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Builder for burning an SNS domain NFT and registry account. */
|
|
42
|
+
declare class BurnDomainInstruction {
|
|
43
|
+
/** Instruction discriminator. */
|
|
44
|
+
tag: number;
|
|
45
|
+
static schema: {
|
|
46
|
+
struct: {
|
|
47
|
+
tag: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
constructor();
|
|
51
|
+
serialize(): Uint8Array;
|
|
52
|
+
getInstruction(programAddress: Address, nameServiceId: Address, systemProgram: Address, domainAddress: Address, reverse: Address, resellingState: Address, state: Address, centralState: Address, owner: Address, target: Address): Instruction;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Creates an idempotent associated-token-account instruction.
|
|
57
|
+
*
|
|
58
|
+
* The instruction succeeds when the associated token account already exists,
|
|
59
|
+
* allowing callers to include it safely before token transfers.
|
|
60
|
+
*
|
|
61
|
+
* @param programAddress Associated Token Program address
|
|
62
|
+
* @param payer Account funding associated token account creation
|
|
63
|
+
* @param ata Derived associated token account address
|
|
64
|
+
* @param owner Owner of the associated token account
|
|
65
|
+
* @param mint Token mint for the associated token account
|
|
66
|
+
* @param systemProgram Solana System Program address
|
|
67
|
+
* @param splTokenProgram SPL Token Program address
|
|
68
|
+
* @returns Idempotent associated-token-account creation instruction
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const instruction = _createAtaIdempotentInstruction(
|
|
73
|
+
* ASSOCIATED_TOKEN_PROGRAM_ADDRESS,
|
|
74
|
+
* payer,
|
|
75
|
+
* ata,
|
|
76
|
+
* owner,
|
|
77
|
+
* mint,
|
|
78
|
+
* SYSTEM_PROGRAM_ADDRESS,
|
|
79
|
+
* TOKEN_PROGRAM_ADDRESS,
|
|
80
|
+
* );
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare const _createAtaIdempotentInstruction: (programAddress: Address, payer: Address, ata: Address, owner: Address, mint: Address, systemProgram: Address, splTokenProgram: Address) => Instruction;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Input for creating an SNS name-registry account.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* const params: CreateNameRegistryInstructionParams = { nameHash, lamports, space: 32 };
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
interface CreateNameRegistryInstructionParams {
|
|
94
|
+
/** Hash of the registry name. */
|
|
95
|
+
nameHash: Uint8Array;
|
|
96
|
+
/** Account funding amount. */
|
|
97
|
+
lamports: bigint;
|
|
98
|
+
/** Account data size in bytes. */
|
|
99
|
+
space: number;
|
|
100
|
+
}
|
|
101
|
+
/** Builder for creating an SNS name-registry account. */
|
|
102
|
+
declare class CreateNameRegistryInstruction {
|
|
103
|
+
/** Instruction discriminator. */
|
|
104
|
+
tag: number;
|
|
105
|
+
/** Hash of the registry name. */
|
|
106
|
+
nameHash: Uint8Array;
|
|
107
|
+
/** Account funding amount. */
|
|
108
|
+
lamports: bigint;
|
|
109
|
+
/** Account data size in bytes. */
|
|
110
|
+
space: number;
|
|
111
|
+
static schema: {
|
|
112
|
+
struct: {
|
|
113
|
+
tag: string;
|
|
114
|
+
nameHash: {
|
|
115
|
+
array: {
|
|
116
|
+
type: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
lamports: string;
|
|
120
|
+
space: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
constructor(obj: CreateNameRegistryInstructionParams);
|
|
124
|
+
serialize(): Uint8Array;
|
|
125
|
+
getInstruction(programAddress: Address, systemProgram: Address, domainAddress: Address, owner: Address, payer: Address, classAddress?: Address, parentAddress?: Address, parentOwner?: Address): Instruction;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Input for creating an SNS reverse-lookup account.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts
|
|
133
|
+
* const params: CreateReverseInstructionParams = { domain: "example" };
|
|
134
|
+
* ```
|
|
135
|
+
*/
|
|
136
|
+
interface CreateReverseInstructionParams {
|
|
137
|
+
/** Raw reverse lookup payload. */
|
|
138
|
+
domain: string;
|
|
139
|
+
}
|
|
140
|
+
/** Builder for creating an SNS reverse-lookup account. */
|
|
141
|
+
declare class CreateReverseInstruction {
|
|
142
|
+
/** Instruction discriminator. */
|
|
143
|
+
tag: number;
|
|
144
|
+
/** Raw reverse lookup payload. */
|
|
145
|
+
domain: string;
|
|
146
|
+
static schema: {
|
|
147
|
+
struct: {
|
|
148
|
+
tag: string;
|
|
149
|
+
domain: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
constructor(obj: CreateReverseInstructionParams);
|
|
153
|
+
serialize(): Uint8Array;
|
|
154
|
+
getInstruction(programAddress: Address, namingServiceProgram: Address, rootDomain: Address, reverseLookup: Address, systemProgram: Address, centralState: Address, payer: Address, rentSysvar: Address, parentAddress?: Address, parentOwner?: Address): Instruction;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Input for creating a split SNS V2 domain account.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```ts
|
|
162
|
+
* const params: CreateSplitV2InstructionParams = { name: "example", space: 1_000, referrerIdxOpt: null };
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
interface CreateSplitV2InstructionParams {
|
|
166
|
+
/** TLD-less domain name. */
|
|
167
|
+
name: string;
|
|
168
|
+
/** Account data size in bytes. */
|
|
169
|
+
space: number;
|
|
170
|
+
/** Approved referrer index, if any. */
|
|
171
|
+
referrerIdxOpt: number | null;
|
|
172
|
+
}
|
|
173
|
+
/** Builder for creating a split SNS V2 domain account. */
|
|
174
|
+
declare class CreateSplitV2Instruction {
|
|
175
|
+
/** Instruction discriminator. */
|
|
176
|
+
tag: number;
|
|
177
|
+
/** TLD-less domain name. */
|
|
178
|
+
name: string;
|
|
179
|
+
/** Account data size in bytes. */
|
|
180
|
+
space: number;
|
|
181
|
+
/** Approved referrer index, if any. */
|
|
182
|
+
referrerIdxOpt: number | null;
|
|
183
|
+
static schema: {
|
|
184
|
+
struct: {
|
|
185
|
+
tag: string;
|
|
186
|
+
name: string;
|
|
187
|
+
space: string;
|
|
188
|
+
referrerIdxOpt: {
|
|
189
|
+
option: string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
constructor(obj: CreateSplitV2InstructionParams);
|
|
194
|
+
serialize(): Uint8Array;
|
|
195
|
+
getInstruction(programAddress: Address, namingServiceProgram: Address, rootDomain: Address, name: Address, reverseLookup: Address, systemProgram: Address, centralState: Address, buyer: Address, domainOwner: Address, feePayer: Address, buyerTokenSource: Address, pythFeedAccount: Address, vault: Address, splTokenProgram: Address, rentSysvar: Address, state: Address, referrerAccountOpt?: Address): Instruction;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Input for registering an SNS domain backed by an NFT.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```ts
|
|
203
|
+
* const params: CreateWithNftInstructionParams = { name: "example", space: 1_000 };
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
interface CreateWithNftInstructionParams {
|
|
207
|
+
/** TLD-less domain name. */
|
|
208
|
+
name: string;
|
|
209
|
+
/** Account data size in bytes. */
|
|
210
|
+
space: number;
|
|
211
|
+
}
|
|
212
|
+
/** Builder for registering an SNS domain backed by an NFT. */
|
|
213
|
+
declare class CreateWithNftInstruction {
|
|
214
|
+
/** Instruction discriminator. */
|
|
215
|
+
tag: number;
|
|
216
|
+
/** TLD-less domain name. */
|
|
217
|
+
name: string;
|
|
218
|
+
/** Account data size in bytes. */
|
|
219
|
+
space: number;
|
|
220
|
+
static schema: {
|
|
221
|
+
struct: {
|
|
222
|
+
tag: string;
|
|
223
|
+
name: string;
|
|
224
|
+
space: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
constructor(obj: CreateWithNftInstructionParams);
|
|
228
|
+
serialize(): Uint8Array;
|
|
229
|
+
getInstruction(programAddress: Address, namingServiceProgram: Address, rootDomain: Address, name: Address, reverseLookup: Address, systemProgram: Address, centralState: Address, buyer: Address, nftSource: Address, nftMetadata: Address, nftMint: Address, masterEdition: Address, collection: Address, splTokenProgram: Address, rentSysvar: Address, state: Address, mplTokenMetadata: Address): Instruction;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Builder for deleting an SNS name-registry account. */
|
|
233
|
+
declare class DeleteNameRegistryInstruction {
|
|
234
|
+
/** Instruction discriminator. */
|
|
235
|
+
tag: number;
|
|
236
|
+
static schema: {
|
|
237
|
+
struct: {
|
|
238
|
+
tag: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
constructor();
|
|
242
|
+
serialize(): Uint8Array;
|
|
243
|
+
getInstruction(programAddress: Address, domainAddress: Address, refundTarget: Address, owner: Address): Instruction;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** Builder for deleting an SNS V2 record account. */
|
|
247
|
+
declare class DeleteRecordInstruction {
|
|
248
|
+
/** Instruction discriminator. */
|
|
249
|
+
tag: number;
|
|
250
|
+
static schema: {
|
|
251
|
+
struct: {
|
|
252
|
+
tag: string;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
constructor();
|
|
256
|
+
serialize(): Uint8Array;
|
|
257
|
+
getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, payer: Address, record: Address, domainAddress: Address, domainOwner: Address, centralState: Address): Instruction;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Input for reallocating an SNS name-registry account.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```ts
|
|
265
|
+
* const params: ReallocInstructionParams = { space: 1_000 };
|
|
266
|
+
* ```
|
|
267
|
+
*/
|
|
268
|
+
interface ReallocInstructionParams {
|
|
269
|
+
/** New account data size in bytes. */
|
|
270
|
+
space: number;
|
|
271
|
+
}
|
|
272
|
+
/** Builder for reallocating an SNS name-registry account. */
|
|
273
|
+
declare class ReallocInstruction {
|
|
274
|
+
/** Instruction discriminator. */
|
|
275
|
+
tag: number;
|
|
276
|
+
/** New account data size in bytes. */
|
|
277
|
+
space: number;
|
|
278
|
+
static schema: {
|
|
279
|
+
struct: {
|
|
280
|
+
tag: string;
|
|
281
|
+
space: string;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
constructor(obj: ReallocInstructionParams);
|
|
285
|
+
serialize(): Uint8Array;
|
|
286
|
+
getInstruction(programAddress: Address, systemProgramId: Address, payerKey: Address, nameAccountKey: Address, nameOwnerKey: Address): Instruction;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/** Builder for registering an address's SNS primary domain. */
|
|
290
|
+
declare class RegisterPrimaryInstruction {
|
|
291
|
+
/** Instruction discriminator. */
|
|
292
|
+
tag: number;
|
|
293
|
+
static schema: {
|
|
294
|
+
struct: {
|
|
295
|
+
tag: string;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
constructor();
|
|
299
|
+
serialize(): Uint8Array;
|
|
300
|
+
getInstruction(programAddress: Address, nameAccount: Address, primaryAccount: Address, owner: Address, systemProgram: Address, optParent?: Address): Instruction;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Input for transferring an SNS name-registry account.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* ```ts
|
|
308
|
+
* const params: TransferInstructionParams = { newOwner };
|
|
309
|
+
* ```
|
|
310
|
+
*/
|
|
311
|
+
interface TransferInstructionParams {
|
|
312
|
+
/** New registry owner. */
|
|
313
|
+
newOwner: Address;
|
|
314
|
+
}
|
|
315
|
+
/** Builder for the SNS name-registry transfer instruction. */
|
|
316
|
+
declare class TransferInstruction {
|
|
317
|
+
/** Instruction discriminator. */
|
|
318
|
+
tag: number;
|
|
319
|
+
/** Encoded new owner address. */
|
|
320
|
+
encodedNewOwnerAddress: ReadonlyUint8Array;
|
|
321
|
+
static schema: {
|
|
322
|
+
struct: {
|
|
323
|
+
tag: string;
|
|
324
|
+
encodedNewOwnerAddress: {
|
|
325
|
+
array: {
|
|
326
|
+
type: string;
|
|
327
|
+
len: number;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
constructor(obj: TransferInstructionParams);
|
|
333
|
+
serialize(): Uint8Array;
|
|
334
|
+
getInstruction(programAddress: Address, domainAddress: Address, currentOwner: Address, classAddress?: Address, parentAddress?: Address, parentOwner?: Address): Instruction;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Input for updating an SNS name-registry account.
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* ```ts
|
|
342
|
+
* const params: UpdateNameRegistryInstructionParams = { offset: 0, inputData };
|
|
343
|
+
* ```
|
|
344
|
+
*/
|
|
345
|
+
interface UpdateNameRegistryInstructionParams {
|
|
346
|
+
/** Byte offset where the update begins. */
|
|
347
|
+
offset: number;
|
|
348
|
+
/** Bytes to write. */
|
|
349
|
+
inputData: Uint8Array;
|
|
350
|
+
}
|
|
351
|
+
/** Builder for updating the data of an SNS name-registry account. */
|
|
352
|
+
declare class UpdateNameRegistryInstruction {
|
|
353
|
+
/** Instruction discriminator. */
|
|
354
|
+
tag: number;
|
|
355
|
+
/** Byte offset where the update begins. */
|
|
356
|
+
offset: number;
|
|
357
|
+
/** Bytes to write. */
|
|
358
|
+
inputData: Uint8Array;
|
|
359
|
+
static schema: {
|
|
360
|
+
struct: {
|
|
361
|
+
tag: string;
|
|
362
|
+
offset: string;
|
|
363
|
+
inputData: {
|
|
364
|
+
array: {
|
|
365
|
+
type: string;
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
constructor(obj: UpdateNameRegistryInstructionParams);
|
|
371
|
+
serialize(): Uint8Array;
|
|
372
|
+
getInstruction(programAddress: Address, domainAddress: Address, signer: Address): Instruction;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Input for updating an SNS V2 record account.
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```ts
|
|
380
|
+
* const params: UpdateRecordInstructionParams = { record, content };
|
|
381
|
+
* ```
|
|
382
|
+
*/
|
|
383
|
+
interface UpdateRecordInstructionParams {
|
|
384
|
+
/** Encoded V2 record label. */
|
|
385
|
+
record: string;
|
|
386
|
+
/** Serialized record content. */
|
|
387
|
+
content: ReadonlyUint8Array;
|
|
388
|
+
}
|
|
389
|
+
/** Builder for updating content in an SNS V2 record account. */
|
|
390
|
+
declare class UpdateRecordInstruction {
|
|
391
|
+
/** Instruction discriminator. */
|
|
392
|
+
tag: number;
|
|
393
|
+
/** Encoded V2 record label. */
|
|
394
|
+
record: string;
|
|
395
|
+
/** Serialized record content. */
|
|
396
|
+
content: ReadonlyUint8Array;
|
|
397
|
+
static schema: {
|
|
398
|
+
struct: {
|
|
399
|
+
tag: string;
|
|
400
|
+
record: string;
|
|
401
|
+
content: {
|
|
402
|
+
array: {
|
|
403
|
+
type: string;
|
|
404
|
+
};
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
constructor(obj: UpdateRecordInstructionParams);
|
|
409
|
+
serialize(): Uint8Array;
|
|
410
|
+
getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address): Instruction;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Input for validating an Ethereum signature for an SNS record.
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ```ts
|
|
418
|
+
* const params: ValidateEthereumSignatureInstructionParams = { validation, signature, expectedPubkey };
|
|
419
|
+
* ```
|
|
420
|
+
*/
|
|
421
|
+
interface ValidateEthereumSignatureInstructionParams {
|
|
422
|
+
/** Validation mode discriminator. */
|
|
423
|
+
validation: number;
|
|
424
|
+
/** Ethereum signature. */
|
|
425
|
+
signature: ReadonlyUint8Array;
|
|
426
|
+
/** Expected Ethereum public key. */
|
|
427
|
+
expectedPubkey: ReadonlyUint8Array;
|
|
428
|
+
}
|
|
429
|
+
/** Builder for validating an Ethereum signature for an SNS record. */
|
|
430
|
+
declare class ValidateEthereumSignatureInstruction {
|
|
431
|
+
/** Instruction discriminator. */
|
|
432
|
+
tag: number;
|
|
433
|
+
/** Validation mode discriminator. */
|
|
434
|
+
validation: number;
|
|
435
|
+
/** Ethereum signature. */
|
|
436
|
+
signature: ReadonlyUint8Array;
|
|
437
|
+
/** Expected Ethereum public key. */
|
|
438
|
+
expectedPubkey: ReadonlyUint8Array;
|
|
439
|
+
static schema: {
|
|
440
|
+
struct: {
|
|
441
|
+
tag: string;
|
|
442
|
+
validation: string;
|
|
443
|
+
signature: {
|
|
444
|
+
array: {
|
|
445
|
+
type: string;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
expectedPubkey: {
|
|
449
|
+
array: {
|
|
450
|
+
type: string;
|
|
451
|
+
};
|
|
452
|
+
};
|
|
453
|
+
};
|
|
454
|
+
};
|
|
455
|
+
constructor(obj: ValidateEthereumSignatureInstructionParams);
|
|
456
|
+
serialize(): Uint8Array;
|
|
457
|
+
getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address): Instruction;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Input for validating a Solana signature for an SNS record.
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* ```ts
|
|
465
|
+
* const params: ValidateSolanaSignatureInstructionParams = { staleness: false };
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
interface ValidateSolanaSignatureInstructionParams {
|
|
469
|
+
/** Whether to validate staleness. */
|
|
470
|
+
staleness: boolean;
|
|
471
|
+
}
|
|
472
|
+
/** Builder for validating a Solana signature for an SNS record. */
|
|
473
|
+
declare class ValidateSolanaSignatureInstruction {
|
|
474
|
+
/** Instruction discriminator. */
|
|
475
|
+
tag: number;
|
|
476
|
+
/** Whether to validate staleness. */
|
|
477
|
+
staleness: boolean;
|
|
478
|
+
static schema: {
|
|
479
|
+
struct: {
|
|
480
|
+
tag: string;
|
|
481
|
+
staleness: string;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
constructor(obj: ValidateSolanaSignatureInstructionParams);
|
|
485
|
+
serialize(): Uint8Array;
|
|
486
|
+
getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address, verifier: Address): Instruction;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Input for setting an SNS record's Right of Association verifier.
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* ```ts
|
|
494
|
+
* const params: SetRecordRoaVerifierInstructionParams = { verifier };
|
|
495
|
+
* ```
|
|
496
|
+
*/
|
|
497
|
+
interface SetRecordRoaVerifierInstructionParams {
|
|
498
|
+
/** Verifier account address. */
|
|
499
|
+
verifier: Address;
|
|
500
|
+
}
|
|
501
|
+
/** Builder for setting an SNS record's Right of Association verifier. */
|
|
502
|
+
declare class SetRecordRoaVerifierInstruction {
|
|
503
|
+
/** Instruction discriminator. */
|
|
504
|
+
tag: number;
|
|
505
|
+
/** Encoded verifier address. */
|
|
506
|
+
roaId: ReadonlyUint8Array;
|
|
507
|
+
static schema: {
|
|
508
|
+
struct: {
|
|
509
|
+
tag: string;
|
|
510
|
+
roaId: {
|
|
511
|
+
array: {
|
|
512
|
+
type: string;
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
constructor(obj: SetRecordRoaVerifierInstructionParams);
|
|
518
|
+
serialize(): Uint8Array;
|
|
519
|
+
getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address): Instruction;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export { AllocateAndPostRecordInstruction, BurnDomainInstruction, CreateNameRegistryInstruction, CreateReverseInstruction, CreateSplitV2Instruction, CreateWithNftInstruction, DeleteNameRegistryInstruction, DeleteRecordInstruction, ReallocInstruction, RegisterPrimaryInstruction, SetRecordRoaVerifierInstruction, TransferInstruction, UpdateNameRegistryInstruction, UpdateRecordInstruction, ValidateEthereumSignatureInstruction, ValidateSolanaSignatureInstruction, _createAtaIdempotentInstruction };
|
|
523
|
+
export type { AllocateAndPostRecordInstructionParams, CreateNameRegistryInstructionParams, CreateReverseInstructionParams, CreateSplitV2InstructionParams, CreateWithNftInstructionParams, ReallocInstructionParams, SetRecordRoaVerifierInstructionParams, TransferInstructionParams, UpdateNameRegistryInstructionParams, UpdateRecordInstructionParams, ValidateEthereumSignatureInstructionParams, ValidateSolanaSignatureInstructionParams };
|
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Address, Rpc, GetAccountInfoApi, GetTokenLargestAccountsApi } from '@solana/kit';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for deriving an SNS NFT mint.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const params: GetSnsNftMintParams = { domainAddress };
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
interface GetSnsNftMintParams {
|
|
12
|
+
/** Tokenized domain account address. */
|
|
13
|
+
domainAddress: Address;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Derives the mint address of a tokenized SNS domain.
|
|
17
|
+
*
|
|
18
|
+
* @param params NFT mint derivation parameters
|
|
19
|
+
* @param params.domainAddress Domain account address used to derive the NFT mint
|
|
20
|
+
* @returns The derived SNS domain NFT mint address.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const mint = await getSnsNftMint({ domainAddress });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare const getSnsNftMint: ({ domainAddress }: GetSnsNftMintParams) => Promise<Address<string>>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Parameters for retrieving an SNS NFT owner.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const params: GetSnsNftOwnerParams = { rpc, domainAddress };
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
interface GetSnsNftOwnerParams {
|
|
38
|
+
/** RPC client. */
|
|
39
|
+
rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;
|
|
40
|
+
/** Tokenized domain account address. */
|
|
41
|
+
domainAddress: Address;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Retrieves the owner of a tokenized SNS domain.
|
|
45
|
+
*
|
|
46
|
+
* @param params NFT owner retrieval parameters
|
|
47
|
+
* @param params.rpc RPC client implementing account and token-largest-account APIs
|
|
48
|
+
* @param params.domainAddress Domain account address whose tokenized owner is retrieved
|
|
49
|
+
* @returns The SNS domain NFT owner address, or `null` when no valid tokenized owner is found.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* const owner = await getSnsNftOwner({ rpc, domainAddress });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
declare const getSnsNftOwner: ({ rpc, domainAddress, }: GetSnsNftOwnerParams) => Promise<Address | null>;
|
|
57
|
+
|
|
58
|
+
export { getSnsNftMint, getSnsNftOwner };
|
|
59
|
+
export type { GetSnsNftMintParams, GetSnsNftOwnerParams };
|