@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
package/dist/cjs/index.cjs
CHANGED
|
@@ -4,78 +4,83 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const codecs = require('./codecs.cjs');
|
|
6
6
|
const errors = require('./errors.cjs');
|
|
7
|
-
const getSnsDomainsForAddress = require('./address/getSnsDomainsForAddress.cjs');
|
|
8
|
-
const getSnsNftsForAddress = require('./address/getSnsNftsForAddress.cjs');
|
|
9
|
-
const getPrimaryDomain = require('./address/getPrimaryDomain.cjs');
|
|
10
|
-
const getPrimaryDomainsBatch = require('./address/getPrimaryDomainsBatch.cjs');
|
|
11
|
-
const burnDomain = require('./bindings/burnDomain.cjs');
|
|
12
|
-
const createNameRegistry = require('./bindings/createNameRegistry.cjs');
|
|
13
|
-
const createRecord = require('./bindings/createRecord.cjs');
|
|
14
|
-
const createReverse = require('./bindings/createReverse.cjs');
|
|
15
|
-
const createSubdomain = require('./bindings/createSubdomain.cjs');
|
|
16
|
-
const deleteNameRegistry = require('./bindings/deleteNameRegistry.cjs');
|
|
17
|
-
const deleteRecord = require('./bindings/deleteRecord.cjs');
|
|
18
|
-
const registerDomain = require('./bindings/registerDomain.cjs');
|
|
19
|
-
const registerDomainWithNft = require('./bindings/registerDomainWithNft.cjs');
|
|
20
|
-
const setPrimaryDomain = require('./bindings/setPrimaryDomain.cjs');
|
|
21
|
-
const setRecordRoaVerifier = require('./bindings/setRecordRoaVerifier.cjs');
|
|
22
|
-
const setRecordStalenessVerifier = require('./bindings/setRecordStalenessVerifier.cjs');
|
|
23
|
-
const transferDomain = require('./bindings/transferDomain.cjs');
|
|
24
|
-
const transferSubdomain = require('./bindings/transferSubdomain.cjs');
|
|
25
|
-
const updateNameRegistry = require('./bindings/updateNameRegistry.cjs');
|
|
26
|
-
const updateRecord = require('./bindings/updateRecord.cjs');
|
|
27
|
-
const validateRecordRoa = require('./bindings/validateRecordRoa.cjs');
|
|
28
|
-
const validateRecordRoaEthereum = require('./bindings/validateRecordRoaEthereum.cjs');
|
|
29
|
-
const addresses = require('./constants/addresses.cjs');
|
|
30
|
-
const pythFeeds = require('./constants/pythFeeds.cjs');
|
|
31
|
-
const records = require('./constants/records.cjs');
|
|
32
|
-
const getAllSnsDomains = require('./domain/getAllSnsDomains.cjs');
|
|
33
|
-
const getSnsDomainAddress = require('./domain/getSnsDomainAddress.cjs');
|
|
34
|
-
const getSrsDomainAddress = require('./domain/getSrsDomainAddress.cjs');
|
|
35
|
-
const getDomainOwner = require('./domain/getDomainOwner.cjs');
|
|
36
|
-
const getDomainRecord = require('./domain/getDomainRecord.cjs');
|
|
37
|
-
const getDomainRecords = require('./domain/getDomainRecords.cjs');
|
|
38
|
-
const getSubdomains = require('./domain/getSubdomains.cjs');
|
|
39
|
-
const resolve = require('./domain/resolve.cjs');
|
|
40
7
|
const allocateAndPostRecordInstruction = require('./instructions/allocateAndPostRecordInstruction.cjs');
|
|
41
8
|
const burnDomainInstruction = require('./instructions/burnDomainInstruction.cjs');
|
|
42
|
-
const
|
|
9
|
+
const addresses = require('./constants/addresses.cjs');
|
|
43
10
|
const createNameRegistryInstruction = require('./instructions/createNameRegistryInstruction.cjs');
|
|
44
11
|
const createReverseInstruction = require('./instructions/createReverseInstruction.cjs');
|
|
45
12
|
const createSplitV2Instruction = require('./instructions/createSplitV2Instruction.cjs');
|
|
46
13
|
const createWithNftInstruction = require('./instructions/createWithNftInstruction.cjs');
|
|
47
14
|
const deleteNameRegistryInstruction = require('./instructions/deleteNameRegistryInstruction.cjs');
|
|
48
15
|
const deleteRecordInstruction = require('./instructions/deleteRecordInstruction.cjs');
|
|
16
|
+
const records = require('./constants/records.cjs');
|
|
17
|
+
const record = require('./states/record.cjs');
|
|
18
|
+
const nft = require('./states/nft.cjs');
|
|
19
|
+
const pythFeeds = require('./constants/pythFeeds.cjs');
|
|
20
|
+
const primaryDomain = require('./states/primaryDomain.cjs');
|
|
21
|
+
const record$1 = require('./types/record.cjs');
|
|
49
22
|
const reallocInstruction = require('./instructions/reallocInstruction.cjs');
|
|
50
23
|
const registerPrimaryInstruction = require('./instructions/registerPrimaryInstruction.cjs');
|
|
24
|
+
const registry = require('./states/registry.cjs');
|
|
25
|
+
const tld = require('./utils/tld.cjs');
|
|
26
|
+
const srs = require('./constants/srs.cjs');
|
|
27
|
+
const setRecordRoaVerifierInstruction = require('./instructions/setRecordRoaVerifierInstruction.cjs');
|
|
51
28
|
const transferInstruction = require('./instructions/transferInstruction.cjs');
|
|
52
29
|
const updateNameRegistryInstruction = require('./instructions/updateNameRegistryInstruction.cjs');
|
|
53
30
|
const updateRecordInstruction = require('./instructions/updateRecordInstruction.cjs');
|
|
54
31
|
const validateEthereumSignatureInstruction = require('./instructions/validateEthereumSignatureInstruction.cjs');
|
|
55
32
|
const validateSolanaSignatureInstruction = require('./instructions/validateSolanaSignatureInstruction.cjs');
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const getSnsNftOwner = require('./nft/getSnsNftOwner.cjs');
|
|
59
|
-
const getRecordV1Address = require('./record/getRecordV1Address.cjs');
|
|
60
|
-
const getRecordV2Address = require('./record/getRecordV2Address.cjs');
|
|
33
|
+
const validation = require('./types/validation.cjs');
|
|
34
|
+
const createAtaIdempotentInstruction = require('./instructions/createAtaIdempotentInstruction.cjs');
|
|
61
35
|
const verifyRecordRightOfAssociation = require('./record/verifyRecordRightOfAssociation.cjs');
|
|
62
36
|
const verifyRecordStaleness = require('./record/verifyRecordStaleness.cjs');
|
|
63
|
-
const
|
|
64
|
-
const primaryDomain = require('./states/primaryDomain.cjs');
|
|
65
|
-
const record = require('./states/record.cjs');
|
|
66
|
-
const registry = require('./states/registry.cjs');
|
|
67
|
-
const record$1 = require('./types/record.cjs');
|
|
68
|
-
const validation = require('./types/validation.cjs');
|
|
37
|
+
const burnDomain = require('./bindings/burnDomain.cjs');
|
|
69
38
|
const index = require('./utils/checkAddressOnCurve/index.cjs');
|
|
39
|
+
const createNameRegistry = require('./bindings/createNameRegistry.cjs');
|
|
40
|
+
const createRecord = require('./bindings/createRecord.cjs');
|
|
41
|
+
const createReverse = require('./bindings/createReverse.cjs');
|
|
42
|
+
const createSubdomain = require('./bindings/createSubdomain.cjs');
|
|
43
|
+
const deleteNameRegistry = require('./bindings/deleteNameRegistry.cjs');
|
|
44
|
+
const deleteRecord = require('./bindings/deleteRecord.cjs');
|
|
70
45
|
const deserializeRecordContent = require('./utils/deserializers/deserializeRecordContent.cjs');
|
|
71
46
|
const deserializeReverse = require('./utils/deserializers/deserializeReverse.cjs');
|
|
47
|
+
const getAllSnsDomains = require('./domain/getAllSnsDomains.cjs');
|
|
48
|
+
const getAllSolDomains = require('./domain/getAllSolDomains.cjs');
|
|
49
|
+
const getDomainOwner = require('./domain/getDomainOwner.cjs');
|
|
50
|
+
const getDomainRecord = require('./domain/getDomainRecord.cjs');
|
|
51
|
+
const getDomainRecords = require('./domain/getDomainRecords.cjs');
|
|
52
|
+
const getPrimaryDomain = require('./address/getPrimaryDomain.cjs');
|
|
53
|
+
const getPrimaryDomainsBatch = require('./address/getPrimaryDomainsBatch.cjs');
|
|
72
54
|
const getPythFeedAddress = require('./utils/getPythFeedAddress.cjs');
|
|
55
|
+
const getRecordV1Address = require('./record/getRecordV1Address.cjs');
|
|
56
|
+
const getRecordV2Address = require('./record/getRecordV2Address.cjs');
|
|
73
57
|
const getReverseAddress = require('./utils/getReverseAddress.cjs');
|
|
74
58
|
const getReverseAddressFromDomainAddress = require('./utils/getReverseAddressFromDomainAddress.cjs');
|
|
59
|
+
const getSnsDomainAddress = require('./domain/getSnsDomainAddress.cjs');
|
|
60
|
+
const getSnsDomainsForAddress = require('./address/getSnsDomainsForAddress.cjs');
|
|
61
|
+
const getSnsNftMint = require('./nft/getSnsNftMint.cjs');
|
|
62
|
+
const getSnsNftOwner = require('./nft/getSnsNftOwner.cjs');
|
|
63
|
+
const getSnsNftsForAddress = require('./address/getSnsNftsForAddress.cjs');
|
|
64
|
+
const getSolDomainAddress = require('./domain/getSolDomainAddress.cjs');
|
|
65
|
+
const getSolDomainsForAddress = require('./address/getSolDomainsForAddress.cjs');
|
|
66
|
+
const getSolNftsForAddress = require('./address/getSolNftsForAddress.cjs');
|
|
67
|
+
const getSrsDomainAddress = require('./domain/getSrsDomainAddress.cjs');
|
|
68
|
+
const getSubdomains = require('./domain/getSubdomains.cjs');
|
|
69
|
+
const registerDomain = require('./bindings/registerDomain.cjs');
|
|
70
|
+
const registerDomainWithNft = require('./bindings/registerDomainWithNft.cjs');
|
|
71
|
+
const resolve = require('./domain/resolve.cjs');
|
|
75
72
|
const reverseLookup = require('./utils/reverseLookup.cjs');
|
|
76
73
|
const reverseLookupBatch = require('./utils/reverseLookupBatch.cjs');
|
|
77
74
|
const serializeRecordContent = require('./utils/serializers/serializeRecordContent.cjs');
|
|
78
|
-
const
|
|
75
|
+
const setPrimaryDomain = require('./bindings/setPrimaryDomain.cjs');
|
|
76
|
+
const setRecordRoaVerifier = require('./bindings/setRecordRoaVerifier.cjs');
|
|
77
|
+
const setRecordStalenessVerifier = require('./bindings/setRecordStalenessVerifier.cjs');
|
|
78
|
+
const transferDomain = require('./bindings/transferDomain.cjs');
|
|
79
|
+
const transferSubdomain = require('./bindings/transferSubdomain.cjs');
|
|
80
|
+
const updateNameRegistry = require('./bindings/updateNameRegistry.cjs');
|
|
81
|
+
const updateRecord = require('./bindings/updateRecord.cjs');
|
|
82
|
+
const validateRecordRoa = require('./bindings/validateRecordRoa.cjs');
|
|
83
|
+
const validateRecordRoaEthereum = require('./bindings/validateRecordRoaEthereum.cjs');
|
|
79
84
|
|
|
80
85
|
|
|
81
86
|
|
|
@@ -117,28 +122,8 @@ exports.RecordMalformedError = errors.RecordMalformedError;
|
|
|
117
122
|
exports.SNSError = errors.SNSError;
|
|
118
123
|
exports.SnsSolResolutionMismatchError = errors.SnsSolResolutionMismatchError;
|
|
119
124
|
exports.UnsupportedTldError = errors.UnsupportedTldError;
|
|
120
|
-
exports.
|
|
121
|
-
exports.
|
|
122
|
-
exports.getPrimaryDomain = getPrimaryDomain.getPrimaryDomain;
|
|
123
|
-
exports.getPrimaryDomainsBatch = getPrimaryDomainsBatch.getPrimaryDomainsBatch;
|
|
124
|
-
exports.burnDomain = burnDomain.burnDomain;
|
|
125
|
-
exports.createNameRegistry = createNameRegistry.createNameRegistry;
|
|
126
|
-
exports.createRecord = createRecord.createRecord;
|
|
127
|
-
exports.createReverse = createReverse.createReverse;
|
|
128
|
-
exports.createSubdomain = createSubdomain.createSubdomain;
|
|
129
|
-
exports.deleteNameRegistry = deleteNameRegistry.deleteNameRegistry;
|
|
130
|
-
exports.deleteRecord = deleteRecord.deleteRecord;
|
|
131
|
-
exports.registerDomain = registerDomain.registerDomain;
|
|
132
|
-
exports.registerDomainWithNft = registerDomainWithNft.registerDomainWithNft;
|
|
133
|
-
exports.setPrimaryDomain = setPrimaryDomain.setPrimaryDomain;
|
|
134
|
-
exports.setRecordRoaVerifier = setRecordRoaVerifier.setRecordRoaVerifier;
|
|
135
|
-
exports.setRecordStalenessVerifier = setRecordStalenessVerifier.setRecordStalenessVerifier;
|
|
136
|
-
exports.transferDomain = transferDomain.transferDomain;
|
|
137
|
-
exports.transferSubdomain = transferSubdomain.transferSubdomain;
|
|
138
|
-
exports.updateNameRegistry = updateNameRegistry.updateNameRegistry;
|
|
139
|
-
exports.updateRecord = updateRecord.updateRecord;
|
|
140
|
-
exports.validateRecordRoa = validateRecordRoa.validateRecordRoa;
|
|
141
|
-
exports.validateRecordRoaEthereum = validateRecordRoaEthereum.validateRecordRoaEthereum;
|
|
125
|
+
exports.AllocateAndPostRecordInstruction = allocateAndPostRecordInstruction.AllocateAndPostRecordInstruction;
|
|
126
|
+
exports.BurnDomainInstruction = burnDomainInstruction.BurnDomainInstruction;
|
|
142
127
|
exports.CENTRAL_STATE = addresses.CENTRAL_STATE;
|
|
143
128
|
exports.CENTRAL_STATE_DOMAIN_RECORDS = addresses.CENTRAL_STATE_DOMAIN_RECORDS;
|
|
144
129
|
exports.DEFAULT_ADDRESS = addresses.DEFAULT_ADDRESS;
|
|
@@ -152,69 +137,42 @@ exports.REFERRERS = addresses.REFERRERS;
|
|
|
152
137
|
exports.REGISTRY_PROGRAM_ADDRESS = addresses.REGISTRY_PROGRAM_ADDRESS;
|
|
153
138
|
exports.REVERSE_LOOKUP_CLASS = addresses.REVERSE_LOOKUP_CLASS;
|
|
154
139
|
exports.SNS_ROOT_DOMAIN_ACCOUNT = addresses.SNS_ROOT_DOMAIN_ACCOUNT;
|
|
140
|
+
exports.SOL_REGISTRAR_PROGRAM_ADDRESS = addresses.SOL_REGISTRAR_PROGRAM_ADDRESS;
|
|
155
141
|
exports.SOL_SRS_CLASS = addresses.SOL_SRS_CLASS;
|
|
156
142
|
exports.SRS_CENTRAL_STATE = addresses.SRS_CENTRAL_STATE;
|
|
143
|
+
exports.SRS_PROGRAM_ADDRESS = addresses.SRS_PROGRAM_ADDRESS;
|
|
157
144
|
exports.SYSTEM_PROGRAM_ADDRESS = addresses.SYSTEM_PROGRAM_ADDRESS;
|
|
158
145
|
exports.SYSVAR_RENT_ADDRESS = addresses.SYSVAR_RENT_ADDRESS;
|
|
146
|
+
exports.TOKEN_2022_PROGRAM_ADDRESS = addresses.TOKEN_2022_PROGRAM_ADDRESS;
|
|
159
147
|
exports.TOKEN_PROGRAM_ADDRESS = addresses.TOKEN_PROGRAM_ADDRESS;
|
|
160
148
|
exports.TWITTER_ROOT_PARENT_REGISTRY_ADDRESS = addresses.TWITTER_ROOT_PARENT_REGISTRY_ADDRESS;
|
|
161
149
|
exports.TWITTER_VERIFICATION_AUTHORITY = addresses.TWITTER_VERIFICATION_AUTHORITY;
|
|
162
150
|
exports.USDC_MINT = addresses.USDC_MINT;
|
|
163
151
|
exports.VAULT_OWNER = addresses.VAULT_OWNER;
|
|
164
152
|
exports.WOLVES_COLLECTION_METADATA = addresses.WOLVES_COLLECTION_METADATA;
|
|
165
|
-
exports.PYTH_FEEDS = pythFeeds.PYTH_FEEDS;
|
|
166
|
-
exports.PYTH_PROGRAM_ID = pythFeeds.PYTH_PROGRAM_ID;
|
|
167
|
-
exports.ETH_ROA_RECORDS = records.ETH_ROA_RECORDS;
|
|
168
|
-
exports.EVM_RECORDS = records.EVM_RECORDS;
|
|
169
|
-
exports.GUARDIANS = records.GUARDIANS;
|
|
170
|
-
exports.SELF_SIGNED_RECORDS = records.SELF_SIGNED_RECORDS;
|
|
171
|
-
exports.UTF8_ENCODED_RECORDS = records.UTF8_ENCODED_RECORDS;
|
|
172
|
-
exports.getAllSnsDomains = getAllSnsDomains.getAllSnsDomains;
|
|
173
|
-
exports.getSnsDomainAddress = getSnsDomainAddress.getSnsDomainAddress;
|
|
174
|
-
exports.getSrsDomainAddress = getSrsDomainAddress.getSrsDomainAddress;
|
|
175
|
-
exports.getDomainOwner = getDomainOwner.getDomainOwner;
|
|
176
|
-
exports.getDomainRecord = getDomainRecord.getDomainRecord;
|
|
177
|
-
exports.getDomainRecords = getDomainRecords.getDomainRecords;
|
|
178
|
-
exports.getSubdomains = getSubdomains.getSubdomains;
|
|
179
|
-
exports.resolve = resolve.resolve;
|
|
180
|
-
exports.safeResolve = resolve.safeResolve;
|
|
181
|
-
exports.AllocateAndPostRecordInstruction = allocateAndPostRecordInstruction.AllocateAndPostRecordInstruction;
|
|
182
|
-
exports.BurnDomainInstruction = burnDomainInstruction.BurnDomainInstruction;
|
|
183
|
-
exports._createAtaIdempotentInstruction = createAtaIdempotentInstruction._createAtaIdempotentInstruction;
|
|
184
153
|
exports.CreateNameRegistryInstruction = createNameRegistryInstruction.CreateNameRegistryInstruction;
|
|
185
154
|
exports.CreateReverseInstruction = createReverseInstruction.CreateReverseInstruction;
|
|
186
155
|
exports.CreateSplitV2Instruction = createSplitV2Instruction.CreateSplitV2Instruction;
|
|
187
156
|
exports.CreateWithNftInstruction = createWithNftInstruction.CreateWithNftInstruction;
|
|
188
157
|
exports.DeleteNameRegistryInstruction = deleteNameRegistryInstruction.DeleteNameRegistryInstruction;
|
|
189
158
|
exports.DeleteRecordInstruction = deleteRecordInstruction.DeleteRecordInstruction;
|
|
190
|
-
exports.
|
|
191
|
-
exports.
|
|
192
|
-
exports.
|
|
193
|
-
exports.
|
|
194
|
-
exports.
|
|
195
|
-
exports.
|
|
196
|
-
exports.
|
|
197
|
-
exports.
|
|
198
|
-
exports.
|
|
199
|
-
exports.getSnsNftOwner = getSnsNftOwner.getSnsNftOwner;
|
|
200
|
-
exports.getRecordV1Address = getRecordV1Address.getRecordV1Address;
|
|
201
|
-
exports.getRecordV2Address = getRecordV2Address.getRecordV2Address;
|
|
202
|
-
exports._getDefaultVerifier = verifyRecordRightOfAssociation._getDefaultVerifier;
|
|
203
|
-
exports._verifyRoaSync = verifyRecordRightOfAssociation._verifyRoaSync;
|
|
204
|
-
exports.verifyRecordRightOfAssociation = verifyRecordRightOfAssociation.verifyRecordRightOfAssociation;
|
|
205
|
-
exports._verifyStalenessSync = verifyRecordStaleness._verifyStalenessSync;
|
|
206
|
-
exports.verifyRecordStaleness = verifyRecordStaleness.verifyRecordStaleness;
|
|
159
|
+
exports.ETH_ROA_RECORDS = records.ETH_ROA_RECORDS;
|
|
160
|
+
exports.EVM_RECORDS = records.EVM_RECORDS;
|
|
161
|
+
exports.GUARDIANS = records.GUARDIANS;
|
|
162
|
+
exports.SELF_SIGNED_RECORDS = records.SELF_SIGNED_RECORDS;
|
|
163
|
+
exports.UTF8_ENCODED_RECORDS = records.UTF8_ENCODED_RECORDS;
|
|
164
|
+
exports.NAME_REGISTRY_LEN = record.NAME_REGISTRY_LEN;
|
|
165
|
+
exports.RecordHeaderState = record.RecordHeaderState;
|
|
166
|
+
exports.RecordState = record.RecordState;
|
|
167
|
+
exports.getValidationLength = record.getValidationLength;
|
|
207
168
|
exports.NftState = nft.NftState;
|
|
208
169
|
Object.defineProperty(exports, "NftTag", {
|
|
209
170
|
enumerable: true,
|
|
210
171
|
get: () => nft.NftTag
|
|
211
172
|
});
|
|
173
|
+
exports.PYTH_FEEDS = pythFeeds.PYTH_FEEDS;
|
|
174
|
+
exports.PYTH_PROGRAM_ID = pythFeeds.PYTH_PROGRAM_ID;
|
|
212
175
|
exports.PrimaryDomainState = primaryDomain.PrimaryDomainState;
|
|
213
|
-
exports.NAME_REGISTRY_LEN = record.NAME_REGISTRY_LEN;
|
|
214
|
-
exports.RecordHeaderState = record.RecordHeaderState;
|
|
215
|
-
exports.RecordState = record.RecordState;
|
|
216
|
-
exports.getValidationLength = record.getValidationLength;
|
|
217
|
-
exports.RegistryState = registry.RegistryState;
|
|
218
176
|
exports.RECORD_V1_SIZE = record$1.RECORD_V1_SIZE;
|
|
219
177
|
Object.defineProperty(exports, "Record", {
|
|
220
178
|
enumerable: true,
|
|
@@ -224,23 +182,91 @@ Object.defineProperty(exports, "RecordVersion", {
|
|
|
224
182
|
enumerable: true,
|
|
225
183
|
get: () => record$1.RecordVersion
|
|
226
184
|
});
|
|
185
|
+
exports.ReallocInstruction = reallocInstruction.ReallocInstruction;
|
|
186
|
+
exports.RegisterPrimaryInstruction = registerPrimaryInstruction.RegisterPrimaryInstruction;
|
|
187
|
+
exports.RegistryState = registry.RegistryState;
|
|
188
|
+
exports.SNS_TLD = tld.SNS_TLD;
|
|
189
|
+
exports.SOL_TLD = tld.SOL_TLD;
|
|
190
|
+
exports.SUPPORTED_TLDS = tld.SUPPORTED_TLDS;
|
|
191
|
+
exports.getTld = tld.getTld;
|
|
192
|
+
exports.parseSnsTld = tld.parseSnsTld;
|
|
193
|
+
exports.parseSupportedTld = tld.parseSupportedTld;
|
|
194
|
+
exports.SRS_ADDRESS_LENGTH = srs.SRS_ADDRESS_LENGTH;
|
|
195
|
+
exports.SRS_EXPIRY_LENGTH = srs.SRS_EXPIRY_LENGTH;
|
|
196
|
+
exports.SRS_HASH_PREFIX = srs.SRS_HASH_PREFIX;
|
|
197
|
+
exports.SRS_OWNER_TYPE_PUBKEY = srs.SRS_OWNER_TYPE_PUBKEY;
|
|
198
|
+
exports.SRS_OWNER_TYPE_TOKEN = srs.SRS_OWNER_TYPE_TOKEN;
|
|
199
|
+
exports.SRS_RECORD_CLASS_OFFSET = srs.SRS_RECORD_CLASS_OFFSET;
|
|
200
|
+
exports.SRS_RECORD_DISCRIMINATOR = srs.SRS_RECORD_DISCRIMINATOR;
|
|
201
|
+
exports.SRS_RECORD_DISCRIMINATOR_OFFSET = srs.SRS_RECORD_DISCRIMINATOR_OFFSET;
|
|
202
|
+
exports.SRS_RECORD_EXPIRY_OFFSET = srs.SRS_RECORD_EXPIRY_OFFSET;
|
|
203
|
+
exports.SRS_RECORD_FROZEN_OFFSET = srs.SRS_RECORD_FROZEN_OFFSET;
|
|
204
|
+
exports.SRS_RECORD_HEADER_LENGTH = srs.SRS_RECORD_HEADER_LENGTH;
|
|
205
|
+
exports.SRS_RECORD_METADATA_OFFSET = srs.SRS_RECORD_METADATA_OFFSET;
|
|
206
|
+
exports.SRS_RECORD_OWNER_OFFSET = srs.SRS_RECORD_OWNER_OFFSET;
|
|
207
|
+
exports.SRS_RECORD_OWNER_TYPE_OFFSET = srs.SRS_RECORD_OWNER_TYPE_OFFSET;
|
|
208
|
+
exports.SetRecordRoaVerifierInstruction = setRecordRoaVerifierInstruction.SetRecordRoaVerifierInstruction;
|
|
209
|
+
exports.TransferInstruction = transferInstruction.TransferInstruction;
|
|
210
|
+
exports.UpdateNameRegistryInstruction = updateNameRegistryInstruction.UpdateNameRegistryInstruction;
|
|
211
|
+
exports.UpdateRecordInstruction = updateRecordInstruction.UpdateRecordInstruction;
|
|
212
|
+
exports.ValidateEthereumSignatureInstruction = validateEthereumSignatureInstruction.ValidateEthereumSignatureInstruction;
|
|
213
|
+
exports.ValidateSolanaSignatureInstruction = validateSolanaSignatureInstruction.ValidateSolanaSignatureInstruction;
|
|
227
214
|
Object.defineProperty(exports, "Validation", {
|
|
228
215
|
enumerable: true,
|
|
229
216
|
get: () => validation.Validation
|
|
230
217
|
});
|
|
218
|
+
exports._createAtaIdempotentInstruction = createAtaIdempotentInstruction._createAtaIdempotentInstruction;
|
|
219
|
+
exports._getDefaultVerifier = verifyRecordRightOfAssociation._getDefaultVerifier;
|
|
220
|
+
exports._verifyRoaSync = verifyRecordRightOfAssociation._verifyRoaSync;
|
|
221
|
+
exports.verifyRecordRightOfAssociation = verifyRecordRightOfAssociation.verifyRecordRightOfAssociation;
|
|
222
|
+
exports._verifyStalenessSync = verifyRecordStaleness._verifyStalenessSync;
|
|
223
|
+
exports.verifyRecordStaleness = verifyRecordStaleness.verifyRecordStaleness;
|
|
224
|
+
exports.burnDomain = burnDomain.burnDomain;
|
|
231
225
|
exports.checkAddressOnCurve = index.checkAddressOnCurve;
|
|
226
|
+
exports.createNameRegistry = createNameRegistry.createNameRegistry;
|
|
227
|
+
exports.createRecord = createRecord.createRecord;
|
|
228
|
+
exports.createReverse = createReverse.createReverse;
|
|
229
|
+
exports.createSubdomain = createSubdomain.createSubdomain;
|
|
230
|
+
exports.deleteNameRegistry = deleteNameRegistry.deleteNameRegistry;
|
|
231
|
+
exports.deleteRecord = deleteRecord.deleteRecord;
|
|
232
232
|
exports.deserializeRecordContent = deserializeRecordContent.deserializeRecordContent;
|
|
233
233
|
exports.deserializeReverse = deserializeReverse.deserializeReverse;
|
|
234
|
+
exports.getAllSnsDomains = getAllSnsDomains.getAllSnsDomains;
|
|
235
|
+
exports.getAllSolDomains = getAllSolDomains.getAllSolDomains;
|
|
236
|
+
exports.getDomainOwner = getDomainOwner.getDomainOwner;
|
|
237
|
+
exports.getDomainRecord = getDomainRecord.getDomainRecord;
|
|
238
|
+
exports.getDomainRecords = getDomainRecords.getDomainRecords;
|
|
239
|
+
exports.getPrimaryDomain = getPrimaryDomain.getPrimaryDomain;
|
|
240
|
+
exports.getPrimaryDomainsBatch = getPrimaryDomainsBatch.getPrimaryDomainsBatch;
|
|
234
241
|
exports.getPythFeedAddress = getPythFeedAddress.getPythFeedAddress;
|
|
242
|
+
exports.getRecordV1Address = getRecordV1Address.getRecordV1Address;
|
|
243
|
+
exports.getRecordV2Address = getRecordV2Address.getRecordV2Address;
|
|
235
244
|
exports.getReverseAddress = getReverseAddress.getReverseAddress;
|
|
236
245
|
exports.getReverseAddressFromDomainAddress = getReverseAddressFromDomainAddress.getReverseAddressFromDomainAddress;
|
|
246
|
+
exports.getSnsDomainAddress = getSnsDomainAddress.getSnsDomainAddress;
|
|
247
|
+
exports.getSnsDomainsForAddress = getSnsDomainsForAddress.getSnsDomainsForAddress;
|
|
248
|
+
exports.getSnsNftMint = getSnsNftMint.getSnsNftMint;
|
|
249
|
+
exports.getSnsNftOwner = getSnsNftOwner.getSnsNftOwner;
|
|
250
|
+
exports.getSnsNftsForAddress = getSnsNftsForAddress.getSnsNftsForAddress;
|
|
251
|
+
exports.getSolDomainAddress = getSolDomainAddress.getSolDomainAddress;
|
|
252
|
+
exports.getSolDomainsForAddress = getSolDomainsForAddress.getSolDomainsForAddress;
|
|
253
|
+
exports.getSolNftsForAddress = getSolNftsForAddress.getSolNftsForAddress;
|
|
254
|
+
exports.getSrsDomainAddress = getSrsDomainAddress.getSrsDomainAddress;
|
|
255
|
+
exports.getSubdomains = getSubdomains.getSubdomains;
|
|
256
|
+
exports.registerDomain = registerDomain.registerDomain;
|
|
257
|
+
exports.registerDomainWithNft = registerDomainWithNft.registerDomainWithNft;
|
|
258
|
+
exports.resolve = resolve.resolve;
|
|
259
|
+
exports.safeResolve = resolve.safeResolve;
|
|
237
260
|
exports.reverseLookup = reverseLookup.reverseLookup;
|
|
238
261
|
exports.reverseLookupBatch = reverseLookupBatch.reverseLookupBatch;
|
|
239
262
|
exports.serializeRecordContent = serializeRecordContent.serializeRecordContent;
|
|
240
|
-
exports.
|
|
241
|
-
exports.
|
|
242
|
-
exports.
|
|
243
|
-
exports.
|
|
244
|
-
exports.
|
|
245
|
-
exports.
|
|
263
|
+
exports.setPrimaryDomain = setPrimaryDomain.setPrimaryDomain;
|
|
264
|
+
exports.setRecordRoaVerifier = setRecordRoaVerifier.setRecordRoaVerifier;
|
|
265
|
+
exports.setRecordStalenessVerifier = setRecordStalenessVerifier.setRecordStalenessVerifier;
|
|
266
|
+
exports.transferDomain = transferDomain.transferDomain;
|
|
267
|
+
exports.transferSubdomain = transferSubdomain.transferSubdomain;
|
|
268
|
+
exports.updateNameRegistry = updateNameRegistry.updateNameRegistry;
|
|
269
|
+
exports.updateRecord = updateRecord.updateRecord;
|
|
270
|
+
exports.validateRecordRoa = validateRecordRoa.validateRecordRoa;
|
|
271
|
+
exports.validateRecordRoaEthereum = validateRecordRoaEthereum.validateRecordRoaEthereum;
|
|
246
272
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocateAndPostRecordInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,qBAAqB;gBAC9B,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"burnDomainInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,OAAO;gBAChB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAtaIdempotentInstruction.cjs","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":["AccountRole","getCreateAssociatedTokenIdempotentInstructionDataEncoder"],"mappings":";;;;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;
|
|
1
|
+
{"version":3,"file":"createAtaIdempotentInstruction.cjs","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":["AccountRole","getCreateAssociatedTokenIdempotentInstructionDataEncoder"],"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,EAAEA,eAAW,CAAC,eAAe;AAClC,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,GAAG;YACZ,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,KAAK;YACd,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,IAAI;YACb,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,aAAa;YACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;YACxB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,SAAA;KACF;IAED,OAAO;QACL,cAAc;QACd,QAAQ;AACR,QAAA,IAAI,EAAEC,8DAAwD,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;KAC5E;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNameRegistryInstruction.cjs","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":["serialize","AccountRole","DEFAULT_ADDRESS"],"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.cjs","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":["serialize","AccountRole","DEFAULT_ADDRESS"],"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;IACxB;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,CAAC,6BAA6B,CAAC,MAAM,EAAE,IAAI,CAAC;IAC9D;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,aAAsB,EACtB,KAAc,EACd,KAAc,EACd,YAAsB,EACtB,aAAuB,EACvB,WAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,YAAY,EAAE;YAChB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA,CAAC;QACJ;aAAO;YACL,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAEC,yBAAe;gBACxB,IAAI,EAAED,eAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,IAAI,aAAa,EAAE;YACjB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;aAAO;YACL,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAEC,yBAAe;gBACxB,IAAI,EAAED,eAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,IAAI,WAAW,EAAE;YACf,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createReverseInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,aAAa,EAAE;YACjB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,IAAI,WAAW,EAAE;YACf,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSplitV2Instruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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;IAC1C;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,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,WAAoB,EACpB,QAAiB,EACjB,gBAAyB,EACzB,eAAwB,EACxB,KAAc,EACd,eAAwB,EACxB,UAAmB,EACnB,KAAc,EACd,kBAA4B,EAAA;AAE5B,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAC7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,oBAAoB;gBAC7B,IAAI,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,IAAI;gBACb,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,gBAAgB;gBACzB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,kBAAkB,EAAE;YACtB,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,kBAAkB;gBAC3B,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createWithNftInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,IAAI;gBACb,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,SAAS;gBAClB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,OAAO;gBAChB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,UAAU;gBACnB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,gBAAgB;gBACzB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteNameRegistryInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteRecordInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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;IACd;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,CAAC,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC;IACxD;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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,qBAAqB;gBAC9B,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,WAAW;gBACpB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reallocInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerPrimaryInstruction.cjs","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":["serialize","AccountRole"],"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.cjs","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":["serialize","AccountRole"],"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,OAAOA,eAAS,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,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,KAAK;gBACd,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;SACF;QAED,IAAI,SAAS,EAAE;YACb,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,SAAS;gBAClB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA,CAAC;QACJ;QAEA,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|