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
- getQuoteIssuer
- getTimerService
- makeQuoteNotifier
- mutableQuoteWhenGT
- mutableQuoteWhenGTE
- mutableQuoteWhenLT
- mutableQuoteWhenLTE
- quoteAtTime
- quoteGiven
- quoteWanted
- quoteWhenGT
- quoteWhenGTE
- quoteWhenLT
- quoteWhenLTE
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
Name | Type |
---|---|
brandIn | Brand <AssetKind > |
brandOut | Brand <AssetKind > |
Returns
ERef
<Issuer
<"set"
>>
Defined in
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
Name | Type |
---|---|
brandIn | Brand <AssetKind > |
brandOut | Brand <AssetKind > |
Returns
ERef
<TimerService
>
Defined in
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
Name | Type |
---|---|
amountIn | Amount <"nat" > |
brandOut | Brand <"nat" > |
Returns
ERef
<Notifier
<PriceQuote
>>
Defined in
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
Name | Type |
---|---|
amountIn | Amount <AssetKind > |
amountOutLimit | Amount <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
Name | Type |
---|---|
amountIn | Amount <AssetKind > |
amountOutLimit | Amount <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
Name | Type |
---|---|
amountIn | Amount <AssetKind > |
amountOutLimit | Amount <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
Name | Type |
---|---|
amountIn | Amount <AssetKind > |
amountOutLimit | Amount <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
Name | Type |
---|---|
deadline | Timestamp |
amountIn | Amount <"nat" > |
brandOut | Brand <"nat" > |
Returns
Promise
<PriceQuote
>
Defined in
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
Name | Type |
---|---|
amountIn | Amount <"nat" > |
brandOut | Brand <"nat" > |
Returns
Promise
<PriceQuote
>
Defined in
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
Name | Type |
---|---|
brandIn | Brand <"nat" > |
amountOut | Amount <"nat" > |
Returns
Promise
<PriceQuote
>
Defined in
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
Name | Type |
---|---|
amountIn | Amount <"nat" > |
amountOutLimit | Amount <"nat" > |
Returns
Promise
<PriceQuote
>
Defined in
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
Name | Type |
---|---|
amountIn | Amount <"nat" > |
amountOutLimit | Amount <"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
Name | Type |
---|---|
amountIn | Amount <AssetKind > |
amountOutLimit | Amount <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
Name | Type |
---|---|
amountIn | Amount <AssetKind > |
amountOutLimit | Amount <AssetKind > |
Returns
Promise
<PriceQuote
>