Provide Interfaces for Price Oracle Relay API Endpoints
We have some of these defined in the AnyHedge Whitelabel Frontend currently.
But, as these payloads are in hexadecimal (and therefore not directly utilizable using existing interfaces - need to convert to bin), it might be useful to have these in the library.
Some interfaces defined from AnyHedge Whitelabel Frontend:
/**
* Response entry for the Oracle Messages (/v1/oracleMessages) endpoint.
*/
export interface OracleMessageEntry
{
/** The message encoded as a hexadecimal string. */
message: string;
/** The public key of the Oracle encoded as a hexadecimal string. */
publicKey: string;
/** The signature encoded as a hexadecimal string. */
signature: string;
}
/**
* Response typing for the Oracle Messages (/v1/oracleMessages) endpoint.
*/
export interface OracleMessagesResponse
{
/** Array of Orcale Message Entries. */
oracleMessages: Array<OracleMessageEntry>;
}
/**
* The payload we receive from our Oracle SSE Message (/sse/v1/messages) endpoint.
*/
export interface OracleSSEMessagePayload
{
/** The message encoded as a hexadecimal string. */
message: string;
/** The signature encoded as a hexadecimal string. */
signature: string;
}