@solana-name-service/sns-sdk-kit 1.0.1 → 1.1.0-beta.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 +28 -15
- package/dist/cjs/address/getPrimaryDomain.cjs.map +1 -1
- package/dist/cjs/address/getPrimaryDomainsBatch.cjs.map +1 -1
- package/dist/cjs/address/getSnsDomainsForAddress.cjs.map +1 -1
- package/dist/cjs/address/getSnsNftsForAddress.cjs.map +1 -1
- package/dist/cjs/address/getSolDomainsForAddress.cjs +86 -0
- package/dist/cjs/address/getSolDomainsForAddress.cjs.map +1 -0
- package/dist/cjs/address/getSolNftsForAddress.cjs +144 -0
- package/dist/cjs/address/getSolNftsForAddress.cjs.map +1 -0
- package/dist/cjs/address/index.cjs +4 -0
- package/dist/cjs/address/index.cjs.map +1 -1
- package/dist/cjs/bindings/burnDomain.cjs.map +1 -1
- package/dist/cjs/bindings/createNameRegistry.cjs.map +1 -1
- package/dist/cjs/bindings/createRecord.cjs.map +1 -1
- package/dist/cjs/bindings/createReverse.cjs.map +1 -1
- package/dist/cjs/bindings/createSubdomain.cjs.map +1 -1
- package/dist/cjs/bindings/deleteNameRegistry.cjs.map +1 -1
- package/dist/cjs/bindings/deleteRecord.cjs.map +1 -1
- package/dist/cjs/bindings/recordValidation.cjs.map +1 -1
- package/dist/cjs/bindings/registerDomain.cjs.map +1 -1
- package/dist/cjs/bindings/registerDomainWithNft.cjs.map +1 -1
- package/dist/cjs/bindings/setPrimaryDomain.cjs.map +1 -1
- package/dist/cjs/bindings/setRecordRoaVerifier.cjs.map +1 -1
- package/dist/cjs/bindings/setRecordStalenessVerifier.cjs.map +1 -1
- package/dist/cjs/bindings/transferDomain.cjs.map +1 -1
- package/dist/cjs/bindings/transferSubdomain.cjs.map +1 -1
- package/dist/cjs/bindings/updateNameRegistry.cjs.map +1 -1
- package/dist/cjs/bindings/updateRecord.cjs.map +1 -1
- package/dist/cjs/bindings/validateRecordRoa.cjs.map +1 -1
- package/dist/cjs/bindings/validateRecordRoaEthereum.cjs.map +1 -1
- package/dist/cjs/codecs.cjs.map +1 -1
- package/dist/cjs/constants/addresses.cjs +26 -16
- package/dist/cjs/constants/addresses.cjs.map +1 -1
- package/dist/cjs/constants/index.cjs +18 -0
- package/dist/cjs/constants/index.cjs.map +1 -1
- package/dist/cjs/constants/pythFeeds.cjs.map +1 -1
- package/dist/cjs/constants/records.cjs.map +1 -1
- package/dist/cjs/constants/srs.cjs +48 -0
- package/dist/cjs/constants/srs.cjs.map +1 -0
- package/dist/cjs/domain/getAllSnsDomains.cjs.map +1 -1
- package/dist/cjs/domain/getAllSolDomains.cjs +58 -0
- package/dist/cjs/domain/getAllSolDomains.cjs.map +1 -0
- package/dist/cjs/domain/getDomainOwner.cjs +3 -3
- package/dist/cjs/domain/getDomainOwner.cjs.map +1 -1
- package/dist/cjs/domain/getDomainRecord.cjs +3 -3
- package/dist/cjs/domain/getDomainRecord.cjs.map +1 -1
- package/dist/cjs/domain/getDomainRecords.cjs +3 -3
- package/dist/cjs/domain/getDomainRecords.cjs.map +1 -1
- package/dist/cjs/domain/getSnsDomainAddress.cjs.map +1 -1
- package/dist/cjs/domain/getSnsDomainOwner.cjs +1 -2
- package/dist/cjs/domain/getSnsDomainOwner.cjs.map +1 -1
- package/dist/cjs/domain/getSolDomainAddress.cjs +36 -0
- package/dist/cjs/domain/getSolDomainAddress.cjs.map +1 -0
- package/dist/cjs/domain/getSrsDomainAddress.cjs +4 -17
- package/dist/cjs/domain/getSrsDomainAddress.cjs.map +1 -1
- package/dist/cjs/domain/getSubdomains.cjs +3 -3
- package/dist/cjs/domain/getSubdomains.cjs.map +1 -1
- package/dist/cjs/domain/index.cjs +4 -0
- package/dist/cjs/domain/index.cjs.map +1 -1
- package/dist/cjs/domain/resolve.cjs +19 -12
- package/dist/cjs/domain/resolve.cjs.map +1 -1
- package/dist/cjs/domain/resolveSns.cjs.map +1 -1
- package/dist/cjs/domain/resolveSol.cjs +129 -0
- package/dist/cjs/domain/resolveSol.cjs.map +1 -0
- package/dist/cjs/errors.cjs.map +1 -1
- package/dist/cjs/index.cjs +141 -115
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/instructions/allocateAndPostRecordInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/burnDomainInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createAtaIdempotentInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createNameRegistryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createReverseInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/createSplitV2Instruction.cjs.map +1 -1
- package/dist/cjs/instructions/createWithNftInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/deleteNameRegistryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/deleteRecordInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/reallocInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/registerPrimaryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/setRecordRoaVerifierInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/transferInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/updateNameRegistryInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/updateRecordInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/validateEthereumSignatureInstruction.cjs.map +1 -1
- package/dist/cjs/instructions/validateSolanaSignatureInstruction.cjs.map +1 -1
- package/dist/cjs/nft/getSnsNftMint.cjs.map +1 -1
- package/dist/cjs/nft/getSnsNftOwner.cjs.map +1 -1
- package/dist/cjs/record/getRecordV1Address.cjs.map +1 -1
- package/dist/cjs/record/getRecordV2Address.cjs.map +1 -1
- package/dist/cjs/record/verifyRecordRightOfAssociation.cjs +3 -3
- package/dist/cjs/record/verifyRecordRightOfAssociation.cjs.map +1 -1
- package/dist/cjs/record/verifyRecordStaleness.cjs +3 -3
- package/dist/cjs/record/verifyRecordStaleness.cjs.map +1 -1
- package/dist/cjs/srs/additional-metadata.cjs +20 -0
- package/dist/cjs/srs/additional-metadata.cjs.map +1 -0
- package/dist/cjs/srs/metadata.cjs +27 -0
- package/dist/cjs/srs/metadata.cjs.map +1 -0
- package/dist/cjs/states/nft.cjs.map +1 -1
- package/dist/cjs/states/primaryDomain.cjs.map +1 -1
- package/dist/cjs/states/record.cjs.map +1 -1
- package/dist/cjs/states/registry.cjs.map +1 -1
- package/dist/cjs/types/record.cjs.map +1 -1
- package/dist/cjs/types/validation.cjs.map +1 -1
- package/dist/cjs/utils/check.cjs.map +1 -1
- package/dist/cjs/utils/checkAddressOnCurve/ed25519.cjs.map +1 -1
- package/dist/cjs/utils/checkAddressOnCurve/index.cjs.map +1 -1
- package/dist/cjs/utils/deriveAddress.cjs.map +1 -1
- package/dist/cjs/utils/deserializers/deserializeRecordContent.cjs.map +1 -1
- package/dist/cjs/utils/deserializers/deserializeReverse.cjs.map +1 -1
- package/dist/cjs/utils/fetchEncodedAccountsBatched.cjs +29 -0
- package/dist/cjs/utils/fetchEncodedAccountsBatched.cjs.map +1 -0
- package/dist/cjs/utils/getPythFeedAddress.cjs.map +1 -1
- package/dist/cjs/utils/getReverseAddress.cjs.map +1 -1
- package/dist/cjs/utils/getReverseAddressFromDomainAddress.cjs.map +1 -1
- package/dist/cjs/utils/parseSnsDomain.cjs +1 -2
- package/dist/cjs/utils/parseSnsDomain.cjs.map +1 -1
- package/dist/cjs/utils/reverseLookup.cjs.map +1 -1
- package/dist/cjs/utils/reverseLookupBatch.cjs.map +1 -1
- package/dist/cjs/utils/serializers/serializeRecordContent.cjs.map +1 -1
- package/dist/cjs/utils/tld.cjs +1 -1
- package/dist/cjs/utils/tld.cjs.map +1 -1
- package/dist/cjs/utils/token2022/assertValidAccountData.cjs +37 -0
- package/dist/cjs/utils/token2022/assertValidAccountData.cjs.map +1 -0
- package/dist/cjs/utils/token2022/extensions.cjs +91 -0
- package/dist/cjs/utils/token2022/extensions.cjs.map +1 -0
- package/dist/cjs/utils/token2022/unpackAccount.cjs +29 -0
- package/dist/cjs/utils/token2022/unpackAccount.cjs.map +1 -0
- package/dist/cjs/utils/token2022/unpackMint.cjs +27 -0
- package/dist/cjs/utils/token2022/unpackMint.cjs.map +1 -0
- package/dist/cjs/utils/uint8Array/uint8ArrayFromHex.cjs.map +1 -1
- package/dist/cjs/utils/uint8Array/uint8ArrayToHex.cjs.map +1 -1
- package/dist/cjs/utils/uint8Array/uint8ArraysEqual.cjs.map +1 -1
- package/dist/esm/address/getPrimaryDomain.mjs.map +1 -1
- package/dist/esm/address/getPrimaryDomainsBatch.mjs.map +1 -1
- package/dist/esm/address/getSnsDomainsForAddress.mjs.map +1 -1
- package/dist/esm/address/getSnsNftsForAddress.mjs.map +1 -1
- package/dist/esm/address/getSolDomainsForAddress.mjs +82 -0
- package/dist/esm/address/getSolDomainsForAddress.mjs.map +1 -0
- package/dist/esm/address/getSolNftsForAddress.mjs +140 -0
- package/dist/esm/address/getSolNftsForAddress.mjs.map +1 -0
- package/dist/esm/address/index.mjs +2 -0
- package/dist/esm/address/index.mjs.map +1 -1
- package/dist/esm/bindings/burnDomain.mjs.map +1 -1
- package/dist/esm/bindings/createNameRegistry.mjs.map +1 -1
- package/dist/esm/bindings/createRecord.mjs.map +1 -1
- package/dist/esm/bindings/createReverse.mjs.map +1 -1
- package/dist/esm/bindings/createSubdomain.mjs.map +1 -1
- package/dist/esm/bindings/deleteNameRegistry.mjs.map +1 -1
- package/dist/esm/bindings/deleteRecord.mjs.map +1 -1
- package/dist/esm/bindings/recordValidation.mjs.map +1 -1
- package/dist/esm/bindings/registerDomain.mjs.map +1 -1
- package/dist/esm/bindings/registerDomainWithNft.mjs.map +1 -1
- package/dist/esm/bindings/setPrimaryDomain.mjs.map +1 -1
- package/dist/esm/bindings/setRecordRoaVerifier.mjs.map +1 -1
- package/dist/esm/bindings/setRecordStalenessVerifier.mjs.map +1 -1
- package/dist/esm/bindings/transferDomain.mjs.map +1 -1
- package/dist/esm/bindings/transferSubdomain.mjs.map +1 -1
- package/dist/esm/bindings/updateNameRegistry.mjs.map +1 -1
- package/dist/esm/bindings/updateRecord.mjs.map +1 -1
- package/dist/esm/bindings/validateRecordRoa.mjs.map +1 -1
- package/dist/esm/bindings/validateRecordRoaEthereum.mjs.map +1 -1
- package/dist/esm/codecs.mjs.map +1 -1
- package/dist/esm/constants/addresses.mjs +24 -17
- package/dist/esm/constants/addresses.mjs.map +1 -1
- package/dist/esm/constants/index.mjs +2 -1
- package/dist/esm/constants/index.mjs.map +1 -1
- package/dist/esm/constants/pythFeeds.mjs.map +1 -1
- package/dist/esm/constants/records.mjs.map +1 -1
- package/dist/esm/constants/srs.mjs +31 -0
- package/dist/esm/constants/srs.mjs.map +1 -0
- package/dist/esm/domain/getAllSnsDomains.mjs.map +1 -1
- package/dist/esm/domain/getAllSolDomains.mjs +54 -0
- package/dist/esm/domain/getAllSolDomains.mjs.map +1 -0
- package/dist/esm/domain/getDomainOwner.mjs +3 -3
- package/dist/esm/domain/getDomainOwner.mjs.map +1 -1
- package/dist/esm/domain/getDomainRecord.mjs +3 -3
- package/dist/esm/domain/getDomainRecord.mjs.map +1 -1
- package/dist/esm/domain/getDomainRecords.mjs +3 -3
- package/dist/esm/domain/getDomainRecords.mjs.map +1 -1
- package/dist/esm/domain/getSnsDomainAddress.mjs.map +1 -1
- package/dist/esm/domain/getSnsDomainOwner.mjs +1 -2
- package/dist/esm/domain/getSnsDomainOwner.mjs.map +1 -1
- package/dist/esm/domain/getSolDomainAddress.mjs +32 -0
- package/dist/esm/domain/getSolDomainAddress.mjs.map +1 -0
- package/dist/esm/domain/getSrsDomainAddress.mjs +4 -17
- package/dist/esm/domain/getSrsDomainAddress.mjs.map +1 -1
- package/dist/esm/domain/getSubdomains.mjs +3 -3
- package/dist/esm/domain/getSubdomains.mjs.map +1 -1
- package/dist/esm/domain/index.mjs +2 -0
- package/dist/esm/domain/index.mjs.map +1 -1
- package/dist/esm/domain/resolve.mjs +20 -13
- package/dist/esm/domain/resolve.mjs.map +1 -1
- package/dist/esm/domain/resolveSns.mjs.map +1 -1
- package/dist/esm/domain/resolveSol.mjs +125 -0
- package/dist/esm/domain/resolveSol.mjs.map +1 -0
- package/dist/esm/errors.mjs.map +1 -1
- package/dist/esm/index.mjs +51 -46
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/instructions/allocateAndPostRecordInstruction.mjs.map +1 -1
- package/dist/esm/instructions/burnDomainInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createAtaIdempotentInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createNameRegistryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createReverseInstruction.mjs.map +1 -1
- package/dist/esm/instructions/createSplitV2Instruction.mjs.map +1 -1
- package/dist/esm/instructions/createWithNftInstruction.mjs.map +1 -1
- package/dist/esm/instructions/deleteNameRegistryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/deleteRecordInstruction.mjs.map +1 -1
- package/dist/esm/instructions/reallocInstruction.mjs.map +1 -1
- package/dist/esm/instructions/registerPrimaryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/setRecordRoaVerifierInstruction.mjs.map +1 -1
- package/dist/esm/instructions/transferInstruction.mjs.map +1 -1
- package/dist/esm/instructions/updateNameRegistryInstruction.mjs.map +1 -1
- package/dist/esm/instructions/updateRecordInstruction.mjs.map +1 -1
- package/dist/esm/instructions/validateEthereumSignatureInstruction.mjs.map +1 -1
- package/dist/esm/instructions/validateSolanaSignatureInstruction.mjs.map +1 -1
- package/dist/esm/nft/getSnsNftMint.mjs +1 -1
- package/dist/esm/nft/getSnsNftMint.mjs.map +1 -1
- package/dist/esm/nft/getSnsNftOwner.mjs.map +1 -1
- package/dist/esm/record/getRecordV1Address.mjs.map +1 -1
- package/dist/esm/record/getRecordV2Address.mjs.map +1 -1
- package/dist/esm/record/verifyRecordRightOfAssociation.mjs +3 -3
- package/dist/esm/record/verifyRecordRightOfAssociation.mjs.map +1 -1
- package/dist/esm/record/verifyRecordStaleness.mjs +3 -3
- package/dist/esm/record/verifyRecordStaleness.mjs.map +1 -1
- package/dist/esm/srs/additional-metadata.mjs +16 -0
- package/dist/esm/srs/additional-metadata.mjs.map +1 -0
- package/dist/esm/srs/metadata.mjs +23 -0
- package/dist/esm/srs/metadata.mjs.map +1 -0
- package/dist/esm/states/nft.mjs.map +1 -1
- package/dist/esm/states/primaryDomain.mjs.map +1 -1
- package/dist/esm/states/record.mjs +1 -1
- package/dist/esm/states/record.mjs.map +1 -1
- package/dist/esm/states/registry.mjs.map +1 -1
- package/dist/esm/types/record.mjs.map +1 -1
- package/dist/esm/types/validation.mjs.map +1 -1
- package/dist/esm/utils/check.mjs.map +1 -1
- package/dist/esm/utils/checkAddressOnCurve/ed25519.mjs.map +1 -1
- package/dist/esm/utils/checkAddressOnCurve/index.mjs.map +1 -1
- package/dist/esm/utils/deriveAddress.mjs.map +1 -1
- package/dist/esm/utils/deserializers/deserializeRecordContent.mjs.map +1 -1
- package/dist/esm/utils/deserializers/deserializeReverse.mjs.map +1 -1
- package/dist/esm/utils/fetchEncodedAccountsBatched.mjs +25 -0
- package/dist/esm/utils/fetchEncodedAccountsBatched.mjs.map +1 -0
- package/dist/esm/utils/getPythFeedAddress.mjs.map +1 -1
- package/dist/esm/utils/getReverseAddress.mjs.map +1 -1
- package/dist/esm/utils/getReverseAddressFromDomainAddress.mjs.map +1 -1
- package/dist/esm/utils/parseSnsDomain.mjs +1 -2
- package/dist/esm/utils/parseSnsDomain.mjs.map +1 -1
- package/dist/esm/utils/reverseLookup.mjs.map +1 -1
- package/dist/esm/utils/reverseLookupBatch.mjs.map +1 -1
- package/dist/esm/utils/serializers/serializeRecordContent.mjs.map +1 -1
- package/dist/esm/utils/tld.mjs +1 -1
- package/dist/esm/utils/tld.mjs.map +1 -1
- package/dist/esm/utils/token2022/assertValidAccountData.mjs +33 -0
- package/dist/esm/utils/token2022/assertValidAccountData.mjs.map +1 -0
- package/dist/esm/utils/token2022/extensions.mjs +85 -0
- package/dist/esm/utils/token2022/extensions.mjs.map +1 -0
- package/dist/esm/utils/token2022/unpackAccount.mjs +25 -0
- package/dist/esm/utils/token2022/unpackAccount.mjs.map +1 -0
- package/dist/esm/utils/token2022/unpackMint.mjs +23 -0
- package/dist/esm/utils/token2022/unpackMint.mjs.map +1 -0
- package/dist/esm/utils/uint8Array/uint8ArrayFromHex.mjs.map +1 -1
- package/dist/esm/utils/uint8Array/uint8ArrayToHex.mjs.map +1 -1
- package/dist/esm/utils/uint8Array/uint8ArraysEqual.mjs.map +1 -1
- package/dist/types/address/index.d.ts +103 -2
- package/dist/types/constants/index.d.ts +53 -17
- package/dist/types/domain/index.d.ts +94 -32
- package/dist/types/index.d.ts +253 -54
- package/dist/types/record/index.d.ts +6 -6
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +2 -1
- package/dist/cjs/config.cjs +0 -18
- package/dist/cjs/config.cjs.map +0 -1
- package/dist/cjs/utils/assertTldSupported.cjs +0 -28
- package/dist/cjs/utils/assertTldSupported.cjs.map +0 -1
- package/dist/esm/config.mjs +0 -11
- package/dist/esm/config.mjs.map +0 -1
- package/dist/esm/utils/assertTldSupported.mjs +0 -24
- package/dist/esm/utils/assertTldSupported.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSol.mjs","sources":["../../../src/domain/resolveSol.ts"],"sourcesContent":["import { AccountState } from \"@solana-program/token\";\r\nimport {\r\n Address,\r\n fetchEncodedAccount,\r\n getI64Decoder,\r\n getProgramDerivedAddress,\r\n} from \"@solana/kit\";\r\n\r\nimport { addressCodec, utf8Codec } from \"../codecs\";\r\nimport {\r\n SOL_SRS_CLASS,\r\n SRS_PROGRAM_ADDRESS,\r\n TOKEN_2022_PROGRAM_ADDRESS,\r\n} from \"../constants/addresses\";\r\nimport {\r\n SRS_ADDRESS_LENGTH,\r\n SRS_EXPIRY_LENGTH,\r\n SRS_OWNER_TYPE_PUBKEY,\r\n SRS_OWNER_TYPE_TOKEN,\r\n SRS_RECORD_CLASS_OFFSET,\r\n SRS_RECORD_DISCRIMINATOR,\r\n SRS_RECORD_DISCRIMINATOR_OFFSET,\r\n SRS_RECORD_EXPIRY_OFFSET,\r\n SRS_RECORD_HEADER_LENGTH,\r\n SRS_RECORD_OWNER_OFFSET,\r\n SRS_RECORD_OWNER_TYPE_OFFSET,\r\n} from \"../constants/srs\";\r\nimport {\r\n CouldNotFindSrsOwnerError,\r\n DomainDoesNotExistError,\r\n DomainExpiredError,\r\n PdaOwnerNotAllowedError,\r\n RecordMalformedError,\r\n} from \"../errors\";\r\nimport { checkAddressOnCurve } from \"../utils/checkAddressOnCurve\";\r\nimport { unpackAccount, unpackMint } from \"../utils/token2022\";\r\nimport { getSolDomainAddress } from \"./getSolDomainAddress\";\r\nimport { ResolveSolParams } from \"./resolveTypes\";\r\n\r\nconst i64Decoder = getI64Decoder();\r\n\r\nconst resolveSrsPubkeyOwner = async ({\r\n rpc,\r\n owner,\r\n options,\r\n}: Pick<ResolveSolParams, \"rpc\" | \"options\"> & {\r\n owner: Address;\r\n}): Promise<Address> => {\r\n if (checkAddressOnCurve(owner)) {\r\n return owner;\r\n }\r\n\r\n if (options.allowPda === \"any\") {\r\n return owner;\r\n }\r\n\r\n if (!options.allowPda) {\r\n throw new PdaOwnerNotAllowedError();\r\n }\r\n\r\n const ownerAccount = await fetchEncodedAccount(rpc, owner);\r\n if (!ownerAccount.exists) {\r\n throw new PdaOwnerNotAllowedError(\"Invalid domain owner account\");\r\n }\r\n\r\n if (\r\n options.programIds.some(\r\n (programId) => ownerAccount.programAddress === programId\r\n )\r\n ) {\r\n return owner;\r\n }\r\n\r\n throw new PdaOwnerNotAllowedError(\r\n `The program ${ownerAccount.programAddress} is not allowed`\r\n );\r\n};\r\n\r\nconst resolveSrsTokenOwner = async ({\r\n rpc,\r\n record,\r\n mint,\r\n options,\r\n}: Pick<ResolveSolParams, \"rpc\" | \"options\"> & {\r\n record: Address;\r\n mint: Address;\r\n}): Promise<Address> => {\r\n const [canonicalMint] = await getProgramDerivedAddress({\r\n programAddress: SRS_PROGRAM_ADDRESS,\r\n seeds: [utf8Codec.encode(\"mint\"), addressCodec.encode(record)],\r\n });\r\n\r\n if (mint !== canonicalMint) {\r\n throw new RecordMalformedError(\"SRS record has a noncanonical token mint\");\r\n }\r\n\r\n const mintAccount = await fetchEncodedAccount(rpc, mint);\r\n if (\r\n !mintAccount.exists ||\r\n mintAccount.programAddress !== TOKEN_2022_PROGRAM_ADDRESS\r\n ) {\r\n throw new CouldNotFindSrsOwnerError(\"SRS token mint is invalid\");\r\n }\r\n\r\n let mintState;\r\n try {\r\n mintState = unpackMint(mintAccount.data);\r\n } catch {\r\n throw new CouldNotFindSrsOwnerError(\"SRS token mint is invalid\");\r\n }\r\n\r\n if (\r\n !mintState.isInitialized ||\r\n mintState.decimals !== 0 ||\r\n mintState.supply !== 1n\r\n ) {\r\n throw new CouldNotFindSrsOwnerError(\"SRS token mint is invalid\");\r\n }\r\n\r\n const largestAccounts = await rpc.getTokenLargestAccounts(mint).send();\r\n const holders = largestAccounts.value.filter(({ amount }) => amount === \"1\");\r\n if (holders.length !== 1) {\r\n throw new CouldNotFindSrsOwnerError(\r\n \"SRS token mint has no unique current holder\"\r\n );\r\n }\r\n\r\n const holderAddress = holders[0].address;\r\n const holderAccount = await fetchEncodedAccount(rpc, holderAddress);\r\n if (\r\n !holderAccount.exists ||\r\n holderAccount.programAddress !== TOKEN_2022_PROGRAM_ADDRESS\r\n ) {\r\n throw new CouldNotFindSrsOwnerError(\"SRS token holder account is invalid\");\r\n }\r\n\r\n let holderState;\r\n try {\r\n holderState = unpackAccount(holderAccount.data);\r\n } catch {\r\n throw new CouldNotFindSrsOwnerError(\"SRS token holder account is invalid\");\r\n }\r\n\r\n if (\r\n holderState.state === AccountState.Uninitialized ||\r\n holderState.mint !== mint ||\r\n holderState.amount !== 1n\r\n ) {\r\n throw new CouldNotFindSrsOwnerError(\"SRS token holder account is invalid\");\r\n }\r\n\r\n return resolveSrsPubkeyOwner({\r\n rpc,\r\n owner: holderState.owner,\r\n options,\r\n });\r\n};\r\n\r\n/** Resolves a TLD-trimmed `.sol` name from its canonical SRS record. */\r\nexport const resolveSol = async ({\r\n rpc,\r\n domain,\r\n options,\r\n}: ResolveSolParams): Promise<Address> => {\r\n const { domainAddress } = await getSolDomainAddress({ domain });\r\n const account = await fetchEncodedAccount(rpc, domainAddress);\r\n\r\n if (!account.exists) {\r\n throw new DomainDoesNotExistError(`Domain ${domain} does not exist`);\r\n }\r\n\r\n const { data } = account;\r\n if (\r\n account.programAddress !== SRS_PROGRAM_ADDRESS ||\r\n data.length < SRS_RECORD_HEADER_LENGTH ||\r\n data[SRS_RECORD_DISCRIMINATOR_OFFSET] !== SRS_RECORD_DISCRIMINATOR\r\n ) {\r\n throw new RecordMalformedError(\"SRS record is malformed\");\r\n }\r\n\r\n if (\r\n addressCodec.decode(\r\n data.slice(\r\n SRS_RECORD_CLASS_OFFSET,\r\n SRS_RECORD_CLASS_OFFSET + SRS_ADDRESS_LENGTH\r\n )\r\n ) !== SOL_SRS_CLASS\r\n ) {\r\n throw new RecordMalformedError(\"SRS record has an invalid class\");\r\n }\r\n\r\n const ownerType = data[SRS_RECORD_OWNER_TYPE_OFFSET];\r\n if (\r\n ownerType !== SRS_OWNER_TYPE_PUBKEY &&\r\n ownerType !== SRS_OWNER_TYPE_TOKEN\r\n ) {\r\n throw new RecordMalformedError(\"SRS record has an invalid owner type\");\r\n }\r\n\r\n const expiry = i64Decoder.decode(\r\n data.slice(\r\n SRS_RECORD_EXPIRY_OFFSET,\r\n SRS_RECORD_EXPIRY_OFFSET + SRS_EXPIRY_LENGTH\r\n )\r\n );\r\n // Zero is the SRS sentinel for a record that does not expire.\r\n if (expiry !== 0n && expiry <= BigInt(Math.floor(Date.now() / 1_000))) {\r\n throw new DomainExpiredError(`Domain ${domain} has expired`);\r\n }\r\n\r\n const owner = addressCodec.decode(\r\n data.slice(\r\n SRS_RECORD_OWNER_OFFSET,\r\n SRS_RECORD_OWNER_OFFSET + SRS_ADDRESS_LENGTH\r\n )\r\n );\r\n if (ownerType === SRS_OWNER_TYPE_TOKEN) {\r\n return resolveSrsTokenOwner({\r\n rpc,\r\n record: domainAddress,\r\n mint: owner,\r\n options,\r\n });\r\n }\r\n\r\n return resolveSrsPubkeyOwner({ rpc, owner, options });\r\n};\r\n"],"names":[],"mappings":";;;;;;;;;;;AAuCA,MAAM,UAAU,GAAG,aAAa,EAAE;AAElC,MAAM,qBAAqB,GAAG,OAAO,EACnC,GAAG,EACH,KAAK,EACL,OAAO,GAGR,KAAsB;AACrB,IAAA,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;QACrB,MAAM,IAAI,uBAAuB,EAAE;IACrC;IAEA,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1D,IAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;AACxB,QAAA,MAAM,IAAI,uBAAuB,CAAC,8BAA8B,CAAC;IACnE;AAEA,IAAA,IACE,OAAO,CAAC,UAAU,CAAC,IAAI,CACrB,CAAC,SAAS,KAAK,YAAY,CAAC,cAAc,KAAK,SAAS,CACzD,EACD;AACA,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,IAAI,uBAAuB,CAC/B,CAAA,YAAA,EAAe,YAAY,CAAC,cAAc,CAAA,eAAA,CAAiB,CAC5D;AACH,CAAC;AAED,MAAM,oBAAoB,GAAG,OAAO,EAClC,GAAG,EACH,MAAM,EACN,IAAI,EACJ,OAAO,GAIR,KAAsB;AACrB,IAAA,MAAM,CAAC,aAAa,CAAC,GAAG,MAAM,wBAAwB,CAAC;AACrD,QAAA,cAAc,EAAE,mBAAmB;AACnC,QAAA,KAAK,EAA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errors.mjs","sources":["../../src/errors.ts"],"sourcesContent":["/**\r\n * Error classes and stable error categories emitted by SDK operations.\r\n * @module Errors\r\n */\r\n/** Stable error codes emitted by SNS SDK operations. */\r\nexport enum ErrorType {\r\n InvalidSubdomain = \"InvalidSubdomain\",\r\n PrimaryDomainNotFound = \"PrimaryDomainNotFound\",\r\n NoRecordData = \"NoRecordData\",\r\n InvalidRecordData = \"InvalidRecordData\",\r\n InvalidEvmAddress = \"InvalidEvmAddress\",\r\n InvalidInjectiveAddress = \"InvalidInjectiveAddress\",\r\n InvalidARecord = \"InvalidARecord\",\r\n InvalidAAAARecord = \"InvalidAAAARecord\",\r\n InvalidRecordInput = \"InvalidRecordInput\",\r\n AccountDoesNotExist = \"AccountDoesNotExist\",\r\n NoAccountData = \"NoAccountData\",\r\n InvalidInput = \"InvalidInput\",\r\n InvalidDomain = \"InvalidDomain\",\r\n MissingVerifier = \"MissingVerifier\",\r\n PythFeedNotFound = \"PythFeedNotFound\",\r\n InvalidRoa = \"InvalidRoa\",\r\n InvalidParent = \"InvalidParent\",\r\n NftAccountNotFound = \"NftRecordNotFound\",\r\n PdaOwnerNotAllowed = \"PdaOwnerNotAllowed\",\r\n DomainDoesNotExist = \"DomainDoesNotExist\",\r\n RecordMalformed = \"RecordMalformed\",\r\n CouldNotFindNftOwner = \"CouldNotFindNftOwner\",\r\n InvalidValidation = \"InvalidValidation\",\r\n InvalidSerializedData = \"InvalidSerializedData\",\r\n UnsupportedTld = \"UnsupportedTld\",\r\n DomainExpired = \"DomainExpired\",\r\n CouldNotFindSrsOwner = \"CouldNotFindSrsOwner\",\r\n SnsSolResolutionMismatch = \"SnsSolResolutionMismatch\",\r\n}\r\n\r\n/** Base error thrown by SNS SDK operations. Inspect `type` for a stable error code. */\r\nexport class SNSError extends Error {\r\n type: ErrorType;\r\n\r\n constructor(type: ErrorType, message?: string) {\r\n super(message);\r\n this.name = \"SNSError\";\r\n this.type = type;\r\n\r\n if ((Error as any).captureStackTrace) {\r\n (Error as any).captureStackTrace(this, SNSError);\r\n }\r\n }\r\n}\r\n\r\n/** Thrown when a subdomain name is malformed or unsupported. */\r\nexport class InvalidSubdomainError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidSubdomain, message);\r\n }\r\n}\r\n\r\n/** Thrown when an address has no configured primary domain. */\r\nexport class PrimaryDomainNotFoundError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.PrimaryDomainNotFound, message);\r\n }\r\n}\r\n\r\n/** Thrown when a requested record account has no readable data. */\r\nexport class NoRecordDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.NoRecordData, message);\r\n }\r\n}\r\n\r\n/** Thrown when record content fails format validation. */\r\nexport class InvalidRecordDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidRecordData, message);\r\n }\r\n}\r\n\r\n/** Thrown when an EVM address is invalid for a record operation. */\r\nexport class InvalidEvmAddressError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidEvmAddress, message);\r\n }\r\n}\r\n\r\n/** Thrown when an Injective address is invalid for a record operation. */\r\nexport class InvalidInjectiveAddressError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidInjectiveAddress, message);\r\n }\r\n}\r\n\r\n/** Thrown when an IPv4 record value is invalid. */\r\nexport class InvalidARecordError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidARecord, message);\r\n }\r\n}\r\n\r\n/** Thrown when an IPv6 record value is invalid. */\r\nexport class InvalidAAAARecordError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidAAAARecord, message);\r\n }\r\n}\r\n\r\n/** Thrown when record creation or update input is incomplete or invalid. */\r\nexport class InvalidRecordInputError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidRecordInput, message);\r\n }\r\n}\r\n\r\n/** Thrown when a required on-chain account does not exist. */\r\nexport class AccountDoesNotExistError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.AccountDoesNotExist, message);\r\n }\r\n}\r\n\r\n/** Thrown when an existing account has no readable data. */\r\nexport class NoAccountDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.NoAccountData, message);\r\n }\r\n}\r\n\r\n/** Thrown when a general SDK input contract is not met. */\r\nexport class InvalidInputError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidInput, message);\r\n }\r\n}\r\n\r\n/** Thrown when a domain name is malformed or invalid. */\r\nexport class InvalidDomainError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidDomain, message);\r\n }\r\n}\r\n\r\n/** Thrown when required record verification data is missing. */\r\nexport class MissingVerifierError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.MissingVerifier, message);\r\n }\r\n}\r\n\r\n/** Thrown when no Pyth price feed is configured for a mint. */\r\nexport class PythFeedNotFoundError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.PythFeedNotFound, message);\r\n }\r\n}\r\n\r\n/** Thrown when a Right of Association proof is invalid. */\r\nexport class InvalidRoaError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidRoa, message);\r\n }\r\n}\r\n\r\n/** Thrown when a required parent domain account cannot be resolved. */\r\nexport class InvalidParentError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidParent, message);\r\n }\r\n}\r\n\r\n/** Thrown when an expected SNS NFT account cannot be found. */\r\nexport class NftAccountNotFoundError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.NftAccountNotFound, message);\r\n }\r\n}\r\n\r\n/** Thrown when a program-derived address is not an allowed owner. */\r\nexport class PdaOwnerNotAllowedError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.PdaOwnerNotAllowed, message);\r\n }\r\n}\r\n\r\n/** Thrown when a requested SNS domain account does not exist. */\r\nexport class DomainDoesNotExistError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.DomainDoesNotExist, message);\r\n }\r\n}\r\n\r\n/** Thrown when serialized record data cannot be decoded safely. */\r\nexport class RecordMalformedError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.RecordMalformed, message);\r\n }\r\n}\r\n\r\n/** Thrown when the owner of an SNS NFT cannot be determined. */\r\nexport class CouldNotFindNftOwnerError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.CouldNotFindNftOwner, message);\r\n }\r\n}\r\n\r\n/** Thrown when an unsupported record validation mode is encountered. */\r\nexport class InvalidValidationError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidValidation, message);\r\n }\r\n}\r\n\r\n/** Thrown when serialized account or record data is inconsistent. */\r\nexport class InvalidSerializedDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidSerializedData, message);\r\n }\r\n}\r\n\r\n/** Thrown when a domain does not use a supported top-level domain. */\r\nexport class UnsupportedTldError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.UnsupportedTld, message);\r\n }\r\n}\r\n\r\n/** Thrown when a Solana Registration Service domain has expired. */\r\nexport class DomainExpiredError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.DomainExpired, message);\r\n }\r\n}\r\n\r\n/** Thrown when a Solana Registration Service domain owner cannot be resolved. */\r\nexport class CouldNotFindSrsOwnerError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.CouldNotFindSrsOwner, message);\r\n }\r\n}\r\n\r\n/** Thrown when .sns and .sol resolve the same domain to different addresses. */\r\nexport class SnsSolResolutionMismatchError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.SnsSolResolutionMismatch, message);\r\n }\r\n}\r\n"],"names":[],"mappings":"AAAA;;;AAGG;AACH;IACY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,SAAA,CAAA,uBAAA,CAAA,GAAA,uBAA+C;AAC/C,IAAA,SAAA,CAAA,cAAA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C;AAED;AACM,MAAO,yBAA0B,SAAQ,QAAQ,CAAA;AACrD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC;;AAEjD;AAED;AACM,MAAO,sBAAuB,SAAQ,QAAQ,CAAA;AAClD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC;;AAE9C;AAED;AACM,MAAO,0BAA2B,SAAQ,QAAQ,CAAA;AACtD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAC;;AAElD;AAED;AACM,MAAO,mBAAoB,SAAQ,QAAQ,CAAA;AAC/C,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;;AAE3C;AAED;AACM,MAAO,kBAAmB,SAAQ,QAAQ,CAAA;AAC9C,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;;AAE1C;AAED;AACM,MAAO,yBAA0B,SAAQ,QAAQ,CAAA;AACrD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC;;AAEjD;AAED;AACM,MAAO,6BAA8B,SAAQ,QAAQ,CAAA;AACzD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,wBAAwB,EAAE,OAAO,CAAC;;AAErD;;;;"}
|
|
1
|
+
{"version":3,"file":"errors.mjs","sources":["../../src/errors.ts"],"sourcesContent":["/**\r\n * Error classes and stable error categories emitted by SDK operations.\r\n * @module Errors\r\n */\r\n/** Stable error codes emitted by SNS SDK operations. */\r\nexport enum ErrorType {\r\n InvalidSubdomain = \"InvalidSubdomain\",\r\n PrimaryDomainNotFound = \"PrimaryDomainNotFound\",\r\n NoRecordData = \"NoRecordData\",\r\n InvalidRecordData = \"InvalidRecordData\",\r\n InvalidEvmAddress = \"InvalidEvmAddress\",\r\n InvalidInjectiveAddress = \"InvalidInjectiveAddress\",\r\n InvalidARecord = \"InvalidARecord\",\r\n InvalidAAAARecord = \"InvalidAAAARecord\",\r\n InvalidRecordInput = \"InvalidRecordInput\",\r\n AccountDoesNotExist = \"AccountDoesNotExist\",\r\n NoAccountData = \"NoAccountData\",\r\n InvalidInput = \"InvalidInput\",\r\n InvalidDomain = \"InvalidDomain\",\r\n MissingVerifier = \"MissingVerifier\",\r\n PythFeedNotFound = \"PythFeedNotFound\",\r\n InvalidRoa = \"InvalidRoa\",\r\n InvalidParent = \"InvalidParent\",\r\n NftAccountNotFound = \"NftRecordNotFound\",\r\n PdaOwnerNotAllowed = \"PdaOwnerNotAllowed\",\r\n DomainDoesNotExist = \"DomainDoesNotExist\",\r\n RecordMalformed = \"RecordMalformed\",\r\n CouldNotFindNftOwner = \"CouldNotFindNftOwner\",\r\n InvalidValidation = \"InvalidValidation\",\r\n InvalidSerializedData = \"InvalidSerializedData\",\r\n UnsupportedTld = \"UnsupportedTld\",\r\n DomainExpired = \"DomainExpired\",\r\n CouldNotFindSrsOwner = \"CouldNotFindSrsOwner\",\r\n SnsSolResolutionMismatch = \"SnsSolResolutionMismatch\",\r\n}\r\n\r\n/** Base error thrown by SNS SDK operations. Inspect `type` for a stable error code. */\r\nexport class SNSError extends Error {\r\n type: ErrorType;\r\n\r\n constructor(type: ErrorType, message?: string) {\r\n super(message);\r\n this.name = \"SNSError\";\r\n this.type = type;\r\n\r\n if ((Error as any).captureStackTrace) {\r\n (Error as any).captureStackTrace(this, SNSError);\r\n }\r\n }\r\n}\r\n\r\n/** Thrown when a subdomain name is malformed or unsupported. */\r\nexport class InvalidSubdomainError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidSubdomain, message);\r\n }\r\n}\r\n\r\n/** Thrown when an address has no configured primary domain. */\r\nexport class PrimaryDomainNotFoundError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.PrimaryDomainNotFound, message);\r\n }\r\n}\r\n\r\n/** Thrown when a requested record account has no readable data. */\r\nexport class NoRecordDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.NoRecordData, message);\r\n }\r\n}\r\n\r\n/** Thrown when record content fails format validation. */\r\nexport class InvalidRecordDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidRecordData, message);\r\n }\r\n}\r\n\r\n/** Thrown when an EVM address is invalid for a record operation. */\r\nexport class InvalidEvmAddressError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidEvmAddress, message);\r\n }\r\n}\r\n\r\n/** Thrown when an Injective address is invalid for a record operation. */\r\nexport class InvalidInjectiveAddressError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidInjectiveAddress, message);\r\n }\r\n}\r\n\r\n/** Thrown when an IPv4 record value is invalid. */\r\nexport class InvalidARecordError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidARecord, message);\r\n }\r\n}\r\n\r\n/** Thrown when an IPv6 record value is invalid. */\r\nexport class InvalidAAAARecordError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidAAAARecord, message);\r\n }\r\n}\r\n\r\n/** Thrown when record creation or update input is incomplete or invalid. */\r\nexport class InvalidRecordInputError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidRecordInput, message);\r\n }\r\n}\r\n\r\n/** Thrown when a required on-chain account does not exist. */\r\nexport class AccountDoesNotExistError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.AccountDoesNotExist, message);\r\n }\r\n}\r\n\r\n/** Thrown when an existing account has no readable data. */\r\nexport class NoAccountDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.NoAccountData, message);\r\n }\r\n}\r\n\r\n/** Thrown when a general SDK input contract is not met. */\r\nexport class InvalidInputError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidInput, message);\r\n }\r\n}\r\n\r\n/** Thrown when a domain name is malformed or invalid. */\r\nexport class InvalidDomainError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidDomain, message);\r\n }\r\n}\r\n\r\n/** Thrown when required record verification data is missing. */\r\nexport class MissingVerifierError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.MissingVerifier, message);\r\n }\r\n}\r\n\r\n/** Thrown when no Pyth price feed is configured for a mint. */\r\nexport class PythFeedNotFoundError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.PythFeedNotFound, message);\r\n }\r\n}\r\n\r\n/** Thrown when a Right of Association proof is invalid. */\r\nexport class InvalidRoaError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidRoa, message);\r\n }\r\n}\r\n\r\n/** Thrown when a required parent domain account cannot be resolved. */\r\nexport class InvalidParentError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidParent, message);\r\n }\r\n}\r\n\r\n/** Thrown when an expected SNS NFT account cannot be found. */\r\nexport class NftAccountNotFoundError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.NftAccountNotFound, message);\r\n }\r\n}\r\n\r\n/** Thrown when a program-derived address is not an allowed owner. */\r\nexport class PdaOwnerNotAllowedError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.PdaOwnerNotAllowed, message);\r\n }\r\n}\r\n\r\n/** Thrown when a requested SNS domain account does not exist. */\r\nexport class DomainDoesNotExistError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.DomainDoesNotExist, message);\r\n }\r\n}\r\n\r\n/** Thrown when serialized record data cannot be decoded safely. */\r\nexport class RecordMalformedError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.RecordMalformed, message);\r\n }\r\n}\r\n\r\n/** Thrown when the owner of an SNS NFT cannot be determined. */\r\nexport class CouldNotFindNftOwnerError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.CouldNotFindNftOwner, message);\r\n }\r\n}\r\n\r\n/** Thrown when an unsupported record validation mode is encountered. */\r\nexport class InvalidValidationError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidValidation, message);\r\n }\r\n}\r\n\r\n/** Thrown when serialized account or record data is inconsistent. */\r\nexport class InvalidSerializedDataError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.InvalidSerializedData, message);\r\n }\r\n}\r\n\r\n/** Thrown when a domain does not use a supported top-level domain. */\r\nexport class UnsupportedTldError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.UnsupportedTld, message);\r\n }\r\n}\r\n\r\n/** Thrown when a Solana Registration Service domain has expired. */\r\nexport class DomainExpiredError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.DomainExpired, message);\r\n }\r\n}\r\n\r\n/** Thrown when a Solana Registration Service domain owner cannot be resolved. */\r\nexport class CouldNotFindSrsOwnerError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.CouldNotFindSrsOwner, message);\r\n }\r\n}\r\n\r\n/** Thrown when .sns and .sol resolve the same domain to different addresses. */\r\nexport class SnsSolResolutionMismatchError extends SNSError {\r\n constructor(message?: string) {\r\n super(ErrorType.SnsSolResolutionMismatch, message);\r\n }\r\n}\r\n"],"names":[],"mappings":"AAAA;;;AAGG;AACH;IACY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,SAAA,CAAA,uBAAA,CAAA,GAAA,uBAA+C;AAC/C,IAAA,SAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC7B,IAAA,SAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;AACvC,IAAA,SAAA,CAAA,mBAAA,CAAA,GAAA,mBAAuC;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D,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAChD;AACD;AAED;AACM,MAAO,sBAAuB,SAAQ,QAAQ,CAAA;AAClD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC7C;AACD;AAED;AACM,MAAO,0BAA2B,SAAQ,QAAQ,CAAA;AACtD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,qBAAqB,EAAE,OAAO,CAAC;IACjD;AACD;AAED;AACM,MAAO,mBAAoB,SAAQ,QAAQ,CAAA;AAC/C,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,OAAO,CAAC;IAC1C;AACD;AAED;AACM,MAAO,kBAAmB,SAAQ,QAAQ,CAAA;AAC9C,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC;IACzC;AACD;AAED;AACM,MAAO,yBAA0B,SAAQ,QAAQ,CAAA;AACrD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,oBAAoB,EAAE,OAAO,CAAC;IAChD;AACD;AAED;AACM,MAAO,6BAA8B,SAAQ,QAAQ,CAAA;AACzD,IAAA,WAAA,CAAY,OAAgB,EAAA;AAC1B,QAAA,KAAK,CAAC,SAAS,CAAC,wBAAwB,EAAE,OAAO,CAAC;IACpD;AACD;;"}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,75 +1,80 @@
|
|
|
1
1
|
export { addressCodec, base58Codec, base64Codec, tokenCodec, utf8Codec } from './codecs.mjs';
|
|
2
2
|
export { AccountDoesNotExistError, CouldNotFindNftOwnerError, CouldNotFindSrsOwnerError, DomainDoesNotExistError, DomainExpiredError, ErrorType, InvalidAAAARecordError, InvalidARecordError, InvalidDomainError, InvalidEvmAddressError, InvalidInjectiveAddressError, InvalidInputError, InvalidParentError, InvalidRecordDataError, InvalidRecordInputError, InvalidRoaError, InvalidSerializedDataError, InvalidSubdomainError, InvalidValidationError, MissingVerifierError, NftAccountNotFoundError, NoAccountDataError, NoRecordDataError, PdaOwnerNotAllowedError, PrimaryDomainNotFoundError, PythFeedNotFoundError, RecordMalformedError, SNSError, SnsSolResolutionMismatchError, UnsupportedTldError } from './errors.mjs';
|
|
3
|
-
export { getSnsDomainsForAddress } from './address/getSnsDomainsForAddress.mjs';
|
|
4
|
-
export { getSnsNftsForAddress } from './address/getSnsNftsForAddress.mjs';
|
|
5
|
-
export { getPrimaryDomain } from './address/getPrimaryDomain.mjs';
|
|
6
|
-
export { getPrimaryDomainsBatch } from './address/getPrimaryDomainsBatch.mjs';
|
|
7
|
-
export { burnDomain } from './bindings/burnDomain.mjs';
|
|
8
|
-
export { createNameRegistry } from './bindings/createNameRegistry.mjs';
|
|
9
|
-
export { createRecord } from './bindings/createRecord.mjs';
|
|
10
|
-
export { createReverse } from './bindings/createReverse.mjs';
|
|
11
|
-
export { createSubdomain } from './bindings/createSubdomain.mjs';
|
|
12
|
-
export { deleteNameRegistry } from './bindings/deleteNameRegistry.mjs';
|
|
13
|
-
export { deleteRecord } from './bindings/deleteRecord.mjs';
|
|
14
|
-
export { registerDomain } from './bindings/registerDomain.mjs';
|
|
15
|
-
export { registerDomainWithNft } from './bindings/registerDomainWithNft.mjs';
|
|
16
|
-
export { setPrimaryDomain } from './bindings/setPrimaryDomain.mjs';
|
|
17
|
-
export { setRecordRoaVerifier } from './bindings/setRecordRoaVerifier.mjs';
|
|
18
|
-
export { setRecordStalenessVerifier } from './bindings/setRecordStalenessVerifier.mjs';
|
|
19
|
-
export { transferDomain } from './bindings/transferDomain.mjs';
|
|
20
|
-
export { transferSubdomain } from './bindings/transferSubdomain.mjs';
|
|
21
|
-
export { updateNameRegistry } from './bindings/updateNameRegistry.mjs';
|
|
22
|
-
export { updateRecord } from './bindings/updateRecord.mjs';
|
|
23
|
-
export { validateRecordRoa } from './bindings/validateRecordRoa.mjs';
|
|
24
|
-
export { validateRecordRoaEthereum } from './bindings/validateRecordRoaEthereum.mjs';
|
|
25
|
-
export { CENTRAL_STATE, CENTRAL_STATE_DOMAIN_RECORDS, DEFAULT_ADDRESS, FIDA_MINT, METAPLEX_PROGRAM_ADDRESS, NAME_OFFERS_ADDRESS, NAME_PROGRAM_ADDRESS, NAME_TOKENIZER_ADDRESS, RECORDS_PROGRAM_ADDRESS, REFERRERS, REGISTRY_PROGRAM_ADDRESS, REVERSE_LOOKUP_CLASS, SNS_ROOT_DOMAIN_ACCOUNT, SOL_SRS_CLASS, SRS_CENTRAL_STATE, SYSTEM_PROGRAM_ADDRESS, SYSVAR_RENT_ADDRESS, TOKEN_PROGRAM_ADDRESS, TWITTER_ROOT_PARENT_REGISTRY_ADDRESS, TWITTER_VERIFICATION_AUTHORITY, USDC_MINT, VAULT_OWNER, WOLVES_COLLECTION_METADATA } from './constants/addresses.mjs';
|
|
26
|
-
export { PYTH_FEEDS, PYTH_PROGRAM_ID } from './constants/pythFeeds.mjs';
|
|
27
|
-
export { ETH_ROA_RECORDS, EVM_RECORDS, GUARDIANS, SELF_SIGNED_RECORDS, UTF8_ENCODED_RECORDS } from './constants/records.mjs';
|
|
28
|
-
export { getAllSnsDomains } from './domain/getAllSnsDomains.mjs';
|
|
29
|
-
export { getSnsDomainAddress } from './domain/getSnsDomainAddress.mjs';
|
|
30
|
-
export { getSrsDomainAddress } from './domain/getSrsDomainAddress.mjs';
|
|
31
|
-
export { getDomainOwner } from './domain/getDomainOwner.mjs';
|
|
32
|
-
export { getDomainRecord } from './domain/getDomainRecord.mjs';
|
|
33
|
-
export { getDomainRecords } from './domain/getDomainRecords.mjs';
|
|
34
|
-
export { getSubdomains } from './domain/getSubdomains.mjs';
|
|
35
|
-
export { resolve, safeResolve } from './domain/resolve.mjs';
|
|
36
3
|
export { AllocateAndPostRecordInstruction } from './instructions/allocateAndPostRecordInstruction.mjs';
|
|
37
4
|
export { BurnDomainInstruction } from './instructions/burnDomainInstruction.mjs';
|
|
38
|
-
export {
|
|
5
|
+
export { CENTRAL_STATE, CENTRAL_STATE_DOMAIN_RECORDS, DEFAULT_ADDRESS, FIDA_MINT, METAPLEX_PROGRAM_ADDRESS, NAME_OFFERS_ADDRESS, NAME_PROGRAM_ADDRESS, NAME_TOKENIZER_ADDRESS, RECORDS_PROGRAM_ADDRESS, REFERRERS, REGISTRY_PROGRAM_ADDRESS, REVERSE_LOOKUP_CLASS, SNS_ROOT_DOMAIN_ACCOUNT, SOL_REGISTRAR_PROGRAM_ADDRESS, SOL_SRS_CLASS, SRS_CENTRAL_STATE, SRS_PROGRAM_ADDRESS, SYSTEM_PROGRAM_ADDRESS, SYSVAR_RENT_ADDRESS, TOKEN_2022_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, TWITTER_ROOT_PARENT_REGISTRY_ADDRESS, TWITTER_VERIFICATION_AUTHORITY, USDC_MINT, VAULT_OWNER, WOLVES_COLLECTION_METADATA } from './constants/addresses.mjs';
|
|
39
6
|
export { CreateNameRegistryInstruction } from './instructions/createNameRegistryInstruction.mjs';
|
|
40
7
|
export { CreateReverseInstruction } from './instructions/createReverseInstruction.mjs';
|
|
41
8
|
export { CreateSplitV2Instruction } from './instructions/createSplitV2Instruction.mjs';
|
|
42
9
|
export { CreateWithNftInstruction } from './instructions/createWithNftInstruction.mjs';
|
|
43
10
|
export { DeleteNameRegistryInstruction } from './instructions/deleteNameRegistryInstruction.mjs';
|
|
44
11
|
export { DeleteRecordInstruction } from './instructions/deleteRecordInstruction.mjs';
|
|
12
|
+
export { ETH_ROA_RECORDS, EVM_RECORDS, GUARDIANS, SELF_SIGNED_RECORDS, UTF8_ENCODED_RECORDS } from './constants/records.mjs';
|
|
13
|
+
export { NAME_REGISTRY_LEN, RecordHeaderState, RecordState, getValidationLength } from './states/record.mjs';
|
|
14
|
+
export { NftState, NftTag } from './states/nft.mjs';
|
|
15
|
+
export { PYTH_FEEDS, PYTH_PROGRAM_ID } from './constants/pythFeeds.mjs';
|
|
16
|
+
export { PrimaryDomainState } from './states/primaryDomain.mjs';
|
|
17
|
+
export { RECORD_V1_SIZE, Record, RecordVersion } from './types/record.mjs';
|
|
45
18
|
export { ReallocInstruction } from './instructions/reallocInstruction.mjs';
|
|
46
19
|
export { RegisterPrimaryInstruction } from './instructions/registerPrimaryInstruction.mjs';
|
|
20
|
+
export { RegistryState } from './states/registry.mjs';
|
|
21
|
+
export { SNS_TLD, SOL_TLD, SUPPORTED_TLDS, getTld, parseSnsTld, parseSupportedTld } from './utils/tld.mjs';
|
|
22
|
+
export { SRS_ADDRESS_LENGTH, SRS_EXPIRY_LENGTH, SRS_HASH_PREFIX, SRS_OWNER_TYPE_PUBKEY, SRS_OWNER_TYPE_TOKEN, SRS_RECORD_CLASS_OFFSET, SRS_RECORD_DISCRIMINATOR, SRS_RECORD_DISCRIMINATOR_OFFSET, SRS_RECORD_EXPIRY_OFFSET, SRS_RECORD_FROZEN_OFFSET, SRS_RECORD_HEADER_LENGTH, SRS_RECORD_METADATA_OFFSET, SRS_RECORD_OWNER_OFFSET, SRS_RECORD_OWNER_TYPE_OFFSET } from './constants/srs.mjs';
|
|
23
|
+
export { SetRecordRoaVerifierInstruction } from './instructions/setRecordRoaVerifierInstruction.mjs';
|
|
47
24
|
export { TransferInstruction } from './instructions/transferInstruction.mjs';
|
|
48
25
|
export { UpdateNameRegistryInstruction } from './instructions/updateNameRegistryInstruction.mjs';
|
|
49
26
|
export { UpdateRecordInstruction } from './instructions/updateRecordInstruction.mjs';
|
|
50
27
|
export { ValidateEthereumSignatureInstruction } from './instructions/validateEthereumSignatureInstruction.mjs';
|
|
51
28
|
export { ValidateSolanaSignatureInstruction } from './instructions/validateSolanaSignatureInstruction.mjs';
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
export { getSnsNftOwner } from './nft/getSnsNftOwner.mjs';
|
|
55
|
-
export { getRecordV1Address } from './record/getRecordV1Address.mjs';
|
|
56
|
-
export { getRecordV2Address } from './record/getRecordV2Address.mjs';
|
|
29
|
+
export { Validation } from './types/validation.mjs';
|
|
30
|
+
export { _createAtaIdempotentInstruction } from './instructions/createAtaIdempotentInstruction.mjs';
|
|
57
31
|
export { _getDefaultVerifier, _verifyRoaSync, verifyRecordRightOfAssociation } from './record/verifyRecordRightOfAssociation.mjs';
|
|
58
32
|
export { _verifyStalenessSync, verifyRecordStaleness } from './record/verifyRecordStaleness.mjs';
|
|
59
|
-
export {
|
|
60
|
-
export { PrimaryDomainState } from './states/primaryDomain.mjs';
|
|
61
|
-
export { NAME_REGISTRY_LEN, RecordHeaderState, RecordState, getValidationLength } from './states/record.mjs';
|
|
62
|
-
export { RegistryState } from './states/registry.mjs';
|
|
63
|
-
export { RECORD_V1_SIZE, Record, RecordVersion } from './types/record.mjs';
|
|
64
|
-
export { Validation } from './types/validation.mjs';
|
|
33
|
+
export { burnDomain } from './bindings/burnDomain.mjs';
|
|
65
34
|
export { checkAddressOnCurve } from './utils/checkAddressOnCurve/index.mjs';
|
|
35
|
+
export { createNameRegistry } from './bindings/createNameRegistry.mjs';
|
|
36
|
+
export { createRecord } from './bindings/createRecord.mjs';
|
|
37
|
+
export { createReverse } from './bindings/createReverse.mjs';
|
|
38
|
+
export { createSubdomain } from './bindings/createSubdomain.mjs';
|
|
39
|
+
export { deleteNameRegistry } from './bindings/deleteNameRegistry.mjs';
|
|
40
|
+
export { deleteRecord } from './bindings/deleteRecord.mjs';
|
|
66
41
|
export { deserializeRecordContent } from './utils/deserializers/deserializeRecordContent.mjs';
|
|
67
42
|
export { deserializeReverse } from './utils/deserializers/deserializeReverse.mjs';
|
|
43
|
+
export { getAllSnsDomains } from './domain/getAllSnsDomains.mjs';
|
|
44
|
+
export { getAllSolDomains } from './domain/getAllSolDomains.mjs';
|
|
45
|
+
export { getDomainOwner } from './domain/getDomainOwner.mjs';
|
|
46
|
+
export { getDomainRecord } from './domain/getDomainRecord.mjs';
|
|
47
|
+
export { getDomainRecords } from './domain/getDomainRecords.mjs';
|
|
48
|
+
export { getPrimaryDomain } from './address/getPrimaryDomain.mjs';
|
|
49
|
+
export { getPrimaryDomainsBatch } from './address/getPrimaryDomainsBatch.mjs';
|
|
68
50
|
export { getPythFeedAddress } from './utils/getPythFeedAddress.mjs';
|
|
51
|
+
export { getRecordV1Address } from './record/getRecordV1Address.mjs';
|
|
52
|
+
export { getRecordV2Address } from './record/getRecordV2Address.mjs';
|
|
69
53
|
export { getReverseAddress } from './utils/getReverseAddress.mjs';
|
|
70
54
|
export { getReverseAddressFromDomainAddress } from './utils/getReverseAddressFromDomainAddress.mjs';
|
|
55
|
+
export { getSnsDomainAddress } from './domain/getSnsDomainAddress.mjs';
|
|
56
|
+
export { getSnsDomainsForAddress } from './address/getSnsDomainsForAddress.mjs';
|
|
57
|
+
export { getSnsNftMint } from './nft/getSnsNftMint.mjs';
|
|
58
|
+
export { getSnsNftOwner } from './nft/getSnsNftOwner.mjs';
|
|
59
|
+
export { getSnsNftsForAddress } from './address/getSnsNftsForAddress.mjs';
|
|
60
|
+
export { getSolDomainAddress } from './domain/getSolDomainAddress.mjs';
|
|
61
|
+
export { getSolDomainsForAddress } from './address/getSolDomainsForAddress.mjs';
|
|
62
|
+
export { getSolNftsForAddress } from './address/getSolNftsForAddress.mjs';
|
|
63
|
+
export { getSrsDomainAddress } from './domain/getSrsDomainAddress.mjs';
|
|
64
|
+
export { getSubdomains } from './domain/getSubdomains.mjs';
|
|
65
|
+
export { registerDomain } from './bindings/registerDomain.mjs';
|
|
66
|
+
export { registerDomainWithNft } from './bindings/registerDomainWithNft.mjs';
|
|
67
|
+
export { resolve, safeResolve } from './domain/resolve.mjs';
|
|
71
68
|
export { reverseLookup } from './utils/reverseLookup.mjs';
|
|
72
69
|
export { reverseLookupBatch } from './utils/reverseLookupBatch.mjs';
|
|
73
70
|
export { serializeRecordContent } from './utils/serializers/serializeRecordContent.mjs';
|
|
74
|
-
export {
|
|
71
|
+
export { setPrimaryDomain } from './bindings/setPrimaryDomain.mjs';
|
|
72
|
+
export { setRecordRoaVerifier } from './bindings/setRecordRoaVerifier.mjs';
|
|
73
|
+
export { setRecordStalenessVerifier } from './bindings/setRecordStalenessVerifier.mjs';
|
|
74
|
+
export { transferDomain } from './bindings/transferDomain.mjs';
|
|
75
|
+
export { transferSubdomain } from './bindings/transferSubdomain.mjs';
|
|
76
|
+
export { updateNameRegistry } from './bindings/updateNameRegistry.mjs';
|
|
77
|
+
export { updateRecord } from './bindings/updateRecord.mjs';
|
|
78
|
+
export { validateRecordRoa } from './bindings/validateRecordRoa.mjs';
|
|
79
|
+
export { validateRecordRoaEthereum } from './bindings/validateRecordRoaEthereum.mjs';
|
|
75
80
|
//# sourceMappingURL=index.mjs.map
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocateAndPostRecordInstruction.mjs","sources":["../../../src/instructions/allocateAndPostRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for allocating and writing an SNS V2 record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: AllocateAndPostRecordInstructionParams = { record, content };\r\n * ```\r\n */\r\nexport interface AllocateAndPostRecordInstructionParams {\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for allocating and writing an SNS V2 record account. */\r\nexport class AllocateAndPostRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: AllocateAndPostRecordInstructionParams) {\r\n this.tag = 1;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(AllocateAndPostRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAwBA;MACa,gCAAgC,CAAA;;AAE3C,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,OAAO;IAEP,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA2C,EAAA;AACrD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO
|
|
1
|
+
{"version":3,"file":"allocateAndPostRecordInstruction.mjs","sources":["../../../src/instructions/allocateAndPostRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for allocating and writing an SNS V2 record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: AllocateAndPostRecordInstructionParams = { record, content };\r\n * ```\r\n */\r\nexport interface AllocateAndPostRecordInstructionParams {\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for allocating and writing an SNS V2 record account. */\r\nexport class AllocateAndPostRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: AllocateAndPostRecordInstructionParams) {\r\n this.tag = 1;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(AllocateAndPostRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAwBA;MACa,gCAAgC,CAAA;;AAE3C,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,OAAO;IAEP,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA2C,EAAA;AACrD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO;IAC5B;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,gCAAgC,CAAC,MAAM,EAAE,IAAI,CAAC;IACjE;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,qBAA8B,EAC9B,KAAc,EACd,MAAe,EACf,aAAsB,EACtB,WAAoB,EACpB,YAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,qBAAqB;gBAC9B,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burnDomainInstruction.mjs","sources":["../../../src/instructions/burnDomainInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for burning an SNS domain NFT and registry account. */\r\nexport class BurnDomainInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 16;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(BurnDomainInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameServiceId: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n reverse: Address,\r\n resellingState: Address,\r\n state: Address,\r\n centralState: Address,\r\n owner: Address,\r\n target: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: nameServiceId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverse,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: resellingState,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: target,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,qBAAqB,CAAA;;AAEhC,IAAA,GAAG;IAEH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE
|
|
1
|
+
{"version":3,"file":"burnDomainInstruction.mjs","sources":["../../../src/instructions/burnDomainInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for burning an SNS domain NFT and registry account. */\r\nexport class BurnDomainInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 16;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(BurnDomainInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameServiceId: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n reverse: Address,\r\n resellingState: Address,\r\n state: Address,\r\n centralState: Address,\r\n owner: Address,\r\n target: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: nameServiceId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverse,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: resellingState,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: target,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,qBAAqB,CAAA;;AAEhC,IAAA,GAAG;IAEH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;IACf;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,IAAI,CAAC;IACtD;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,aAAsB,EACtB,aAAsB,EACtB,OAAgB,EAChB,cAAuB,EACvB,KAAc,EACd,YAAqB,EACrB,KAAc,EACd,MAAe,EAAA;AAEf,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,OAAO;gBAChB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAtaIdempotentInstruction.mjs","sources":["../../../src/instructions/createAtaIdempotentInstruction.ts"],"sourcesContent":["import { getCreateAssociatedTokenIdempotentInstructionDataEncoder } from \"@solana-program/token\";\r\nimport { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\n\r\n/**\r\n * Creates an idempotent associated-token-account instruction.\r\n *\r\n * The instruction succeeds when the associated token account already exists,\r\n * allowing callers to include it safely before token transfers.\r\n *\r\n * @param programAddress Associated Token Program address\r\n * @param payer Account funding associated token account creation\r\n * @param ata Derived associated token account address\r\n * @param owner Owner of the associated token account\r\n * @param mint Token mint for the associated token account\r\n * @param systemProgram Solana System Program address\r\n * @param splTokenProgram SPL Token Program address\r\n * @returns Idempotent associated-token-account creation instruction\r\n *\r\n * @example\r\n * ```ts\r\n * const instruction = _createAtaIdempotentInstruction(\r\n * ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\r\n * payer,\r\n * ata,\r\n * owner,\r\n * mint,\r\n * SYSTEM_PROGRAM_ADDRESS,\r\n * TOKEN_PROGRAM_ADDRESS,\r\n * );\r\n * ```\r\n */\r\nexport const _createAtaIdempotentInstruction = (\r\n programAddress: Address,\r\n payer: Address,\r\n ata: Address,\r\n owner: Address,\r\n mint: Address,\r\n systemProgram: Address,\r\n splTokenProgram: Address\r\n): Instruction => {\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: ata,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: mint,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\r\n };\r\n};\r\n"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;
|
|
1
|
+
{"version":3,"file":"createAtaIdempotentInstruction.mjs","sources":["../../../src/instructions/createAtaIdempotentInstruction.ts"],"sourcesContent":["import { getCreateAssociatedTokenIdempotentInstructionDataEncoder } from \"@solana-program/token\";\r\nimport { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\n\r\n/**\r\n * Creates an idempotent associated-token-account instruction.\r\n *\r\n * The instruction succeeds when the associated token account already exists,\r\n * allowing callers to include it safely before token transfers.\r\n *\r\n * @param programAddress Associated Token Program address\r\n * @param payer Account funding associated token account creation\r\n * @param ata Derived associated token account address\r\n * @param owner Owner of the associated token account\r\n * @param mint Token mint for the associated token account\r\n * @param systemProgram Solana System Program address\r\n * @param splTokenProgram SPL Token Program address\r\n * @returns Idempotent associated-token-account creation instruction\r\n *\r\n * @example\r\n * ```ts\r\n * const instruction = _createAtaIdempotentInstruction(\r\n * ASSOCIATED_TOKEN_PROGRAM_ADDRESS,\r\n * payer,\r\n * ata,\r\n * owner,\r\n * mint,\r\n * SYSTEM_PROGRAM_ADDRESS,\r\n * TOKEN_PROGRAM_ADDRESS,\r\n * );\r\n * ```\r\n */\r\nexport const _createAtaIdempotentInstruction = (\r\n programAddress: Address,\r\n payer: Address,\r\n ata: Address,\r\n owner: Address,\r\n mint: Address,\r\n systemProgram: Address,\r\n splTokenProgram: Address\r\n): Instruction => {\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: ata,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: mint,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data: getCreateAssociatedTokenIdempotentInstructionDataEncoder().encode({}),\r\n };\r\n};\r\n"],"names":[],"mappings":";;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACI,MAAM,+BAA+B,GAAG,CAC7C,cAAuB,EACvB,KAAc,EACd,GAAY,EACZ,KAAc,EACd,IAAa,EACb,aAAsB,EACtB,eAAwB,KACT;AACf,IAAA,MAAM,QAAQ,GAAkB;AAC9B,QAAA;AACE,YAAA,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,GAAG;YACZ,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,IAAI;YACb,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,aAAa;YACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;YACxB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,SAAA;KACF;IAED,OAAO;QACL,cAAc;QACd,QAAQ;AACR,QAAA,IAAI,EAAE,wDAAwD,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;KAC5E;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNameRegistryInstruction.mjs","sources":["../../../src/instructions/createNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Input for creating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateNameRegistryInstructionParams = { nameHash, lamports, space: 32 };\r\n * ```\r\n */\r\nexport interface CreateNameRegistryInstructionParams {\r\n /** Hash of the registry name. */\r\n nameHash: Uint8Array;\r\n /** Account funding amount. */\r\n lamports: bigint;\r\n /** Account data size in bytes. */\r\n space: number;\r\n}\r\n\r\n/** Builder for creating an SNS name-registry account. */\r\nexport class CreateNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Hash of the registry name. */\r\n nameHash: Uint8Array;\r\n /** Account funding amount. */\r\n lamports: bigint;\r\n /** Account data size in bytes. */\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n nameHash: { array: { type: \"u8\" } },\r\n lamports: \"u64\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: CreateNameRegistryInstructionParams) {\r\n this.tag = 0;\r\n this.nameHash = obj.nameHash;\r\n this.lamports = obj.lamports;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n owner: Address,\r\n payer: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;AAsBA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;;AAEH,IAAA,QAAQ;;AAER,IAAA,QAAQ;;AAER,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,YAAA,QAAQ,EAAE,KAAK;AACf,YAAA,KAAK,EAAE,KAAK;AACb,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAwC,EAAA;AAClD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ;AAC5B,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"createNameRegistryInstruction.mjs","sources":["../../../src/instructions/createNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Input for creating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateNameRegistryInstructionParams = { nameHash, lamports, space: 32 };\r\n * ```\r\n */\r\nexport interface CreateNameRegistryInstructionParams {\r\n /** Hash of the registry name. */\r\n nameHash: Uint8Array;\r\n /** Account funding amount. */\r\n lamports: bigint;\r\n /** Account data size in bytes. */\r\n space: number;\r\n}\r\n\r\n/** Builder for creating an SNS name-registry account. */\r\nexport class CreateNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Hash of the registry name. */\r\n nameHash: Uint8Array;\r\n /** Account funding amount. */\r\n lamports: bigint;\r\n /** Account data size in bytes. */\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n nameHash: { array: { type: \"u8\" } },\r\n lamports: \"u64\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: CreateNameRegistryInstructionParams) {\r\n this.tag = 0;\r\n this.nameHash = obj.nameHash;\r\n this.lamports = obj.lamports;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n domainAddress: Address,\r\n owner: Address,\r\n payer: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n } else {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mapp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AC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,YAAY,EAAE;YAChB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA,CAAC;QACJ;aAAO;YACL,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,IAAI,aAAa,EAAE;YACjB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;aAAO;YACL,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,IAAI,WAAW,EAAE;YACf,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReverseInstruction.mjs","sources":["../../../src/instructions/createReverseInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for creating an SNS reverse-lookup account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateReverseInstructionParams = { domain: \"example\" };\r\n * ```\r\n */\r\nexport interface CreateReverseInstructionParams {\r\n /** Raw reverse lookup payload. */\r\n domain: string;\r\n}\r\n\r\n/** Builder for creating an SNS reverse-lookup account. */\r\nexport class CreateReverseInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Raw reverse lookup payload. */\r\n domain: string;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n domain: \"string\",\r\n },\r\n };\r\n\r\n constructor(obj: CreateReverseInstructionParams) {\r\n this.tag = 12;\r\n this.domain = obj.domain;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateReverseInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n payer: Address,\r\n rentSysvar: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAgBA;MACa,wBAAwB,CAAA;;AAEnC,IAAA,GAAG;;AAEH,IAAA,MAAM;IACN,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;AACjB,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAmC,EAAA;AAC7C,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM
|
|
1
|
+
{"version":3,"file":"createReverseInstruction.mjs","sources":["../../../src/instructions/createReverseInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for creating an SNS reverse-lookup account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateReverseInstructionParams = { domain: \"example\" };\r\n * ```\r\n */\r\nexport interface CreateReverseInstructionParams {\r\n /** Raw reverse lookup payload. */\r\n domain: string;\r\n}\r\n\r\n/** Builder for creating an SNS reverse-lookup account. */\r\nexport class CreateReverseInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Raw reverse lookup payload. */\r\n domain: string;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n domain: \"string\",\r\n },\r\n };\r\n\r\n constructor(obj: CreateReverseInstructionParams) {\r\n this.tag = 12;\r\n this.domain = obj.domain;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateReverseInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n payer: Address,\r\n rentSysvar: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (parentAddress) {\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n if (parentOwner) {\r\n accounts.push({\r\n address: parentOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAgBA;MACa,wBAAwB,CAAA;;AAEnC,IAAA,GAAG;;AAEH,IAAA,MAAM;IACN,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;AACjB,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAmC,EAAA;AAC7C,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;IAC1B;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC;IACzD;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,oBAA6B,EAC7B,UAAmB,EACnB,aAAsB,EACtB,aAAsB,EACtB,YAAqB,EACrB,KAAc,EACd,UAAmB,EACnB,aAAuB,EACvB,WAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,oBAAoB;gBAC7B,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,aAAa,EAAE;YACjB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,IAAI,WAAW,EAAE;YACf,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSplitV2Instruction.mjs","sources":["../../../src/instructions/createSplitV2Instruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for creating a split SNS V2 domain account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateSplitV2InstructionParams = { name: \"example\", space: 1_000, referrerIdxOpt: null };\r\n * ```\r\n */\r\nexport interface CreateSplitV2InstructionParams {\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n /** Approved referrer index, if any. */\r\n referrerIdxOpt: number | null;\r\n}\r\n\r\n/** Builder for creating a split SNS V2 domain account. */\r\nexport class CreateSplitV2Instruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n /** Approved referrer index, if any. */\r\n referrerIdxOpt: number | null;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n referrerIdxOpt: { option: \"u16\" },\r\n },\r\n };\r\n\r\n constructor(obj: CreateSplitV2InstructionParams) {\r\n this.tag = 20;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n this.referrerIdxOpt = obj.referrerIdxOpt;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateSplitV2Instruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n domainOwner: Address,\r\n feePayer: Address,\r\n buyerTokenSource: Address,\r\n pythFeedAccount: Address,\r\n vault: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n referrerAccountOpt?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: pythFeedAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: vault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (referrerAccountOpt) {\r\n accounts.push({\r\n address: referrerAccountOpt,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAoBA;MACa,wBAAwB,CAAA;;AAEnC,IAAA,GAAG;;AAEH,IAAA,IAAI;;AAEJ,IAAA,KAAK;;AAEL,IAAA,cAAc;IAEd,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;AAClC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAmC,EAAA;AAC7C,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;AACtB,QAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc
|
|
1
|
+
{"version":3,"file":"createSplitV2Instruction.mjs","sources":["../../../src/instructions/createSplitV2Instruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for creating a split SNS V2 domain account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateSplitV2InstructionParams = { name: \"example\", space: 1_000, referrerIdxOpt: null };\r\n * ```\r\n */\r\nexport interface CreateSplitV2InstructionParams {\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n /** Approved referrer index, if any. */\r\n referrerIdxOpt: number | null;\r\n}\r\n\r\n/** Builder for creating a split SNS V2 domain account. */\r\nexport class CreateSplitV2Instruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n /** Approved referrer index, if any. */\r\n referrerIdxOpt: number | null;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n referrerIdxOpt: { option: \"u16\" },\r\n },\r\n };\r\n\r\n constructor(obj: CreateSplitV2InstructionParams) {\r\n this.tag = 20;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n this.referrerIdxOpt = obj.referrerIdxOpt;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateSplitV2Instruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n domainOwner: Address,\r\n feePayer: Address,\r\n buyerTokenSource: Address,\r\n pythFeedAccount: Address,\r\n vault: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n referrerAccountOpt?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: buyerTokenSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: pythFeedAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: vault,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (referrerAccountOpt) {\r\n accounts.push({\r\n address: referrerAccountOpt,\r\n role: AccountRole.WRITABLE,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAoBA;MACa,wBAAwB,CAAA;;AAEnC,IAAA,GAAG;;AAEH,IAAA,IAAI;;AAEJ,IAAA,KAAK;;AAEL,IAAA,cAAc;IAEd,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,KAAK;AACZ,YAAA,cAAc,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;AAClC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAmC,EAAA;AAC7C,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI;AACpB,QAA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E,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,gBAAgB;gBACzB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,kBAAkB,EAAE;YACtB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,kBAAkB;gBAC3B,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWithNftInstruction.mjs","sources":["../../../src/instructions/createWithNftInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for registering an SNS domain backed by an NFT.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateWithNftInstructionParams = { name: \"example\", space: 1_000 };\r\n * ```\r\n */\r\nexport interface CreateWithNftInstructionParams {\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n}\r\n\r\n/** Builder for registering an SNS domain backed by an NFT. */\r\nexport class CreateWithNftInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: CreateWithNftInstructionParams) {\r\n this.tag = 17;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateWithNftInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n nftSource: Address,\r\n nftMetadata: Address,\r\n nftMint: Address,\r\n masterEdition: Address,\r\n collection: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n mplTokenMetadata: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nftSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMetadata,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMint,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: masterEdition,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: collection,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: mplTokenMetadata,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAkBA;MACa,wBAAwB,CAAA;;AAEnC,IAAA,GAAG;;AAEH,IAAA,IAAI;;AAEJ,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,KAAK;AACb,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAmC,EAAA;AAC7C,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"createWithNftInstruction.mjs","sources":["../../../src/instructions/createWithNftInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for registering an SNS domain backed by an NFT.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: CreateWithNftInstructionParams = { name: \"example\", space: 1_000 };\r\n * ```\r\n */\r\nexport interface CreateWithNftInstructionParams {\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n}\r\n\r\n/** Builder for registering an SNS domain backed by an NFT. */\r\nexport class CreateWithNftInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** TLD-less domain name. */\r\n name: string;\r\n /** Account data size in bytes. */\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n name: \"string\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: CreateWithNftInstructionParams) {\r\n this.tag = 17;\r\n this.name = obj.name;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(CreateWithNftInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n namingServiceProgram: Address,\r\n rootDomain: Address,\r\n name: Address,\r\n reverseLookup: Address,\r\n systemProgram: Address,\r\n centralState: Address,\r\n buyer: Address,\r\n nftSource: Address,\r\n nftMetadata: Address,\r\n nftMint: Address,\r\n masterEdition: Address,\r\n collection: Address,\r\n splTokenProgram: Address,\r\n rentSysvar: Address,\r\n state: Address,\r\n mplTokenMetadata: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: namingServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rootDomain,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: name,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: reverseLookup,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: buyer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nftSource,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMetadata,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nftMint,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: masterEdition,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: collection,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: splTokenProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: rentSysvar,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: state,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: mplTokenMetadata,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAkBA;MACa,wBAAwB,CAAA;;AAEnC,IAAA,GAAG;;AAEH,IAAA,IAAI;;AAEJ,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,IAAI,EAAE,QAAQ;AACd,YAAA,KAAK,EAAE,KAAK;AACb,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAmC,EAAA;AAC7C,QAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACb,QAAA,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;IACxB;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,wBAAwB,CAAC,MAAM,EAAE,IAAI,CAAC;IACzD;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,oBAA6B,EAC7B,UAAmB,EACnB,IAAa,EACb,aAAsB,EACtB,aAAsB,EACtB,YAAqB,EACrB,KAAc,EACd,SAAkB,EAClB,WAAoB,EACpB,OAAgB,EAChB,aAAsB,EACtB,UAAmB,EACnB,eAAwB,EACxB,UAAmB,EACnB,KAAc,EACd,gBAAyB,EAAA;AAEzB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,oBAAoB;gBAC7B,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA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AE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,gBAAgB;gBACzB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteNameRegistryInstruction.mjs","sources":["../../../src/instructions/deleteNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for deleting an SNS name-registry account. */\r\nexport class DeleteNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 3;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(DeleteNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n refundTarget: Address,\r\n owner: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: refundTarget,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;IAEH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"deleteNameRegistryInstruction.mjs","sources":["../../../src/instructions/deleteNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for deleting an SNS name-registry account. */\r\nexport class DeleteNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 3;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(DeleteNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n refundTarget: Address,\r\n owner: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n {\r\n address: refundTarget,\r\n role: AccountRole.WRITABLE,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;IAEH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;IACd;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,6BAA6B,CAAC,MAAM,EAAE,IAAI,CAAC;IAC9D;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,YAAqB,EACrB,KAAc,EAAA;AAEd,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteRecordInstruction.mjs","sources":["../../../src/instructions/deleteRecordInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for deleting an SNS V2 record account. */\r\nexport class DeleteRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 5;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(DeleteRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,uBAAuB,CAAA;;AAElC,IAAA,GAAG;IAEH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"deleteRecordInstruction.mjs","sources":["../../../src/instructions/deleteRecordInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for deleting an SNS V2 record account. */\r\nexport class DeleteRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 5;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(DeleteRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n payer: Address,\r\n record: Address,\r\n domainAddress: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\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AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reallocInstruction.mjs","sources":["../../../src/instructions/reallocInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for reallocating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ReallocInstructionParams = { space: 1_000 };\r\n * ```\r\n */\r\nexport interface ReallocInstructionParams {\r\n /** New account data size in bytes. */\r\n space: number;\r\n}\r\n\r\n/** Builder for reallocating an SNS name-registry account. */\r\nexport class ReallocInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** New account data size in bytes. */\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: ReallocInstructionParams) {\r\n this.tag = 4;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ReallocInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgramId: Address,\r\n payerKey: Address,\r\n nameAccountKey: Address,\r\n nameOwnerKey: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgramId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payerKey,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nameAccountKey,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nameOwnerKey,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAgBA;MACa,kBAAkB,CAAA;;AAE7B,IAAA,GAAG;;AAEH,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,KAAK,EAAE,KAAK;AACb,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA6B,EAAA;AACvC,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK
|
|
1
|
+
{"version":3,"file":"reallocInstruction.mjs","sources":["../../../src/instructions/reallocInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for reallocating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ReallocInstructionParams = { space: 1_000 };\r\n * ```\r\n */\r\nexport interface ReallocInstructionParams {\r\n /** New account data size in bytes. */\r\n space: number;\r\n}\r\n\r\n/** Builder for reallocating an SNS name-registry account. */\r\nexport class ReallocInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** New account data size in bytes. */\r\n space: number;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n space: \"u32\",\r\n },\r\n };\r\n\r\n constructor(obj: ReallocInstructionParams) {\r\n this.tag = 4;\r\n this.space = obj.space;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ReallocInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgramId: Address,\r\n payerKey: Address,\r\n nameAccountKey: Address,\r\n nameOwnerKey: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgramId,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: payerKey,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: nameAccountKey,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: nameOwnerKey,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAgBA;MACa,kBAAkB,CAAA;;AAE7B,IAAA,GAAG;;AAEH,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,KAAK,EAAE,KAAK;AACb,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA6B,EAAA;AACvC,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK;IACxB;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC;IACnD;IAEA,cAAc,CACZ,cAAuB,EACvB,eAAwB,EACxB,QAAiB,EACjB,cAAuB,EACvB,YAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerPrimaryInstruction.mjs","sources":["../../../src/instructions/registerPrimaryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for registering an address's SNS primary domain. */\r\nexport class RegisterPrimaryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 6;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(RegisterPrimaryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameAccount: Address,\r\n primaryAccount: Address,\r\n owner: Address,\r\n systemProgram: Address,\r\n optParent?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: nameAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: primaryAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (optParent) {\r\n accounts.push({\r\n address: optParent,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,0BAA0B,CAAA;;AAErC,IAAA,GAAG;IACH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC
|
|
1
|
+
{"version":3,"file":"registerPrimaryInstruction.mjs","sources":["../../../src/instructions/registerPrimaryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/** Builder for registering an address's SNS primary domain. */\r\nexport class RegisterPrimaryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n },\r\n };\r\n\r\n constructor() {\r\n this.tag = 6;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(RegisterPrimaryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n nameAccount: Address,\r\n primaryAccount: Address,\r\n owner: Address,\r\n systemProgram: Address,\r\n optParent?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: nameAccount,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: primaryAccount,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: owner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n if (optParent) {\r\n accounts.push({\r\n address: optParent,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAGA;MACa,0BAA0B,CAAA;;AAErC,IAAA,GAAG;IACH,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACV,SAAA;KACF;AAED,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;IACd;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,0BAA0B,CAAC,MAAM,EAAE,IAAI,CAAC;IAC3D;IAEA,cAAc,CACZ,cAAuB,EACvB,WAAoB,EACpB,cAAuB,EACvB,KAAc,EACd,aAAsB,EACtB,SAAmB,EAAA;AAEnB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAC7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,SAAS,EAAE;YACb,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,SAAS;gBAClB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setRecordRoaVerifierInstruction.mjs","sources":["../../../src/instructions/setRecordRoaVerifierInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\n\r\n/**\r\n * Input for setting an SNS record's Right of Association verifier.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: SetRecordRoaVerifierInstructionParams = { verifier };\r\n * ```\r\n */\r\nexport interface SetRecordRoaVerifierInstructionParams {\r\n /** Verifier account address. */\r\n verifier: Address;\r\n}\r\n\r\n/** Builder for setting an SNS record's Right of Association verifier. */\r\nexport class SetRecordRoaVerifierInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded verifier address. */\r\n roaId: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n roaId: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: SetRecordRoaVerifierInstructionParams) {\r\n this.tag = 6;\r\n this.roaId = addressCodec.encode(obj.verifier);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(SetRecordRoaVerifierInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;AAwBA;MACa,+BAA+B,CAAA;;AAE1C,IAAA,GAAG;;AAEH,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;YACT,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACjC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA0C,EAAA;AACpD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"setRecordRoaVerifierInstruction.mjs","sources":["../../../src/instructions/setRecordRoaVerifierInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\n\r\n/**\r\n * Input for setting an SNS record's Right of Association verifier.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: SetRecordRoaVerifierInstructionParams = { verifier };\r\n * ```\r\n */\r\nexport interface SetRecordRoaVerifierInstructionParams {\r\n /** Verifier account address. */\r\n verifier: Address;\r\n}\r\n\r\n/** Builder for setting an SNS record's Right of Association verifier. */\r\nexport class SetRecordRoaVerifierInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded verifier address. */\r\n roaId: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n roaId: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: SetRecordRoaVerifierInstructionParams) {\r\n this.tag = 6;\r\n this.roaId = addressCodec.encode(obj.verifier);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(SetRecordRoaVerifierInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r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QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transferInstruction.mjs","sources":["../../../src/instructions/transferInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Input for transferring an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: TransferInstructionParams = { newOwner };\r\n * ```\r\n */\r\nexport interface TransferInstructionParams {\r\n /** New registry owner. */\r\n newOwner: Address;\r\n}\r\n\r\n/** Builder for the SNS name-registry transfer instruction. */\r\nexport class TransferInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded new owner address. */\r\n encodedNewOwnerAddress: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n encodedNewOwnerAddress: { array: { type: \"u8\", len: 32 } },\r\n },\r\n };\r\n\r\n constructor(obj: TransferInstructionParams) {\r\n this.tag = 2;\r\n this.encodedNewOwnerAddress = addressCodec.encode(obj.newOwner);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(TransferInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n currentOwner: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: parentOwner ? parentOwner : currentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n if (parentOwner && parentAddress) {\r\n if (!classAddress) {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAyBA;MACa,mBAAmB,CAAA;;AAE9B,IAAA,GAAG;;AAEH,IAAA,sBAAsB;IAEtB,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,sBAAsB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;AAC3D,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA8B,EAAA;AACxC,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,sBAAsB,GAAG,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"transferInstruction.mjs","sources":["../../../src/instructions/transferInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Input for transferring an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: TransferInstructionParams = { newOwner };\r\n * ```\r\n */\r\nexport interface TransferInstructionParams {\r\n /** New registry owner. */\r\n newOwner: Address;\r\n}\r\n\r\n/** Builder for the SNS name-registry transfer instruction. */\r\nexport class TransferInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded new owner address. */\r\n encodedNewOwnerAddress: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n encodedNewOwnerAddress: { array: { type: \"u8\", len: 32 } },\r\n },\r\n };\r\n\r\n constructor(obj: TransferInstructionParams) {\r\n this.tag = 2;\r\n this.encodedNewOwnerAddress = addressCodec.encode(obj.newOwner);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(TransferInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n currentOwner: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: parentOwner ? parentOwner : currentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n if (parentOwner && parentAddress) {\r\n if (!classAddress) {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;;;AAyBA;MACa,mBAAmB,CAAA;;AAE9B,IAAA,GAAG;;AAEH,IAAA,sBAAsB;IAEtB,OAAO,MAAM,GAAG;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tB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateNameRegistryInstruction.mjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateNameRegistryInstructionParams = { offset: 0, inputData };\r\n * ```\r\n */\r\nexport interface UpdateNameRegistryInstructionParams {\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n}\r\n\r\n/** Builder for updating the data of an SNS name-registry account. */\r\nexport class UpdateNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n offset: \"u32\",\r\n inputData: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateNameRegistryInstructionParams) {\r\n this.tag = 1;\r\n this.offset = obj.offset;\r\n this.inputData = obj.inputData;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n signer: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: signer,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAkBA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,SAAS;IAET,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACrC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAwC,EAAA;AAClD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"updateNameRegistryInstruction.mjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateNameRegistryInstructionParams = { offset: 0, inputData };\r\n * ```\r\n */\r\nexport interface UpdateNameRegistryInstructionParams {\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n}\r\n\r\n/** Builder for updating the data of an SNS name-registry account. */\r\nexport class UpdateNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n offset: \"u32\",\r\n inputData: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateNameRegistryInstructionParams) {\r\n this.tag = 1;\r\n this.offset = obj.offset;\r\n this.inputData = obj.inputData;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n signer: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: signer,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAkBA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,SAAS;IAET,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACrC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAwC,EAAA;AAClD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;IAChC;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,6BAA6B,CAAC,MAAM,EAAE,IAAI,CAAC;IAC9D;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,MAAe,EAAA;AAEf,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,WAAW,CAAC,eAAe;AAClC,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRecordInstruction.mjs","sources":["../../../src/instructions/updateRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS V2 record account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateRecordInstructionParams = { record, content };\r\n * ```\r\n */\r\nexport interface UpdateRecordInstructionParams {\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for updating content in an SNS V2 record account. */\r\nexport class UpdateRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateRecordInstructionParams) {\r\n this.tag = 2;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAwBA;MACa,uBAAuB,CAAA;;AAElC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,OAAO;IAEP,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAkC,EAAA;AAC5C,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO
|
|
1
|
+
{"version":3,"file":"updateRecordInstruction.mjs","sources":["../../../src/instructions/updateRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS V2 record account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateRecordInstructionParams = { record, content };\r\n * ```\r\n */\r\nexport interface UpdateRecordInstructionParams {\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for updating content in an SNS V2 record account. */\r\nexport class UpdateRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateRecordInstructionParams) {\r\n this.tag = 2;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AAwBA;MACa,uBAAuB,CAAA;;AAElC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,OAAO;IAEP,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAkC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umSignatureInstruction.mjs","sources":["../../../src/instructions/validateEthereumSignatureInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for validating an Ethereum signature for an SNS record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ValidateEthereumSignatureInstructionParams = { validation, signature, expectedPubkey };\r\n * ```\r\n */\r\nexport interface ValidateEthereumSignatureInstructionParams {\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for validating an Ethereum signature for an SNS record. */\r\nexport class ValidateEthereumSignatureInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n validation: \"u8\",\r\n signature: { array: { type: \"u8\" } },\r\n expectedPubkey: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: ValidateEthereumSignatureInstructionParams) {\r\n this.tag = 4;\r\n this.validation = obj.validation;\r\n this.signature = obj.signature;\r\n this.expectedPubkey = obj.expectedPubkey;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ValidateEthereumSignatureInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AA0BA;MACa,oCAAoC,CAAA;;AAE/C,IAAA,GAAG;;AAEH,IAAA,UAAU;;AAEV,IAAA,SAAS;;AAET,IAAA,cAAc;IAEd,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YACpC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AAC1C,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA+C,EAAA;AACzD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;AAC9B,QAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc
|
|
1
|
+
{"version":3,"file":"validateEthereumSignatureInstruction.mjs","sources":["../../../src/instructions/validateEthereumSignatureInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for validating an Ethereum signature for an SNS record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ValidateEthereumSignatureInstructionParams = { validation, signature, expectedPubkey };\r\n * ```\r\n */\r\nexport interface ValidateEthereumSignatureInstructionParams {\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for validating an Ethereum signature for an SNS record. */\r\nexport class ValidateEthereumSignatureInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n validation: \"u8\",\r\n signature: { array: { type: \"u8\" } },\r\n expectedPubkey: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: ValidateEthereumSignatureInstructionParams) {\r\n this.tag = 4;\r\n this.validation = obj.validation;\r\n this.signature = obj.signature;\r\n this.expectedPubkey = obj.expectedPubkey;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ValidateEthereumSignatureInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":[],"mappings":";;;AA0BA;MACa,oCAAoC,CAAA;;AAE/C,IAAA,GAAG;;AAEH,IAAA,UAAU;;AAEV,IAAA,SAAS;;AAET,IAAA,cAAc;IAEd,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YACpC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AAC1C,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA+C,EAAA;AACzD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;AAC9B,QAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc;IAC1C;IAEA,SAAS,GAAA;QACP,OAAO,SAAS,CAAC,oCAAoC,CAAC,MAAM,EAAE,IAAI,CAAC;IACrE;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,qBAA8B,EAC9B,QAAiB,EACjB,MAAe,EACf,MAAe,EACf,WAAoB,EACpB,YAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAE,WAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YA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