ts: Add bool, u128, i128 for idl types (#1042)
This commit is contained in:
parent
9bee113fa4
commit
c868b91e93
|
@ -81,11 +81,13 @@ export type InstructionContextFnArgs<
|
||||||
|
|
||||||
type TypeMap = {
|
type TypeMap = {
|
||||||
publicKey: PublicKey;
|
publicKey: PublicKey;
|
||||||
u64: BN;
|
bool: boolean;
|
||||||
i64: BN;
|
|
||||||
} & {
|
} & {
|
||||||
[K in "u8" | "i8" | "u16" | "i16" | "u32" | "i32"]: number;
|
[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
|
export type DecodeType<T extends IdlType, Defined> = T extends keyof TypeMap
|
||||||
? TypeMap[T]
|
? TypeMap[T]
|
||||||
|
|
Loading…
Reference in New Issue