Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateConnectionOpts

Hierarchy

Properties

Optional connectionBufferSize

connectionBufferSize: undefined | number

Number of bytes each connection can have in the buffer. Defaults to 65534

Optional connectionId

connectionId: undefined | string

Token in the ILP address uniquely identifying this connection

Optional connectionTag

connectionTag: undefined | string

User-specified connection identifier that was passed into [generateAddressAndSecret]{@link Server#generateAddressAndSecret}

destinationAccount

destinationAccount: string

ILP Address of the server

Optional enablePadding

enablePadding: undefined | false | true

Pad packets to the maximum size (data field of 32767 bytes). False by default

Optional exchangeRate

exchangeRate: undefined | number

Fixed exchange rate. When set, the connection skips the packet volley step. Note that the minimum acceptable exchange rate is usually slightly lower than this (depending on the connection's slippage).

This option should usually be used in concert with ConnectionOpts.maximumPacketAmount.

This option should usually be used in concert with ConnectionOpts.maximumPacketAmount.

Optional getExpiry

getExpiry: undefined | function

Returns the expiry to use for an ILP Prepare to the specified destination. When omitted, use a timeout of 30 seconds.

Optional idleTimeout

idleTimeout: undefined | number

Inactivity timeout (milliseconds)

Optional maxRemoteStreams

maxRemoteStreams: undefined | number

Maximum number of streams the other entity can have open at once. Defaults to 10

Optional maximumPacketAmount

maximumPacketAmount: undefined | string

Fixed maximum packet amount. When set, the connection's maximum packet amount is the minimum of this setting and the path's discovered maximum amount.

Optional minExchangeRatePrecision

minExchangeRatePrecision: undefined | number

Minimum Precision to use when determining the exchange rate

plugin

plugin: Plugin

Ledger plugin (V2)

Optional receiptNonce

receiptNonce: Buffer

User-specified receipt nonce that was passed into [generateAddressAndSecret]{@link Server#generateAddressAndSecret}

Optional receiptSecret

receiptSecret: Buffer

User-specified receipt secret that was passed into [generateAddressAndSecret]{@link Server#generateAddressAndSecret}

sharedSecret

sharedSecret: Buffer

Shared secret generated by the server

Optional shouldFulfill

shouldFulfill: undefined | function

Callback for the consumer to perform accounting and choose to fulfill an incoming ILP Prepare, given the amount received, a unique identifier for the packet, and connectionTag.

If the returned Promise is resolved, the ILP Prepare will be fulfilled; if it is rejected, the ILP Prepare will be rejected. The ILP Fulfill will be immediately sent back after the Promise is resolved.

Note: a misbehaving sender can trigger duplicate packetIds, which should be ignored and rejected.

If the returned Promise is resolved, the ILP Prepare will be fulfilled; if it is rejected, the ILP Prepare will be rejected. The ILP Fulfill will be immediately sent back after the Promise is resolved.

Note: a misbehaving sender can trigger duplicate packetIds, which should be ignored and rejected.

Optional slippage

slippage: undefined | number

Specifies how much worse than the initial test packet that the exchange rate is allowed to get before packets are rejected

Optional sourceAccount

sourceAccount: undefined | string

ILP Address of the plugin

Generated using TypeDoc