import { ReadonlyUint8Array, Address, Instruction } from '@solana/kit'; /** * Input for allocating and writing an SNS V2 record. * * @example * ```ts * const params: AllocateAndPostRecordInstructionParams = { record, content }; * ``` */ interface AllocateAndPostRecordInstructionParams { /** Encoded V2 record label. */ record: string; /** Serialized record content. */ content: ReadonlyUint8Array; } /** Builder for allocating and writing an SNS V2 record account. */ declare class AllocateAndPostRecordInstruction { /** Instruction discriminator. */ tag: number; /** Encoded V2 record label. */ record: string; /** Serialized record content. */ content: ReadonlyUint8Array; static schema: { struct: { tag: string; record: string; content: { array: { type: string; }; }; }; }; constructor(obj: AllocateAndPostRecordInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, payer: Address, record: Address, domainAddress: Address, domainOwner: Address, centralState: Address): Instruction; } /** Builder for burning an SNS domain NFT and registry account. */ declare class BurnDomainInstruction { /** Instruction discriminator. */ tag: number; static schema: { struct: { tag: string; }; }; constructor(); serialize(): Uint8Array; getInstruction(programAddress: Address, nameServiceId: Address, systemProgram: Address, domainAddress: Address, reverse: Address, resellingState: Address, state: Address, centralState: Address, owner: Address, target: Address): Instruction; } /** * Creates an idempotent associated-token-account instruction. * * The instruction succeeds when the associated token account already exists, * allowing callers to include it safely before token transfers. * * @param programAddress Associated Token Program address * @param payer Account funding associated token account creation * @param ata Derived associated token account address * @param owner Owner of the associated token account * @param mint Token mint for the associated token account * @param systemProgram Solana System Program address * @param splTokenProgram SPL Token Program address * @returns Idempotent associated-token-account creation instruction * * @example * ```ts * const instruction = _createAtaIdempotentInstruction( * ASSOCIATED_TOKEN_PROGRAM_ADDRESS, * payer, * ata, * owner, * mint, * SYSTEM_PROGRAM_ADDRESS, * TOKEN_PROGRAM_ADDRESS, * ); * ``` */ declare const _createAtaIdempotentInstruction: (programAddress: Address, payer: Address, ata: Address, owner: Address, mint: Address, systemProgram: Address, splTokenProgram: Address) => Instruction; /** * Input for creating an SNS name-registry account. * * @example * ```ts * const params: CreateNameRegistryInstructionParams = { nameHash, lamports, space: 32 }; * ``` */ interface CreateNameRegistryInstructionParams { /** Hash of the registry name. */ nameHash: Uint8Array; /** Account funding amount. */ lamports: bigint; /** Account data size in bytes. */ space: number; } /** Builder for creating an SNS name-registry account. */ declare class CreateNameRegistryInstruction { /** Instruction discriminator. */ tag: number; /** Hash of the registry name. */ nameHash: Uint8Array; /** Account funding amount. */ lamports: bigint; /** Account data size in bytes. */ space: number; static schema: { struct: { tag: string; nameHash: { array: { type: string; }; }; lamports: string; space: string; }; }; constructor(obj: CreateNameRegistryInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, domainAddress: Address, owner: Address, payer: Address, classAddress?: Address, parentAddress?: Address, parentOwner?: Address): Instruction; } /** * Input for creating an SNS reverse-lookup account. * * @example * ```ts * const params: CreateReverseInstructionParams = { domain: "example" }; * ``` */ interface CreateReverseInstructionParams { /** Raw reverse lookup payload. */ domain: string; } /** Builder for creating an SNS reverse-lookup account. */ declare class CreateReverseInstruction { /** Instruction discriminator. */ tag: number; /** Raw reverse lookup payload. */ domain: string; static schema: { struct: { tag: string; domain: string; }; }; constructor(obj: CreateReverseInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, namingServiceProgram: Address, rootDomain: Address, reverseLookup: Address, systemProgram: Address, centralState: Address, payer: Address, rentSysvar: Address, parentAddress?: Address, parentOwner?: Address): Instruction; } /** * Input for creating a split SNS V2 domain account. * * @example * ```ts * const params: CreateSplitV2InstructionParams = { name: "example", space: 1_000, referrerIdxOpt: null }; * ``` */ interface CreateSplitV2InstructionParams { /** TLD-less domain name. */ name: string; /** Account data size in bytes. */ space: number; /** Approved referrer index, if any. */ referrerIdxOpt: number | null; } /** Builder for creating a split SNS V2 domain account. */ declare class CreateSplitV2Instruction { /** Instruction discriminator. */ tag: number; /** TLD-less domain name. */ name: string; /** Account data size in bytes. */ space: number; /** Approved referrer index, if any. */ referrerIdxOpt: number | null; static schema: { struct: { tag: string; name: string; space: string; referrerIdxOpt: { option: string; }; }; }; constructor(obj: CreateSplitV2InstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, namingServiceProgram: Address, rootDomain: Address, name: Address, reverseLookup: Address, systemProgram: Address, centralState: Address, buyer: Address, domainOwner: Address, feePayer: Address, buyerTokenSource: Address, pythFeedAccount: Address, vault: Address, splTokenProgram: Address, rentSysvar: Address, state: Address, referrerAccountOpt?: Address): Instruction; } /** * Input for registering an SNS domain backed by an NFT. * * @example * ```ts * const params: CreateWithNftInstructionParams = { name: "example", space: 1_000 }; * ``` */ interface CreateWithNftInstructionParams { /** TLD-less domain name. */ name: string; /** Account data size in bytes. */ space: number; } /** Builder for registering an SNS domain backed by an NFT. */ declare class CreateWithNftInstruction { /** Instruction discriminator. */ tag: number; /** TLD-less domain name. */ name: string; /** Account data size in bytes. */ space: number; static schema: { struct: { tag: string; name: string; space: string; }; }; constructor(obj: CreateWithNftInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, namingServiceProgram: Address, rootDomain: Address, name: Address, reverseLookup: Address, systemProgram: Address, centralState: Address, buyer: Address, nftSource: Address, nftMetadata: Address, nftMint: Address, masterEdition: Address, collection: Address, splTokenProgram: Address, rentSysvar: Address, state: Address, mplTokenMetadata: Address): Instruction; } /** Builder for deleting an SNS name-registry account. */ declare class DeleteNameRegistryInstruction { /** Instruction discriminator. */ tag: number; static schema: { struct: { tag: string; }; }; constructor(); serialize(): Uint8Array; getInstruction(programAddress: Address, domainAddress: Address, refundTarget: Address, owner: Address): Instruction; } /** Builder for deleting an SNS V2 record account. */ declare class DeleteRecordInstruction { /** Instruction discriminator. */ tag: number; static schema: { struct: { tag: string; }; }; constructor(); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, payer: Address, record: Address, domainAddress: Address, domainOwner: Address, centralState: Address): Instruction; } /** * Input for reallocating an SNS name-registry account. * * @example * ```ts * const params: ReallocInstructionParams = { space: 1_000 }; * ``` */ interface ReallocInstructionParams { /** New account data size in bytes. */ space: number; } /** Builder for reallocating an SNS name-registry account. */ declare class ReallocInstruction { /** Instruction discriminator. */ tag: number; /** New account data size in bytes. */ space: number; static schema: { struct: { tag: string; space: string; }; }; constructor(obj: ReallocInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgramId: Address, payerKey: Address, nameAccountKey: Address, nameOwnerKey: Address): Instruction; } /** Builder for registering an address's SNS primary domain. */ declare class RegisterPrimaryInstruction { /** Instruction discriminator. */ tag: number; static schema: { struct: { tag: string; }; }; constructor(); serialize(): Uint8Array; getInstruction(programAddress: Address, nameAccount: Address, primaryAccount: Address, owner: Address, systemProgram: Address, optParent?: Address): Instruction; } /** * Input for transferring an SNS name-registry account. * * @example * ```ts * const params: TransferInstructionParams = { newOwner }; * ``` */ interface TransferInstructionParams { /** New registry owner. */ newOwner: Address; } /** Builder for the SNS name-registry transfer instruction. */ declare class TransferInstruction { /** Instruction discriminator. */ tag: number; /** Encoded new owner address. */ encodedNewOwnerAddress: ReadonlyUint8Array; static schema: { struct: { tag: string; encodedNewOwnerAddress: { array: { type: string; len: number; }; }; }; }; constructor(obj: TransferInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, domainAddress: Address, currentOwner: Address, classAddress?: Address, parentAddress?: Address, parentOwner?: Address): Instruction; } /** * Input for updating an SNS name-registry account. * * @example * ```ts * const params: UpdateNameRegistryInstructionParams = { offset: 0, inputData }; * ``` */ interface UpdateNameRegistryInstructionParams { /** Byte offset where the update begins. */ offset: number; /** Bytes to write. */ inputData: Uint8Array; } /** Builder for updating the data of an SNS name-registry account. */ declare class UpdateNameRegistryInstruction { /** Instruction discriminator. */ tag: number; /** Byte offset where the update begins. */ offset: number; /** Bytes to write. */ inputData: Uint8Array; static schema: { struct: { tag: string; offset: string; inputData: { array: { type: string; }; }; }; }; constructor(obj: UpdateNameRegistryInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, domainAddress: Address, signer: Address): Instruction; } /** * Input for updating an SNS V2 record account. * * @example * ```ts * const params: UpdateRecordInstructionParams = { record, content }; * ``` */ interface UpdateRecordInstructionParams { /** Encoded V2 record label. */ record: string; /** Serialized record content. */ content: ReadonlyUint8Array; } /** Builder for updating content in an SNS V2 record account. */ declare class UpdateRecordInstruction { /** Instruction discriminator. */ tag: number; /** Encoded V2 record label. */ record: string; /** Serialized record content. */ content: ReadonlyUint8Array; static schema: { struct: { tag: string; record: string; content: { array: { type: string; }; }; }; }; constructor(obj: UpdateRecordInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address): Instruction; } /** * Input for validating an Ethereum signature for an SNS record. * * @example * ```ts * const params: ValidateEthereumSignatureInstructionParams = { validation, signature, expectedPubkey }; * ``` */ interface ValidateEthereumSignatureInstructionParams { /** Validation mode discriminator. */ validation: number; /** Ethereum signature. */ signature: ReadonlyUint8Array; /** Expected Ethereum public key. */ expectedPubkey: ReadonlyUint8Array; } /** Builder for validating an Ethereum signature for an SNS record. */ declare class ValidateEthereumSignatureInstruction { /** Instruction discriminator. */ tag: number; /** Validation mode discriminator. */ validation: number; /** Ethereum signature. */ signature: ReadonlyUint8Array; /** Expected Ethereum public key. */ expectedPubkey: ReadonlyUint8Array; static schema: { struct: { tag: string; validation: string; signature: { array: { type: string; }; }; expectedPubkey: { array: { type: string; }; }; }; }; constructor(obj: ValidateEthereumSignatureInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address): Instruction; } /** * Input for validating a Solana signature for an SNS record. * * @example * ```ts * const params: ValidateSolanaSignatureInstructionParams = { staleness: false }; * ``` */ interface ValidateSolanaSignatureInstructionParams { /** Whether to validate staleness. */ staleness: boolean; } /** Builder for validating a Solana signature for an SNS record. */ declare class ValidateSolanaSignatureInstruction { /** Instruction discriminator. */ tag: number; /** Whether to validate staleness. */ staleness: boolean; static schema: { struct: { tag: string; staleness: string; }; }; constructor(obj: ValidateSolanaSignatureInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address, verifier: Address): Instruction; } /** * Input for setting an SNS record's Right of Association verifier. * * @example * ```ts * const params: SetRecordRoaVerifierInstructionParams = { verifier }; * ``` */ interface SetRecordRoaVerifierInstructionParams { /** Verifier account address. */ verifier: Address; } /** Builder for setting an SNS record's Right of Association verifier. */ declare class SetRecordRoaVerifierInstruction { /** Instruction discriminator. */ tag: number; /** Encoded verifier address. */ roaId: ReadonlyUint8Array; static schema: { struct: { tag: string; roaId: { array: { type: string; }; }; }; }; constructor(obj: SetRecordRoaVerifierInstructionParams); serialize(): Uint8Array; getInstruction(programAddress: Address, systemProgram: Address, splNameServiceProgram: Address, feePayer: Address, record: Address, domain: Address, domainOwner: Address, centralState: Address): Instruction; } export { AllocateAndPostRecordInstruction, BurnDomainInstruction, CreateNameRegistryInstruction, CreateReverseInstruction, CreateSplitV2Instruction, CreateWithNftInstruction, DeleteNameRegistryInstruction, DeleteRecordInstruction, ReallocInstruction, RegisterPrimaryInstruction, SetRecordRoaVerifierInstruction, TransferInstruction, UpdateNameRegistryInstruction, UpdateRecordInstruction, ValidateEthereumSignatureInstruction, ValidateSolanaSignatureInstruction, _createAtaIdempotentInstruction }; export type { AllocateAndPostRecordInstructionParams, CreateNameRegistryInstructionParams, CreateReverseInstructionParams, CreateSplitV2InstructionParams, CreateWithNftInstructionParams, ReallocInstructionParams, SetRecordRoaVerifierInstructionParams, TransferInstructionParams, UpdateNameRegistryInstructionParams, UpdateRecordInstructionParams, ValidateEthereumSignatureInstructionParams, ValidateSolanaSignatureInstructionParams };