diff --git a/docs/widgets.md b/docs/widgets.md index b35c23c6..4dbddaa3 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -13,6 +13,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Weather Forecast](#weather-forecast) - [Crypto Watch List](#crypto-watch-list) - [Crypto Price History](#crypto-token-price-history) + - [Crypto Wallet Balance](#wallet-balance) - [RSS Feed](#rss-feed) - [Code Stats](#code-stats) - [Vulnerability Feed](#vulnerability-feed) @@ -238,6 +239,38 @@ Shows recent price history for a given crypto asset, using price data fetched fr --- +### Wallet Balance + +Keep track of your crypto balances and see recent transactions. Data is fetched from [BlockCypher](https://www.blockcypher.com/dev/) + +
+ +##### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`coin`** | `string` | Required | Symbol of coin or asset, e.g. `btc`, `eth` or `doge` +**`address`** | `string` | Required | Address to monitor. This is your wallet's **public** / receiving address +**`network`** | `string` | _Optional_ | To use a different network, other than mainnet. Defaults to `main` +**`limit`** | `number` | _Optional_ | Limit the number of transactions to display. Defaults to `10`, set to large number to show all + +##### Example + +```yaml +- type: wallet-balance + options: + coin: btc + address: 3853bSxupMjvxEYfwGDGAaLZhTKxB2vEVC +``` + +##### Info +- **CORS**: 🟢 Enabled +- **Auth**: 🟢 Not Required +- **Price**: 🟢 Free +- **Privacy**: _See [BlockCypher Privacy Policy](https://www.blockcypher.com/privacy.html)_ + +--- + ### RSS Feed Display news and updates from any RSS-enabled service. diff --git a/src/components/Widgets/WalletBalance.vue b/src/components/Widgets/WalletBalance.vue new file mode 100644 index 00000000..09ba466c --- /dev/null +++ b/src/components/Widgets/WalletBalance.vue @@ -0,0 +1,228 @@ + +{{ getCoinNameFromSymbol(coin) }} Wallet
+ {{ address }} +{{ balances.current }}
+Recent Transactions
+ + {{ transaction.date }} + + {{ transaction.incoming ? '+' : '-'}}{{ transaction.amount }} + + +