Coda by Ian Macalinao
    Preparing search index...

    Module @macalinao/coda

    Coda

    npm version npm downloads

    Automated client generation for Solana programs.

    Visit coda.ianm.com for comprehensive documentation.

    bun add -D @macalinao/coda
    

    Or with npm:

    npm install -D @macalinao/coda
    
    # Generate a client from your Anchor IDL
    coda generate

    # Initialize a configuration file
    coda init

    Copyright © 2025 Ian Macalinao

    Licensed under the Apache License, Version 2.0

    Classes

    CodamaError
    LinkableDictionary
    NodeStack

    Interfaces

    AccountBumpValueNode
    AccountLinkNode
    AccountNode
    AccountValueNode
    AmountTypeNode
    ArgumentValueNode
    ArrayTypeNode
    ArrayValueNode
    BooleanTypeNode
    BooleanValueNode
    BytesTypeNode
    BytesValueNode
    CodaConfig
    Codama
    ConditionalValueNode
    ConstantDiscriminatorNode
    ConstantPdaSeedNode
    ConstantValueNode
    DateTimeTypeNode
    DefinedTypeLinkNode
    DefinedTypeNode
    EnumEmptyVariantTypeNode
    EnumStructVariantTypeNode
    EnumTupleVariantTypeNode
    EnumTypeNode
    EnumValueNode
    ErrorNode
    FieldDiscriminatorNode
    FixedCountNode
    FixedSizeTypeNode
    HiddenPrefixTypeNode
    HiddenSuffixTypeNode
    IdentityValueNode
    InstructionAccountLinkNode
    InstructionAccountNode
    InstructionArgumentLinkNode
    InstructionArgumentNode
    InstructionByteDeltaNode
    InstructionLinkNode
    InstructionNode
    InstructionRemainingAccountsNode
    MapEntryValueNode
    MapTypeNode
    MapValueNode
    NoneValueNode
    NumberTypeNode
    NumberValueNode
    OptionTypeNode
    PayerValueNode
    PdaLinkNode
    PdaNode
    PdaSeedValueNode
    PdaValueNode
    PostOffsetTypeNode
    PrefixedCountNode
    PreOffsetTypeNode
    ProgramIdValueNode
    ProgramLinkNode
    ProgramNode
    PublicKeyTypeNode
    PublicKeyValueNode
    RemainderCountNode
    RemainderOptionTypeNode
    ResolverValueNode
    RootNode
    SentinelTypeNode
    SetTypeNode
    SetValueNode
    SizeDiscriminatorNode
    SizePrefixTypeNode
    SolAmountTypeNode
    SomeValueNode
    StringTypeNode
    StringValueNode
    StructFieldTypeNode
    StructFieldValueNode
    StructTypeNode
    StructValueNode
    TupleTypeNode
    TupleValueNode
    VariablePdaSeedNode
    VisitorContext
    ZeroableOptionTypeNode

    Type Aliases

    AccountNodeInput
    AccountUpdates
    BottomUpNodeTransformer
    BottomUpNodeTransformerWithSelector
    BytesEncoding
    ByteSizeVisitorKeys
    CamelCaseString
    CodamaErrorCode
    CodamaVersion
    ContextualValueNode
    CountNode
    DefinedTypeHistogram
    DefinedTypeNodeInput
    DefinedTypeUpdates
    DiscriminatorNode
    Docs
    DocsInput
    EnumVariantTypeNode
    ErrorNodeInput
    ErrorUpdates
    FlattenInstructionArgumentsConfig
    FlattenStructOptions
    GetLinkableFromLinkNode
    GetNodeFromKind
    GetVisitorFunctionName
    InstructionAccountDefaultRule
    InstructionAccountNodeInput
    InstructionAccountUpdates
    InstructionArgumentNodeInput
    InstructionArgumentUpdates
    InstructionInputValueNode
    InstructionNodeInput
    InstructionUpdates
    KebabCaseString
    LinkableNode
    LinkNode
    LogLevel
    NestedTypeNode
    Node
    NodeKind
    NodePath
    NodeSelector
    NodeSelectorFunction
    NodeSelectorPath
    NumberFormat
    NumberWrapper
    OptionalAccountStrategy
    PascalCaseString
    PdaNodeInput
    PdaSeedNode
    ProgramAdditions
    ProgramNodeInput
    ProgramUpdates
    ProgramVersion
    RegisteredContextualValueNode
    RegisteredCountNode
    RegisteredDiscriminatorNode
    RegisteredLinkNode
    RegisteredPdaSeedNode
    RegisteredTypeNode
    RegisteredValueNode
    ResolvedInstructionAccount
    ResolvedInstructionArgument
    ResolvedInstructionInput
    SnakeCaseString
    StandaloneContextualValueNode
    StandaloneTypeNode
    StandaloneValueNode
    StructFieldTypeNodeInput
    TitleCaseString
    TopDownNodeTransformer
    TopDownNodeTransformerWithSelector
    TypeNode
    ValidationItem
    ValueNode
    Visitor
    VisitorInterceptor
    VisitorOverrideFunction
    VisitorOverrides

    Variables

    ASSOCIATED_TOKEN_PROGRAM_VALUE_NODE
    associatedTokenAccountPdaNode
    associatedTokenAccountValueNode
    BPF_UPGRADEABLE_LOADER_PROGRAM_VALUE_NODE
    CODAMA_ERROR__ANCHOR__ACCOUNT_TYPE_MISSING
    CODAMA_ERROR__ANCHOR__ARGUMENT_TYPE_MISSING
    CODAMA_ERROR__ANCHOR__PROGRAM_ID_KIND_UNIMPLEMENTED
    CODAMA_ERROR__ANCHOR__SEED_KIND_UNIMPLEMENTED
    CODAMA_ERROR__ANCHOR__TYPE_PATH_MISSING
    CODAMA_ERROR__ANCHOR__UNRECOGNIZED_IDL_TYPE
    CODAMA_ERROR__DISCRIMINATOR_FIELD_HAS_NO_DEFAULT_VALUE
    CODAMA_ERROR__DISCRIMINATOR_FIELD_NOT_FOUND
    CODAMA_ERROR__ENUM_VARIANT_NOT_FOUND
    CODAMA_ERROR__LINKED_NODE_NOT_FOUND
    CODAMA_ERROR__NODE_FILESYSTEM_FUNCTION_UNAVAILABLE
    CODAMA_ERROR__RENDERERS__UNSUPPORTED_NODE
    CODAMA_ERROR__UNEXPECTED_NESTED_NODE_KIND
    CODAMA_ERROR__UNEXPECTED_NODE_KIND
    CODAMA_ERROR__UNRECOGNIZED_BYTES_ENCODING
    CODAMA_ERROR__UNRECOGNIZED_NODE_KIND
    CODAMA_ERROR__UNRECOGNIZED_NUMBER_FORMAT
    CODAMA_ERROR__VERSION_MISMATCH
    CODAMA_ERROR__VISITORS__ACCOUNT_FIELD_NOT_FOUND
    CODAMA_ERROR__VISITORS__CANNOT_ADD_DUPLICATED_PDA_NAMES
    CODAMA_ERROR__VISITORS__CANNOT_EXTEND_MISSING_VISIT_FUNCTION
    CODAMA_ERROR__VISITORS__CANNOT_FLATTEN_STRUCT_WITH_CONFLICTING_ATTRIBUTES
    CODAMA_ERROR__VISITORS__CANNOT_REMOVE_LAST_PATH_IN_NODE_STACK
    CODAMA_ERROR__VISITORS__CANNOT_USE_OPTIONAL_ACCOUNT_AS_PDA_SEED_VALUE
    CODAMA_ERROR__VISITORS__CYCLIC_DEPENDENCY_DETECTED_WHEN_RESOLVING_INSTRUCTION_DEFAULT_VALUES
    CODAMA_ERROR__VISITORS__FAILED_TO_VALIDATE_NODE
    CODAMA_ERROR__VISITORS__INSTRUCTION_ENUM_ARGUMENT_NOT_FOUND
    CODAMA_ERROR__VISITORS__INVALID_INSTRUCTION_DEFAULT_VALUE_DEPENDENCY
    CODAMA_ERROR__VISITORS__INVALID_NUMBER_WRAPPER
    CODAMA_ERROR__VISITORS__INVALID_PDA_SEED_VALUES
    CODAMA_ERROR__VISITORS__RENDER_MAP_KEY_NOT_FOUND
    CONTEXTUAL_VALUE_NODES
    COUNT_NODES
    DISCRIMINATOR_NODES
    ENUM_VARIANT_TYPE_NODES
    ESM_DEPENDENCY_MAP
    flattenInstructionArguments
    flattenStruct
    getCommonInstructionAccountDefaultRules
    getConjunctiveNodeSelectorFunction
    getLevelIndex
    getNodeSelectorFunction
    INSTRUCTION_INPUT_VALUE_NODES
    LINKABLE_NODES
    LOG_LEVELS
    MEMO_PROGRAM_VALUE_NODE
    PDA_SEED_NODES
    REGISTERED_CONTEXTUAL_VALUE_NODE_KINDS
    REGISTERED_COUNT_NODE_KINDS
    REGISTERED_DISCRIMINATOR_NODE_KINDS
    REGISTERED_NODE_KINDS
    REGISTERED_PDA_SEED_NODE_KINDS
    REGISTERED_TYPE_NODE_KINDS
    REGISTERED_VALUE_NODE_KINDS
    STANDALONE_CONTEXTUAL_VALUE_NODE_KINDS
    STANDALONE_TYPE_NODE_KINDS
    STANDALONE_VALUE_NODE_KINDS
    SYSTEM_PROGRAM_VALUE_NODE
    SYSVAR_INSTRUCTIONS_VALUE_NODE
    SYSVAR_RENT_VALUE_NODE
    TOKEN_2022_PROGRAM_VALUE_NODE
    TOKEN_METADATA_PROGRAM_VALUE_NODE
    TOKEN_PROGRAM_VALUE_NODE
    TYPE_NODES
    VALUE_NODES

    Functions

    accountBumpValueNode
    accountLinkNode
    accountNode
    accountValueNode
    addNodesVisitor
    addPdasVisitor
    amountTypeNode
    argumentValueNode
    arrayTypeNode
    arrayValueNode
    assertIsNestedTypeNode
    assertIsNode
    assertIsNodeFilter
    assertIsNodePath
    booleanTypeNode
    booleanValueNode
    bottomUpTransformerVisitor
    bytesTypeNode
    bytesValueNode
    camelCase
    capitalize
    conditionalValueNode
    consoleLogVisitor
    constantDiscriminatorNode
    constantPdaSeedNode
    constantPdaSeedNodeFromBytes
    constantPdaSeedNodeFromProgramId
    constantPdaSeedNodeFromString
    constantValueNode
    constantValueNodeFromBytes
    constantValueNodeFromString
    createFromJson
    createFromRoot
    createSubInstructionsFromEnumArgsVisitor
    dateTimeTypeNode
    deduplicateIdenticalDefinedTypesVisitor
    deduplicateInstructionDependencies
    defineConfig
    definedTypeLinkNode
    definedTypeNode
    deleteNodesVisitor
    enumEmptyVariantTypeNode
    enumStructVariantTypeNode
    enumTupleVariantTypeNode
    enumTypeNode
    enumValueNode
    errorNode
    extendVisitor
    fieldDiscriminatorNode
    fillDefaultPdaSeedValuesVisitor
    findFirstNodeFromPath
    findInstructionNodeFromPath
    findLastNodeFromPath
    findProgramNodeFromPath
    fixDocsVisitor
    fixedCountNode
    fixedSizeTypeNode
    flattenInstructionDataArgumentsVisitor
    flattenStructVisitor
    getAllAccounts
    getAllDefinedTypes
    getAllErrors
    getAllInstructionArguments
    getAllInstructions
    getAllInstructionsWithSubs
    getAllPdas
    getAllPrograms
    getByteSizeVisitor
    getDebugStringVisitor
    getDefinedTypeHistogramVisitor
    getInstructionDependencies
    getLastNodeFromPath
    getMaxByteSizeVisitor
    getNodePathUntilLastNode
    getRecordLinkablesVisitor
    getResolvedInstructionInputsVisitor
    getUniqueHashStringVisitor
    getValidationItemsVisitor
    getVisitFunctionName
    hiddenPrefixTypeNode
    hiddenSuffixTypeNode
    identityValueNode
    identityVisitor
    instructionAccountLinkNode
    instructionAccountNode
    instructionArgumentLinkNode
    instructionArgumentNode
    instructionByteDeltaNode
    instructionLinkNode
    instructionNode
    instructionRemainingAccountsNode
    interceptFirstVisitVisitor
    interceptVisitor
    isCodamaError
    isDataEnum
    isDecimal
    isFilledNodePath
    isInteger
    isNestedTypeNode
    isNode
    isNodeFilter
    isNodePath
    isScalarEnum
    isSignedInteger
    isUnsignedInteger
    kebabCase
    logError
    logInfo
    logWarn
    mapEntryValueNode
    mapTypeNode
    mapValueNode
    mapVisitor
    mergeVisitor
    nodePathToString
    nodePathToStringArray
    noneValueNode
    nonNullableIdentityVisitor
    numberTypeNode
    numberValueNode
    optionTypeNode
    parseDocs
    parseOptionalAccountStrategy
    pascalCase
    payerValueNode
    pdaLinkNode
    pdaNode
    pdaSeedValueNode
    pdaValueNode
    pipe
    postOffsetTypeNode
    prefixedCountNode
    preOffsetTypeNode
    programIdValueNode
    programLinkNode
    programNode
    publicKeyTypeNode
    publicKeyValueNode
    recordLinkablesOnFirstVisitVisitor
    recordNodeStackVisitor
    remainderCountNode
    remainderOptionTypeNode
    removeDocsVisitor
    removeNullAndAssertIsNodeFilter
    renameVisitor
    renderESMTypeScriptVisitor
    resolveNestedTypeNode
    resolverValueNode
    rootNode
    rootNodeVisitor
    safeCaptureStackTrace
    sentinelTypeNode
    setAccountDiscriminatorFromFieldVisitor
    setFixedAccountSizesVisitor
    setInstructionAccountDefaultValuesVisitor
    setInstructionDiscriminatorsVisitor
    setNumberWrappersVisitor
    setStructDefaultValuesVisitor
    setTypeNode
    setValueNode
    singleNodeVisitor
    sizeDiscriminatorNode
    sizePrefixTypeNode
    snakeCase
    solAmountTypeNode
    someValueNode
    staticVisitor
    stringTypeNode
    stringValueNode
    structFieldTypeNode
    structFieldTypeNodeFromInstructionArgumentNode
    structFieldValueNode
    structTypeNode
    structTypeNodeFromInstructionArgumentNodes
    structValueNode
    tapVisitor
    throwValidatorItemsVisitor
    titleCase
    topDownTransformerVisitor
    transformDefinedTypesIntoAccountsVisitor
    transformNestedTypeNode
    transformU8ArraysToBytesVisitor
    tupleTypeNode
    tupleValueNode
    unwrapDefinedTypesVisitor
    unwrapInstructionArgsDefinedTypesVisitor
    unwrapTupleEnumWithSingleStructVisitor
    unwrapTypeDefinedLinksVisitor
    updateAccountsVisitor
    updateDefinedTypesVisitor
    updateErrorsVisitor
    updateInstructionsVisitor
    updateProgramsVisitor
    validateCodamaVersion
    validationItem
    variablePdaSeedNode
    visit
    visitOrElse
    voidVisitor
    zeroableOptionTypeNode