Browse Source

ts: Add bool, u128, i128 for idl types (#1042)

Armani Ferrante 3 years ago
parent
commit
c868b91e93
1 changed files with 5 additions and 3 deletions
  1. 5 3
      ts/src/program/namespace/types.ts

+ 5 - 3
ts/src/program/namespace/types.ts

@@ -81,11 +81,13 @@ export type InstructionContextFnArgs<
 
 type TypeMap = {
   publicKey: PublicKey;
-  u64: BN;
-  i64: BN;
+  bool: boolean;
 } & {
   [K in "u8" | "i8" | "u16" | "i16" | "u32" | "i32"]: number;
-};
+} &
+  {
+    [K in "u64" | "i64" | "u128" | "i128"]: BN;
+  };
 
 export type DecodeType<T extends IdlType, Defined> = T extends keyof TypeMap
   ? TypeMap[T]