@@ -849,29 +849,94 @@ export namespace NTT {
849
849
config : NttBindings . Config < IdlVersion > ,
850
850
args : {
851
851
currentAuthority : PublicKey ;
852
+ multisigTokenAuthority ?: PublicKey ;
852
853
} ,
853
854
pdas ?: Pdas
854
855
) {
855
856
pdas = pdas ?? NTT . pdas ( program . programId ) ;
856
857
return program . methods
857
858
. acceptTokenAuthority ( )
858
859
. accountsStrict ( {
859
- config : pdas . configAccount ( ) ,
860
- mint : config . mint ,
861
- tokenProgram : config . tokenProgram ,
862
- tokenAuthority : pdas . tokenAuthority ( ) ,
860
+ common : {
861
+ config : pdas . configAccount ( ) ,
862
+ mint : config . mint ,
863
+ tokenProgram : config . tokenProgram ,
864
+ tokenAuthority : pdas . tokenAuthority ( ) ,
865
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
866
+ } ,
863
867
currentAuthority : args . currentAuthority ,
864
868
} )
865
869
. instruction ( ) ;
866
870
}
867
871
872
+ export async function createAcceptTokenAuthorityFromMultisigInstruction (
873
+ program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
874
+ config : NttBindings . Config < IdlVersion > ,
875
+ args : {
876
+ currentMultisigAuthority : PublicKey ;
877
+ additionalSigners : PublicKey [ ] ;
878
+ multisigTokenAuthority ?: PublicKey ;
879
+ } ,
880
+ pdas ?: Pdas
881
+ ) {
882
+ pdas = pdas ?? NTT . pdas ( program . programId ) ;
883
+ return program . methods
884
+ . acceptTokenAuthorityFromMultisig ( )
885
+ . accountsStrict ( {
886
+ common : {
887
+ config : pdas . configAccount ( ) ,
888
+ mint : config . mint ,
889
+ tokenProgram : config . tokenProgram ,
890
+ tokenAuthority : pdas . tokenAuthority ( ) ,
891
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
892
+ } ,
893
+ currentMultisigAuthority : args . currentMultisigAuthority ,
894
+ } )
895
+ . remainingAccounts (
896
+ args . additionalSigners . map ( ( pubkey ) => ( {
897
+ pubkey,
898
+ isSigner : true ,
899
+ isWritable : false ,
900
+ } ) )
901
+ )
902
+ . instruction ( ) ;
903
+ }
904
+
905
+ export async function createSetTokenAuthorityOneStepUncheckedInstruction (
906
+ program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
907
+ config : NttBindings . Config < IdlVersion > ,
908
+ args : {
909
+ owner : PublicKey ;
910
+ newAuthority : PublicKey ;
911
+ multisigTokenAuthority ?: PublicKey ;
912
+ } ,
913
+ pdas ?: Pdas
914
+ ) {
915
+ pdas = pdas ?? NTT . pdas ( program . programId ) ;
916
+ return program . methods
917
+ . setTokenAuthorityOneStepUnchecked ( )
918
+ . accountsStrict ( {
919
+ common : {
920
+ config : pdas . configAccount ( ) ,
921
+ tokenAuthority : pdas . tokenAuthority ( ) ,
922
+ mint : config . mint ,
923
+ owner : args . owner ,
924
+ newAuthority : args . newAuthority ,
925
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
926
+ } ,
927
+ tokenProgram : config . tokenProgram ,
928
+ } )
929
+ . instruction ( ) ;
930
+ }
931
+
868
932
export async function createSetTokenAuthorityInstruction (
869
933
program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
870
934
config : NttBindings . Config < IdlVersion > ,
871
935
args : {
872
936
rentPayer : PublicKey ;
873
937
owner : PublicKey ;
874
938
newAuthority : PublicKey ;
939
+ multisigTokenAuthority ?: PublicKey ;
875
940
} ,
876
941
pdas ?: Pdas
877
942
) {
@@ -885,6 +950,7 @@ export namespace NTT {
885
950
mint : config . mint ,
886
951
owner : args . owner ,
887
952
newAuthority : args . newAuthority ,
953
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
888
954
} ,
889
955
rentPayer : args . rentPayer ,
890
956
pendingTokenAuthority : pdas . pendingTokenAuthority ( ) ,
@@ -899,6 +965,7 @@ export namespace NTT {
899
965
args : {
900
966
rentPayer : PublicKey ;
901
967
owner : PublicKey ;
968
+ multisigTokenAuthority ?: PublicKey ;
902
969
} ,
903
970
pdas ?: Pdas
904
971
) {
@@ -914,12 +981,79 @@ export namespace NTT {
914
981
systemProgram : SystemProgram . programId ,
915
982
rentPayer : args . rentPayer ,
916
983
pendingTokenAuthority : pdas . pendingTokenAuthority ( ) ,
984
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
917
985
} ,
918
986
owner : args . owner ,
919
987
} )
920
988
. instruction ( ) ;
921
989
}
922
990
991
+ export async function createClaimTokenAuthorityInstruction (
992
+ program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
993
+ config : NttBindings . Config < IdlVersion > ,
994
+ args : {
995
+ rentPayer : PublicKey ;
996
+ newAuthority : PublicKey ;
997
+ multisigTokenAuthority ?: PublicKey ;
998
+ } ,
999
+ pdas ?: Pdas
1000
+ ) {
1001
+ pdas = pdas ?? NTT . pdas ( program . programId ) ;
1002
+ return program . methods
1003
+ . claimTokenAuthority ( )
1004
+ . accountsStrict ( {
1005
+ common : {
1006
+ config : pdas . configAccount ( ) ,
1007
+ mint : config . mint ,
1008
+ tokenAuthority : pdas . tokenAuthority ( ) ,
1009
+ tokenProgram : config . tokenProgram ,
1010
+ systemProgram : SystemProgram . programId ,
1011
+ rentPayer : args . rentPayer ,
1012
+ pendingTokenAuthority : pdas . pendingTokenAuthority ( ) ,
1013
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
1014
+ } ,
1015
+ newAuthority : args . newAuthority ,
1016
+ } )
1017
+ . instruction ( ) ;
1018
+ }
1019
+
1020
+ export async function createClaimTokenAuthorityToMultisigInstruction (
1021
+ program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
1022
+ config : NttBindings . Config < IdlVersion > ,
1023
+ args : {
1024
+ rentPayer : PublicKey ;
1025
+ newMultisigAuthority : PublicKey ;
1026
+ additionalSigners : PublicKey [ ] ;
1027
+ multisigTokenAuthority ?: PublicKey ;
1028
+ } ,
1029
+ pdas ?: Pdas
1030
+ ) {
1031
+ pdas = pdas ?? NTT . pdas ( program . programId ) ;
1032
+ return program . methods
1033
+ . claimTokenAuthorityToMultisig ( )
1034
+ . accountsStrict ( {
1035
+ common : {
1036
+ config : pdas . configAccount ( ) ,
1037
+ mint : config . mint ,
1038
+ tokenAuthority : pdas . tokenAuthority ( ) ,
1039
+ tokenProgram : config . tokenProgram ,
1040
+ systemProgram : SystemProgram . programId ,
1041
+ rentPayer : args . rentPayer ,
1042
+ pendingTokenAuthority : pdas . pendingTokenAuthority ( ) ,
1043
+ multisigTokenAuthority : args . multisigTokenAuthority ?? null ,
1044
+ } ,
1045
+ newMultisigAuthority : args . newMultisigAuthority ,
1046
+ } )
1047
+ . remainingAccounts (
1048
+ args . additionalSigners . map ( ( pubkey ) => ( {
1049
+ pubkey,
1050
+ isSigner : true ,
1051
+ isWritable : false ,
1052
+ } ) )
1053
+ )
1054
+ . instruction ( ) ;
1055
+ }
1056
+
923
1057
export async function createSetPeerInstruction (
924
1058
program : Program < NttBindings . NativeTokenTransfer < IdlVersion > > ,
925
1059
args : {
0 commit comments