pub fn createProgramAddress(
        seeds: Box<[JsValue]>,
        program_id: &Pubkey,
    ) -> Result<Pubkey, JsValue> {
        let seeds_vec = js_value_to_seeds_vec(&seeds)?;
        let seeds_slice = seeds_vec
            .iter()
            .map(|seed| seed.as_slice())
            .collect::<Vec<_>>();

        Pubkey::create_program_address(seeds_slice.as_slice(), program_id)
            .map_err(display_to_jsvalue)
    }
/// Derive a program address from seeds and a program id
Derive a program address from seeds and a program id
Derive a program address from seeds and a program id
pub fn createProgramAddress(
        seeds: Box<[JsValue]>,
        program_id: &Pubkey,
    ) -> Result<Pubkey, JsValue> {
        let seeds_vec = js_value_to_seeds_vec(&seeds)?;
        let seeds_slice = seeds_vec
            .iter()
            .map(|seed| seed.as_slice())
            .collect::<Vec<_>>();
        Pubkey::create_program_address(seeds_slice.as_slice(), program_id)
            .map_err(display_to_jsvalue)
    }
pub fn createProgramAddress ( seeds : Box < [ JsValue ] > , program_id : & Pubkey , ) -> Result < Pubkey , JsValue > { let seeds_vec = js_value_to_seeds_vec ( & seeds ) ? ; let seeds_slice = seeds_vec . iter ( ) . map ( | seed | seed . as_slice ( ) ) . collect :: < Vec < _ > > ( ) ; Pubkey :: create_program_address ( seeds_slice . as_slice ( ) , program_id ) . map_err ( display_to_jsvalue ) }
Derive a program address from seeds and a program id
Derive a program address from seeds and a program id
seeds
Box<[JsValue]>
program_id
&Pubkey