Skip to content

Commit d8aea51

Browse files
committed
Add NTT namespace TS helper
1 parent 285ca66 commit d8aea51

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

solana/ts/lib/ntt.ts

+18
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,24 @@ export namespace NTT {
969969
.instruction();
970970
}
971971

972+
export async function createSetThresholdInstruction(
973+
program: Program<NttBindings.NativeTokenTransfer<IdlVersion>>,
974+
args: {
975+
owner: PublicKey;
976+
threshold: number;
977+
},
978+
pdas?: Pdas
979+
) {
980+
pdas = pdas ?? NTT.pdas(program.programId);
981+
return program.methods
982+
.setThreshold(args.threshold)
983+
.accountsStrict({
984+
owner: args.owner,
985+
config: pdas.configAccount(),
986+
})
987+
.instruction();
988+
}
989+
972990
export async function createSetOutboundLimitInstruction(
973991
program: Program<NttBindings.NativeTokenTransfer<IdlVersion>>,
974992
args: {

0 commit comments

Comments
 (0)