Skip to main content

Callable

  • downloadReleaseArtifact(oracleVersion: string): Promise<string>

  • Downloads a specific version of the sbv2-oracle from GitHub releases and stores it in the cache directory.


    Parameters

    • oracleVersion: string

      The version of the sbv2-oracle to be downloaded.

    Returns Promise<string>

    A promise that resolves to the output location of the downloaded release.

    Basic usage example:

    import { getNodeImage, ReleaseChannel } from '@switchboard-xyz/oracle';

    (async () => {
    const releaseChannel: ReleaseChannel = 'testnet';
    const nodeImage = await getNodeImage(releaseChannel);
    console.log(`Latest node image for the ${releaseChannel} release channel: ${nodeImage}`);
    })();