Artifact Content
Not logged in

Artifact cd81f8cd977833153d75b20febae0295ec771ab8:


InterledgerQuotingProtocol DEFINITIONS AUTOMATIC TAGS ::=
BEGIN

IMPORTS
    UInt32,
    UInt64,
    UInt128,
    FROM GenericTypes

    Address,
    Timestamp,
    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.
QuoteLiquidityRequest ::= SEQUENCE {
    requestId UInt128,
    destinationAccount Address,
    -- How much time the receiver needs to fulfill the payment (in milliseconds)
    destinationHoldDuration UInt32,

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

QuoteLiquidityResponse ::= SEQUENCE {
    requestId UInt128,
    -- 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 Timestamp,

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

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

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

QuoteBySourceAmountResponse ::= SEQUENCE {
    requestId UInt128,
    -- 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
QuoteByDestinationAmountRequest ::= SEQUENCE {
    requestId UInt128,
    destinationAccount Address,
    destinationAmount UInt64,
    -- How much time the receiver needs to fulfill the payment (in milliseconds)
    destinationHoldDuration UInt32,

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

QuoteByDestinationAmountResponse ::= SEQUENCE {
    requestId UInt128,
    -- 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