@airgap/serializer
Version:
The @airgap/serializer provides serializers used in AirGap applications.
22 lines • 714 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
// TODO: Remove because I think it's unused?
// export function toBuffer(rlpArray: RLPData): Buffer | Buffer[] {
// if (Array.isArray(rlpArray)) {
// return rlpArray.map(toBuffer) as Buffer[]
// }
// if (typeof rlpArray === 'number') {
// return Buffer.from(rlpArray.toString())
// }
// if (typeof rlpArray === 'boolean') {
// return Buffer.from(rlpArray ? '1' : '0')
// }
// if (BigNumber.isBigNumber(rlpArray)) {
// return Buffer.from(rlpArray.toFixed())
// }
// if (Buffer.isBuffer(rlpArray)) {
// return rlpArray
// }
// return Buffer.from(rlpArray)
// }
//# sourceMappingURL=toBuffer.js.map