Artifact Content
Not logged in

Artifact 058bf7a708fb1f2fad881f16f861807ab91066e7:


InterledgerQuotingProtocol
DEFINITIONS
AUTOMATIC TAGS ::=
BEGIN

IMPORTS
    UInt32,
    UInt64
    FROM GenericTypes

    Address,
    LiquidityCurve
    FROM InterledgerTypes
;

-- Request to receive liquidity information between the current ledger and the
-- destination account. This information is sufficient to locally quote any
-- amount until the curve expires.
QuoteLiquidityRequestData ::= SEQUENCE {
    destinationAccount Address,
    -- How much time the receiver needs to fulfill the payment (in milliseconds)
    destinationHoldDuration UInt32,

    -- Enable ASN.1 Extensibility
    extensions SEQUENCE {
        ...
    }
}

QuoteLiquidityResponseData ::= SEQUENCE {
    -- Curve describing the liquidity (relationship between input and output
    -- amounts) for the quoted route
    liquidity LiquidityCurve,
    -- Common prefix of all addresses for which this liquidity curve applies.
    -- If the curve only applies to the destinationAccount requested this MUST
    -- be set equal to that address. If the curve applies to other accounts
    -- with a certain prefix, this value should be set to that prefix. For more
    -- on ILP Address Prefixes, see IL-RFC-0015:
    -- https://interledger.org/rfcs/0015-ilp-addresses/
    appliesToPrefix Address,
    -- How long the sender should put money on hold (in milliseconds)
    sourceHoldDuration UInt32,
    -- Maximum time where the connector (and any connectors after it) expects to
    -- be able to honor this liquidity curve. Note that a quote in ILP is
    -- non-committal, meaning that the liquidity is only likely to be available,
    -- but not reserved and therefore not guaranteed.
    expiresAt GeneralizedTime,

    -- Enable ASN.1 Extensibility
    extensions SEQUENCE {
        ...
    }
}

-- Quoting with a specified source amount to determine destination amount
QuoteBySourceAmountRequestData ::= SEQUENCE {
    destinationAccount Address,
    sourceAmount UInt64,
    -- How much time the receiver needs to fulfill the payment (in milliseconds)
    destinationHoldDuration UInt32,

    -- Enable ASN.1 Extensibility
    extensions SEQUENCE {
        ...
    }
}

QuoteBySourceAmountResponseData ::= SEQUENCE {
    -- Amount that will arrive at the receiver
    destinationAmount UInt64,
    -- How long the sender should put money on hold (in milliseconds)
    sourceHoldDuration UInt32,

    -- Enable ASN.1 Extensibility
    extensions SEQUENCE {
        ...
    }
}

-- Quoting with a specified destination amount to determine source amount
QuoteByDestinationAmountRequestData ::= SEQUENCE {
    destinationAccount Address,
    destinationAmount UInt64,
    -- How much time the receiver needs to fulfill the payment (in milliseconds)
    destinationHoldDuration UInt32,

    -- Enable ASN.1 Extensibility
    extensions SEQUENCE {
        ...
    }
}

QuoteByDestinationAmountResponseData ::= SEQUENCE {
    -- Amount the sender needs to send based on the requested destination amount
    sourceAmount UInt64,
    -- How long the sender should put money on hold (in milliseconds)
    sourceHoldDuration UInt32,

    -- Enable ASN.1 Extensibility
    extensions SEQUENCE {
        ...
    }
}

END