This class implements the Skynet REST API.

To create a SkynetRESTProvider quickly, call createSkynetRESTProvider with the API key.
To customize headers, call the SkynetRESTProvider constructor with a tailored ConnectionInfo parameter.

Hierarchy

  • CustomSkynetProvider
    • SkynetRESTProvider

Accounts

Block

Blocks

  • Get blocks

    If block_hash is present, always search by block_hash first. The block_number value must be positive. If there is no block_hash or block_number present, the API searches for all blocks. The limit and offset parameters are used to paginate results.

    Parameters

    Returns Promise<get_blocks_Response>

Contracts

NFTs

Other

connection: ConnectionInfo
  • Protected

    Sends HTTP GET message to the service provider

    Parameters

    • urlSuffix: string
    • Optionalconfig: AxiosRequestConfig<any>

    Returns Promise<AxiosResponse<any, any>>

  • Places a call to the service, with optional limits and cursor

    Parameters

    • url: string
    • Optionallimit: number

      how many items can be return in a single response, maximum 200

    • Optionalcursor: string

      the current pointer of the result set, to iterate to the next part of the results, it's returned by the previous call (nextCursor field), you get it and pass to the next call, present nextCursor means there will be more results to scroll, empty nextCursor means it reaches to the end of results

    Returns Promise<any>

  • Protected

    Sends HTTP POST message to the service provider

    Parameters

    • urlSuffix: string
    • data: any

    Returns Promise<AxiosResponse<any, any>>

  • Updates the url to include limit and cursors, if they're provided.

    Parameters

    • url: string
    • Optionallimit: number

      how many items can be return in a single response, maximum 200

    • Optionaloffset: string | number

    Returns string

    Updated url if limit and cursors provided, otherwise, returns the parameter url.

  • Parameters

    • url: string
    • params: string | URLSearchParams

    Returns string

Supplies

Token balances

Token transfers

Tokens

Transactions