ilp-protocol-stream
Version:
Interledger Transport Protocol for sending multiple streams of money and data over ILP.
27 lines (26 loc) • 1.04 kB
TypeScript
import Long from 'long';
export declare type LongValue = Long | string | number;
export declare function longFromValue(value: LongValue, unsigned: boolean): Long;
export declare function maxLong(a: Long, b: Long): Long;
export declare function minLong(a: Long, b: Long): Long;
export declare function minLongs(values: Long[]): Long;
export declare function countDigits(value: Long): number;
export declare function checkedAdd(a: Long, b: Long): {
sum: Long;
overflow: boolean;
};
export declare function checkedSubtract(a: Long, b: Long): {
difference: Long;
underflow: boolean;
};
export declare function checkedMultiply(a: Long, b: Long): {
product: Long;
overflow: boolean;
};
export declare function multiplyDivideFloor(a: Long, b: Long, c: Long): Long;
export declare function multiplyDivideCeil(a: Long, b: Long, c: Long): Long;
export declare function multiplyDivideRound(a: Long, b: Long, c: Long): Long;
export declare function multiplyDivide(a: Long, b: Long, c: Long): {
quo: Long;
rem: Long;
};