added cacheTask
cache task cacheTask now uses job instead of task[] proto docs docs removed buffer from valueTask added big field to math & value tasks docs(website): add vrf request randomness code sample docs(protos): updated proto comments
This commit is contained in:
parent
436e9080f4
commit
c99d50f8eb
|
@ -57,8 +57,7 @@ message OracleJob {
|
|||
optional AggregationMethod aggregation_method = 2;
|
||||
}
|
||||
|
||||
// Returns the median of all the results returned by the provided subtasks and subjobs. Nested
|
||||
// tasks must return a Number.
|
||||
// Returns the median of all the results returned by the provided subtasks and subjobs. Nested tasks must return a Number.
|
||||
message MedianTask {
|
||||
// A list of subtasks to process and produce a list of result values.
|
||||
repeated Task tasks = 1;
|
||||
|
@ -90,6 +89,8 @@ message OracleJob {
|
|||
double value = 1;
|
||||
// Specifies an aggregatorr to pull the value of.
|
||||
string aggregator_pubkey = 2;
|
||||
// A stringified big.js. `Accepts variable expansion syntax.`
|
||||
string big = 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,11 +127,12 @@ message OracleJob {
|
|||
string aggregator_pubkey = 2;
|
||||
// A job whose result is computed before dividing our numerical input by that result.
|
||||
OracleJob job = 3;
|
||||
// A stringified big.js. `Accepts variable expansion syntax.`
|
||||
string big = 4;
|
||||
}
|
||||
}
|
||||
|
||||
// This task will multiply a numerical input by a scalar value or by another
|
||||
// aggregate.
|
||||
// This task will multiply a numerical input by a scalar value or by another aggregator.
|
||||
message MultiplyTask {
|
||||
oneof Multiple {
|
||||
// Specifies a scalar to multiply by.
|
||||
|
@ -139,6 +141,8 @@ message OracleJob {
|
|||
string aggregator_pubkey = 2;
|
||||
// A job whose result is computed before multiplying our numerical input by that result.
|
||||
OracleJob job = 3;
|
||||
// A stringified big.js. `Accepts variable expansion syntax.`
|
||||
string big = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,6 +156,8 @@ message OracleJob {
|
|||
string aggregator_pubkey = 2;
|
||||
// A job whose result is computed before adding our numerical input by that result.
|
||||
OracleJob job = 3;
|
||||
// A stringified big.js. `Accepts variable expansion syntax.`
|
||||
string big = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,6 +171,8 @@ message OracleJob {
|
|||
string aggregator_pubkey = 2;
|
||||
// A job whose result is computed before subtracting our numerical input by that result.
|
||||
OracleJob job = 3;
|
||||
// A stringified big.js. `Accepts variable expansion syntax.`
|
||||
string big = 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -250,6 +258,8 @@ message OracleJob {
|
|||
double scalar = 1;
|
||||
// Take the working value to the exponent of the aggregators value.
|
||||
string aggregator_pubkey = 2;
|
||||
// A stringified big.js. `Accepts variable expansion syntax.`
|
||||
string big = 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,13 +284,17 @@ message OracleJob {
|
|||
optional string perp_market_address = 1;
|
||||
}
|
||||
|
||||
// Fetch the simulated price for a swap on JupiterSwap.
|
||||
message JupiterSwapTask {
|
||||
// The input token address.
|
||||
optional string in_token_address = 1;
|
||||
// The output token address.
|
||||
optional string out_token_address = 2;
|
||||
// The amount of tokens to swap.
|
||||
optional double base_amount = 3;
|
||||
}
|
||||
|
||||
// Fetch the current price of a perpetual market
|
||||
// Fetch the current price of a perpetual market.
|
||||
message PerpMarketTask {
|
||||
oneof MarketAddress {
|
||||
// Market address for a mango perpetual market. A full list can be found here: https://github.com/blockworks-foundation/mango-client-v3/blob/main/src/ids.json
|
||||
|
@ -294,14 +308,14 @@ message OracleJob {
|
|||
}
|
||||
}
|
||||
|
||||
// Fetch the current price of a Solana oracle protocol
|
||||
// Fetch the current price of a Solana oracle protocol.
|
||||
message OracleTask {
|
||||
oneof AggregatorAddress {
|
||||
// Mainnet address of a Switchboard V2 feed. Switchboard is decentralized and allows anyone to build their own feed. A small subset of feeds is available here: https://switchboard.xyz/explorer
|
||||
string switchboard_address = 1;
|
||||
// Mainnet address for a Pyth feed. A full list can be found here: https://pyth.network/markets/
|
||||
string pyth_address = 2;
|
||||
// Devnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana
|
||||
// Mainnet address for a Chainlink feed. A full list can be found here: https://docs.chain.link/docs/solana/data-feeds-solana
|
||||
string chainlink_address = 3;
|
||||
}
|
||||
// Value (as a percentage) that the lower bound confidence interval is of the actual value.
|
||||
|
@ -317,94 +331,148 @@ message OracleJob {
|
|||
optional string account_address = 2;
|
||||
}
|
||||
|
||||
message DefiKingdomsTask {
|
||||
message Token {
|
||||
optional string address = 1;
|
||||
optional int32 decimals = 2;
|
||||
}
|
||||
optional string provider = 1;
|
||||
optional Token in_token = 2;
|
||||
optional Token out_token = 3;
|
||||
}
|
||||
|
||||
// Fetch the current transactions per second.
|
||||
message TpsTask {}
|
||||
|
||||
// Fetch the JSON representation of an SPL Stake Pool account.
|
||||
message SplStakePoolTask {
|
||||
// The pubkey of the SPL Stake Pool.``
|
||||
// The pubkey of the SPL Stake Pool.
|
||||
optional string pubkey = 1;
|
||||
}
|
||||
|
||||
// Fetch the JSON representation of an SPL token mint.
|
||||
message SplTokenParseTask {
|
||||
oneof AccountAddress {
|
||||
// The publicKey of a token account to fetch the mintInfo for.
|
||||
string token_account_address = 1;
|
||||
// The publicKey of the token mint address.
|
||||
string mint_address = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message UniswapExchangeRateTask {
|
||||
optional string in_token_address = 1;
|
||||
optional string out_token_address = 2;
|
||||
optional double in_token_amount = 3;
|
||||
optional double slippage = 4;
|
||||
optional string provider = 5;
|
||||
}
|
||||
|
||||
message SushiswapExchangeRateTask {
|
||||
optional string in_token_address = 1;
|
||||
optional string out_token_address = 2;
|
||||
optional double in_token_amount = 3;
|
||||
optional double slippage = 4;
|
||||
optional string provider = 5;
|
||||
}
|
||||
|
||||
message PancakeswapExchangeRateTask {
|
||||
optional string in_token_address = 1;
|
||||
optional string out_token_address = 2;
|
||||
optional double in_token_amount = 3;
|
||||
optional double slippage = 4;
|
||||
optional string provider = 5;
|
||||
}
|
||||
|
||||
message CacheTask {
|
||||
optional string name = 1;
|
||||
enum Method {
|
||||
METHOD_GET = 0;
|
||||
METHOD_SET = 1;
|
||||
// Fetch the swap price from DefiKingdoms.
|
||||
message DefiKingdomsTask {
|
||||
message Token {
|
||||
// The address of the token.
|
||||
optional string address = 1;
|
||||
// The number of decimal places for a token.
|
||||
optional int32 decimals = 2;
|
||||
}
|
||||
optional Method method = 2;
|
||||
// The RPC provider to use for the swap.
|
||||
optional string provider = 1;
|
||||
// The input token of the swap.
|
||||
optional Token in_token = 2;
|
||||
// The output token of the swap.
|
||||
optional Token out_token = 3;
|
||||
}
|
||||
|
||||
// Fetch the swap price from UniSwap.
|
||||
message UniswapExchangeRateTask {
|
||||
// The input token address.
|
||||
optional string in_token_address = 1;
|
||||
// The output token address.
|
||||
optional string out_token_address = 2;
|
||||
// The amount of tokens to swap.
|
||||
optional double in_token_amount = 3;
|
||||
// The allowable slippage in percent for the swap.
|
||||
optional double slippage = 4;
|
||||
// The RPC provider to use for the swap.
|
||||
optional string provider = 5;
|
||||
}
|
||||
|
||||
// Fetch the swap price from SushiSwap.
|
||||
message SushiswapExchangeRateTask {
|
||||
// The input token address.
|
||||
optional string in_token_address = 1;
|
||||
// The output token address.
|
||||
optional string out_token_address = 2;
|
||||
// The amount of tokens to swap.
|
||||
optional double in_token_amount = 3;
|
||||
// The allowable slippage in percent for the swap.
|
||||
optional double slippage = 4;
|
||||
// The RPC provider to use for the swap.
|
||||
optional string provider = 5;
|
||||
}
|
||||
|
||||
// Fetch the swap price from PancakeSwap.
|
||||
message PancakeswapExchangeRateTask {
|
||||
// The input token address.
|
||||
optional string in_token_address = 1;
|
||||
// The output token address.
|
||||
optional string out_token_address = 2;
|
||||
// The amount of tokens to swap.
|
||||
optional double in_token_amount = 3;
|
||||
// The allowable slippage in percent for the swap.
|
||||
optional double slippage = 4;
|
||||
// The RPC provider to use for the swap.
|
||||
optional string provider = 5;
|
||||
}
|
||||
|
||||
|
||||
// Execute a job and store the result in a variable to reference later.
|
||||
message CacheTask {
|
||||
message CacheItem {
|
||||
// The name of the variable to store in cache to reference later with `${VARIABLE_NAME}`.
|
||||
optional string variable_name = 1;
|
||||
// The OracleJob to execute to yield the value to store in cache.
|
||||
optional OracleJob job = 2;
|
||||
}
|
||||
// A list of cached variables to reference in the job with `${VARIABLE_NAME}`.
|
||||
repeated CacheItem cache_items = 1;
|
||||
}
|
||||
|
||||
// Return the difference between an oracle's clock and the current timestamp at `SYSVAR_CLOCK_PUBKEY`.
|
||||
message SysclockOffsetTask {}
|
||||
|
||||
message MarinadeStateTask {}
|
||||
|
||||
// Fetch the account data in a stringified buffer format.
|
||||
message SolanaAccountDataFetchTask {
|
||||
// The on-chain account to fetch the account data from.
|
||||
optional string pubkey = 1;
|
||||
}
|
||||
|
||||
// Return the deserialized value from a stringified buffer.
|
||||
message BufferLayoutParseTask {
|
||||
// The buffer offset to start deserializing from.
|
||||
optional uint32 offset = 1;
|
||||
enum Endian {
|
||||
LITTLE_ENDIAN = 0;
|
||||
BIG_ENDIAN = 1;
|
||||
}
|
||||
// The endianness of the stored value.
|
||||
optional Endian endian = 2;
|
||||
enum BufferParseType {
|
||||
// A public key.
|
||||
pubkey = 1;
|
||||
// A boolean.
|
||||
bool = 2;
|
||||
// An 8-bit unsigned value.
|
||||
u8 = 3;
|
||||
// An 8-bit signed value.
|
||||
i8 = 4;
|
||||
// A 16-bit unsigned value.
|
||||
u16 = 5;
|
||||
// A 16-bit signed value.
|
||||
i16 = 6;
|
||||
// A 32-bit unsigned value.
|
||||
u32 = 7;
|
||||
// A 32-bit signed value.
|
||||
i32 = 8;
|
||||
// A 32-bit IEEE floating point value.
|
||||
f32 = 9;
|
||||
// A 64-bit unsigned value.
|
||||
u64 = 10;
|
||||
// A 64-bit signed value.
|
||||
i64 = 11;
|
||||
// A 64-bit IEEE floating point value.
|
||||
f64 = 12;
|
||||
// A 128-bit unsigned value.
|
||||
u128 = 13;
|
||||
// A 128-bit signed value.
|
||||
i128 = 14;
|
||||
}
|
||||
// The type of value to deserialize.
|
||||
optional BufferParseType type = 3;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@switchboard-xyz/switchboard-v2",
|
||||
"version": "0.0.110",
|
||||
"version": "0.0.111-beta.0",
|
||||
"license": "MIT",
|
||||
"author": "mitch@switchboard.xyz",
|
||||
"description": "API wrapper for intergating with the Switchboardv2 program",
|
||||
|
|
|
@ -714,6 +714,9 @@ export namespace OracleJob {
|
|||
|
||||
/** ValueTask aggregatorPubkey */
|
||||
aggregatorPubkey?: (string|null);
|
||||
|
||||
/** ValueTask big */
|
||||
big?: (string|null);
|
||||
}
|
||||
|
||||
/** Represents a ValueTask. */
|
||||
|
@ -731,8 +734,11 @@ export namespace OracleJob {
|
|||
/** ValueTask aggregatorPubkey. */
|
||||
public aggregatorPubkey?: (string|null);
|
||||
|
||||
/** ValueTask big. */
|
||||
public big?: (string|null);
|
||||
|
||||
/** ValueTask Value. */
|
||||
public Value?: ("value"|"aggregatorPubkey");
|
||||
public Value?: ("value"|"aggregatorPubkey"|"big");
|
||||
|
||||
/**
|
||||
* Creates a new ValueTask instance using the specified properties.
|
||||
|
@ -1020,6 +1026,9 @@ export namespace OracleJob {
|
|||
|
||||
/** DivideTask job */
|
||||
job?: (IOracleJob|null);
|
||||
|
||||
/** DivideTask big */
|
||||
big?: (string|null);
|
||||
}
|
||||
|
||||
/** Represents a DivideTask. */
|
||||
|
@ -1040,8 +1049,11 @@ export namespace OracleJob {
|
|||
/** DivideTask job. */
|
||||
public job?: (IOracleJob|null);
|
||||
|
||||
/** DivideTask big. */
|
||||
public big?: (string|null);
|
||||
|
||||
/** DivideTask Denominator. */
|
||||
public Denominator?: ("scalar"|"aggregatorPubkey"|"job");
|
||||
public Denominator?: ("scalar"|"aggregatorPubkey"|"job"|"big");
|
||||
|
||||
/**
|
||||
* Creates a new DivideTask instance using the specified properties.
|
||||
|
@ -1125,6 +1137,9 @@ export namespace OracleJob {
|
|||
|
||||
/** MultiplyTask job */
|
||||
job?: (IOracleJob|null);
|
||||
|
||||
/** MultiplyTask big */
|
||||
big?: (string|null);
|
||||
}
|
||||
|
||||
/** Represents a MultiplyTask. */
|
||||
|
@ -1145,8 +1160,11 @@ export namespace OracleJob {
|
|||
/** MultiplyTask job. */
|
||||
public job?: (IOracleJob|null);
|
||||
|
||||
/** MultiplyTask big. */
|
||||
public big?: (string|null);
|
||||
|
||||
/** MultiplyTask Multiple. */
|
||||
public Multiple?: ("scalar"|"aggregatorPubkey"|"job");
|
||||
public Multiple?: ("scalar"|"aggregatorPubkey"|"job"|"big");
|
||||
|
||||
/**
|
||||
* Creates a new MultiplyTask instance using the specified properties.
|
||||
|
@ -1230,6 +1248,9 @@ export namespace OracleJob {
|
|||
|
||||
/** AddTask job */
|
||||
job?: (IOracleJob|null);
|
||||
|
||||
/** AddTask big */
|
||||
big?: (string|null);
|
||||
}
|
||||
|
||||
/** Represents an AddTask. */
|
||||
|
@ -1250,8 +1271,11 @@ export namespace OracleJob {
|
|||
/** AddTask job. */
|
||||
public job?: (IOracleJob|null);
|
||||
|
||||
/** AddTask big. */
|
||||
public big?: (string|null);
|
||||
|
||||
/** AddTask Addition. */
|
||||
public Addition?: ("scalar"|"aggregatorPubkey"|"job");
|
||||
public Addition?: ("scalar"|"aggregatorPubkey"|"job"|"big");
|
||||
|
||||
/**
|
||||
* Creates a new AddTask instance using the specified properties.
|
||||
|
@ -1335,6 +1359,9 @@ export namespace OracleJob {
|
|||
|
||||
/** SubtractTask job */
|
||||
job?: (IOracleJob|null);
|
||||
|
||||
/** SubtractTask big */
|
||||
big?: (string|null);
|
||||
}
|
||||
|
||||
/** Represents a SubtractTask. */
|
||||
|
@ -1355,8 +1382,11 @@ export namespace OracleJob {
|
|||
/** SubtractTask job. */
|
||||
public job?: (IOracleJob|null);
|
||||
|
||||
/** SubtractTask big. */
|
||||
public big?: (string|null);
|
||||
|
||||
/** SubtractTask Subtraction. */
|
||||
public Subtraction?: ("scalar"|"aggregatorPubkey"|"job");
|
||||
public Subtraction?: ("scalar"|"aggregatorPubkey"|"job"|"big");
|
||||
|
||||
/**
|
||||
* Creates a new SubtractTask instance using the specified properties.
|
||||
|
@ -2088,6 +2118,9 @@ export namespace OracleJob {
|
|||
|
||||
/** PowTask aggregatorPubkey */
|
||||
aggregatorPubkey?: (string|null);
|
||||
|
||||
/** PowTask big */
|
||||
big?: (string|null);
|
||||
}
|
||||
|
||||
/** Represents a PowTask. */
|
||||
|
@ -2105,8 +2138,11 @@ export namespace OracleJob {
|
|||
/** PowTask aggregatorPubkey. */
|
||||
public aggregatorPubkey?: (string|null);
|
||||
|
||||
/** PowTask big. */
|
||||
public big?: (string|null);
|
||||
|
||||
/** PowTask Exponent. */
|
||||
public Exponent?: ("scalar"|"aggregatorPubkey");
|
||||
public Exponent?: ("scalar"|"aggregatorPubkey"|"big");
|
||||
|
||||
/**
|
||||
* Creates a new PowTask instance using the specified properties.
|
||||
|
@ -2800,207 +2836,6 @@ export namespace OracleJob {
|
|||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
/** Properties of a DefiKingdomsTask. */
|
||||
interface IDefiKingdomsTask {
|
||||
|
||||
/** DefiKingdomsTask provider */
|
||||
provider?: (string|null);
|
||||
|
||||
/** DefiKingdomsTask inToken */
|
||||
inToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
|
||||
/** DefiKingdomsTask outToken */
|
||||
outToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
}
|
||||
|
||||
/** Represents a DefiKingdomsTask. */
|
||||
class DefiKingdomsTask implements IDefiKingdomsTask {
|
||||
|
||||
/**
|
||||
* Constructs a new DefiKingdomsTask.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: OracleJob.IDefiKingdomsTask);
|
||||
|
||||
/** DefiKingdomsTask provider. */
|
||||
public provider: string;
|
||||
|
||||
/** DefiKingdomsTask inToken. */
|
||||
public inToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
|
||||
/** DefiKingdomsTask outToken. */
|
||||
public outToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
|
||||
/**
|
||||
* Creates a new DefiKingdomsTask instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns DefiKingdomsTask instance
|
||||
*/
|
||||
public static create(properties?: OracleJob.IDefiKingdomsTask): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Encodes the specified DefiKingdomsTask message. Does not implicitly {@link OracleJob.DefiKingdomsTask.verify|verify} messages.
|
||||
* @param message DefiKingdomsTask message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: OracleJob.IDefiKingdomsTask, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified DefiKingdomsTask message, length delimited. Does not implicitly {@link OracleJob.DefiKingdomsTask.verify|verify} messages.
|
||||
* @param message DefiKingdomsTask message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: OracleJob.IDefiKingdomsTask, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a DefiKingdomsTask message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns DefiKingdomsTask
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Decodes a DefiKingdomsTask message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns DefiKingdomsTask
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Verifies a DefiKingdomsTask message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a DefiKingdomsTask message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns DefiKingdomsTask
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a DefiKingdomsTask message. Also converts values to other types if specified.
|
||||
* @param message DefiKingdomsTask
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: OracleJob.DefiKingdomsTask, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this DefiKingdomsTask to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
namespace DefiKingdomsTask {
|
||||
|
||||
/** Properties of a Token. */
|
||||
interface IToken {
|
||||
|
||||
/** Token address */
|
||||
address?: (string|null);
|
||||
|
||||
/** Token decimals */
|
||||
decimals?: (number|null);
|
||||
}
|
||||
|
||||
/** Represents a Token. */
|
||||
class Token implements IToken {
|
||||
|
||||
/**
|
||||
* Constructs a new Token.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: OracleJob.DefiKingdomsTask.IToken);
|
||||
|
||||
/** Token address. */
|
||||
public address: string;
|
||||
|
||||
/** Token decimals. */
|
||||
public decimals: number;
|
||||
|
||||
/**
|
||||
* Creates a new Token instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns Token instance
|
||||
*/
|
||||
public static create(properties?: OracleJob.DefiKingdomsTask.IToken): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Encodes the specified Token message. Does not implicitly {@link OracleJob.DefiKingdomsTask.Token.verify|verify} messages.
|
||||
* @param message Token message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: OracleJob.DefiKingdomsTask.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified Token message, length delimited. Does not implicitly {@link OracleJob.DefiKingdomsTask.Token.verify|verify} messages.
|
||||
* @param message Token message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: OracleJob.DefiKingdomsTask.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a Token message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns Token
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Decodes a Token message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns Token
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Verifies a Token message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a Token message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns Token
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a Token message. Also converts values to other types if specified.
|
||||
* @param message Token
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: OracleJob.DefiKingdomsTask.Token, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this Token to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
}
|
||||
|
||||
/** Properties of a TpsTask. */
|
||||
interface ITpsTask {
|
||||
}
|
||||
|
@ -3274,6 +3109,207 @@ export namespace OracleJob {
|
|||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
/** Properties of a DefiKingdomsTask. */
|
||||
interface IDefiKingdomsTask {
|
||||
|
||||
/** DefiKingdomsTask provider */
|
||||
provider?: (string|null);
|
||||
|
||||
/** DefiKingdomsTask inToken */
|
||||
inToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
|
||||
/** DefiKingdomsTask outToken */
|
||||
outToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
}
|
||||
|
||||
/** Represents a DefiKingdomsTask. */
|
||||
class DefiKingdomsTask implements IDefiKingdomsTask {
|
||||
|
||||
/**
|
||||
* Constructs a new DefiKingdomsTask.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: OracleJob.IDefiKingdomsTask);
|
||||
|
||||
/** DefiKingdomsTask provider. */
|
||||
public provider: string;
|
||||
|
||||
/** DefiKingdomsTask inToken. */
|
||||
public inToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
|
||||
/** DefiKingdomsTask outToken. */
|
||||
public outToken?: (OracleJob.DefiKingdomsTask.IToken|null);
|
||||
|
||||
/**
|
||||
* Creates a new DefiKingdomsTask instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns DefiKingdomsTask instance
|
||||
*/
|
||||
public static create(properties?: OracleJob.IDefiKingdomsTask): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Encodes the specified DefiKingdomsTask message. Does not implicitly {@link OracleJob.DefiKingdomsTask.verify|verify} messages.
|
||||
* @param message DefiKingdomsTask message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: OracleJob.IDefiKingdomsTask, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified DefiKingdomsTask message, length delimited. Does not implicitly {@link OracleJob.DefiKingdomsTask.verify|verify} messages.
|
||||
* @param message DefiKingdomsTask message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: OracleJob.IDefiKingdomsTask, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a DefiKingdomsTask message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns DefiKingdomsTask
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Decodes a DefiKingdomsTask message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns DefiKingdomsTask
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Verifies a DefiKingdomsTask message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a DefiKingdomsTask message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns DefiKingdomsTask
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): OracleJob.DefiKingdomsTask;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a DefiKingdomsTask message. Also converts values to other types if specified.
|
||||
* @param message DefiKingdomsTask
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: OracleJob.DefiKingdomsTask, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this DefiKingdomsTask to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
|
||||
namespace DefiKingdomsTask {
|
||||
|
||||
/** Properties of a Token. */
|
||||
interface IToken {
|
||||
|
||||
/** Token address */
|
||||
address?: (string|null);
|
||||
|
||||
/** Token decimals */
|
||||
decimals?: (number|null);
|
||||
}
|
||||
|
||||
/** Represents a Token. */
|
||||
class Token implements IToken {
|
||||
|
||||
/**
|
||||
* Constructs a new Token.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: OracleJob.DefiKingdomsTask.IToken);
|
||||
|
||||
/** Token address. */
|
||||
public address: string;
|
||||
|
||||
/** Token decimals. */
|
||||
public decimals: number;
|
||||
|
||||
/**
|
||||
* Creates a new Token instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns Token instance
|
||||
*/
|
||||
public static create(properties?: OracleJob.DefiKingdomsTask.IToken): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Encodes the specified Token message. Does not implicitly {@link OracleJob.DefiKingdomsTask.Token.verify|verify} messages.
|
||||
* @param message Token message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: OracleJob.DefiKingdomsTask.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified Token message, length delimited. Does not implicitly {@link OracleJob.DefiKingdomsTask.Token.verify|verify} messages.
|
||||
* @param message Token message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: OracleJob.DefiKingdomsTask.IToken, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a Token message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns Token
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Decodes a Token message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns Token
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Verifies a Token message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a Token message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns Token
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): OracleJob.DefiKingdomsTask.Token;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a Token message. Also converts values to other types if specified.
|
||||
* @param message Token
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: OracleJob.DefiKingdomsTask.Token, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this Token to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
}
|
||||
|
||||
/** Properties of an UniswapExchangeRateTask. */
|
||||
interface IUniswapExchangeRateTask {
|
||||
|
||||
|
@ -3619,11 +3655,8 @@ export namespace OracleJob {
|
|||
/** Properties of a CacheTask. */
|
||||
interface ICacheTask {
|
||||
|
||||
/** CacheTask name */
|
||||
name?: (string|null);
|
||||
|
||||
/** CacheTask method */
|
||||
method?: (OracleJob.CacheTask.Method|null);
|
||||
/** CacheTask cacheItems */
|
||||
cacheItems?: (OracleJob.CacheTask.ICacheItem[]|null);
|
||||
}
|
||||
|
||||
/** Represents a CacheTask. */
|
||||
|
@ -3635,11 +3668,8 @@ export namespace OracleJob {
|
|||
*/
|
||||
constructor(properties?: OracleJob.ICacheTask);
|
||||
|
||||
/** CacheTask name. */
|
||||
public name: string;
|
||||
|
||||
/** CacheTask method. */
|
||||
public method: OracleJob.CacheTask.Method;
|
||||
/** CacheTask cacheItems. */
|
||||
public cacheItems: OracleJob.CacheTask.ICacheItem[];
|
||||
|
||||
/**
|
||||
* Creates a new CacheTask instance using the specified properties.
|
||||
|
@ -3714,10 +3744,100 @@ export namespace OracleJob {
|
|||
|
||||
namespace CacheTask {
|
||||
|
||||
/** Method enum. */
|
||||
enum Method {
|
||||
METHOD_GET = 0,
|
||||
METHOD_SET = 1
|
||||
/** Properties of a CacheItem. */
|
||||
interface ICacheItem {
|
||||
|
||||
/** CacheItem variableName */
|
||||
variableName?: (string|null);
|
||||
|
||||
/** CacheItem job */
|
||||
job?: (IOracleJob|null);
|
||||
}
|
||||
|
||||
/** Represents a CacheItem. */
|
||||
class CacheItem implements ICacheItem {
|
||||
|
||||
/**
|
||||
* Constructs a new CacheItem.
|
||||
* @param [properties] Properties to set
|
||||
*/
|
||||
constructor(properties?: OracleJob.CacheTask.ICacheItem);
|
||||
|
||||
/** CacheItem variableName. */
|
||||
public variableName: string;
|
||||
|
||||
/** CacheItem job. */
|
||||
public job?: (IOracleJob|null);
|
||||
|
||||
/**
|
||||
* Creates a new CacheItem instance using the specified properties.
|
||||
* @param [properties] Properties to set
|
||||
* @returns CacheItem instance
|
||||
*/
|
||||
public static create(properties?: OracleJob.CacheTask.ICacheItem): OracleJob.CacheTask.CacheItem;
|
||||
|
||||
/**
|
||||
* Encodes the specified CacheItem message. Does not implicitly {@link OracleJob.CacheTask.CacheItem.verify|verify} messages.
|
||||
* @param message CacheItem message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encode(message: OracleJob.CacheTask.ICacheItem, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Encodes the specified CacheItem message, length delimited. Does not implicitly {@link OracleJob.CacheTask.CacheItem.verify|verify} messages.
|
||||
* @param message CacheItem message or plain object to encode
|
||||
* @param [writer] Writer to encode to
|
||||
* @returns Writer
|
||||
*/
|
||||
public static encodeDelimited(message: OracleJob.CacheTask.ICacheItem, writer?: $protobuf.Writer): $protobuf.Writer;
|
||||
|
||||
/**
|
||||
* Decodes a CacheItem message from the specified reader or buffer.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @param [length] Message length if known beforehand
|
||||
* @returns CacheItem
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): OracleJob.CacheTask.CacheItem;
|
||||
|
||||
/**
|
||||
* Decodes a CacheItem message from the specified reader or buffer, length delimited.
|
||||
* @param reader Reader or buffer to decode from
|
||||
* @returns CacheItem
|
||||
* @throws {Error} If the payload is not a reader or valid buffer
|
||||
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
||||
*/
|
||||
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): OracleJob.CacheTask.CacheItem;
|
||||
|
||||
/**
|
||||
* Verifies a CacheItem message.
|
||||
* @param message Plain object to verify
|
||||
* @returns `null` if valid, otherwise the reason why it is not
|
||||
*/
|
||||
public static verify(message: { [k: string]: any }): (string|null);
|
||||
|
||||
/**
|
||||
* Creates a CacheItem message from a plain object. Also converts values to their respective internal types.
|
||||
* @param object Plain object
|
||||
* @returns CacheItem
|
||||
*/
|
||||
public static fromObject(object: { [k: string]: any }): OracleJob.CacheTask.CacheItem;
|
||||
|
||||
/**
|
||||
* Creates a plain object from a CacheItem message. Also converts values to other types if specified.
|
||||
* @param message CacheItem
|
||||
* @param [options] Conversion options
|
||||
* @returns Plain object
|
||||
*/
|
||||
public static toObject(message: OracleJob.CacheTask.CacheItem, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
||||
|
||||
/**
|
||||
* Converts this CacheItem to JSON.
|
||||
* @returns JSON object
|
||||
*/
|
||||
public toJSON(): { [k: string]: any };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue