@fluent-wallet/hw-app-conflux
Version:
Ledger Hardware Wallet Conflux Application API
16 lines • 710 B
TypeScript
/// <reference types="node" />
/// <reference types="node" />
import type { EIP712FieldDefinition } from "./types";
/**
* Encodes an EIP712 field definition into binary format for the device.
*
* Format: typeDesc [typeName] [typeSize] [arrayLevels] keyName
* - typeDesc: 1 byte (bit7: hasArray, bit6: hasSize, bits0-3: typeValue)
* - typeName: length + utf8 (custom types only)
* - typeSize: 1 byte (sized types only)
* - arrayLevels: encoded array levels (arrays only)
* - keyName: length + utf8
*/
export declare function encodeFieldDefinition(field: EIP712FieldDefinition): Buffer;
export declare function normalizeFieldValue(value: Buffer | Uint8Array): Buffer;
//# sourceMappingURL=codec.d.ts.map