PriceOracle.ts
This module provides a service for determining USD pricing of a given chain’s gas denomination.
Added in v2.0.0
Signature
export declare class PriceError
Added in v2.0.0
Source: src/PriceOracle.ts:40
{@see https://www.bandprotocol.com/}
Signature
export declare const Band: Layer.Layer<PriceOracle, never, never>
Source: src/PriceOracle.ts:489
Added in v2.0.0
{@see https://www.pyth.network/}
Signature
export declare const Pyth: Layer.Layer<PriceOracle, PriceError, never>
Source: src/PriceOracle.ts:118
Added in v2.0.0
{@see https://www.redstone.finance/}
Signature
export declare const Redstone: Layer.Layer<PriceOracle, PriceError, never>
Source: src/PriceOracle.ts:307
Added in v2.0.0
Signature
export declare const PriceResult: S.Struct<{ price: S.refine<BigDecimal.BigDecimal, typeof S.BigDecimalFromNumber> source: S.Struct<{ url: typeof S.URL; metadata: S.Option<S.Record$<typeof S.NonEmptyString, typeof S.Any>> }>}>
Source: src/PriceOracle.ts:69
Added in v2.0.0
Signature
export type PriceResult = typeof PriceResult.Type
Source: src/PriceOracle.ts:83
Added in v2.0.0
Details about the source of pricing data.
Signature
export declare const PriceSource: S.Struct<{ url: typeof S.URL metadata: S.Option<S.Record$<typeof S.NonEmptyString, typeof S.Any>>}>
Source: src/PriceOracle.ts:52
Added in v2.0.0
Signature
export type PriceSource = typeof PriceSource.Type
Source: src/PriceOracle.ts:63
Added in v2.0.0
Signature
export declare class PriceOracle
Added in v2.0.0
Source: src/PriceOracle.ts:107
Signature
export declare const LivePlan: ExecutionPlan.ExecutionPlan<{ provides: PriceOracle input: unknown error: PriceError requirements: never}>
Source: src/PriceOracle.ts:679
Added in v2.0.0
Added in v2.0.0
Signature
export interface Service { readonly of: (id: UniversalChainId) => Effect.Effect<PriceResult, PriceError> readonly ratio: ( from: UniversalChainId, to: UniversalChainId ) => Effect.Effect< { ratio: BigDecimal.BigDecimal source: PriceSource destination: PriceSource }, PriceError > readonly stream: (id: UniversalChainId) => Stream.Stream<PriceResult, PriceError>}
Source: src/PriceOracle.ts:92
Added in v2.0.0
Signature
export declare class PriceOracleExecutor
Added in v2.0.0
Source: src/PriceOracle.ts:706