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::nexus::generated::SEND_NEXUS_ID;

pub const GLOBAL_CONFIG_SEED: &'static [u8] =
	&[103, 108, 111, 98, 97, 108, 95, 99, 111, 110, 102, 105, 103];

pub const GLOBAL_CONFIG_ADDRESS: solana_address::Address =
	solana_address::address!("3bycfBeRULfXYqcg3DmiYFBjv6mMVidMuqKdFZJTGdNr");

pub const GLOBAL_CONFIG_BUMP: u8 = 254;

/// Signer seeds for `invoke_signed`; only the deriving program can sign with them.
pub const GLOBAL_CONFIG_SIGNER_SEEDS: &[&[u8]] =
	&[GLOBAL_CONFIG_SEED, &[GLOBAL_CONFIG_BUMP]];
pub fn create_global_config_pda(
	bump: u8,
) -> Result<solana_address::Address, solana_address::error::AddressError> {
	solana_address::Address::create_program_address(
		&[GLOBAL_CONFIG_SEED, &[bump]],
		&SEND_NEXUS_ID,
	)
}
/// Precomputed at generation time; equal to
/// `find_program_address(&[..], &SEND_NEXUS_ID)`.
pub const fn find_global_config_pda() -> (solana_address::Address, u8) {
	(GLOBAL_CONFIG_ADDRESS, GLOBAL_CONFIG_BUMP)
}