@@ -97,6 +97,8 @@ export namespace NTT {
97
97
derivePda ( "outbox_rate_limit" , programId ) ;
98
98
const tokenAuthority = ( ) : PublicKey =>
99
99
derivePda ( "token_authority" , programId ) ;
100
+ const pendingTokenAuthority = ( ) : PublicKey =>
101
+ derivePda ( "pending_token_authority" , programId ) ;
100
102
const peerAccount = ( chain : Chain ) : PublicKey =>
101
103
derivePda ( [ "peer" , chainToBytes ( chain ) ] , programId ) ;
102
104
const registeredTransceiver = ( transceiver : PublicKey ) : PublicKey =>
@@ -131,6 +133,7 @@ export namespace NTT {
131
133
inboxItemAccount,
132
134
sessionAuthority,
133
135
tokenAuthority,
136
+ pendingTokenAuthority,
134
137
peerAccount,
135
138
registeredTransceiver,
136
139
lutAccount,
@@ -710,6 +713,34 @@ export namespace NTT {
710
713
. instruction ( ) ;
711
714
}
712
715
716
+ export async function createSetTokenAuthorityInstruction (
717
+ program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
718
+ config : NttBindings . Config < IdlVersion > ,
719
+ args : {
720
+ payer : PublicKey ;
721
+ owner : PublicKey ;
722
+ newAuthority : PublicKey ;
723
+ } ,
724
+ pdas ?: Pdas
725
+ ) {
726
+ pdas = pdas ?? NTT . pdas ( program . programId ) ;
727
+ return await program . methods
728
+ . setTokenAuthority ( )
729
+ . accountsStrict ( {
730
+ common : {
731
+ config : pdas . configAccount ( ) ,
732
+ tokenAuthority : pdas . tokenAuthority ( ) ,
733
+ mint : config . mint ,
734
+ owner : args . owner ,
735
+ newAuthority : args . newAuthority ,
736
+ } ,
737
+ payer : args . payer ,
738
+ pendingTokenAuthority : pdas . pendingTokenAuthority ( ) ,
739
+ systemProgram : SystemProgram . programId ,
740
+ } )
741
+ . instruction ( ) ;
742
+ }
743
+
713
744
export async function createSetPeerInstruction (
714
745
program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
715
746
args : {
0 commit comments