@solana-name-service/sns-sdk-kit 1.0.0 → 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 +335 -322
- 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
|
@@ -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;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setRecordRoaVerifierInstruction.cjs","sources":["../../../src/instructions/setRecordRoaVerifierInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\n\r\n/**\r\n * Input for setting an SNS record's Right of Association verifier.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: SetRecordRoaVerifierInstructionParams = { verifier };\r\n * ```\r\n */\r\nexport interface SetRecordRoaVerifierInstructionParams {\r\n /** Verifier account address. */\r\n verifier: Address;\r\n}\r\n\r\n/** Builder for setting an SNS record's Right of Association verifier. */\r\nexport class SetRecordRoaVerifierInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded verifier address. */\r\n roaId: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n roaId: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: SetRecordRoaVerifierInstructionParams) {\r\n this.tag = 6;\r\n this.roaId = addressCodec.encode(obj.verifier);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(SetRecordRoaVerifierInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["addressCodec","serialize","AccountRole"],"mappings":";;;;;;;;AAwBA;MACa,+BAA+B,CAAA;;AAE1C,IAAA,GAAG;;AAEH,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;YACT,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACjC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA0C,EAAA;AACpD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,KAAK,GAAGA,mBAAY,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"setRecordRoaVerifierInstruction.cjs","sources":["../../../src/instructions/setRecordRoaVerifierInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\n\r\n/**\r\n * Input for setting an SNS record's Right of Association verifier.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: SetRecordRoaVerifierInstructionParams = { verifier };\r\n * ```\r\n */\r\nexport interface SetRecordRoaVerifierInstructionParams {\r\n /** Verifier account address. */\r\n verifier: Address;\r\n}\r\n\r\n/** Builder for setting an SNS record's Right of Association verifier. */\r\nexport class SetRecordRoaVerifierInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded verifier address. */\r\n roaId: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n roaId: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: SetRecordRoaVerifierInstructionParams) {\r\n this.tag = 6;\r\n this.roaId = addressCodec.encode(obj.verifier);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(SetRecordRoaVerifierInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["addressCodec","serialize","AccountRole"],"mappings":";;;;;;;;AAwBA;MACa,+BAA+B,CAAA;;AAE1C,IAAA,GAAG;;AAEH,IAAA,KAAK;IAEL,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;YACT,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACjC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA0C,EAAA;AACpD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,KAAK,GAAGA,mBAAY,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAChD;IAEA,SAAS,GAAA;QACP,OAAOC,eAAS,CAAC,+BAA+B,CAAC,MAAM,EAAE,IAAI,CAAC;IAChE;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,qBAA8B,EAC9B,QAAiB,EACjB,MAAe,EACf,MAAe,EACf,WAAoB,EACpB,YAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,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,QAAQ;gBACjB,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,MAAM;gBACf,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":"transferInstruction.cjs","sources":["../../../src/instructions/transferInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Input for transferring an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: TransferInstructionParams = { newOwner };\r\n * ```\r\n */\r\nexport interface TransferInstructionParams {\r\n /** New registry owner. */\r\n newOwner: Address;\r\n}\r\n\r\n/** Builder for the SNS name-registry transfer instruction. */\r\nexport class TransferInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded new owner address. */\r\n encodedNewOwnerAddress: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n encodedNewOwnerAddress: { array: { type: \"u8\", len: 32 } },\r\n },\r\n };\r\n\r\n constructor(obj: TransferInstructionParams) {\r\n this.tag = 2;\r\n this.encodedNewOwnerAddress = addressCodec.encode(obj.newOwner);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(TransferInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n currentOwner: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: parentOwner ? parentOwner : currentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n if (parentOwner && parentAddress) {\r\n if (!classAddress) {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["addressCodec","serialize","AccountRole","DEFAULT_ADDRESS"],"mappings":";;;;;;;;;AAyBA;MACa,mBAAmB,CAAA;;AAE9B,IAAA,GAAG;;AAEH,IAAA,sBAAsB;IAEtB,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,sBAAsB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;AAC3D,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA8B,EAAA;AACxC,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,sBAAsB,GAAGA,mBAAY,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC
|
|
1
|
+
{"version":3,"file":"transferInstruction.cjs","sources":["../../../src/instructions/transferInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { DEFAULT_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Input for transferring an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: TransferInstructionParams = { newOwner };\r\n * ```\r\n */\r\nexport interface TransferInstructionParams {\r\n /** New registry owner. */\r\n newOwner: Address;\r\n}\r\n\r\n/** Builder for the SNS name-registry transfer instruction. */\r\nexport class TransferInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded new owner address. */\r\n encodedNewOwnerAddress: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n encodedNewOwnerAddress: { array: { type: \"u8\", len: 32 } },\r\n },\r\n };\r\n\r\n constructor(obj: TransferInstructionParams) {\r\n this.tag = 2;\r\n this.encodedNewOwnerAddress = addressCodec.encode(obj.newOwner);\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(TransferInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n currentOwner: Address,\r\n classAddress?: Address,\r\n parentAddress?: Address,\r\n parentOwner?: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: parentOwner ? parentOwner : currentOwner,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n if (classAddress) {\r\n accounts.push({\r\n address: classAddress,\r\n role: AccountRole.READONLY_SIGNER,\r\n });\r\n }\r\n\r\n if (parentOwner && parentAddress) {\r\n if (!classAddress) {\r\n accounts.push({\r\n address: DEFAULT_ADDRESS,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n accounts.push({\r\n address: parentAddress,\r\n role: AccountRole.READONLY,\r\n });\r\n }\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["addressCodec","serialize","AccountRole","DEFAULT_ADDRESS"],"mappings":";;;;;;;;;AAyBA;MACa,mBAAmB,CAAA;;AAE9B,IAAA,GAAG;;AAEH,IAAA,sBAAsB;IAEtB,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,sBAAsB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE;AAC3D,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA8B,EAAA;AACxC,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,sBAAsB,GAAGA,mBAAY,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IACjE;IAEA,SAAS,GAAA;QACP,OAAOC,eAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC;IACpD;IAEA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,YAAqB,EACrB,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;gBACE,OAAO,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY;gBACjD,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,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;AAEA,QAAA,IAAI,WAAW,IAAI,aAAa,EAAE;YAChC,IAAI,CAAC,YAAY,EAAE;gBACjB,QAAQ,CAAC,IAAI,CAAC;AACZ,oBAAA,OAAO,EAAEC,yBAAe;oBACxB,IAAI,EAAED,eAAW,CAAC,QAAQ;AAC3B,iBAAA,CAAC;YACJ;YAEA,QAAQ,CAAC,IAAI,CAAC;AACZ,gBAAA,OAAO,EAAE,aAAa;gBACtB,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":"updateNameRegistryInstruction.cjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateNameRegistryInstructionParams = { offset: 0, inputData };\r\n * ```\r\n */\r\nexport interface UpdateNameRegistryInstructionParams {\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n}\r\n\r\n/** Builder for updating the data of an SNS name-registry account. */\r\nexport class UpdateNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n offset: \"u32\",\r\n inputData: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateNameRegistryInstructionParams) {\r\n this.tag = 1;\r\n this.offset = obj.offset;\r\n this.inputData = obj.inputData;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n signer: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: signer,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["serialize","AccountRole"],"mappings":";;;;;;;AAkBA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,SAAS;IAET,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACrC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAwC,EAAA;AAClD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"updateNameRegistryInstruction.cjs","sources":["../../../src/instructions/updateNameRegistryInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS name-registry account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateNameRegistryInstructionParams = { offset: 0, inputData };\r\n * ```\r\n */\r\nexport interface UpdateNameRegistryInstructionParams {\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n}\r\n\r\n/** Builder for updating the data of an SNS name-registry account. */\r\nexport class UpdateNameRegistryInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Byte offset where the update begins. */\r\n offset: number;\r\n /** Bytes to write. */\r\n inputData: Uint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n offset: \"u32\",\r\n inputData: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateNameRegistryInstructionParams) {\r\n this.tag = 1;\r\n this.offset = obj.offset;\r\n this.inputData = obj.inputData;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateNameRegistryInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n domainAddress: Address,\r\n signer: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: domainAddress,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: signer,\r\n role: AccountRole.READONLY_SIGNER,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["serialize","AccountRole"],"mappings":";;;;;;;AAkBA;MACa,6BAA6B,CAAA;;AAExC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,SAAS;IAET,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACrC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAwC,EAAA;AAClD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;IAChC;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,CAAC,6BAA6B,CAAC,MAAM,EAAE,IAAI,CAAC;IAC9D;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,MAAe,EAAA;AAEf,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,EAAEC,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,MAAM;gBACf,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateRecordInstruction.cjs","sources":["../../../src/instructions/updateRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS V2 record account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateRecordInstructionParams = { record, content };\r\n * ```\r\n */\r\nexport interface UpdateRecordInstructionParams {\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for updating content in an SNS V2 record account. */\r\nexport class UpdateRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateRecordInstructionParams) {\r\n this.tag = 2;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["serialize","AccountRole"],"mappings":";;;;;;;AAwBA;MACa,uBAAuB,CAAA;;AAElC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,OAAO;IAEP,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAkC,EAAA;AAC5C,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO
|
|
1
|
+
{"version":3,"file":"updateRecordInstruction.cjs","sources":["../../../src/instructions/updateRecordInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for updating an SNS V2 record account.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: UpdateRecordInstructionParams = { record, content };\r\n * ```\r\n */\r\nexport interface UpdateRecordInstructionParams {\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for updating content in an SNS V2 record account. */\r\nexport class UpdateRecordInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Encoded V2 record label. */\r\n record: string;\r\n /** Serialized record content. */\r\n content: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n record: \"string\",\r\n content: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: UpdateRecordInstructionParams) {\r\n this.tag = 2;\r\n this.record = obj.record;\r\n this.content = obj.content;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(UpdateRecordInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["serialize","AccountRole"],"mappings":";;;;;;;AAwBA;MACa,uBAAuB,CAAA;;AAElC,IAAA,GAAG;;AAEH,IAAA,MAAM;;AAEN,IAAA,OAAO;IAEP,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AACnC,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAAkC,EAAA;AAC5C,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM;AACxB,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO;IAC5B;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,CAAC,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC;IACxD;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,qBAA8B,EAC9B,QAAiB,EACjB,MAAe,EACf,MAAe,EACf,WAAoB,EACpB,YAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,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,QAAQ;gBACjB,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,MAAM;gBACf,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":"validateEthereumSignatureInstruction.cjs","sources":["../../../src/instructions/validateEthereumSignatureInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for validating an Ethereum signature for an SNS record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ValidateEthereumSignatureInstructionParams = { validation, signature, expectedPubkey };\r\n * ```\r\n */\r\nexport interface ValidateEthereumSignatureInstructionParams {\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for validating an Ethereum signature for an SNS record. */\r\nexport class ValidateEthereumSignatureInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n validation: \"u8\",\r\n signature: { array: { type: \"u8\" } },\r\n expectedPubkey: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: ValidateEthereumSignatureInstructionParams) {\r\n this.tag = 4;\r\n this.validation = obj.validation;\r\n this.signature = obj.signature;\r\n this.expectedPubkey = obj.expectedPubkey;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ValidateEthereumSignatureInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["serialize","AccountRole"],"mappings":";;;;;;;AA0BA;MACa,oCAAoC,CAAA;;AAE/C,IAAA,GAAG;;AAEH,IAAA,UAAU;;AAEV,IAAA,SAAS;;AAET,IAAA,cAAc;IAEd,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YACpC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AAC1C,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA+C,EAAA;AACzD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;AAC9B,QAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc
|
|
1
|
+
{"version":3,"file":"validateEthereumSignatureInstruction.cjs","sources":["../../../src/instructions/validateEthereumSignatureInstruction.ts"],"sourcesContent":["import {\r\n AccountMeta,\r\n AccountRole,\r\n Address,\r\n Instruction,\r\n ReadonlyUint8Array,\r\n} from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for validating an Ethereum signature for an SNS record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ValidateEthereumSignatureInstructionParams = { validation, signature, expectedPubkey };\r\n * ```\r\n */\r\nexport interface ValidateEthereumSignatureInstructionParams {\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n}\r\n\r\n/** Builder for validating an Ethereum signature for an SNS record. */\r\nexport class ValidateEthereumSignatureInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Validation mode discriminator. */\r\n validation: number;\r\n /** Ethereum signature. */\r\n signature: ReadonlyUint8Array;\r\n /** Expected Ethereum public key. */\r\n expectedPubkey: ReadonlyUint8Array;\r\n\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n validation: \"u8\",\r\n signature: { array: { type: \"u8\" } },\r\n expectedPubkey: { array: { type: \"u8\" } },\r\n },\r\n };\r\n\r\n constructor(obj: ValidateEthereumSignatureInstructionParams) {\r\n this.tag = 4;\r\n this.validation = obj.validation;\r\n this.signature = obj.signature;\r\n this.expectedPubkey = obj.expectedPubkey;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ValidateEthereumSignatureInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n ];\r\n\r\n return {\r\n programAddress,\r\n accounts,\r\n data,\r\n };\r\n }\r\n}\r\n"],"names":["serialize","AccountRole"],"mappings":";;;;;;;AA0BA;MACa,oCAAoC,CAAA;;AAE/C,IAAA,GAAG;;AAEH,IAAA,UAAU;;AAEV,IAAA,SAAS;;AAET,IAAA,cAAc;IAEd,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,UAAU,EAAE,IAAI;YAChB,SAAS,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;YACpC,cAAc,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;AAC1C,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA+C,EAAA;AACzD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC,UAAU;AAChC,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;AAC9B,QAAA,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc;IAC1C;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,CAAC,oCAAoC,CAAC,MAAM,EAAE,IAAI,CAAC;IACrE;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,qBAA8B,EAC9B,QAAiB,EACjB,MAAe,EACf,MAAe,EACf,WAAoB,EACpB,YAAqB,EAAA;AAErB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE;AAE7B,QAAA,MAAM,QAAQ,GAAkB;AAC9B,YAAA;AACE,gBAAA,OAAO,EAAE,aAAa;gBACtB,IAAI,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,QAAQ;gBACjB,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,MAAM;gBACf,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":"validateSolanaSignatureInstruction.cjs","sources":["../../../src/instructions/validateSolanaSignatureInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for validating a Solana signature for an SNS record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ValidateSolanaSignatureInstructionParams = { staleness: false };\r\n * ```\r\n */\r\nexport interface ValidateSolanaSignatureInstructionParams {\r\n /** Whether to validate staleness. */\r\n staleness: boolean;\r\n}\r\n\r\n/** Builder for validating a Solana signature for an SNS record. */\r\nexport class ValidateSolanaSignatureInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Whether to validate staleness. */\r\n staleness: boolean;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n staleness: \"bool\",\r\n },\r\n };\r\n\r\n constructor(obj: ValidateSolanaSignatureInstructionParams) {\r\n this.tag = 3;\r\n this.staleness = obj.staleness;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ValidateSolanaSignatureInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address,\r\n verifier: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: verifier,\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,kCAAkC,CAAA;;AAE7C,IAAA,GAAG;;AAEH,IAAA,SAAS;IACT,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,SAAS,EAAE,MAAM;AAClB,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA6C,EAAA;AACvD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"validateSolanaSignatureInstruction.cjs","sources":["../../../src/instructions/validateSolanaSignatureInstruction.ts"],"sourcesContent":["import { AccountMeta, AccountRole, Address, Instruction } from \"@solana/kit\";\r\nimport { serialize } from \"borsh\";\r\n\r\n/**\r\n * Input for validating a Solana signature for an SNS record.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: ValidateSolanaSignatureInstructionParams = { staleness: false };\r\n * ```\r\n */\r\nexport interface ValidateSolanaSignatureInstructionParams {\r\n /** Whether to validate staleness. */\r\n staleness: boolean;\r\n}\r\n\r\n/** Builder for validating a Solana signature for an SNS record. */\r\nexport class ValidateSolanaSignatureInstruction {\r\n /** Instruction discriminator. */\r\n tag: number;\r\n /** Whether to validate staleness. */\r\n staleness: boolean;\r\n static schema = {\r\n struct: {\r\n tag: \"u8\",\r\n staleness: \"bool\",\r\n },\r\n };\r\n\r\n constructor(obj: ValidateSolanaSignatureInstructionParams) {\r\n this.tag = 3;\r\n this.staleness = obj.staleness;\r\n }\r\n\r\n serialize(): Uint8Array {\r\n return serialize(ValidateSolanaSignatureInstruction.schema, this);\r\n }\r\n\r\n getInstruction(\r\n programAddress: Address,\r\n systemProgram: Address,\r\n splNameServiceProgram: Address,\r\n feePayer: Address,\r\n record: Address,\r\n domain: Address,\r\n domainOwner: Address,\r\n centralState: Address,\r\n verifier: Address\r\n ): Instruction {\r\n const data = this.serialize();\r\n\r\n const accounts: AccountMeta[] = [\r\n {\r\n address: systemProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: splNameServiceProgram,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: feePayer,\r\n role: AccountRole.WRITABLE_SIGNER,\r\n },\r\n {\r\n address: record,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domain,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: domainOwner,\r\n role: AccountRole.WRITABLE,\r\n },\r\n {\r\n address: centralState,\r\n role: AccountRole.READONLY,\r\n },\r\n {\r\n address: verifier,\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,kCAAkC,CAAA;;AAE7C,IAAA,GAAG;;AAEH,IAAA,SAAS;IACT,OAAO,MAAM,GAAG;AACd,QAAA,MAAM,EAAE;AACN,YAAA,GAAG,EAAE,IAAI;AACT,YAAA,SAAS,EAAE,MAAM;AAClB,SAAA;KACF;AAED,IAAA,WAAA,CAAY,GAA6C,EAAA;AACvD,QAAA,IAAI,CAAC,GAAG,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS;IAChC;IAEA,SAAS,GAAA;QACP,OAAOA,eAAS,CAAC,kCAAkC,CAAC,MAAM,EAAE,IAAI,CAAC;IACnE;AAEA,IAAA,cAAc,CACZ,cAAuB,EACvB,aAAsB,EACtB,qBAA8B,EAC9B,QAAiB,EACjB,MAAe,EACf,MAAe,EACf,WAAoB,EACpB,YAAqB,EACrB,QAAiB,EAAA;AAEjB,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,QAAQ;gBACjB,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,MAAM;gBACf,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,YAAY;gBACrB,IAAI,EAAEA,eAAW,CAAC,QAAQ;AAC3B,aAAA;AACD,YAAA;AACE,gBAAA,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAEA,eAAW,CAAC,eAAe;AAClC,aAAA;SACF;QAED,OAAO;YACL,cAAc;YACd,QAAQ;YACR,IAAI;SACL;IACH;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSnsNftMint.cjs","sources":["../../../src/nft/getSnsNftMint.ts"],"sourcesContent":["import { Address, getProgramDerivedAddress } from \"@solana/kit\";\r\n\r\nimport { addressCodec, utf8Codec } from \"../codecs\";\r\nimport { NAME_TOKENIZER_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Parameters for deriving an SNS NFT mint.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetSnsNftMintParams = { domainAddress };\r\n * ```\r\n */\r\nexport interface GetSnsNftMintParams {\r\n /** Tokenized domain account address. */\r\n domainAddress: Address;\r\n}\r\n\r\nconst MINT_PREFIX = utf8Codec.encode(\"tokenized_name\");\r\n\r\n/**\r\n * Derives the mint address of a tokenized SNS domain.\r\n *\r\n * @param params NFT mint derivation parameters\r\n * @param params.domainAddress Domain account address used to derive the NFT mint\r\n * @returns The derived SNS domain NFT mint address.\r\n *\r\n * @example\r\n * ```ts\r\n * const mint = await getSnsNftMint({ domainAddress });\r\n * ```\r\n */\r\nexport const getSnsNftMint = async ({ domainAddress }: GetSnsNftMintParams) => {\r\n const [mint] = await getProgramDerivedAddress({\r\n programAddress: NAME_TOKENIZER_ADDRESS,\r\n seeds: [MINT_PREFIX, addressCodec.encode(domainAddress)],\r\n });\r\n return mint;\r\n};\r\n"],"names":["utf8Codec","getProgramDerivedAddress","NAME_TOKENIZER_ADDRESS","addressCodec"],"mappings":";;;;;;;;AAkBA,MAAM,WAAW,GAAGA,gBAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC;AAEtD;;;;;;;;;;;AAWG;
|
|
1
|
+
{"version":3,"file":"getSnsNftMint.cjs","sources":["../../../src/nft/getSnsNftMint.ts"],"sourcesContent":["import { Address, getProgramDerivedAddress } from \"@solana/kit\";\r\n\r\nimport { addressCodec, utf8Codec } from \"../codecs\";\r\nimport { NAME_TOKENIZER_ADDRESS } from \"../constants/addresses\";\r\n\r\n/**\r\n * Parameters for deriving an SNS NFT mint.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetSnsNftMintParams = { domainAddress };\r\n * ```\r\n */\r\nexport interface GetSnsNftMintParams {\r\n /** Tokenized domain account address. */\r\n domainAddress: Address;\r\n}\r\n\r\nconst MINT_PREFIX = utf8Codec.encode(\"tokenized_name\");\r\n\r\n/**\r\n * Derives the mint address of a tokenized SNS domain.\r\n *\r\n * @param params NFT mint derivation parameters\r\n * @param params.domainAddress Domain account address used to derive the NFT mint\r\n * @returns The derived SNS domain NFT mint address.\r\n *\r\n * @example\r\n * ```ts\r\n * const mint = await getSnsNftMint({ domainAddress });\r\n * ```\r\n */\r\nexport const getSnsNftMint = async ({ domainAddress }: GetSnsNftMintParams) => {\r\n const [mint] = await getProgramDerivedAddress({\r\n programAddress: NAME_TOKENIZER_ADDRESS,\r\n seeds: [MINT_PREFIX, addressCodec.encode(domainAddress)],\r\n });\r\n return mint;\r\n};\r\n"],"names":["utf8Codec","getProgramDerivedAddress","NAME_TOKENIZER_ADDRESS","addressCodec"],"mappings":";;;;;;;;AAkBA,MAAM,WAAW,GAAGA,gBAAS,CAAC,MAAM,CAAC,gBAAgB,CAAC;AAEtD;;;;;;;;;;;AAWG;AACI,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,EAAuB,KAAI;AAC5E,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,MAAMC,4BAAwB,CAAC;AAC5C,QAAA,cAAc,EAAEC,gCAAsB;QACtC,KAAK,EAAE,CAAC,WAAW,EAAEC,mBAAY,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;AACzD,KAAA,CAAC;AACF,IAAA,OAAO,IAAI;AACb;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSnsNftOwner.cjs","sources":["../../../src/nft/getSnsNftOwner.ts"],"sourcesContent":["import {\r\n Address,\r\n GetAccountInfoApi,\r\n GetTokenLargestAccountsApi,\r\n Rpc,\r\n SOLANA_ERROR__JSON_RPC__INVALID_PARAMS,\r\n fetchEncodedAccount,\r\n isSolanaError,\r\n} from \"@solana/kit\";\r\n\r\nimport { tokenCodec } from \"../codecs\";\r\nimport { getSnsNftMint } from \"./getSnsNftMint\";\r\n\r\n/**\r\n * Parameters for retrieving an SNS NFT owner.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetSnsNftOwnerParams = { rpc, domainAddress };\r\n * ```\r\n */\r\nexport interface GetSnsNftOwnerParams {\r\n /** RPC client. */\r\n rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;\r\n /** Tokenized domain account address. */\r\n domainAddress: Address;\r\n}\r\n\r\n/**\r\n * Retrieves the owner of a tokenized SNS domain.\r\n *\r\n * @param params NFT owner retrieval parameters\r\n * @param params.rpc RPC client implementing account and token-largest-account APIs\r\n * @param params.domainAddress Domain account address whose tokenized owner is retrieved\r\n * @returns The SNS domain NFT owner address, or `null` when no valid tokenized owner is found.\r\n *\r\n * @example\r\n * ```ts\r\n * const owner = await getSnsNftOwner({ rpc, domainAddress });\r\n * ```\r\n */\r\nexport const getSnsNftOwner = async ({\r\n rpc,\r\n domainAddress,\r\n}: GetSnsNftOwnerParams): Promise<Address | null> => {\r\n try {\r\n const mint = await getSnsNftMint({ domainAddress });\r\n const largestAccounts = await rpc.getTokenLargestAccounts(mint).send();\r\n\r\n if (largestAccounts.value.length === 0) {\r\n return null;\r\n }\r\n\r\n const largestAccountInfo = await fetchEncodedAccount(\r\n rpc,\r\n largestAccounts.value[0].address\r\n );\r\n\r\n if (!largestAccountInfo.exists) {\r\n return null;\r\n }\r\n\r\n const decoded = tokenCodec.decode(largestAccountInfo.data);\r\n if (decoded.amount.toString() === \"1\") {\r\n return decoded.owner;\r\n }\r\n\r\n return null;\r\n } catch (err) {\r\n if (isSolanaError(err, SOLANA_ERROR__JSON_RPC__INVALID_PARAMS)) {\r\n return null;\r\n }\r\n throw err;\r\n }\r\n};\r\n"],"names":["getSnsNftMint","fetchEncodedAccount","tokenCodec","isSolanaError","SOLANA_ERROR__JSON_RPC__INVALID_PARAMS"],"mappings":";;;;;;;;AA4BA;;;;;;;;;;;;AAYG;AACI,MAAM,cAAc,GAAG,OAAO,EACnC,GAAG,EACH,aAAa,GACQ,KAA6B;AAClD,IAAA,IAAI;QACF,MAAM,IAAI,GAAG,MAAMA,2BAAa,CAAC,EAAE,aAAa,EAAE,CAAC;AACnD,QAAA,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAEtE,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACtC,YAAA,OAAO,IAAI
|
|
1
|
+
{"version":3,"file":"getSnsNftOwner.cjs","sources":["../../../src/nft/getSnsNftOwner.ts"],"sourcesContent":["import {\r\n Address,\r\n GetAccountInfoApi,\r\n GetTokenLargestAccountsApi,\r\n Rpc,\r\n SOLANA_ERROR__JSON_RPC__INVALID_PARAMS,\r\n fetchEncodedAccount,\r\n isSolanaError,\r\n} from \"@solana/kit\";\r\n\r\nimport { tokenCodec } from \"../codecs\";\r\nimport { getSnsNftMint } from \"./getSnsNftMint\";\r\n\r\n/**\r\n * Parameters for retrieving an SNS NFT owner.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetSnsNftOwnerParams = { rpc, domainAddress };\r\n * ```\r\n */\r\nexport interface GetSnsNftOwnerParams {\r\n /** RPC client. */\r\n rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;\r\n /** Tokenized domain account address. */\r\n domainAddress: Address;\r\n}\r\n\r\n/**\r\n * Retrieves the owner of a tokenized SNS domain.\r\n *\r\n * @param params NFT owner retrieval parameters\r\n * @param params.rpc RPC client implementing account and token-largest-account APIs\r\n * @param params.domainAddress Domain account address whose tokenized owner is retrieved\r\n * @returns The SNS domain NFT owner address, or `null` when no valid tokenized owner is found.\r\n *\r\n * @example\r\n * ```ts\r\n * const owner = await getSnsNftOwner({ rpc, domainAddress });\r\n * ```\r\n */\r\nexport const getSnsNftOwner = async ({\r\n rpc,\r\n domainAddress,\r\n}: GetSnsNftOwnerParams): Promise<Address | null> => {\r\n try {\r\n const mint = await getSnsNftMint({ domainAddress });\r\n const largestAccounts = await rpc.getTokenLargestAccounts(mint).send();\r\n\r\n if (largestAccounts.value.length === 0) {\r\n return null;\r\n }\r\n\r\n const largestAccountInfo = await fetchEncodedAccount(\r\n rpc,\r\n largestAccounts.value[0].address\r\n );\r\n\r\n if (!largestAccountInfo.exists) {\r\n return null;\r\n }\r\n\r\n const decoded = tokenCodec.decode(largestAccountInfo.data);\r\n if (decoded.amount.toString() === \"1\") {\r\n return decoded.owner;\r\n }\r\n\r\n return null;\r\n } catch (err) {\r\n if (isSolanaError(err, SOLANA_ERROR__JSON_RPC__INVALID_PARAMS)) {\r\n return null;\r\n }\r\n throw err;\r\n }\r\n};\r\n"],"names":["getSnsNftMint","fetchEncodedAccount","tokenCodec","isSolanaError","SOLANA_ERROR__JSON_RPC__INVALID_PARAMS"],"mappings":";;;;;;;;AA4BA;;;;;;;;;;;;AAYG;AACI,MAAM,cAAc,GAAG,OAAO,EACnC,GAAG,EACH,aAAa,GACQ,KAA6B;AAClD,IAAA,IAAI;QACF,MAAM,IAAI,GAAG,MAAMA,2BAAa,CAAC,EAAE,aAAa,EAAE,CAAC;AACnD,QAAA,MAAM,eAAe,GAAG,MAAM,GAAG,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE;QAEtE,IAAI,eAAe,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACtC,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,MAAM,kBAAkB,GAAG,MAAMC,uBAAmB,CAClD,GAAG,EACH,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CACjC;AAED,QAAA,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE;AAC9B,YAAA,OAAO,IAAI;QACb;QAEA,MAAM,OAAO,GAAGC,iBAAU,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC;QAC1D,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,GAAG,EAAE;YACrC,OAAO,OAAO,CAAC,KAAK;QACtB;AAEA,QAAA,OAAO,IAAI;IACb;IAAE,OAAO,GAAG,EAAE;AACZ,QAAA,IAAIC,iBAAa,CAAC,GAAG,EAAEC,0CAAsC,CAAC,EAAE;AAC9D,YAAA,OAAO,IAAI;QACb;AACA,QAAA,MAAM,GAAG;IACX;AACF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecordV1Address.cjs","sources":["../../../src/record/getRecordV1Address.ts"],"sourcesContent":["import { getSnsDomainAddress } from \"../domain/getSnsDomainAddress\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\n\r\n/**\r\n * Parameters for deriving a V1 record address.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetRecordV1AddressParams = { domain: \"example\", record: Record.Url };\r\n * ```\r\n */\r\nexport interface GetRecordV1AddressParams {\r\n /** TLD-less domain name. */\r\n domain: string;\r\n /** Record type. */\r\n record: Record;\r\n}\r\n\r\n/**\r\n * Derives the address of a V1 record account.\r\n *\r\n * The V1 account is derived by prefixing the record label to the domain name.\r\n *\r\n * @param params Record address derivation parameters\r\n * @param params.domain TLD-trimmed SNS domain name\r\n * @param params.record Record type\r\n * @returns The derived V1 record account address.\r\n *\r\n * @example\r\n * ```ts\r\n * const address = await getRecordV1Address({ domain: \"example\", record: Record.Url });\r\n * ```\r\n */\r\nexport const getRecordV1Address = async ({\r\n domain,\r\n record,\r\n}: GetRecordV1AddressParams) => {\r\n const { domainAddress } = await getSnsDomainAddress({\r\n domain: record + \".\" + domain,\r\n record: RecordVersion.V1,\r\n });\r\n\r\n return domainAddress;\r\n};\r\n"],"names":["record","getSnsDomainAddress","RecordVersion"],"mappings":";;;;;;;AAkBA;;;;;;;;;;;;;;AAcG;AACI,MAAM,kBAAkB,GAAG,OAAO,EACvC,MAAM,UACNA,QAAM,GACmB,KAAI;AAC7B,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,MAAMC,uCAAmB,CAAC;AAClD,QAAA,MAAM,EAAED,QAAM,GAAG,GAAG,GAAG,MAAM;QAC7B,MAAM,EAAEE,oBAAa,CAAC,EAAE;AACzB,KAAA,CAAC;AAEF,IAAA,OAAO,aAAa;AACtB
|
|
1
|
+
{"version":3,"file":"getRecordV1Address.cjs","sources":["../../../src/record/getRecordV1Address.ts"],"sourcesContent":["import { getSnsDomainAddress } from \"../domain/getSnsDomainAddress\";\r\nimport { Record, RecordVersion } from \"../types/record\";\r\n\r\n/**\r\n * Parameters for deriving a V1 record address.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetRecordV1AddressParams = { domain: \"example\", record: Record.Url };\r\n * ```\r\n */\r\nexport interface GetRecordV1AddressParams {\r\n /** TLD-less domain name. */\r\n domain: string;\r\n /** Record type. */\r\n record: Record;\r\n}\r\n\r\n/**\r\n * Derives the address of a V1 record account.\r\n *\r\n * The V1 account is derived by prefixing the record label to the domain name.\r\n *\r\n * @param params Record address derivation parameters\r\n * @param params.domain TLD-trimmed SNS domain name\r\n * @param params.record Record type\r\n * @returns The derived V1 record account address.\r\n *\r\n * @example\r\n * ```ts\r\n * const address = await getRecordV1Address({ domain: \"example\", record: Record.Url });\r\n * ```\r\n */\r\nexport const getRecordV1Address = async ({\r\n domain,\r\n record,\r\n}: GetRecordV1AddressParams) => {\r\n const { domainAddress } = await getSnsDomainAddress({\r\n domain: record + \".\" + domain,\r\n record: RecordVersion.V1,\r\n });\r\n\r\n return domainAddress;\r\n};\r\n"],"names":["record","getSnsDomainAddress","RecordVersion"],"mappings":";;;;;;;AAkBA;;;;;;;;;;;;;;AAcG;AACI,MAAM,kBAAkB,GAAG,OAAO,EACvC,MAAM,UACNA,QAAM,GACmB,KAAI;AAC7B,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,MAAMC,uCAAmB,CAAC;AAClD,QAAA,MAAM,EAAED,QAAM,GAAG,GAAG,GAAG,MAAM;QAC7B,MAAM,EAAEE,oBAAa,CAAC,EAAE;AACzB,KAAA,CAAC;AAEF,IAAA,OAAO,aAAa;AACtB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRecordV2Address.cjs","sources":["../../../src/record/getRecordV2Address.ts"],"sourcesContent":["import { Address } from \"@solana/kit\";\r\n\r\nimport { CENTRAL_STATE_DOMAIN_RECORDS } from \"../constants/addresses\";\r\nimport { getSnsDomainAddress } from \"../domain/getSnsDomainAddress\";\r\nimport { Record } from \"../types/record\";\r\nimport { _deriveAddress } from \"../utils/deriveAddress\";\r\n\r\n/**\r\n * Parameters for deriving a V2 record address.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetRecordV2AddressParams = { domain: \"example\", record: Record.Url };\r\n * ```\r\n */\r\nexport interface GetRecordV2AddressParams {\r\n /** TLD-less domain name. */\r\n domain: string;\r\n /** Record type. */\r\n record: Record;\r\n}\r\n\r\n/**\r\n * Derives the address of a V2 record account.\r\n *\r\n * @param params Record address derivation parameters\r\n * @param params.domain TLD-trimmed SNS domain name\r\n * @param params.record Record type\r\n * @returns The derived V2 record account address.\r\n *\r\n * @example\r\n * ```ts\r\n * const address = await getRecordV2Address({ domain: \"example\", record: Record.Url });\r\n * ```\r\n */\r\nexport const getRecordV2Address = async ({\r\n domain,\r\n record,\r\n}: GetRecordV2AddressParams): Promise<Address> => {\r\n const { domainAddress } = await getSnsDomainAddress({ domain });\r\n\r\n return await _deriveAddress(\r\n `\\x02${record}`,\r\n domainAddress,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n};\r\n"],"names":["getSnsDomainAddress","_deriveAddress","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":";;;;;;;;AAsBA;;;;;;;;;;;;AAYG;AACI,MAAM,kBAAkB,GAAG,OAAO,EACvC,MAAM,EACN,MAAM,GACmB,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAMA,uCAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/D,OAAO,MAAMC,4BAAc,CACzB,
|
|
1
|
+
{"version":3,"file":"getRecordV2Address.cjs","sources":["../../../src/record/getRecordV2Address.ts"],"sourcesContent":["import { Address } from \"@solana/kit\";\r\n\r\nimport { CENTRAL_STATE_DOMAIN_RECORDS } from \"../constants/addresses\";\r\nimport { getSnsDomainAddress } from \"../domain/getSnsDomainAddress\";\r\nimport { Record } from \"../types/record\";\r\nimport { _deriveAddress } from \"../utils/deriveAddress\";\r\n\r\n/**\r\n * Parameters for deriving a V2 record address.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: GetRecordV2AddressParams = { domain: \"example\", record: Record.Url };\r\n * ```\r\n */\r\nexport interface GetRecordV2AddressParams {\r\n /** TLD-less domain name. */\r\n domain: string;\r\n /** Record type. */\r\n record: Record;\r\n}\r\n\r\n/**\r\n * Derives the address of a V2 record account.\r\n *\r\n * @param params Record address derivation parameters\r\n * @param params.domain TLD-trimmed SNS domain name\r\n * @param params.record Record type\r\n * @returns The derived V2 record account address.\r\n *\r\n * @example\r\n * ```ts\r\n * const address = await getRecordV2Address({ domain: \"example\", record: Record.Url });\r\n * ```\r\n */\r\nexport const getRecordV2Address = async ({\r\n domain,\r\n record,\r\n}: GetRecordV2AddressParams): Promise<Address> => {\r\n const { domainAddress } = await getSnsDomainAddress({ domain });\r\n\r\n return await _deriveAddress(\r\n `\\x02${record}`,\r\n domainAddress,\r\n CENTRAL_STATE_DOMAIN_RECORDS\r\n );\r\n};\r\n"],"names":["getSnsDomainAddress","_deriveAddress","CENTRAL_STATE_DOMAIN_RECORDS"],"mappings":";;;;;;;;AAsBA;;;;;;;;;;;;AAYG;AACI,MAAM,kBAAkB,GAAG,OAAO,EACvC,MAAM,EACN,MAAM,GACmB,KAAsB;IAC/C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAMA,uCAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/D,OAAO,MAAMC,4BAAc,CACzB,CAAA,IAAA,EAAO,MAAM,CAAA,CAAE,EACf,aAAa,EACbC,sCAA4B,CAC7B;AACH;;"}
|
|
@@ -8,7 +8,7 @@ const errors = require('../errors.cjs');
|
|
|
8
8
|
const getRecordV2Address = require('./getRecordV2Address.cjs');
|
|
9
9
|
const record = require('../states/record.cjs');
|
|
10
10
|
const validation = require('../types/validation.cjs');
|
|
11
|
-
const
|
|
11
|
+
const parseSnsDomain = require('../utils/parseSnsDomain.cjs');
|
|
12
12
|
const uint8ArraysEqual = require('../utils/uint8Array/uint8ArraysEqual.cjs');
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -65,7 +65,7 @@ const _verifyRoaSync = ({ record, state, verifier, }) => {
|
|
|
65
65
|
* Verifies a record's Right of Association validation.
|
|
66
66
|
*
|
|
67
67
|
* @param rpc RPC client implementing account and token-largest-account APIs
|
|
68
|
-
* @param domain Full
|
|
68
|
+
* @param domain Full `.sns` domain name
|
|
69
69
|
* @param record Record type to verify
|
|
70
70
|
* @param verifier Optional verifier for the record. If omitted, a default verifier is derived
|
|
71
71
|
* @returns True if the association is valid, false otherwise.
|
|
@@ -77,7 +77,7 @@ const _verifyRoaSync = ({ record, state, verifier, }) => {
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
const verifyRecordRightOfAssociation = async (rpc, domain, record$1, verifier) => {
|
|
80
|
-
const
|
|
80
|
+
const trimmedDomain = parseSnsDomain._parseSnsDomain(domain);
|
|
81
81
|
const address = await getRecordV2Address.getRecordV2Address({
|
|
82
82
|
domain: trimmedDomain,
|
|
83
83
|
record: record$1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyRecordRightOfAssociation.cjs","sources":["../../../src/record/verifyRecordRightOfAssociation.ts"],"sourcesContent":["import {\r\n GetAccountInfoApi,\r\n
|
|
1
|
+
{"version":3,"file":"verifyRecordRightOfAssociation.cjs","sources":["../../../src/record/verifyRecordRightOfAssociation.ts"],"sourcesContent":["import {\r\n GetAccountInfoApi,\r\n GetTokenLargestAccountsApi,\r\n ReadonlyUint8Array,\r\n Rpc,\r\n} from \"@solana/kit\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport {\r\n ETH_ROA_RECORDS,\r\n GUARDIANS,\r\n SELF_SIGNED_RECORDS,\r\n} from \"../constants/records\";\r\nimport { MissingVerifierError } from \"../errors\";\r\nimport { getRecordV2Address } from \"../record/getRecordV2Address\";\r\nimport { RecordState } from \"../states/record\";\r\nimport { Record } from \"../types/record\";\r\nimport { Validation } from \"../types/validation\";\r\nimport { _parseSnsDomain } from \"../utils/parseSnsDomain\";\r\nimport { uint8ArraysEqual } from \"../utils/uint8Array/uint8ArraysEqual\";\r\n\r\n/**\r\n * Internal helper that derives the default verifier for a record state.\r\n *\r\n * @param params Default verifier parameters\r\n * @param params.record Record type\r\n * @param params.state Record state\r\n * @returns The default verifier, or `undefined` when no verifier is found.\r\n *\r\n * @example\r\n * ```ts\r\n * const verifier = _getDefaultVerifier({ record: Record.Url, state });\r\n * ```\r\n */\r\nexport const _getDefaultVerifier = ({\r\n record,\r\n state,\r\n}: {\r\n record: Record;\r\n state: RecordState;\r\n}) => {\r\n if (SELF_SIGNED_RECORDS.has(record)) {\r\n return state.getContent();\r\n } else {\r\n const guardian = GUARDIANS.get(record);\r\n if (guardian) {\r\n return addressCodec.encode(guardian);\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Internal helper that verifies a record's Right of Association validation.\r\n *\r\n * Ethereum/secp256k1 validation is used for EVM RoA records; Solana validation\r\n * is used otherwise.\r\n *\r\n * @param params Right of Association verification parameters\r\n * @param params.record Record type to verify\r\n * @param params.state Record state\r\n * @param params.verifier Verifier for the record\r\n * @returns True if the association is valid, false otherwise.\r\n *\r\n * @example\r\n * ```ts\r\n * const valid = _verifyRoaSync({ record: Record.Url, state, verifier });\r\n * ```\r\n */\r\nexport const _verifyRoaSync = ({\r\n record,\r\n state,\r\n verifier,\r\n}: {\r\n record: Record;\r\n state: RecordState;\r\n verifier: ReadonlyUint8Array;\r\n}) => {\r\n const roaId = state.getRoAId();\r\n\r\n const validation = ETH_ROA_RECORDS.has(record)\r\n ? Validation.Ethereum\r\n : Validation.Solana;\r\n\r\n return (\r\n uint8ArraysEqual(roaId, verifier) &&\r\n state.header.rightOfAssociationValidation === validation\r\n );\r\n};\r\n\r\n/**\r\n * Verifies a record's Right of Association validation.\r\n *\r\n * @param rpc RPC client implementing account and token-largest-account APIs\r\n * @param domain Full `.sns` domain name\r\n * @param record Record type to verify\r\n * @param verifier Optional verifier for the record. If omitted, a default verifier is derived\r\n * @returns True if the association is valid, false otherwise.\r\n * @throws MissingVerifierError If no verifier is specified and no default verifier is found.\r\n *\r\n * @example\r\n * ```ts\r\n * const valid = await verifyRecordRightOfAssociation(rpc, \"example.sns\", Record.Url);\r\n * ```\r\n */\r\nexport const verifyRecordRightOfAssociation = async (\r\n rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>,\r\n domain: string,\r\n record: Record,\r\n verifier?: ReadonlyUint8Array\r\n) => {\r\n const trimmedDomain = _parseSnsDomain(domain);\r\n const address = await getRecordV2Address({\r\n domain: trimmedDomain,\r\n record,\r\n });\r\n const state = await RecordState.retrieve(rpc, address);\r\n\r\n verifier = verifier || _getDefaultVerifier({ record, state });\r\n if (!verifier) {\r\n throw new MissingVerifierError(\"You must specify the verifier\");\r\n }\r\n\r\n return _verifyRoaSync({ record, state, verifier });\r\n};\r\n"],"names":["SELF_SIGNED_RECORDS","GUARDIANS","addressCodec","validation","ETH_ROA_RECORDS","Validation","uint8ArraysEqual","record","_parseSnsDomain","getRecordV2Address","RecordState","MissingVerifierError"],"mappings":";;;;;;;;;;;;;AAqBA;;;;;;;;;;;;AAYG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAClC,MAAM,EACN,KAAK,GAIN,KAAI;AACH,IAAA,IAAIA,2BAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;AACnC,QAAA,OAAO,KAAK,CAAC,UAAU,EAAE;IAC3B;SAAO;QACL,MAAM,QAAQ,GAAGC,iBAAS,CAAC,GAAG,CAAC,MAAM,CAAC;QACtC,IAAI,QAAQ,EAAE;AACZ,YAAA,OAAOC,mBAAY,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtC;IACF;AACA,IAAA,OAAO,SAAS;AAClB;AAEA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,cAAc,GAAG,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,QAAQ,GAKT,KAAI;AACH,IAAA,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE;AAE9B,IAAA,MAAMC,YAAU,GAAGC,uBAAe,CAAC,GAAG,CAAC,MAAM;UACzCC,qBAAU,CAAC;AACb,UAAEA,qBAAU,CAAC,MAAM;AAErB,IAAA,QACEC,iCAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC;AACjC,QAAA,KAAK,CAAC,MAAM,CAAC,4BAA4B,KAAKH,YAAU;AAE5D;AAEA;;;;;;;;;;;;;;AAcG;AACI,MAAM,8BAA8B,GAAG,OAC5C,GAAwD,EACxD,MAAc,EACdI,QAAc,EACd,QAA6B,KAC3B;AACF,IAAA,MAAM,aAAa,GAAGC,8BAAe,CAAC,MAAM,CAAC;AAC7C,IAAA,MAAM,OAAO,GAAG,MAAMC,qCAAkB,CAAC;AACvC,QAAA,MAAM,EAAE,aAAa;gBACrBF,QAAM;AACP,KAAA,CAAC;IACF,MAAM,KAAK,GAAG,MAAMG,kBAAW,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IAEtD,QAAQ,GAAG,QAAQ,IAAI,mBAAmB,CAAC,UAAEH,QAAM,EAAE,KAAK,EAAE,CAAC;IAC7D,IAAI,CAAC,QAAQ,EAAE;AACb,QAAA,MAAM,IAAII,2BAAoB,CAAC,+BAA+B,CAAC;IACjE;IAEA,OAAO,cAAc,CAAC,UAAEJ,QAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACpD;;;;"}
|
|
@@ -7,7 +7,7 @@ const getSnsDomainOwner = require('../domain/getSnsDomainOwner.cjs');
|
|
|
7
7
|
const getRecordV2Address = require('./getRecordV2Address.cjs');
|
|
8
8
|
const record = require('../states/record.cjs');
|
|
9
9
|
const validation = require('../types/validation.cjs');
|
|
10
|
-
const
|
|
10
|
+
const parseSnsDomain = require('../utils/parseSnsDomain.cjs');
|
|
11
11
|
const uint8ArraysEqual = require('../utils/uint8Array/uint8ArraysEqual.cjs');
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -33,7 +33,7 @@ const _verifyStalenessSync = ({ domainOwner, state, }) => {
|
|
|
33
33
|
*
|
|
34
34
|
* @param params Staleness verification parameters
|
|
35
35
|
* @param params.rpc RPC client implementing account and token-largest-account APIs
|
|
36
|
-
* @param params.domain Full
|
|
36
|
+
* @param params.domain Full `.sns` domain name
|
|
37
37
|
* @param params.record Record type to verify
|
|
38
38
|
* @returns True if the record's staleness validation passes, false otherwise.
|
|
39
39
|
*
|
|
@@ -43,7 +43,7 @@ const _verifyStalenessSync = ({ domainOwner, state, }) => {
|
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
45
|
const verifyRecordStaleness = async ({ rpc, domain, record: record$1, }) => {
|
|
46
|
-
const
|
|
46
|
+
const trimmedDomain = parseSnsDomain._parseSnsDomain(domain);
|
|
47
47
|
const [domainOwner, state] = await Promise.all([
|
|
48
48
|
getSnsDomainOwner._getSnsDomainOwner({ rpc, domain: trimmedDomain }),
|
|
49
49
|
getRecordV2Address.getRecordV2Address({ domain: trimmedDomain, record: record$1 }).then((address) => record.RecordState.retrieve(rpc, address)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyRecordStaleness.cjs","sources":["../../../src/record/verifyRecordStaleness.ts"],"sourcesContent":["import {\r\n Address,\r\n GetAccountInfoApi,\r\n
|
|
1
|
+
{"version":3,"file":"verifyRecordStaleness.cjs","sources":["../../../src/record/verifyRecordStaleness.ts"],"sourcesContent":["import {\r\n Address,\r\n GetAccountInfoApi,\r\n GetTokenLargestAccountsApi,\r\n Rpc,\r\n} from \"@solana/kit\";\r\n\r\nimport { addressCodec } from \"../codecs\";\r\nimport { _getSnsDomainOwner } from \"../domain/getSnsDomainOwner\";\r\nimport { getRecordV2Address } from \"../record/getRecordV2Address\";\r\nimport { RecordState } from \"../states/record\";\r\nimport { Record } from \"../types/record\";\r\nimport { Validation } from \"../types/validation\";\r\nimport { _parseSnsDomain } from \"../utils/parseSnsDomain\";\r\nimport { uint8ArraysEqual } from \"../utils/uint8Array/uint8ArraysEqual\";\r\n\r\n/**\r\n * Internal helper that verifies a record's staleness validation.\r\n *\r\n * @param params Staleness verification parameters\r\n * @param params.domainOwner Current owner of the domain\r\n * @param params.state Record state to verify\r\n * @returns True if the record's staleness validation passes, false otherwise.\r\n *\r\n * @example\r\n * ```ts\r\n * const valid = _verifyStalenessSync({ domainOwner, state });\r\n * ```\r\n */\r\nexport const _verifyStalenessSync = ({\r\n domainOwner,\r\n state,\r\n}: {\r\n domainOwner: Address;\r\n state: RecordState;\r\n}) => {\r\n const stalenessId = state.getStalenessId();\r\n\r\n return (\r\n uint8ArraysEqual(addressCodec.encode(domainOwner), stalenessId) &&\r\n state.header.stalenessValidation === Validation.Solana\r\n );\r\n};\r\n\r\n/**\r\n * Parameters for verifying record staleness.\r\n *\r\n * @example\r\n * ```ts\r\n * const params: VerifyRecordStalenessParams = {\r\n * rpc,\r\n * domain: \"example.sns\",\r\n * record: Record.Url,\r\n * };\r\n * ```\r\n */\r\nexport interface VerifyRecordStalenessParams {\r\n /** RPC client. */\r\n rpc: Rpc<GetAccountInfoApi & GetTokenLargestAccountsApi>;\r\n /** Full `.sns` domain name. */\r\n domain: string;\r\n /** Record type. */\r\n record: Record;\r\n}\r\n\r\n/**\r\n * Verifies a record's staleness validation.\r\n *\r\n * @param params Staleness verification parameters\r\n * @param params.rpc RPC client implementing account and token-largest-account APIs\r\n * @param params.domain Full `.sns` domain name\r\n * @param params.record Record type to verify\r\n * @returns True if the record's staleness validation passes, false otherwise.\r\n *\r\n * @example\r\n * ```ts\r\n * const valid = await verifyRecordStaleness({ rpc, domain: \"example.sns\", record: Record.Url });\r\n * ```\r\n */\r\nexport const verifyRecordStaleness = async ({\r\n rpc,\r\n domain,\r\n record,\r\n}: VerifyRecordStalenessParams): Promise<boolean> => {\r\n const trimmedDomain = _parseSnsDomain(domain);\r\n const [domainOwner, state] = await Promise.all([\r\n _getSnsDomainOwner({ rpc, domain: trimmedDomain }),\r\n getRecordV2Address({ domain: trimmedDomain, record }).then((address) =>\r\n RecordState.retrieve(rpc, address)\r\n ),\r\n ]);\r\n\r\n return _verifyStalenessSync({ domainOwner, state });\r\n};\r\n"],"names":["uint8ArraysEqual","addressCodec","Validation","record","_parseSnsDomain","_getSnsDomainOwner","getRecordV2Address","RecordState"],"mappings":";;;;;;;;;;;;AAgBA;;;;;;;;;;;;AAYG;AACI,MAAM,oBAAoB,GAAG,CAAC,EACnC,WAAW,EACX,KAAK,GAIN,KAAI;AACH,IAAA,MAAM,WAAW,GAAG,KAAK,CAAC,cAAc,EAAE;IAE1C,QACEA,iCAAgB,CAACC,mBAAY,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;QAC/D,KAAK,CAAC,MAAM,CAAC,mBAAmB,KAAKC,qBAAU,CAAC,MAAM;AAE1D;AAuBA;;;;;;;;;;;;;AAaG;AACI,MAAM,qBAAqB,GAAG,OAAO,EAC1C,GAAG,EACH,MAAM,UACNC,QAAM,GACsB,KAAsB;AAClD,IAAA,MAAM,aAAa,GAAGC,8BAAe,CAAC,MAAM,CAAC;IAC7C,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC7CC,oCAAkB,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,CAAC;QAClDC,qCAAkB,CAAC,EAAE,MAAM,EAAE,aAAa,UAAEH,QAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,KACjEI,kBAAW,CAAC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CACnC;AACF,KAAA,CAAC;IAEF,OAAO,oBAAoB,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;AACrD;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const serializers = require('@metaplex-foundation/umi/serializers');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Creates the serializer for one Token-2022 additional metadata entry.
|
|
9
|
+
*
|
|
10
|
+
* @returns A serializer for encoding and decoding additional metadata entries.
|
|
11
|
+
*/
|
|
12
|
+
function getAdditionalMetadataSerializer() {
|
|
13
|
+
return serializers.struct([
|
|
14
|
+
["label", serializers.string()],
|
|
15
|
+
["value", serializers.string()],
|
|
16
|
+
], { description: "AdditionalMetadata" });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.getAdditionalMetadataSerializer = getAdditionalMetadataSerializer;
|
|
20
|
+
//# sourceMappingURL=additional-metadata.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"additional-metadata.cjs","sources":["../../../src/srs/additional-metadata.ts"],"sourcesContent":["import {\r\n Serializer,\r\n string,\r\n struct,\r\n} from \"@metaplex-foundation/umi/serializers\";\r\n\r\n/** Additional metadata for the Token-2022 Metadata Extension format. */\r\nexport type AdditionalMetadata = { label: string; value: string };\r\n\r\n/** Input fields accepted by the additional metadata serializer. */\r\nexport type AdditionalMetadataArgs = AdditionalMetadata;\r\n\r\n/**\r\n * Creates the serializer for one Token-2022 additional metadata entry.\r\n *\r\n * @returns A serializer for encoding and decoding additional metadata entries.\r\n */\r\nexport function getAdditionalMetadataSerializer(): Serializer<\r\n AdditionalMetadataArgs,\r\n AdditionalMetadata\r\n> {\r\n return struct<AdditionalMetadata>(\r\n [\r\n [\"label\", string()],\r\n [\"value\", string()],\r\n ],\r\n { description: \"AdditionalMetadata\" }\r\n ) as Serializer<AdditionalMetadataArgs, AdditionalMetadata>;\r\n}\r\n"],"names":["struct","string"],"mappings":";;;;;;AAYA;;;;AAIG;SACa,+BAA+B,GAAA;AAI7C,IAAA,OAAOA,kBAAM,CACX;AACE,QAAA,CAAC,OAAO,EAAEC,kBAAM,EAAE,CAAC;AACnB,QAAA,CAAC,OAAO,EAAEA,kBAAM,EAAE,CAAC;AACpB,KAAA,EACD,EAAE,WAAW,EAAE,oBAAoB,EAAE,CACoB;AAC7D;;"}
|