JavaScript wrapper library for fiwind.io
To initialize a Fiwind struct:
- Log in to panel.fiwind.io.
- Open the developer tools and navigate to the local storage section.
- Locate the following variables:
JWT_TOKEN
,REFRESH_TOKEN
, anddeviceId
. - Pass these values to the constructor:
const fw = new Fiwind(jwtToken, refreshToken, deviceId)
Method | Description |
---|---|
Fiwind.wallet.balance(currency: string) |
Retrieves the balance of the specified currency. |
Fiwind.wallet.addresses(currency: string) |
Retrieves deposit addresses for the specified cryptocurrency. |
Fiwind.wallet.convert(from: string, to: string, amount: number) |
Requests the current exchange rate between two currencies. It returns a short-lived quote ID for confirmation. |
Fiwind.wallet.confirmTx(txId: string) |
Confirms a transaction using the provided quote ID. |
Fiwind.wallet.findRecipient(cbuOrAlias: string, currency: string) |
Finds a recipient's bank account using their CBU (Clave Bancaria Uniforme) or alias and the specified currency. |
Fiwind.wallet.findBank(cbu: string, alias: string, currency: string, bankName: string, denomination: string, cuit: string) |
Finds a bank account based on the provided recipient's details. |
Fiwind.wallet.sendFiat(currency: string, amount: number, bankId: string) |
Sends money to the specified bank account. |
npm run dev