Skip to content

API documentation of Agoric SDK / Exports / @agoric/zoe / tools/types-ambient / PriceAuthority

Interface: PriceAuthority

@agoric/zoe.tools/types-ambient.PriceAuthority

An object that mints PriceQuotes and handles triggers and notifiers for changes in the price

Table of contents

Properties

Properties

getQuoteIssuer

getQuoteIssuer: (brandIn: Brand<AssetKind>, brandOut: Brand<AssetKind>) => ERef<Issuer<"set">>

Get the ERTP issuer of PriceQuotes for a given brandIn/brandOut pair

Type declaration

▸ (brandIn, brandOut): ERef<Issuer<"set">>

Parameters
NameType
brandInBrand<AssetKind>
brandOutBrand<AssetKind>
Returns

ERef<Issuer<"set">>

Defined in

zoe/tools/types-ambient.js:66


getTimerService

getTimerService: (brandIn: Brand<AssetKind>, brandOut: Brand<AssetKind>) => ERef<TimerService>

Get the timer used in PriceQuotes for a given brandIn/brandOut pair

Type declaration

▸ (brandIn, brandOut): ERef<TimerService>

Parameters
NameType
brandInBrand<AssetKind>
brandOutBrand<AssetKind>
Returns

ERef<TimerService>

Defined in

zoe/tools/types-ambient.js:71


makeQuoteNotifier

makeQuoteNotifier: (amountIn: Amount<"nat">, brandOut: Brand<"nat">) => ERef<Notifier<PriceQuote>>

Be notified of the latest PriceQuotes for a given amountIn. The rate at which these are issued may be very different between priceAuthorities.

Type declaration

▸ (amountIn, brandOut): ERef<Notifier<PriceQuote>>

Parameters
NameType
amountInAmount<"nat">
brandOutBrand<"nat">
Returns

ERef<Notifier<PriceQuote>>

Defined in

zoe/tools/types-ambient.js:76


mutableQuoteWhenGT

mutableQuoteWhenGT: (amountIn: Amount<AssetKind>, amountOutLimit: Amount<AssetKind>) => ERef<MutableQuote>

Resolve when a price quote of amountIn exceeds amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): ERef<MutableQuote>

Parameters
NameType
amountInAmount<AssetKind>
amountOutLimitAmount<AssetKind>
Returns

ERef<MutableQuote>

Defined in

zoe/tools/types-ambient.js:120


mutableQuoteWhenGTE

mutableQuoteWhenGTE: (amountIn: Amount<AssetKind>, amountOutLimit: Amount<AssetKind>) => ERef<MutableQuote>

Resolve when a price quote of amountIn reaches or exceeds amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): ERef<MutableQuote>

Parameters
NameType
amountInAmount<AssetKind>
amountOutLimitAmount<AssetKind>
Returns

ERef<MutableQuote>

Defined in

zoe/tools/types-ambient.js:125


mutableQuoteWhenLT

mutableQuoteWhenLT: (amountIn: Amount<AssetKind>, amountOutLimit: Amount<AssetKind>) => ERef<MutableQuote>

Resolve when the price quote of amountIn drops below amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): ERef<MutableQuote>

Parameters
NameType
amountInAmount<AssetKind>
amountOutLimitAmount<AssetKind>
Returns

ERef<MutableQuote>

Defined in

zoe/tools/types-ambient.js:137


mutableQuoteWhenLTE

mutableQuoteWhenLTE: (amountIn: Amount<AssetKind>, amountOutLimit: Amount<AssetKind>) => ERef<MutableQuote>

Resolve when a price quote of amountIn reaches or drops below amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): ERef<MutableQuote>

Parameters
NameType
amountInAmount<AssetKind>
amountOutLimitAmount<AssetKind>
Returns

ERef<MutableQuote>

Defined in

zoe/tools/types-ambient.js:131


quoteAtTime

quoteAtTime: (deadline: Timestamp, amountIn: Amount<"nat">, brandOut: Brand<"nat">) => Promise<PriceQuote>

Resolves after deadline passes on the priceAuthority's timerService with the price quote of amountIn at that time

Type declaration

▸ (deadline, amountIn, brandOut): Promise<PriceQuote>

Parameters
NameType
deadlineTimestamp
amountInAmount<"nat">
brandOutBrand<"nat">
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:84


quoteGiven

quoteGiven: (amountIn: Amount<"nat">, brandOut: Brand<"nat">) => Promise<PriceQuote>

Get a quote corresponding to the specified amountIn

Type declaration

▸ (amountIn, brandOut): Promise<PriceQuote>

Parameters
NameType
amountInAmount<"nat">
brandOutBrand<"nat">
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:90


quoteWanted

quoteWanted: (brandIn: Brand<"nat">, amountOut: Amount<"nat">) => Promise<PriceQuote>

Get a quote corresponding to the specified amountOut

Type declaration

▸ (brandIn, amountOut): Promise<PriceQuote>

Parameters
NameType
brandInBrand<"nat">
amountOutAmount<"nat">
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:94


quoteWhenGT

quoteWhenGT: (amountIn: Amount<"nat">, amountOutLimit: Amount<"nat">) => Promise<PriceQuote>

Resolve when a price quote of amountIn exceeds amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): Promise<PriceQuote>

Parameters
NameType
amountInAmount<"nat">
amountOutLimitAmount<"nat">
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:99


quoteWhenGTE

quoteWhenGTE: (amountIn: Amount<"nat">, amountOutLimit: Amount<"nat">) => Promise<PriceQuote>

Resolve when a price quote of amountIn reaches or exceeds amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): Promise<PriceQuote>

Parameters
NameType
amountInAmount<"nat">
amountOutLimitAmount<"nat">
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:104


quoteWhenLT

quoteWhenLT: (amountIn: Amount<AssetKind>, amountOutLimit: Amount<AssetKind>) => Promise<PriceQuote>

Resolve when the price quote of amountIn drops below amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): Promise<PriceQuote>

Parameters
NameType
amountInAmount<AssetKind>
amountOutLimitAmount<AssetKind>
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:115


quoteWhenLTE

quoteWhenLTE: (amountIn: Amount<AssetKind>, amountOutLimit: Amount<AssetKind>) => Promise<PriceQuote>

Resolve when a price quote of amountIn reaches or drops below amountOutLimit

Type declaration

▸ (amountIn, amountOutLimit): Promise<PriceQuote>

Parameters
NameType
amountInAmount<AssetKind>
amountOutLimitAmount<AssetKind>
Returns

Promise<PriceQuote>

Defined in

zoe/tools/types-ambient.js:109