SDK Types
Custom Types
export declare class CustomTypeClass<T extends CustomType<T>> implements CustomType<T> {
toJson(): JsonObject;
toJsonString(): string;
equals<U extends CustomType<U>>(other: CustomType<U> | null | undefined, normalizeNumberTypes?: boolean | undefined): boolean;
clone(): T;
getNumberFieldNames(): string[]; //Used behind the scenes
convert<U extends NumberType>(_convertFunction?: (val: NumberType) => U): CustomType<any>;
}import { Balance, Numberify }
const balance = new Balance<bigint>({
amount: 1n,
tokenIds: [{ start: 1n, end: 100n }],
ownershipTimes: [{ start: 1n, end: 100n }]
})
const convertedBalance = balance.convert(Numberify); //1, 100 instead of 1n, 100nTyped Arrays
Proto Types
Last updated