# Class HavenoClient

Haveno daemon client.

#### Hierarchy

- HavenoClient

- Defined in src/HavenoClient.ts:30

#####
Index

### Constructors

constructor

### Methods

accountExists
addMoneroConnection
addNotificationListener
backupAccount
changePassword
checkMoneroConnection
checkMoneroConnections
closeAccount
completeTrade
confirmPaymentReceived
confirmPaymentSent
createAccount
createCryptoPaymentAccount
createPaymentAccount
createXmrTx
deleteAccount
deletePaymentAccount
disconnect
getAppName
getAutoSwitch
getBalances
getBestAvailableConnection
getChatMessages
getDispute
getDisputes
getMarketDepth
getMoneroConnection
getMoneroConnections
getMoneroNodeSettings
getMyOffer
getMyOffers
getOffers
getPaymentAccount
getPaymentAccountForm
getPaymentAccountPayloadForm
getPaymentAccounts
getPaymentMethods
getPrice
getPricedAssetCodes
getPrices
getProcess
getTrade
getTradeStatistics
getTrades
getUrl
getVersion
getWalletRpcPort
getXmrNewSubaddress
getXmrPrimaryAddress
getXmrSeed
getXmrTx
getXmrTxs
isAccountOpen
isConnectedToDaemon
isConnectedToMonero
isMoneroNodeOnline
openAccount
openDispute
postOffer
registerDisputeAgent
relayXmrTx
removeMoneroConnection
removeNotificationListener
removeOffer
resolveDispute
restoreAccount
sendChatMessage
sendDisputeChatMessage
setAutoSwitch
setMoneroConnection
setProcessLogging
shutdownServer
startCheckingConnection
startMoneroNode
stopCheckingConnection
stopMoneroNode
takeOffer
unregisterDisputeAgent
validateFormField
startProcess

## Constructors

### constructor

- new HavenoClient(url: string, password: string): HavenoClient

- Construct a client connected to a Haveno daemon.

  #### Parameters

  - ##### url: string

    Haveno daemon url

  - ##### password: string

    Haveno daemon password

  #### Returns HavenoClient

  - Defined in src/HavenoClient.ts:72

## Methods

### accountExists

- accountExists(): Promise<boolean>

- Indicates if the Haveno account is created.

  ### Returns

  true if the account is created, false otherwise

  #### Returns Promise<boolean>

  - Defined in src/HavenoClient.ts:269

### addMoneroConnection

- addMoneroConnection(connection: string | UrlConnection): Promise<void>

- Add a Monero daemon connection.

  #### Parameters

  - ##### connection: string | UrlConnection

    daemon url or connection to add

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:446

### addNotificationListener

- addNotificationListener(listener: ((_notification: NotificationMessage) => void)): Promise<void>

- Add a listener to receive notifications from the Haveno daemon.

  #### Parameters

  - ##### listener: ((_notification: NotificationMessage) => void)

    the notification listener to add

    - - (_notification: NotificationMessage): void

      - #### Parameters

        - ##### _notification: NotificationMessage

        #### Returns void

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:412

### backupAccount

- backupAccount(stream: any): Promise<number>

- Backup the account to the given stream. TODO: stream type?

  #### Parameters

  - ##### stream: any

  #### Returns Promise<number>

  - Defined in src/HavenoClient.ts:359

### changePassword

- changePassword(oldPassword: string, newPassword: string): Promise<void>

- Change the Haveno account password.

  #### Parameters

  - ##### oldPassword: string

  - ##### newPassword: string

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:323

### checkMoneroConnection

- checkMoneroConnection(): Promise<undefined | UrlConnection>

- Check the current Monero daemon connection.

  If disconnected and auto switch enabled, switch to the best available connection and return its status.

  ### Returns

  the current daemon connection status, undefined if no current connection

  #### Returns Promise<undefined | UrlConnection>

  - Defined in src/HavenoClient.ts:521

### checkMoneroConnections

- checkMoneroConnections(): Promise<UrlConnection[]>

- Check all Monero daemon connections.

  ### Returns

  status of all managed connections.

  #### Returns Promise<UrlConnection[]>

  - Defined in src/HavenoClient.ts:534

### closeAccount

- closeAccount(): Promise<void>

- Close the currently open account.

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:337

### completeTrade

- completeTrade(tradeId: string): Promise<void>

- Acknowledge that a trade has completed.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1198

### confirmPaymentReceived

- confirmPaymentReceived(tradeId: string): Promise<void>

- Confirm a payment is received.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1185

### confirmPaymentSent

- confirmPaymentSent(tradeId: string): Promise<void>

- Confirm a payment is sent.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1172

### createAccount

- createAccount(password: string): Promise<void>

- Create and open a new Haveno account.

  #### Parameters

  - ##### password: string

    the password to encrypt the account

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:295

### createCryptoPaymentAccount

- createCryptoPaymentAccount(accountName: string, assetCode: string, address: string): Promise<PaymentAccount>

- Create a crypto payment account.

  ### Returns

  the created payment account

  #### Parameters

  - ##### accountName: string

    description of the account

  - ##### assetCode: string

    traded asset code

  - ##### address: string

    payment address of the account

  #### Returns Promise<PaymentAccount>

  - Defined in src/HavenoClient.ts:962

### createPaymentAccount

- createPaymentAccount(paymentAccountForm: PaymentAccountForm): Promise<PaymentAccount>

- Create a payment account.

  ### Returns

  the created payment account

  #### Parameters

  - ##### paymentAccountForm: PaymentAccountForm

    the completed form to create the payment account

  #### Returns Promise<PaymentAccount>

  - Defined in src/HavenoClient.ts:946

### createXmrTx

- createXmrTx(destinations: XmrDestination[]): Promise<XmrTx>

- Create but do not relay a transaction to send funds from the Monero wallet.

  ### Returns

  the created transaction

  #### Parameters

  - ##### destinations: XmrDestination[]

  #### Returns Promise<XmrTx>

  - Defined in src/HavenoClient.ts:767

### deleteAccount

- deleteAccount(): Promise<void>

- Permanently delete the Haveno account.

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:348

### deletePaymentAccount

- deletePaymentAccount(paymentAccountId: string): Promise<void>

- Delete a payment account.

  #### Parameters

  - ##### paymentAccountId: string

    the id of the payment account to delete

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:980

### disconnect

- disconnect(): Promise<void>

- Disconnect this client from the server.

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1320

### getAppName

- getAppName(): undefined | string

- Get the name of the Haveno application folder.

  #### Returns undefined | string

  - Defined in src/HavenoClient.ts:233

### getAutoSwitch

- getAutoSwitch(): Promise<boolean>

- Get the current auto switch setting.

  ### Returns

  whether auto switch is enabled or disabled

  #### Returns Promise<boolean>

  - Defined in src/HavenoClient.ts:597

### getBalances

- getBalances(): Promise<XmrBalanceInfo>

- Get the user's balances.

  ### Returns

  the user's balances

  #### Returns Promise<XmrBalanceInfo>

  - Defined in src/HavenoClient.ts:688

### getBestAvailableConnection

- getBestAvailableConnection(): Promise<undefined | UrlConnection>

- Get the best available connection in order of priority then response time.

  ### Returns

  the best available connection in order of priority then response time, undefined if no connections available

  #### Returns Promise<undefined | UrlConnection>

  - Defined in src/HavenoClient.ts:571

### getChatMessages

- getChatMessages(tradeId: string): Promise<ChatMessage[]>

- Get all chat messages for a trade.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  #### Returns Promise<ChatMessage[]>

  - Defined in src/HavenoClient.ts:1211

### getDispute

- getDispute(tradeId: string): Promise<Dispute>

- Get a dispute by trade id.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  #### Returns Promise<Dispute>

  - Defined in src/HavenoClient.ts:1242

### getDisputes

- getDisputes(): Promise<Dispute[]>

- Get all disputes.

  #### Returns Promise<Dispute[]>

  - Defined in src/HavenoClient.ts:1253

### getMarketDepth

- getMarketDepth(assetCode: string): Promise<MarketDepthInfo>

- Get the market depth of a currency.

  ### Returns

  market depth of the given currency

  #### Parameters

  - ##### assetCode: string

    asset to get the market depth of

  #### Returns Promise<MarketDepthInfo>

  - Defined in src/HavenoClient.ts:834

### getMoneroConnection

- getMoneroConnection(): Promise<undefined | UrlConnection>

- Get the current Monero daemon connection.

  ### Returns

  the current daemon connection, undefined if no current connection

  #### Returns Promise<undefined | UrlConnection>

  - Defined in src/HavenoClient.ts:472

### getMoneroConnections

- getMoneroConnections(): Promise<UrlConnection[]>

- Get all Monero daemon connections.

  ### Returns

  all daemon connections

  #### Returns Promise<UrlConnection[]>

  - Defined in src/HavenoClient.ts:485

### getMoneroNodeSettings

- getMoneroNodeSettings(): Promise<undefined | XmrNodeSettings>

- Gets the current local monero node settings.

  #### Returns Promise<undefined | XmrNodeSettings>

  - Defined in src/HavenoClient.ts:619

### getMyOffer

- getMyOffer(offerId: string): Promise<OfferInfo>

- Get my offer by id.

  ### Returns

  the user's created offer

  #### Parameters

  - ##### offerId: string

    id of the user's created offer

  #### Returns Promise<OfferInfo>

  - Defined in src/HavenoClient.ts:1028

### getMyOffers

- getMyOffers(assetCode?: string, direction?: OfferDirection): Promise<OfferInfo[]>

- Get the user's posted offers to buy or sell XMR.

  ### Returns

  the user's created offers

  #### Parameters

  - ##### `Optional` assetCode: string

    traded asset code

  - ##### `Optional` direction: OfferDirection

    get offers to buy or sell XMR (default all)

  #### Returns Promise<OfferInfo[]>

  - Defined in src/HavenoClient.ts:1011

### getOffers

- getOffers(assetCode: string, direction?: OfferDirection): Promise<OfferInfo[]>

- Get available offers to buy or sell XMR.

  ### Returns

  the available offers

  #### Parameters

  - ##### assetCode: string

    traded asset code

  - ##### `Optional` direction: OfferDirection

    "buy" or "sell" (default all)

  #### Returns Promise<OfferInfo[]>

  - Defined in src/HavenoClient.ts:995

### getPaymentAccount

- getPaymentAccount(paymentAccountId: string): Promise<PaymentAccount>

- Get a payment account by id.

  ### Returns

  the payment account

  #### Parameters

  - ##### paymentAccountId: string

    the payment account id to get

  #### Returns Promise<PaymentAccount>

  - Defined in src/HavenoClient.ts:883

### getPaymentAccountForm

- getPaymentAccountForm(paymentMethodId: string | FormId): Promise<PaymentAccountForm>

- Get a form for the given payment method to complete and create a new payment account.

  ### Returns

  the payment account form

  #### Parameters

  - ##### paymentMethodId: string | FormId

    the id of the payment method

  #### Returns Promise<PaymentAccountForm>

  - Defined in src/HavenoClient.ts:898

### getPaymentAccountPayloadForm

- getPaymentAccountPayloadForm(paymentAccountPayload: PaymentAccountPayload): Promise<PaymentAccountForm>

- Get a form from the given payment account payload.

  ### Returns

  the payment account form

  #### Parameters

  - ##### paymentAccountPayload: PaymentAccountPayload

    payload to get as a form

  #### Returns Promise<PaymentAccountForm>

  - Defined in src/HavenoClient.ts:913

### getPaymentAccounts

- getPaymentAccounts(): Promise<PaymentAccount[]>

- Get payment accounts.

  ### Returns

  the payment accounts

  #### Returns Promise<PaymentAccount[]>

  - Defined in src/HavenoClient.ts:869

### getPaymentMethods

- getPaymentMethods(assetCode?: string): Promise<PaymentMethod[]>

- Get payment methods.

  ### Returns

  the payment methods

  #### Parameters

  - ##### `Optional` assetCode: string

    get payment methods supporting this asset code (optional)

  #### Returns Promise<PaymentMethod[]>

  - Defined in src/HavenoClient.ts:848

### getPrice

- getPrice(assetCode: string): Promise<number>

- Get the current market price per 1 XMR in the given currency.

  ### Returns

  the price of the asset per 1 XMR

  #### Parameters

  - ##### assetCode: string

    asset code to get the price of

  #### Returns Promise<number>

  - Defined in src/HavenoClient.ts:807

### getPricedAssetCodes

- getPricedAssetCodes(): Promise<string[]>

- Get all asset codes with price information.

  TODO: replace this with getSupportedAssetCodes(): Promise<TradeCurrency[]>)

  ### Returns

  all supported trade assets

  #### Returns Promise<string[]>

  - Defined in src/HavenoClient.ts:795

### getPrices

- getPrices(): Promise<MarketPriceInfo[]>

- Get the current market prices of all a.

  ### Returns

  prices of the assets per 1 XMR

  #### Returns Promise<MarketPriceInfo[]>

  - Defined in src/HavenoClient.ts:820

### getProcess

- getProcess(): any

- Return the process running the haveno daemon.

  ### Returns

  the process running the haveno daemon

  #### Returns any

  - Defined in src/HavenoClient.ts:198

### getTrade

- getTrade(tradeId: string): Promise<TradeInfo>

- Get a trade by id.

  ### Returns

  the trade with the given id

  #### Parameters

  - ##### tradeId: string

    the id of the trade and its offer

  #### Returns Promise<TradeInfo>

  - Defined in src/HavenoClient.ts:1133

### getTradeStatistics

- getTradeStatistics(): Promise<TradeStatistics3[]>

- Get all trade statistics.

  ### Returns

  all user trades

  #### Returns Promise<TradeStatistics3[]>

  - Defined in src/HavenoClient.ts:1146

### getTrades

- getTrades(): Promise<TradeInfo[]>

- Get all trades.

  ### Returns

  all user trades

  #### Returns Promise<TradeInfo[]>

  - Defined in src/HavenoClient.ts:1159

### getUrl

- getUrl(): string

- Get the URL of the Haveno daemon.

  ### Returns

  the URL of the Haveno daemon

  #### Returns string

  - Defined in src/HavenoClient.ts:217

### getVersion

- getVersion(): Promise<string>

- Get the Haveno version.

  ### Returns

  the Haveno daemon version

  #### Returns Promise<string>

  - Defined in src/HavenoClient.ts:242

### getWalletRpcPort

- getWalletRpcPort(): undefined | number

- Get the port of the primary wallet rpc instance if known.

  ### Returns

  the port of the primary wallet rpc instance if known

  #### Returns undefined | number

  - Defined in src/HavenoClient.ts:226

### getXmrNewSubaddress

- getXmrNewSubaddress(): Promise<string>

- Get a new subaddress in the Monero wallet to receive deposits.

  ### Returns

  the deposit address (a subaddress in the Haveno wallet)

  #### Returns Promise<string>

  - Defined in src/HavenoClient.ts:727

### getXmrPrimaryAddress

- getXmrPrimaryAddress(): Promise<string>

- Get the primary address of the Monero wallet.

  ### Returns

  the primary address of the Monero wallet

  #### Returns Promise<string>

  - Defined in src/HavenoClient.ts:714

### getXmrSeed

- getXmrSeed(): Promise<string>

- Get the mnemonic seed phrase of the Monero wallet.

  ### Returns

  the mnemonic seed phrase of the Monero wallet

  #### Returns Promise<string>

  - Defined in src/HavenoClient.ts:701

### getXmrTx

- getXmrTx(txHash: string): Promise<undefined | XmrTx>

- Get a transaction by hash in the Monero wallet.

  ### Returns

  the transaction with the hash

  #### Parameters

  - ##### txHash: string

    hash of the transaction to get

  #### Returns Promise<undefined | XmrTx>

  - Defined in src/HavenoClient.ts:754

### getXmrTxs

- getXmrTxs(): Promise<XmrTx[]>

- Get all transactions in the Monero wallet.

  ### Returns

  the transactions

  #### Returns Promise<XmrTx[]>

  - Defined in src/HavenoClient.ts:740

### isAccountOpen

- isAccountOpen(): Promise<boolean>

- Indicates if the Haveno account is open and authenticated with the correct password.

  ### Returns

  true if the account is open and authenticated, false otherwise

  #### Returns Promise<boolean>

  - Defined in src/HavenoClient.ts:282

### isConnectedToDaemon

- isConnectedToDaemon(): Promise<boolean>

- Indicates if connected and authenticated with the Haveno daemon.

  ### Returns

  true if connected with the Haveno daemon, false otherwise

  #### Returns Promise<boolean>

  - Defined in src/HavenoClient.ts:255

### isConnectedToMonero

- isConnectedToMonero(): Promise<boolean>

- Indicates if connected to the Monero network based on last connection check.

  ### Returns

  true if connected to the Monero network, false otherwise

  #### Returns Promise<boolean>

  - Defined in src/HavenoClient.ts:434

### isMoneroNodeOnline

- isMoneroNodeOnline(): Promise<boolean>

- Returns whether daemon is running a local monero node.

  #### Returns Promise<boolean>

  - Defined in src/HavenoClient.ts:608

### openAccount

- openAccount(password: string): Promise<void>

- Open existing Haveno account.

  #### Parameters

  - ##### password: string

    the account password

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:309

### openDispute

- openDispute(tradeId: string): Promise<void>

- Open a dispute for a trade.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1266

### postOffer

- postOffer(direction: OfferDirection, amount: bigint, assetCode: string, paymentAccountId: string, securityDepositPct: number, price?: number, marketPriceMarginPct?: number, triggerPrice?: number, minAmount?: bigint, reserveExactAmount?: boolean, isPrivateOffer?: boolean, buyerAsTakerWithoutDeposit?: boolean): Promise<OfferInfo>

- Post an offer.

  ### Returns

  the posted offer

  #### Parameters

  - ##### direction: OfferDirection

    "buy" or "sell" XMR

  - ##### amount: bigint

    amount of XMR to trade

  - ##### assetCode: string

    asset code to trade for XMR

  - ##### paymentAccountId: string

    payment account id

  - ##### securityDepositPct: number

    security deposit as % of trade amount for buyer and seller

  - ##### `Optional` price: number

    trade price (optional, default to market price)

  - ##### `Optional` marketPriceMarginPct: number

    if using market price, % from market price to accept (optional, default 0%)

  - ##### `Optional` triggerPrice: number

    price to remove offer (optional)

  - ##### `Optional` minAmount: bigint

    minimum amount to trade (optional, default to fixed amount)

  - ##### `Optional` reserveExactAmount: boolean

    reserve exact amount needed for offer, incurring on-chain transaction and 10 confirmations before the offer goes live (default = false)

  - ##### `Optional` isPrivateOffer: boolean

    whether the offer is private (default = false)

  - ##### `Optional` buyerAsTakerWithoutDeposit: boolean

    waive buyer as taker deposit and fee (default false)

  #### Returns Promise<OfferInfo>

  - Defined in src/HavenoClient.ts:1053

### registerDisputeAgent

- registerDisputeAgent(disputeAgentType: string, registrationKey: string): Promise<void>

- Register as a dispute agent.

  #### Parameters

  - ##### disputeAgentType: string

    type of dispute agent to register, e.g. mediator, refundagent

  - ##### registrationKey: string

    registration key

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:659

### relayXmrTx

- relayXmrTx(metadata: string): Promise<string>

- Relay a previously created transaction to send funds from the Monero wallet.

  ### Returns

  the hash of the relayed transaction

  #### Parameters

  - ##### metadata: string

  #### Returns Promise<string>

  - Defined in src/HavenoClient.ts:780

### removeMoneroConnection

- removeMoneroConnection(url: string): Promise<void>

- Remove a Monero daemon connection.

  #### Parameters

  - ##### url: string

    url of the daemon connection to remove

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:459

### removeNotificationListener

- removeNotificationListener(listener: ((_notification: NotificationMessage) => void)): Promise<void>

- Remove a notification listener.

  #### Parameters

  - ##### listener: ((_notification: NotificationMessage) => void)

    the notification listener to remove

    - - (_notification: NotificationMessage): void

      - #### Parameters

        - ##### _notification: NotificationMessage

        #### Returns void

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:422

### removeOffer

- removeOffer(offerId: string): Promise<void>

- Remove a posted offer, releasing its reserved funds.

  #### Parameters

  - ##### offerId: string

    the offer id to cancel

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1092

### resolveDispute

- resolveDispute(tradeId: string, winner: Winner, reason: Reason, summaryNotes: string, customWinnerAmount?: bigint): Promise<void>

- Resolve a dispute. By default, the winner receives the trade amount and the security deposits are returned, but the arbitrator may award a custom amount to the winner and the loser will get the rest.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  - ##### winner: Winner

    the winner of the dispute

  - ##### reason: Reason

    the reason for the dispute

  - ##### summaryNotes: string

    summary of the dispute

  - ##### `Optional` customWinnerAmount: bigint

    custom amount to award the winner (optional)

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1284

### restoreAccount

- restoreAccount(zipBytes: Uint8Array): Promise<void>

- Restore the account from zip bytes.

  Sends chunked requests if size over max grpc envelope size (41943404 bytes).

  #### Parameters

  - ##### zipBytes: Uint8Array

    the bytes of the zipped account to restore

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:388

### sendChatMessage

- sendChatMessage(tradeId: string, message: string): Promise<void>

- Send a trade chat message.

  #### Parameters

  - ##### tradeId: string

    the id of the trade

  - ##### message: string

    the message

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1226

### sendDisputeChatMessage

- sendDisputeChatMessage(disputeId: string, message: string, attachments: Attachment[]): Promise<void>

- Send a dispute chat message.

  #### Parameters

  - ##### disputeId: string

    the id of the dispute

  - ##### message: string

    the message

  - ##### attachments: Attachment[]

    attachments

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1305

### setAutoSwitch

- setAutoSwitch(autoSwitch: boolean): Promise<void>

- Automatically switch to the best available connection if current connection is disconnected after being checked.

  #### Parameters

  - ##### autoSwitch: boolean

    whether auto switch is enabled or disabled

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:584

### setMoneroConnection

- setMoneroConnection(connection?: string | UrlConnection): Promise<void>

- Set the current Monero daemon connection.

  Add the connection if not previously seen. If the connection is provided as string, connect to the URI with any previously set credentials and priority. If the connection is provided as UrlConnection, overwrite any previously set credentials and priority. If undefined connection provided, disconnect the client.

  #### Parameters

  - ##### `Optional` connection: string | UrlConnection

    connection to set as current

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:503

### setProcessLogging

- setProcessLogging(enabled: boolean): void

- Enable or disable process logging.

  #### Parameters

  - ##### enabled: boolean

    specifies if logging is enabled or disabled

  #### Returns void

  - Defined in src/HavenoClient.ts:207

### shutdownServer

- shutdownServer(): Promise<void>

- Shutdown the Haveno daemon server and stop the process if applicable.

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:1327

### startCheckingConnection

- startCheckingConnection(refreshPeriod: number): Promise<void>

- Check the connection and start checking the connection periodically.

  #### Parameters

  - ##### refreshPeriod: number

    time between checks in milliseconds (default 15000 ms or 15 seconds)

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:547

### startMoneroNode

- startMoneroNode(settings: XmrNodeSettings): Promise<void>

- Starts the local monero node.

  #### Parameters

  - ##### settings: XmrNodeSettings

    the settings to start the local node with

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:633

### stopCheckingConnection

- stopCheckingConnection(): Promise<void>

- Stop checking the connection status periodically.

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:558

### stopMoneroNode

- stopMoneroNode(): Promise<void>

- Stops the local monero node.

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:645

### takeOffer

- takeOffer(offerId: string, paymentAccountId: string, amount?: bigint, challenge?: string): Promise<TradeInfo>

- Take an offer.

  ### Returns

  the initialized trade

  #### Parameters

  - ##### offerId: string

    id of the offer to take

  - ##### paymentAccountId: string

    id of the payment account

  - ##### `Optional` amount: bigint

    amount the taker chooses to buy or sell within the offer range (default is max offer amount)

  - ##### `Optional` challenge: string

    the challenge to use for the private offer

  #### Returns Promise<TradeInfo>

  - Defined in src/HavenoClient.ts:1109

### unregisterDisputeAgent

- unregisterDisputeAgent(disputeAgentType: string): Promise<void>

- Unregister as a dispute agent.

  #### Parameters

  - ##### disputeAgentType: string

    type of dispute agent to register, e.g. mediator, refundagent

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:675

### validateFormField

- validateFormField(form: PaymentAccountForm, fieldId: FieldId, value: string): Promise<void>

- #### Parameters

  - ##### form: PaymentAccountForm

  - ##### fieldId: FieldId

  - ##### value: string

  #### Returns Promise<void>

  - Defined in src/HavenoClient.ts:928

### `Static` startProcess

- startProcess(havenoPath: string, cmd: string[], url: string, enableLogging: boolean): Promise<HavenoClient>

- Start a new Haveno process.

  ### Returns

  a client connected to the newly started Haveno process

  #### Parameters

  - ##### havenoPath: string

    path to Haveno binaries

  - ##### cmd: string[]

    command to start the process

  - ##### url: string

    Haveno daemon url (must proxy to api port)

  - ##### enableLogging: boolean

    specifies if logging is enabled or disabled at log level 3

  #### Returns Promise<HavenoClient>

  - Defined in src/HavenoClient.ts:103

Generated using TypeDoc