Negligent Parachute Maintainers

    @spiceai/spice
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.0 • Public • Published

    spice.js

    Spice.xyz client library for Node.JS

    Installation

    npm install @spiceai/spice or yarn add @spiceai/spice

    Usage

    Arrow Query

    import { SpiceClient } from "@spiceai/spice";
    
    const main = async () => {
      const spiceClient = new SpiceClient("API_KEY");
      const table = await spiceClient.query(
        'SELECT number, "timestamp", gas_used FROM eth.recent_blocks LIMIT 10'
      );
      console.table(table.toArray());
    };
    
    main();

    Querying data is done through a SpiceClient object that initializes the connection with Spice endpoint. SpiceClient has the following arguments:

    • apiKey (string, required): API key to authenticate with the endpoint.
    • url (string, optional): URL of the endpoint to use (default: flight.spiceai.io:443)

    Documentation

    Check out our API documentation to learn more about how to use the Node.js SDK.

    Keywords

    none

    Install

    npm i @spiceai/spice

    DownloadsWeekly Downloads

    674

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    23.1 kB

    Total Files

    16

    Last publish

    Collaborators

    • spiceaibot
    • lukespice
    • phillipleblanc