Avalanche SDK Client
    Preparing search index...

    Type Alias AdminAPIActions

    type AdminAPIActions = {
        alias: (args: AliasParameters) => Promise<void>;
        aliasChain: (args: AliasChainParameters) => Promise<void>;
        getChainAliases: (args: GetChainAliasesParameters) => Promise<GetChainAliasesReturnType>;
        getLoggerLevel: (args: GetLoggerLevelParameters) => Promise<GetLoggerLevelReturnType>;
        loadVMs: () => Promise<LoadVMsReturnType>;
        lockProfile: () => Promise<void>;
        memoryProfile: () => Promise<void>;
        setLoggerLevel: (args: SetLoggerLevelParameters) => Promise<void>;
        startCPUProfiler: () => Promise<void>;
        stopCPUProfiler: () => Promise<void>;
    }
    Index

    Properties

    alias: (args: AliasParameters) => Promise<void>

    Assign an API endpoint an alias, a different endpoint for the API. The original endpoint will still work. This change only affects this node.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.alias({
    endpoint: "bc/X",
    alias: "myAlias"
    })
    aliasChain: (args: AliasChainParameters) => Promise<void>

    Give a blockchain an alias, a different name that can be used any place the blockchain's ID is used. Note: The alias is set for each chain on each node individually.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.aliasChain({
    chain: "sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM",
    alias: "myBlockchainAlias"
    })
    getChainAliases: (args: GetChainAliasesParameters) => Promise<GetChainAliasesReturnType>
    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const aliases = await client.admin.getChainAliases({
    chain: "sV6o671RtkGBcno1FiaDbVcFv2sG5aVXMZYzKdP4VQAWmJQnM"
    })
    getLoggerLevel: (args: GetLoggerLevelParameters) => Promise<GetLoggerLevelReturnType>

    Returns log and display levels of loggers.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const loggerLevels = await client.admin.getLoggerLevel({
    loggerName: "C"
    })
    loadVMs: () => Promise<LoadVMsReturnType>

    Dynamically loads any virtual machines installed on the node as plugins.

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    const vms = await client.admin.loadVMs()
    lockProfile: () => Promise<void>

    Writes a profile of mutex statistics to lock.profile.

    Type declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves when the profile is written

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.lockProfile()
    memoryProfile: () => Promise<void>

    Writes a memory profile of the node to mem.profile.

    Type declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves when the profile is written

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.memoryProfile()
    setLoggerLevel: (args: SetLoggerLevelParameters) => Promise<void>

    Type declaration

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.setLoggerLevel({
    loggerName: "C",
    logLevel: "DEBUG",
    displayLevel: "INFO"
    })
    startCPUProfiler: () => Promise<void>

    Start profiling the CPU utilization of the node. To stop, call stopCPUProfiler. On stop, writes the profile to cpu.profile.

    Type declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves when the profiler is started

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.startCPUProfiler()
    stopCPUProfiler: () => Promise<void>

    Stop the CPU profile that was previously started.

    Type declaration

      • (): Promise<void>
      • Returns Promise<void>

        Promise that resolves when the profiler is stopped

    import { createAvalancheClient} from '@avalanche-sdk/client'
    import { avalanche } from '@avalanche-sdk/client/chains'

    const client = createAvalancheClient({
    chain: avalanche,
    transport: {
    type: "http",
    },
    })

    await client.admin.stopCPUProfiler()