sendfun-sdk 3.0.0

Rust SDK for send.fun programs
Documentation
#![allow(
	clippy::all,
	clippy::pedantic,
	clippy::nursery,
	clippy::expect_used,
	clippy::unwrap_used,
	clippy::indexing_slicing,
	clippy::allow_attributes,
	clippy::allow_attributes_without_reason,
	clippy::mem_forget,
	unfulfilled_lint_expectations,
	unexpected_cfgs,
	unused_imports
)]

//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use crate::dex::generated::SEND_DEX_ID;

pub const EVENT_AUTHORITY_SEED: &'static [u8] = &[
	95, 95, 101, 118, 101, 110, 116, 95, 97, 117, 116, 104, 111, 114, 105, 116,
	121,
];

pub const EVENT_AUTHORITY_ADDRESS: solana_address::Address =
	solana_address::address!("4pTDYKRFdmxTQYFceGZkzPGd3kb8ShMA9n6XKRaPZn8t");

pub const EVENT_AUTHORITY_BUMP: u8 = 255;

/// Signer seeds for `invoke_signed`; only the deriving program can sign with them.
pub const EVENT_AUTHORITY_SIGNER_SEEDS: &[&[u8]] =
	&[EVENT_AUTHORITY_SEED, &[EVENT_AUTHORITY_BUMP]];
pub fn create_event_authority_pda(
	bump: u8,
) -> Result<solana_address::Address, solana_address::error::AddressError> {
	solana_address::Address::create_program_address(
		&[EVENT_AUTHORITY_SEED, &[bump]],
		&SEND_DEX_ID,
	)
}
/// Precomputed at generation time; equal to
/// `find_program_address(&[..], &SEND_DEX_ID)`.
pub const fn find_event_authority_pda() -> (solana_address::Address, u8) {
	(EVENT_AUTHORITY_ADDRESS, EVENT_AUTHORITY_BUMP)
}