solana/token_bridge: add custody_signer derive to wasm

Change-Id: I9dc9e5d80dce3e580257877b4640df3408b4b568
This commit is contained in:
Reisen 2021-10-04 11:52:11 +00:00 committed by David Paryente
parent 6b312b3add
commit 6076f9acc4
1 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,7 @@
use crate::{
accounts::{
AuthoritySigner,
CustodySigner,
EmitterAccount,
WrappedDerivationData,
WrappedMetaDerivationData,
@ -391,6 +392,14 @@ pub fn emitter_address(program_id: String) -> Vec<u8> {
emitter.to_bytes().to_vec()
}
#[wasm_bindgen]
pub fn custody_signer(program_id: String) -> Vec<u8> {
let program_id = Pubkey::from_str(program_id.as_str()).unwrap();
let custody_signer = CustodySigner::key(None, &program_id);
custody_signer.to_bytes().to_vec()
}
#[wasm_bindgen]
pub fn approval_authority_address(program_id: String) -> Vec<u8> {
let program_id = Pubkey::from_str(program_id.as_str()).unwrap();