Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 2.3 KB

settlement-factory.md

File metadata and controls

53 lines (36 loc) · 2.3 KB

nahmii-sdk

SettlementFactory ⏏

SettlementFactory A class for creating settlement objects.

Kind: Exported class

new SettlementFactory(provider)

Constructor

Param Type Description
provider NahmiiProvider A NahmiiProvider instance

settlementFactory.calculateRequiredSettlements(address, stageMonetaryAmount) ⇒ Promise

Calculates and returns the required settlements based on the intended stage amount

Kind: instance method of SettlementFactory
Returns: Promise - A promise that resolves into an array containing the required settlement instances to start with.

Param Type Description
address EthereumAddress | string The ethereum address
stageMonetaryAmount MonetaryAmount The intended stage amount in a currency

settlementFactory.getAllSettlements(address, ct) ⇒ Promise

Returns the existing settlements under a wallet/currency pair

Kind: instance method of SettlementFactory
Returns: Promise - A promise that resolves into an array containing the settlement instances.

Param Type Description
address EthereumAddress | string The ethereum address
ct EthereumAddress | string The currency address