This document provides an exhaustive, detailed specification of the idax Node.js bindings API. idax is a wrapper around the IDA Pro SDK, allowing seamless manipulation of IDA databases from Node.js.
This guide is structured specifically for AI agents, emphasizing type signatures, architectural quirks, input/output constraints, and error handling.
- Address Representation (
bigint/ BigInt)- Output: All IDA addresses, sizes, and offsets returned by the API are strictly JavaScript
BigInttypes (e.g.,0x401000n). - Input: When passing addresses into functions, the native C++ layer is highly flexible. You can provide a
bigint, a standardnumber(if within safe integer limits), or a hex/decimalstring(e.g.,"0x401000"). - Sentinel Value:
idax.BadAddressis exported as0xFFFFFFFFFFFFFFFFn. Always check against this for invalid/missing addresses.
- Output: All IDA addresses, sizes, and offsets returned by the API are strictly JavaScript
- The
functionNamespace- Because
functionis a reserved keyword in JavaScript, the TypeScript definitions useexport namespace function_. - However,
index.jsspecifically re-exports this asidax.function. Always useidax.functionin actual code.
- Because
- Error Handling
- The API does not use callback errors or
[error, result]tuples. - All failing operations (C++
Result<T>orStatus) throw exceptions. - Thrown exceptions are of type
IdaxErrorwhich extendsErrorand includes.category(string) and.code(number), and optionally.context(string).
- The API does not use callback errors or
- Opaque Objects (Wrappers)
- Several namespaces return persistent native-backed objects:
ui.WaitBox,decompiler.DecompiledFunction,decompiler.LvarSnapshot,decompiler.ScopedSession,storage.StorageNode, andtype.TypeInfo. These objects possess instance methods and manage native C++ state.
- Several namespaces return persistent native-backed objects:
Whenever you see these aliases in the documentation, assume the following inputs/outputs:
Address,AddressSize,AddressDelta: Output:bigint. Input:bigint | number | string.Token: Output:bigint. Input:bigint | number. (Used for event subscriptions).
Lifecycle, global metadata, and snapshot management.
init(options?: RuntimeOptions): void- Initialize the IDA kernel. Must be called beforeopen().RuntimeOptions:{ quiet?: boolean, pluginPolicy?: { disableUserPlugins?: boolean, allowlistPatterns?: string[] } }
open(path: string): void- Open a database with default auto-analysis.open(path: string, autoAnalysis: boolean): voidopen(path: string, mode: 'analyze' | 'skipAnalysis'): voidopen(path: string, intent: 'autoDetect'|'binary'|'nonBinary', mode?: 'analyze'|'skipAnalysis'): voidopenBinary(path: string, mode?: 'analyze'|'skipAnalysis'): voidopenNonBinary(path: string, mode?: 'analyze'|'skipAnalysis'): voidsave(): void- Flush changes to disk.close(save?: boolean): void- Close DB (defaults tosave = false).fileToDatabase(filePath: string, fileOffset: bigint, ea: Address, size: AddressSize, patchable?: boolean, remote?: boolean): void- Loads bytes from an external file. Defaults:patchable=true,remote=false.memoryToDatabase(data: Buffer | Uint8Array, ea: Address, fileOffset?: bigint): void- Loads bytes from memory. DefaultfileOffset = -1.
inputFilePath(): stringidbPath(): stringfileTypeName(): stringloaderFormatName(): stringinputMd5(): stringcompilerInfo(): { id: number, uncertain: boolean, name: string, abbreviation: string }importModules(): { index: number, name: string, symbols: { address: Address, name: string, ordinal: bigint }[] }[]imageBase(): AddressminAddress(): AddressmaxAddress(): AddressaddressBounds(): { start: Address, end: Address }addressSpan(): AddressSizeprocessorId(): numberprocessorIdFromRaw(rawId: number): number | nullprocessor(): numberprocessorProfile(): { rawId: number, knownId: number | null, name: string, addressBitness: number, bigEndian: boolean, abiName: string | null }processorName(): stringaddressBitness(): number- 16, 32, or 64.setAddressBitness(bits: number): void- set database bitness (16/32/64).isBigEndian(): booleanabiName(): string
snapshots(): Snapshot[]- Returns snapshot tree.Snapshothas{ id: bigint, flags: number, description: string, filename: string, children: Snapshot[] }.setSnapshotDescription(description: string): voidisSnapshotDatabase(): boolean
Portable path splitting and directory checks.
basename(path: string): stringdirname(path: string): stringisDirectory(path: string): boolean
Dialogs, wait boxes, typed forms, and host clipboard helpers.
Host-modal APIs require an interactive IDA UI. Non-modal validation errors are thrown before a dialog opens.
currentWidget(): { id: bigint, title: string, type: number } | null- snapshot the active IDA widget; returnsnullin headless sessions.
new ui.WaitBox(message: string)- show a host wait box.update(message: string): voidcancelled(): booleanactive(): booleandismiss(): void
askText(prompt: string, defaultValue?: string, options?: { maxSize?: number, acceptTabs?: boolean, normalFont?: boolean }): stringaskFormSvalBitset(markup: string, sval: bigint | number, bitset: number): { accepted: boolean, sval: bigint, bitset: number }askFormSvalPathBitset(markup: string, sval: bigint | number, path: string, bitset: number, options?: { forSaving?: boolean }): { accepted: boolean, sval: bigint, path: string, bitset: number }askFormPathBitset(markup: string, path: string, bitset: number, options?: { forSaving?: boolean }): { accepted: boolean, path: string, bitset: number }askFormRadioSvalPathBitset(markup: string, radio: number, sval: bigint | number, path: string, bitset: number, options?: { forSaving?: boolean }): { accepted: boolean, radio: number, sval: bigint, path: string, bitset: number }askFormThreeSvalsPathTwoBitsets(markup: string, first: bigint | number, second: bigint | number, third: bigint | number, path: string, firstBitset: number, secondBitset: number, options?: { forSaving?: boolean }): { accepted: boolean, first: bigint, second: bigint, third: bigint, path: string, firstBitset: number, secondBitset: number }
The fixed typed-form entrypoints deliberately cover only the audited ida-cdump dialog packs. They do not expose a runtime vararg vector.
copyToClipboard(text: string): voidreadClipboard(): stringclipboardBackend(): string
Native builds use Qt when IDAX_ENABLE_QT_CLIPBOARD=ON; otherwise idax falls
back to common host clipboard commands such as wl-copy, xclip, xsel,
pbcopy, or clip.exe. If no usable backend is present,
clipboardBackend() === "unsupported" and clipboard read/write throw
Unsupported.
Address navigation, predicates, and iterators.
Predicate Type: 'mapped' | 'loaded' | 'code' | 'data' | 'unknown' | 'head' | 'tail'
itemStart(ea: Address): AddressitemEnd(ea: Address): Address(Exclusive)itemSize(ea: Address): AddressSizenextHead(ea: Address, limit?: Address): Address(Default limit:idax.BadAddress)prevHead(ea: Address, limit?: Address): Address(Default limit:0)nextDefined(ea: Address, limit?: Address): AddressprevDefined(ea: Address, limit?: Address): AddressnextNotTail(ea: Address): AddressprevNotTail(ea: Address): AddressnextMapped(ea: Address): AddressprevMapped(ea: Address): Address
isMapped(ea: Address),isLoaded(ea: Address),isCode(ea: Address),isData(ea: Address),isUnknown(ea: Address),isHead(ea: Address),isTail(ea: Address)
findFirst(start: Address, end: Address, predicate: Predicate): AddressfindNext(ea: Address, predicate: Predicate, end?: Address): Addressitems(start: Address, end: Address): Address[]codeItems(start: Address, end: Address): Address[]dataItems(start: Address, end: Address): Address[]unknownBytes(start: Address, end: Address): Address[]
Memory segment operations.
Types:
SegmentType:'normal' | 'external' | 'code' | 'data' | 'bss' | 'absoluteSymbols' | 'common' | 'null' | 'undefined' | 'import' | 'internalMemory' | 'group'Permissions:{ read: boolean, write: boolean, execute: boolean }Segment:{ start: Address, end: Address, size: AddressSize, bitness: number, type: SegmentType, permissions: Permissions, name: string, className: string, isVisible: boolean }
create(start: Address, end: Address, name: string, className?: string, type?: SegmentType): Segmentremove(address: Address): booleanat(address: Address): SegmentbyName(name: string): SegmentbyIndex(index: number): Segmentcount(): numbersetName(address: Address, name: string): booleansetClass(address: Address, className: string): booleansetType(address: Address, type: SegmentType): booleansetPermissions(address: Address, permissions: Partial<Permissions>): booleansetBitness(address: Address, bits: number): booleansetDefaultSegmentRegister(address: Address, regIndex: number, value: bigint | number): booleansetDefaultSegmentRegisterForAll(regIndex: number, value: bigint | number): booleancomment(address: Address, repeatable?: boolean): stringsetComment(address: Address, text: string, repeatable?: boolean): booleanresize(address: Address, newStart: Address, newEnd: Address): booleanmove(address: Address, newStart: Address): booleanall(): Segment[]first(): Segment,last(): Segmentnext(address: Address): Segment,prev(address: Address): Segment
Function boundary, analysis, variable, and graph logic.
Types:
Function:{ start, end, size, name, bitness, returns, isLibrary, isThunk, isVisible, frameLocalSize, frameRegsSize, frameArgsSize }Chunk:{ start, end, isTail, owner, size }StackFrame:{ localVariablesSize, savedRegistersSize, argumentsSize, totalSize, variables: FrameVariable[] }FrameVariable:{ name, byteOffset, byteSize, comment, isSpecial }RegisterVariable:{ rangeStart, rangeEnd, canonicalName, userName, comment }
create(start: Address, end?: Address): Functionremove(address: Address): booleanat(address: Address): FunctionbyIndex(index: number): Functioncount(): numbernameAt(address: Address): stringsetStart(address: Address, newStart: Address): booleansetEnd(address: Address, newEnd: Address): booleanupdate(address: Address): booleanreanalyze(address: Address): booleanisOutlined(address: Address): booleansetOutlined(address: Address, outlined: boolean): booleancomment(address: Address, repeatable?: boolean): stringsetComment(address: Address, text: string, repeatable?: boolean): booleancallers(address: Address): Address[]callees(address: Address): Address[]chunks(address: Address): Chunk[]tailChunks(address: Address): Chunk[]chunkCount(address: Address): numberaddTail(funcAddr: Address, tailStart: Address, tailEnd: Address): booleanremoveTail(funcAddr: Address, tailAddr: Address): booleanframe(address: Address): StackFramespDeltaAt(address: Address): AddressDeltaframeVariableByName(address: Address, name: string): FrameVariableframeVariableByOffset(address: Address, byteOffset: number): FrameVariabledefineStackVariable(funcAddr: Address, name: string, frameOffset: number, typeName: string): booleanaddRegisterVariable(funcAddr: Address, rangeStart: Address, rangeEnd: Address, registerName: string, userName: string, comment?: string): booleanfindRegisterVariable(funcAddr: Address, address: Address, registerName: string): RegisterVariableremoveRegisterVariable(funcAddr: Address, rangeStart: Address, rangeEnd: Address, registerName: string): booleanrenameRegisterVariable(funcAddr: Address, address: Address, registerName: string, newUserName: string): booleanhasRegisterVariables(funcAddr: Address, address: Address): booleanregisterVariables(funcAddr: Address): RegisterVariable[]itemAddresses(address: Address): Address[]codeAddresses(address: Address): Address[]all(): Function[]
Disassembly, operands, formats, and control flow properties.
Types:
OperandFormat:'default'|'hex'|'decimal'|'octal'|'binary'|'character'|'float'|'offset'|'stackVariable'Instruction:{ address, size, opcode, mnemonic, operandCount, operands: Operand[] }Operand:{ index, type, isRegister, isImmediate, isMemory, registerId, value, targetAddress, displacement, byteWidth, registerName, registerCategory }StructOffsetPath:{ structureName: string, memberNames: string[], delta: bigint }
decode(address: Address): Instructioncreate(address: Address): Instruction(Makes code and decodes)text(address: Address): string(Disassembly line)setOperandHex(a, n?),setOperandDecimal(a, n?),setOperandOctal(a, n?),setOperandBinary(a, n?),setOperandCharacter(a, n?),setOperandFloat(a, n?)setOperandFormat(address: Address, n: number, format: OperandFormat, base?: Address): voidsetOperandOffset(address: Address, n?: number, base?: Address): voidsetOperandStructOffset(address: Address, n: number, structureName: string, delta?: bigint | number): voidensureOperandStructMemberOffset(address: Address, n: number, structureName: string, memberByteOffset: number | bigint, delta?: bigint | number): booleansetOperandBasedStructOffset(address: Address, n: number, operandValue: Address, base: Address): voidoperandStructOffsetPath(address: Address, n?: number): StructOffsetPathoperandStructOffsetPathNames(address: Address, n?: number): string[]setOperandStackVariable(address: Address, n?: number): voidclearOperandRepresentation(address: Address, n?: number): voidsetForcedOperand(address: Address, n: number, text: string): voidgetForcedOperand(address: Address, n?: number): stringoperandText(address: Address, n?: number): stringoperandByteWidth(address: Address, n?: number): numberoperandRegisterName(address: Address, n?: number): stringoperandRegisterCategory(address: Address, n?: number): RegisterCategorytoggleOperandSign(address: Address, n?: number): voidtoggleOperandNegate(address: Address, n?: number): voidcodeRefsFrom(address: Address): Address[]dataRefsFrom(address: Address): Address[]callTargets(address: Address): Address[]jumpTargets(address: Address): Address[]hasFallThrough(address: Address): booleanisCall(address: Address): boolean,isReturn(...),isJump(...),isConditionalJump(...)next(address: Address): Instruction,prev(address: Address): Instruction
Global symbol names.
Types:
NameEntry:{ address: Address, name: string, userDefined: boolean, autoGenerated: boolean }
set(address: Address, name: string): void(Throws on conflict)forceSet(address: Address, name: string): void(Auto-disambiguates)remove(address: Address): voidget(address: Address): stringdemangled(addressOrSymbol: Address | string, form?: 'short'|'long'|'full'): stringresolve(name: string, context?: Address): Addressall(options?: {start?, end?, includeUserDefined?, includeAutoGenerated?}): NameEntry[]allUserDefined(start?: Address, end?: Address): NameEntry[]isPublic(address: Address): boolean,isWeak(...),isUserDefined(...),isAutoGenerated(...)isValidIdentifier(text: string): boolean,sanitizeIdentifier(text: string): stringsetPublic(address: Address, value?: boolean): void,setWeak(address: Address, value?: boolean): void
Cross-references between addresses.
Types:
CodeType:'callFar' | 'callNear' | 'jumpFar' | 'jumpNear' | 'flow'DataType:'offset' | 'write' | 'read' | 'text' | 'informational'ReferenceType:'unknown' | 'flow' | 'callNear' | 'callFar' | 'jumpNear' | 'jumpFar' | 'offset' | 'read' | 'write' | 'text' | 'informational'Reference:{ from: Address, to: Address, isCode: boolean, type: ReferenceType, userDefined: boolean }
addCode(from: Address, to: Address, type: CodeType): voidaddData(from: Address, to: Address, type: DataType): voidremoveCode(from: Address, to: Address): voidremoveData(from: Address, to: Address): voidrefsFrom(address: Address, type?: ReferenceType): Reference[]refsTo(address: Address, type?: ReferenceType): Reference[]codeRefsFrom(address: Address): Reference[],codeRefsTo(...)dataRefsFrom(address: Address): Reference[],dataRefsTo(...)isCall(type: ReferenceType): boolean,isJump(...),isFlow(...),isData(...),isDataRead(...),isDataWrite(...)
Disassembly comments (regular, anterior, and posterior).
get(address: Address, repeatable?: boolean): stringset(address: Address, text: string, repeatable?: boolean): voidappend(address: Address, text: string, repeatable?: boolean): voidremove(address: Address, repeatable?: boolean): voidaddAnterior(address: Address, text: string): void,addPosterior(...)getAnterior(address: Address, lineIndex: number): string,getPosterior(...)setAnterior(address: Address, lineIndex: number, text: string): void,setPosterior(...)removeAnteriorLine(address: Address, lineIndex: number): void,removePosteriorLine(...)setAnteriorLines(address: Address, lines: string[]): void,setPosteriorLines(...)clearAnterior(address: Address): void,clearPosterior(...)anteriorLines(address: Address): string[],posteriorLines(...)render(address: Address, includeRepeatable?: boolean, includeExtraLines?: boolean): string
Byte-level database access and item definitions.
readByte(address: Address): number,readWord,readDwordreadQword(address: Address): bigintreadBytes(address: Address, size: number): BufferreadString(address: Address, maxLength?: number, stringType?: number, conversionFlags?: number): stringwriteByte(address: Address, value: number): void,writeWord,writeDwordwriteQword(address: Address, value: bigint | number): voidwriteBytes(address: Address, data: Buffer | Uint8Array): voidpatchByte(...),patchWord(...),patchDword(...),patchQword(...),patchBytes(...)revertPatch(address: Address): voidrevertPatches(address: Address, size: number): AddressSizeoriginalByte(address: Address): number,originalWord,originalDword,originalQword
defineByte(address: Address, count?: number | bigint): void,defineWord,defineDword,defineQword,defineOword,defineYword,defineZword,defineFloat,defineDoubletbyteElementSize(): bigint,defineTbyte(...),packedRealElementSize(): bigint,definePackedReal(...)defineString(address: Address, length: number, stringType?: number): voiddefineStruct(address: Address, length: number, structureId: bigint | number): voidundefine(address: Address, count?: number): voidfindBinaryPattern(start: Address, end: Address, pattern: string, forward?: boolean, skipStart?: boolean, caseSensitive?: boolean, radix?: number, strLitsEncoding?: number): Address
registerCustomDataType(definition): number,unregisterCustomDataType(typeId): void,customDataType,findCustomDataType,customDataTypesregisterCustomDataFormat(definition): number,unregisterCustomDataFormat(formatId): void,customDataFormat,findCustomDataFormatattachCustomDataFormat,detachCustomDataFormat,isCustomDataFormatAttached,customDataFormatsattachCustomDataFormatToStandardTypes,detachCustomDataFormatFromStandardTypes,isCustomDataFormatAttachedToStandardTypes,standardCustomDataFormatscustomDataItemSize,defineCustom,defineCustomInferred,customDataAtrenderCustomData,scanCustomData,analyzeCustomData; definition callbacks remain retained until explicit unregister
Searching database addresses.
text(query: string, start: Address, options: TextOptions): Address- Options:
{ direction?: 'forward'|'backward', caseSensitive?: boolean, regex?: boolean, identifier?: boolean, skipStart?: boolean, noBreak?: boolean, noShow?: boolean, breakOnCancel?: boolean }
- Options:
text(query: string, start: Address, direction?: Direction, caseSensitive?: boolean): Addressimmediate(value: bigint | number, start: Address, direction?: Direction): AddressbinaryPattern(hexPattern: string, start: Address, direction?: Direction): AddressnextCode(address: Address): Address,nextData,nextUnknown,nextError,nextDefined
Auto-analysis queue management.
isEnabled(): boolean,setEnabled(enabled: boolean): voidisIdle(): booleanwait(): void,waitRange(start: Address, end: Address): void(Blocks Node thread until analysis finishes)schedule(address: Address): void,scheduleRange(start, end),scheduleCode(address),scheduleFunction(address),scheduleReanalysis(address),scheduleReanalysisRange(start, end)cancel(start: Address, end: Address): voidrevertDecisions(start: Address, end: Address): void
Type library (TIL) and localized type manipulation.
Wrapper Object (TypeInfo): Most APIs return or accept a TypeInfo object. This is a persistent JS wrapper for the C++ type representation.
TypeInfo factory/runtime operations require an initialized IDA runtime/database; pure structural tests should inspect declarations or initialized integration tests rather than constructing TypeInfo objects in an uninitialized Node process.
isVoid(): boolean,isInteger(),isFloatingPoint(),isPointer(),isArray(),isFunction(),isStruct(),isUnion(),isEnum(),isTypedef(),isBool(),isChar(),isUnsignedChar(),isSigned(),isForwardDeclaration(),forwardDeclarationKind(),kind(),name()size(): number,toString(): string,declaration(declaratorName?: string): stringpointeeType(): TypeInfo,pointerDetails(): PointerDetails,withShiftedParent(parent: TypeInfo, byteDelta: number): TypeInfo,arrayElementType(): TypeInfo,arrayLength(): number,resolveTypedef(): TypeInfofunctionReturnType(): TypeInfo,functionArgumentTypes(): TypeInfo[],functionDetails(): FunctionDetails,callingConvention(): CallingConvention,isVariadicFunction(): booleanenumMembers(): { name: string, value: bigint, comment: string }[],enumDetails(): EnumDetailsmemberCount(): number,members(): Member[],udtDetails(): UdtDetails,setUdtSemantics(isCppObject: boolean, isVftable: boolean): voidmemberByName(name: string): Member,memberByOffset(byteOffset: number): MembermemberReferences(byteOffset: number): Address[]— source item heads of persistent user informational references to the unique exact saved-local UDT memberensureMemberReference(byteOffset: number, sourceAddress: Address): boolean— ensure that reference without exposing the member TID; returnstrueonly when newly addedaddMember(name: string, type: TypeInfo, byteOffset?: number): voidapply(address: Address): voidsaveAs(name: string): voidreplaceForwardDeclaration(name: string): TypeInfo— exact local struct/union forward only; preserves the existing ordinal and source object
voidType(): TypeInfo,int8(),int16(),int32(),int64(),uint8(),uint16(),uint32(),uint64(),float32(),float64()pointerTo(target: TypeInfo): TypeInfoarrayOf(element: TypeInfo, count: number): TypeInfofunctionType(returnType: TypeInfo, args?: TypeInfo[], callingConvention?: CallingConvention, varargs?: boolean): TypeInfofromDeclaration(cDecl: string): TypeInfocreateStruct(): TypeInfo,createUnion(): TypeInfobyName(name: string): TypeInforetrieve(address: Address): TypeInforetrieveOperand(address: Address, operandIndex: number): TypeInforemoveType(address: Address): voidloadTypeLibrary(tilName: string): boolean,unloadTypeLibrary(tilName: string): voidlocalTypeCount(): number,localTypeName(ordinal: number): string,localTypeDeclaration(ordinal: number): string(1-based ordinal; declaration includes alignment pragmas and a semicolon)importType(sourceTilName: string, typeName: string): numberensureNamedType(typeName: string, sourceTil?: string): TypeInfoapplyNamedType(address: Address, typeName: string): voidparseDeclarations(declarations: string, options?: { silent?: boolean, replace?: boolean }): { errorCount: number, ok: boolean }
Program entry points (exports).
count(): numberbyIndex(index: number): { ordinal: bigint, address: Address, name: string, forwarder: string }byOrdinal(ordinal: bigint | number): EntryPointadd(ordinal: bigint | number, address: Address, name: string, makeCode?: boolean): voidrename(ordinal: bigint | number, name: string): voidforwarder(ordinal: bigint | number): stringsetForwarder(ordinal: bigint | number, target: string): voidclearForwarder(ordinal: bigint | number): void
Relocation/fixup records.
at(source: Address): Descriptorset(source: Address, descriptor: Partial<Descriptor>): voidremove(source: Address): voidexists(source: Address): booleancontains(start: Address, size: AddressSize): booleaninRange(start: Address, end: Address): Descriptor[]first(): Address | null,next(address: Address): Address | null,prev(address: Address): Address | nullall(): Address[]
Global IDA database event listeners.
All subscription functions return a Token (bigint) which must be used to unsubscribe.
onSegmentAdded(callback: (event: {kind, address}) => void): TokenonSegmentDeleted(callback: (event: {kind, address, secondaryAddress}) => void): TokenonFunctionAdded(callback: (event: {kind, address}) => void): TokenonFunctionDeleted(callback: (event: {kind, address}) => void): TokenonRenamed(callback: (event: {kind, address, newName, oldName}) => void): TokenonBytePatched(callback: (event: {kind, address, oldValue}) => void): TokenonCommentChanged(callback: (event: {kind, address, repeatable}) => void): TokenonEvent(callback: (event: Event) => void): Token(Subscribes to all events)unsubscribe(token: Token): void
Low-level persistent netnode key-value storage.
Wrapper Object (StorageNode): Returned by the factories. Represents a netnode.
id(): bigint,name(): stringalt(index: Address, tag?: number | string): bigintsetAlt(index: Address, value: bigint | number, tag?: number | string): voidremoveAlt(index: Address, tag?: number | string): voidsup(index: Address, tag?: number | string): BuffersetSup(index: Address, data: Buffer | Uint8Array, tag?: number | string): voidhash(key: string, tag?: number | string): stringsetHash(key: string, value: string, tag?: number | string): voidblobSize(index: Address, tag?: number | string): numberblob(index: Address, tag?: number | string): BuffersetBlob(index: Address, data: Buffer | Uint8Array, tag?: number | string): voidremoveBlob(index: Address, tag?: number | string): voidblobString(index: Address, tag?: number | string): string
open(name: string, create?: boolean): StorageNodeopenById(nodeId: bigint | number): StorageNode
Internal logging and asserts.
setLogLevel(level: 'error' | 'warning' | 'info' | 'debug' | 'trace'): voidlogLevel(): stringlog(level: LogLevel, domain: string, message: string): voidassertInvariant(condition: boolean, message: string): voidresetPerformanceCounters(): voidperformanceCounters(): { logMessages: number, invariantFailures: number }
Lumina server synchronization.
hasConnection(feature?: Feature): booleancloseConnection(feature?: Feature): voidcloseAllConnections(): voidpull(addresses: Address | Address[], autoApply?: boolean, skipFrequencyUpdate?: boolean, feature?: Feature): BatchResultpush(addresses: Address | Address[], mode?: PushMode, feature?: Feature): BatchResult
Disassembly color tag formatting.
colstr(text: string, color: number | ColorName): stringtagRemove(taggedText: string): stringtagAdvance(taggedText: string, pos: number): numbertagStrlen(taggedText: string): numbermakeAddrTag(itemIndex: number): stringdecodeAddrTag(taggedText: string, pos: number): number- Constants: Exposes color control bytes (
colorOn,colorOff,colorEsc,colorInv,colorAddr,colorAddrSize) and an enum-like objectidax.lines.Colormapping string keys to their hex values (e.g.idax.lines.Color.Keyword).
Hex-Rays decompilation.
Wrapper Object (DecompiledFunction): Holds a reference to a cfunc_t.
pseudocode(): stringlines(): string[](Stripped of color tags)rawLines(): string[](Contains color tags)declaration(): stringvariableCount(): numbervariables(): LocalVariable[](Has{ name, typeName, isArgument, width, hasUserName, hasNiceName, storage, comment })renameVariable(oldName: string, newName: string): voidretypeVariable(name: string, newType: string): voidretypeVariable(index: number, newType: string): voidentryAddress(): AddresslineToAddress(lineNumber: number): AddressaddressMap(): { address: Address, lineNumber: number }[]refresh(): voidcaptureUserLvarSettings(): LvarSnapshotrestoreUserLvarSettings(snapshot: LvarSnapshot): voidsetVariableComment(nameOrIndex: string | number, comment: string): voidvariable(index: number): LocalVariableforEachExpression(callback: (expr: ExpressionInfo) => void): voidforEachItem(callback: (item: CtreeItemInfo) => void): void
Wrapper Object (LvarSnapshot):
empty(): booleancount(): number
available(): boolean- true if Hex-Rays is licensed/active.initialize(): ScopedSession- take an owned Hex-Rays session reference for plugin lifecycle code.ScopedSession.valid(): booleanScopedSession.close(): void
decompile(address: Address): DecompiledFunctionregisterMicrocodeFilter(matchCb, applyCb): Token- register microcode filter callbacks.matchCb(context)receives aMicrocodeContextand returnsboolean.applyCb(context)receives aMicrocodeContextand returns'notHandled' | 'handled' | 'error'(or numeric0 | 1 | 2).
unregisterMicrocodeFilter(token: Token): voidonMaturityChanged(callback: (event: {functionAddress, newMaturity}) => void): TokenonFuncPrinted(callback: (event: {functionAddress}) => void): TokenonRefreshPseudocode(callback: (event: {functionAddress}) => void): TokenonSwitchPseudocode(callback: (event: {functionAddress}) => void): TokenonPopulatingPopup(callback: (event: { widgetHandle, popupHandle, viewHandle, functionAddress }) => void): Tokenunsubscribe(token: Token): voidmarkDirty(funcAddress: Address, closeViews?: boolean): voidmarkDirtyWithCallers(funcAddress: Address, closeViews?: boolean): void
MicrocodeContext methods (valid only during callback execution):
address(): AddressinstructionType(): numberblockInstructionCount(): numberhasInstructionAtIndex(index: number): booleaninstruction(): instruction.InstructioninstructionAtIndex(index: number): MicrocodeInstructionhasLastEmittedInstruction(): booleanlastEmittedInstruction(): MicrocodeInstruction