/** * OpenSignatureBody.Type enum values, mirroring the generated proto * `sui.rpc.v2.OpenSignatureBody.Type`: TYPE_UNKNOWN=0, ADDRESS=1, BOOL=2, U8=3, * U16=4, U32=5, U64=6, U128=7, U256=8, VECTOR=9, DATATYPE=10, TYPE_PARAMETER=11. * * These MUST match the proto exactly — a mis-numbering silently mis-encodes a * table key (wrong dynamic-field id => wrong/failed lookup). See key-encoding.test.ts. * We only encode the subset that can appear as a table key field. */ export declare const SIG_TYPE: { readonly ADDRESS: 1; readonly BOOL: 2; readonly U8: 3; readonly U16: 4; readonly U32: 5; readonly U64: 6; readonly U128: 7; readonly U256: 8; readonly VECTOR: 9; readonly DATATYPE: 10; }; /** * Re-encode a single key field's resolver-provided bytes to canonical struct-BCS, * based on its Move type (an OpenSignatureBody.Type proto value). * * The resolver emits per-field bytes that are NOT uniformly BCS-encoded: * - fixed-width values (bool = 1 byte 0x00/0x01; uN = little-endian bytes) and * addresses (32 bytes) arrive as their exact canonical bytes -> pass through. * - vector arrives RAW and needs a ULEB128 length prefix added here. * - nested struct (DATATYPE) and anything else is rejected, not mis-encoded. */ export declare function encodeFieldValue(sigType: number | undefined, raw: Uint8Array, fieldName: string, keyType: string): Uint8Array; /** Concatenate byte segments into a single Uint8Array. */ export declare function concatBytes(parts: Uint8Array[]): Uint8Array; //# sourceMappingURL=key-encoding.d.ts.map