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 WSOL_REWARD_ACCRUAL_SEED_0: &'static [u8] = &[
	114, 101, 119, 97, 114, 100, 95, 97, 99, 99, 114, 117, 97, 108,
];
pub const WSOL_REWARD_ACCRUAL_SEED_1: &'static [u8] = &[
	6, 155, 136, 87, 254, 171, 129, 132, 251, 104, 127, 99, 70, 24, 192, 53,
	218, 196, 57, 220, 26, 235, 59, 85, 152, 160, 240, 0, 0, 0, 0, 1,
];

pub const WSOL_REWARD_ACCRUAL_ADDRESS: solana_address::Address =
	solana_address::address!("3AvcBtMajsyeNufVwkxV7UNXWo6G1qkJmCpiXx1HcFg8");

pub const WSOL_REWARD_ACCRUAL_BUMP: u8 = 255;

/// Signer seeds for `invoke_signed`; only the deriving program can sign with them.
pub const WSOL_REWARD_ACCRUAL_SIGNER_SEEDS: &[&[u8]] = &[
	WSOL_REWARD_ACCRUAL_SEED_0,
	WSOL_REWARD_ACCRUAL_SEED_1,
	&[WSOL_REWARD_ACCRUAL_BUMP],
];
pub fn create_wsol_reward_accrual_pda(
	bump: u8,
) -> Result<solana_address::Address, solana_address::error::AddressError> {
	solana_address::Address::create_program_address(
		&[
			WSOL_REWARD_ACCRUAL_SEED_0,
			WSOL_REWARD_ACCRUAL_SEED_1,
			&[bump],
		],
		&SEND_DEX_ID,
	)
}
/// Precomputed at generation time; equal to
/// `find_program_address(&[..], &SEND_DEX_ID)`.
pub const fn find_wsol_reward_accrual_pda() -> (solana_address::Address, u8) {
	(WSOL_REWARD_ACCRUAL_ADDRESS, WSOL_REWARD_ACCRUAL_BUMP)
}