wealthica-sdk-js 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Wealthica Connect SDK across versions will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+
8
+ [Unreleased]: https://github.com/wealthica/wealthica-sdk-js/compare/v0.0.1...HEAD
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Wealthica Financial Technology Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,656 @@
1
+ # Official Wealthica JS SDK for the Browser & NodeJS
2
+
3
+ [![Build Status](https://semaphoreci.com/api/v1/wealthica/wealthica-sdk-js/branches/master/badge.svg)](https://semaphoreci.com/wealthica/wealthica-sdk-js)
4
+
5
+ ## What is Wealthica? A Unified Cryptocurrency API.
6
+
7
+ > *“We tried a few crypto data APIs to retrieve our users digital assets, Wealthica is the only one that actually works!”* — Wealth Tracking Dashboard Dev
8
+
9
+ [Wealthica](https://wealthica.com/) is an API for connecting with cryptocurrency exchanges, wallets and protocols like Bitcoin. Instead of manually integrating with [Crypto Exchange APIs](https://wealthica.com/status/) like [Coinbase API](https://wealthica.com/), [Binance API](https://wealthica.com/), [Bitcoin APIs](https://wealthica.com/), [Crypto APIs](https://wealthica.com/) or the hundreds of other cryptocurrency APIs - you can simply use Wealthica for them all.
10
+
11
+ Wealthica is the **#1** alternative to the discontinued [Zabo API](https://wealthica.com/).
12
+
13
+ We believe teams and developers should focus on building great products, not worry about the fragmented landscape of exchange APIs and blockchain protocols.
14
+
15
+ For our updated list of integrations, check out our list of [Wealthica Integrations](https://wealthica.com/status/).
16
+
17
+ ## Wealthica API Javascript (JS) SDK
18
+
19
+ This is the Official Wealthica JS SDK for the Browser & NodeJS.
20
+
21
+ The Wealthica Connect SDK provides convenient access to the Wealthica API from applications written in browser and server-side JavaScript. Please note that you must register and [request your API keys](https://wealthica.com/) to use in your application.
22
+
23
+ ## Documentation
24
+
25
+ Refer to the [Wealthica API Documentation](https://wealthica.com/docs) for more details.
26
+
27
+ Bugs, requests or suggestions
28
+
29
+ Get in touch at [hello@wealthica.com](mailto:hello@wealthica.com) for bug reports, requests or suggestions.
30
+
31
+ ## Getting started
32
+
33
+ ```javascript
34
+ import Wealthica from 'wealthica-sdk-js';
35
+
36
+ (async () => {
37
+ // Create a Wealthica Connect SDK instance
38
+ const wealthica = Wealthica.init({
39
+ clientId: 'YOUR_CLIENT_ID',
40
+ secret: 'YOUR_CLIENT_SECRET',
41
+ });
42
+
43
+ // Call the API helper methods
44
+ const providers = await wealthica.providers.getList();
45
+ const team = await wealthica.getTeam();
46
+
47
+ // Alternately, pass a loginName to return a Wealthica Connect SDK User instance in order to call
48
+ // user-specific endpoints
49
+ const user = Wealthica.init({
50
+ clientId: 'YOUR_CLIENT_ID',
51
+ secret: 'YOUR_CLIENT_SECRET',
52
+ // Optional, only if you need to work with user data API, such as `wealthica.institutions.getOne(id)`,
53
+ // or `wealthica.transactions.getList()` etc.
54
+ loginName: 'YOUR_USERNAME_OR_ID',
55
+ });
56
+
57
+ // Call the user-specific API methods
58
+ const account = await user.institutions.getOne('ACCOUNT_ID');
59
+ })();
60
+ ```
61
+
62
+ ## APIs
63
+
64
+ ### General APIs
65
+
66
+ These methods are SDK-specific and do not have a corresponding Wealthica API endpoint.
67
+
68
+ #### wealthica.login(loginName)
69
+
70
+ This method logs a user in and returns a Wealthica Connect SDK User instance so you can call user-specific APIs.
71
+
72
+ ##### From server
73
+
74
+ `loginName` is required
75
+
76
+ ```javascript
77
+ // Create a Wealthica Connect SDK instance
78
+ const wealthica = Wealthica.init({
79
+ clientId: 'YOUR_CLIENT_ID',
80
+ secret: 'YOUR_CLIENT_SECRET',
81
+ });
82
+
83
+ // Log user(s) in
84
+ const user1 = wealthica.login('USER_ID_1');
85
+ const user2 = wealthica.login('USER_ID_2');
86
+
87
+ // Call user APIs
88
+ const user1Account = await user1.institutions.getOne('ACCOUNT_ID_1');
89
+ const user2Account = await user2.institutions.getOne('ACCOUNT_ID_2');
90
+ ```
91
+
92
+ ##### From client (browser/ReactNative)
93
+
94
+ `loginName` is optional. Authentication is done either via an `authEndpoint` or a custom `authorizer` callback passed to `Wealthica.init()`
95
+
96
+ ```javascript
97
+ // Create a Wealthica Connect SDK instance
98
+ const wealthica = Wealthica.init({
99
+ clientId: 'YOUR_CLIENT_ID',
100
+ // POST to `authEndpoint` on your server, expecting a JSON { token: 'USER_TOKEN' }
101
+ authEndpoint: '/wealthica/auth', // default value
102
+ // Optional parameters for `authEndpoint` to authenticate your user
103
+ auth: {
104
+ params: {}, // custom `authEndpoint` body
105
+ headers: { Authorization: `Bearer ${yourAppsUserToken}` }, // custom `authEndpoint` headers
106
+ },
107
+ // Optional authorization method to use instead of `authEndpoint`
108
+ authorizer: async (callback) => {
109
+ try {
110
+ const token = await getUserTokenFromYourServer();
111
+ callback(null, { token });
112
+ } catch (error) {
113
+ callback(error);
114
+ }
115
+ }
116
+ });
117
+
118
+ // Log in to create a Wealthica User instance
119
+ const user = wealthica.login();
120
+
121
+ // Call user APIs
122
+ const account = await user.institutions.getOne('ACCOUNT_ID_1');
123
+ ```
124
+
125
+ Example server implementation for `authEndpoint`:
126
+
127
+ ```
128
+ const wealthica = Wealthica.init({
129
+ clientId: 'YOUR_CLIENT_ID',
130
+ secret: 'YOUR_CLIENT_SECRET',
131
+ });
132
+
133
+ router.post('/wealthica/auth', async function(req, res) {
134
+ const user = wealthica.login(req.user.id);
135
+
136
+ res.json({ token: await user.getToken() });
137
+ });
138
+ ```
139
+
140
+ #### user.fetchToken()
141
+
142
+ This method fetches and returns a new user token.
143
+
144
+ **NOTE**
145
+
146
+ - User token has a maximum lifetime duration. Current default is 20 minutes.
147
+ - All User API methods automatically fetch a new token if the old one expires so this is rarely needed.
148
+
149
+ ```javascript
150
+ const token = await user.fetchToken();
151
+ ```
152
+
153
+ #### user.getToken()
154
+
155
+ This method returns an existing user token or fetch a new one if the existing token has less than a specified amount of duration (default 10 seconds).
156
+
157
+ ```javascript
158
+ const wealthica = Wealthica.init({
159
+ clientId: 'YOUR_CLIENT_ID',
160
+ secret: 'YOUR_CLIENT_SECRET',
161
+ });
162
+
163
+ const user = wealthica.login('YOUR_USERNAME_OR_ID');
164
+ let token = await user.getToken(); // returns the user token, 20 minutes lifetime
165
+ // After 10 minutes
166
+ token = await user.getToken(); // returns the same token
167
+ // After 19 minutes 51 seconds
168
+ token = await user.getToken(); // fetches and returns a new token
169
+
170
+ // After > another 10 minutes
171
+ token = await user.getToken({ minimumLifeTime: 600 }); // fetches and returns another new token
172
+ ```
173
+
174
+ #### user.getConnectData({ provider, redirectURI, state, lang, theme, providersPerLine })
175
+
176
+ This method returns a Wealthica Connect URL and authentication token for user to connect an account.
177
+
178
+ Wealthica Connect URL must be called via POST method and pass token in the form data.
179
+
180
+ User token has a 10 minutes session timeout.
181
+
182
+ ```javascript
183
+ const { url, token } = await user.getConnectData({
184
+ provider: 'coinbase', // optional
185
+ // required for server-side, optional for client (browser, ReactNative) or if already passed to `Wealthica.init()`.
186
+ // Must be a registered URI.
187
+ redirectURI: 'YOUR_REDIRECT_URI',
188
+ // required for Wealthica Connect drop-in widget, but already handled by the SDK when calling
189
+ // `user.connect()` (defaults to `window.location.origin`).
190
+ // https://wealthica.com/docs/#connect-url-parameters
191
+ accountId: 'ACCOUNT_ID',
192
+ // Pass accountId to re-connect an existing account that has expired/revoked credentials
193
+ origin: 'YOUR_SITE_ORIGIN',
194
+ state: 'YOUR_APP_STATE', // optional
195
+ lang: 'en', // optional (en | es | fr | it), 'en' by default
196
+ providers: ['wise', 'stockchase'], // optional, ignored if `provider` is also passed in.
197
+ theme: 'light', // optional (light | dark), 'light' by default
198
+ providersPerLine: 1, // optional (1 | 2), 2 by default
199
+ features: 'feature1,feature2', // optional, a comma-separated list of features. undefined by default
200
+ });
201
+ // {
202
+ // url: "https://connect.wealthica.com/connect/coinbase?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&origin=YOUR_SITE_ORIGIN&state=YOUR_APP_STATE&lang=en&theme=light&providersPerLine=2",
203
+ // token: "USER_TOKEN"
204
+ // }
205
+
206
+ // POST Wealthica Connect URL from client (browser/ReactNative) example:
207
+ const form = document.createElement("form");
208
+ form.method = "POST";
209
+ form.action = url;
210
+
211
+ const input = document.createElement("input");
212
+ input.type = "hidden";
213
+ input.name = "token";
214
+ input.value = token;
215
+ form.appendChild(input);
216
+
217
+ document.body.appendChild(form);
218
+
219
+ form.submit();
220
+
221
+ // Alternatively, pass redirectURI once to `Wealthica.init()`
222
+ const wealthica = Wealthica.init({
223
+ clientId: 'YOUR_CLIENT_ID',
224
+ secret: 'YOUR_CLIENT_SECRET',
225
+ redirectURI: 'YOUR_REDIRECT_URI',
226
+ origin: 'YOUR_SITE_ORIGIN',
227
+ });
228
+
229
+ const user1 = wealthica.login('USER_ID_1');
230
+ const { url: url1, token } = await user1.getConnectData();
231
+
232
+ const user2 = wealthica.login('USER_ID_2');
233
+ const { url: url2, token } = await user2.getConnectData();
234
+ ```
235
+
236
+ #### user.connect({ provider, providers, accountId, lang, theme, providersPerLine, features })
237
+
238
+ This method starts the Wealthica Connect process inside your webpage/app for user to connect their account.
239
+
240
+ Connection response are provided via callbacks.
241
+
242
+ This method accepts the same parameters as `user.getConnectData()` except for `redirectURI`, `origin` and `state`
243
+
244
+ ```javascript
245
+ user.connect().onConnection(account => {
246
+ // Send the account to your server
247
+ sendToServer('/some-route', account);
248
+ }).onError(error => {
249
+ console.error('account connection error:', error)
250
+ }).onEvent((name, data) => {
251
+ console.log('account connection event:', name, data);
252
+ });
253
+ ```
254
+
255
+ #### user.reconnect(accountId)
256
+
257
+ This method starts the Wealthica Connect process to re-connect an existing account that has expired/revoked credentials.
258
+
259
+ Connection response are provided via callbacks.
260
+
261
+ ```javascript
262
+ user.reconnect('ACCOUNT_ID').onConnection(account => {
263
+ // Send the account to your server
264
+ sendToServer('/some-route', account);
265
+ }).onError(error => {
266
+ console.error('account connection error:', error)
267
+ }).onEvent((name, data) => {
268
+ console.log('account connection event:', name, data);
269
+ });
270
+ ```
271
+
272
+ ### User APIs
273
+
274
+ These methods return user data and thus require a Wealthica Connect SDK User instance. They automatically fetch a new token if necessary so you would not be bothered with tokens logic.
275
+
276
+ #### user.institutions.getList()
277
+
278
+ This method retrieves the list of institutions for a user.
279
+
280
+ ```javascript
281
+ const institutions = await user.institutions.getList();
282
+ ```
283
+
284
+ ```json
285
+ [
286
+ {
287
+ "id": "603522490d2b02001233a5d6",
288
+ "provider": {
289
+ "name": "coinbase",
290
+ "display_name": "Coinbase",
291
+ "logo": "https://app.wealthica.com/images/institutions/coinbase.png",
292
+ "type": "oauth",
293
+ "scopes": [],
294
+ "resource_type": "provider"
295
+ },
296
+ "balances": [
297
+ {
298
+ "ticker": "BTC",
299
+ "provider_ticker": "BTC",
300
+ "name": "Bitcoin",
301
+ "asset_is_verified": null,
302
+ "asset_type": "",
303
+ "amount": "0.20210831",
304
+ "decimals": 8,
305
+ "fiat_ticker": "USD",
306
+ "fiat_value": "2021.08",
307
+ "fiat_asset_is_verified": null,
308
+ "logo": "https://data.wealthica.com/api/securities/CRYPTO:BTC/logo",
309
+ "updated_at": 1630412605283,
310
+ "misc": null,
311
+ "resource_type": "balance"
312
+ }
313
+ ],
314
+ "blockchain": null,
315
+ "created_at": 1630412605283,
316
+ "updated_at": 1630412605283,
317
+ "resource_type": "account",
318
+ },
319
+ {
320
+ "id": "603522490d2b02001233a5d7",
321
+ "provider": {
322
+ "name": "bitcoin",
323
+ "display_name": "Bitcoin Address",
324
+ "logo": "https://app.wealthica.com/images/institutions/bitcoin.png",
325
+ "type": "wallet",
326
+ "scopes": [],
327
+ "resource_type": "provider"
328
+ },
329
+ "balances": [],
330
+ "blockchain": null,
331
+ "created_at": 1630412605283,
332
+ "updated_at": 1630412605283,
333
+ "resource_type": "account",
334
+ }
335
+ ]
336
+ ```
337
+
338
+ #### user.institutions.getOne(id)
339
+
340
+ This method retrieves a single account.
341
+
342
+ ```javascript
343
+ const account = await user.institutions.getOne('603522490d2b02001233a5d6');
344
+ ```
345
+
346
+ ```json
347
+ {
348
+ "id": "603522490d2b02001233a5d6",
349
+ "provider": {
350
+ "name": "coinbase",
351
+ "display_name": "Coinbase",
352
+ "logo": "https://app.wealthica.com/images/institutions/coinbase.png",
353
+ "type": "oauth",
354
+ "scopes": [],
355
+ "resource_type": "provider"
356
+ },
357
+ "balances": [
358
+ {
359
+ "ticker": "BTC",
360
+ "provider_ticker": "BTC",
361
+ "name": "Bitcoin",
362
+ "asset_is_verified": null,
363
+ "asset_type": "",
364
+ "amount": "0.20210831",
365
+ "decimals": 8,
366
+ "fiat_ticker": "USD",
367
+ "fiat_value": "2021.08",
368
+ "fiat_asset_is_verified": null,
369
+ "logo": "https://data.wealthica.com/api/securities/CRYPTO:BTC/logo",
370
+ "updated_at": 1630412605283,
371
+ "misc": null,
372
+ "resource_type": "balance"
373
+ }
374
+ ],
375
+ "blockchain": null,
376
+ "created_at": 1630412605283,
377
+ "updated_at": 1630412605283,
378
+ "resource_type": "account",
379
+ }
380
+ ```
381
+
382
+ #### user.institutions.sync(id)
383
+
384
+ This method triggers an account sync.
385
+
386
+ ```javascript
387
+ const account = await user.institutions.sync('603522490d2b02001233a5d6');
388
+ ```
389
+
390
+ #### user.institutions.remove(id)
391
+
392
+ This method removes a single account from the user.
393
+
394
+ ```javascript
395
+ await user.institutions.remove('603522490d2b02001233a5d6');
396
+ ```
397
+
398
+ #### user.history.getList({ accountId, from, to, wallet })
399
+
400
+ This method retrieves the balance history for an account.
401
+
402
+ Returns data within the last 1 year by default.
403
+
404
+ ```javascript
405
+ const history = await user.history.getList({
406
+ accountId: '603522490d2b02001233a5d6',
407
+ from: '2021-01-01',
408
+ to: '2021-09-09',
409
+ wallet: 'bitcoin:cash:usd',
410
+ });
411
+ ```
412
+
413
+ ```json
414
+ [
415
+ {
416
+ "id": "6144755af8a77cae7174afa3",
417
+ "date": 1630412605283,
418
+ "wallet": "demo:cash:usd",
419
+ "fiat_ticker": "USD",
420
+ "fiat_value": "125.30"
421
+ },
422
+ {
423
+ "id": "6144755af8a77cae7174afa4",
424
+ "date": 1630412605283,
425
+ "wallet": "demo:cash:cad",
426
+ "fiat_ticker": "USD",
427
+ "fiat_value": "125.30"
428
+ },
429
+ ]
430
+ ```
431
+
432
+ #### user.transactions.getList({ accountId, ticker, from, to, wallet, last, limit })
433
+
434
+ This method retrieves the list of transactions for an account.
435
+
436
+ Returns data within the last 1 year by default.
437
+
438
+ ```javascript
439
+ const transactions = await user.transactions.getList({
440
+ accountId: '603522490d2b02001233a5d6',
441
+ ticker: 'BTC', // optional
442
+ from: '2020-08-31', // optional
443
+ to: '2021-08-31', // optional
444
+ wallet: 'bitcoin:cash:usd', // optional
445
+ last: '603522490d2b02001233a5d6', // optional, blank string is allowed
446
+ limit: 10, // optional
447
+ });
448
+ ```
449
+
450
+ ```json
451
+ [
452
+ {
453
+ "id": "603522490d2b02001233a5d6",
454
+ "status": null,
455
+ "transaction_type": "deposit",
456
+ "parts": [
457
+ {
458
+ "direction": "received",
459
+ "ticker": "BTC",
460
+ "provider_ticker": "BTC",
461
+ "amount": "1.20210831",
462
+ "asset_is_verified": null,
463
+ "fiat_ticker": "USD",
464
+ "fiat_value": "1234567.8",
465
+ "fiat_asset_is_verified": null,
466
+ "other_parties": []
467
+ }
468
+ ],
469
+ "fees": [
470
+ {
471
+ "type": null,
472
+ "ticker": "USD",
473
+ "provider_ticker": "USD",
474
+ "amount": "0.5",
475
+ "asset_is_verified": null,
476
+ "fiat_ticker": "",
477
+ "fiat_value": "",
478
+ "fiat_asset_is_verified": null,
479
+ "resource_type": "transaction_fee"
480
+ }
481
+ ],
482
+ "misc": [],
483
+ "fiat_calculated_at": 1630412605283,
484
+ "initiated_at": 1630412605283,
485
+ "confirmed_at": 1630412605283,
486
+ "resource_type": "transaction"
487
+ },
488
+ {
489
+ "id": "603522490d2b02001233a5d7",
490
+ "status": null,
491
+ "transaction_type": "deposit",
492
+ "parts": [],
493
+ "fees": [],
494
+ "misc": [],
495
+ "fiat_calculated_at": 1630412605283,
496
+ "initiated_at": 1630412605283,
497
+ "confirmed_at": 1630412605283,
498
+ "resource_type": "transaction"
499
+ }
500
+ ]
501
+ ```
502
+
503
+ #### user.transactions.getOne({ accountId, txId })
504
+
505
+ This method retrieves a single transaction.
506
+
507
+ ```javascript
508
+ const transaction = await user.transactions.getOne({
509
+ accountId: '603522490d2b02001233a5d6',
510
+ txId: '603522490d2b02001233a5d6'
511
+ });
512
+ ```
513
+
514
+ ```json
515
+ {
516
+ "id": "603522490d2b02001233a5d6",
517
+ "status": null,
518
+ "transaction_type": "deposit",
519
+ "parts": [
520
+ {
521
+ "direction": "received",
522
+ "ticker": "BTC",
523
+ "provider_ticker": "BTC",
524
+ "amount": "1.20210831",
525
+ "asset_is_verified": null,
526
+ "fiat_ticker": "USD",
527
+ "fiat_value": "1234567.8",
528
+ "fiat_asset_is_verified": null,
529
+ "other_parties": []
530
+ }
531
+ ],
532
+ "fees": [
533
+ {
534
+ "type": null,
535
+ "ticker": "USD",
536
+ "provider_ticker": "USD",
537
+ "amount": "0.5",
538
+ "asset_is_verified": null,
539
+ "fiat_ticker": "",
540
+ "fiat_value": "",
541
+ "fiat_asset_is_verified": null,
542
+ "resource_type": "transaction_fee"
543
+ }
544
+ ],
545
+ "misc": [],
546
+ "fiat_calculated_at": 1630412605283,
547
+ "initiated_at": 1630412605283,
548
+ "confirmed_at": 1630412605283,
549
+ "resource_type": "transaction"
550
+ }
551
+ ```
552
+
553
+ ### Data APIs
554
+
555
+ These methods provide general Wealthica information and do not require logging in a user.
556
+
557
+ ```javascript
558
+ const wealthica = Wealthica.init({
559
+ clientId: 'YOUR_CLIENT_ID',
560
+ secret: 'YOUR_CLIENT_SECRET',
561
+ });
562
+
563
+ const providers = await wealthica.providers.getList();
564
+ ```
565
+
566
+ #### wealthica.providers.getList()
567
+
568
+ This method retrieves the list of Wealthica supported providers.
569
+
570
+ ```javascript
571
+ const providers = await wealthica.providers.getList();
572
+ ```
573
+
574
+ ```json
575
+ [
576
+ {
577
+ "name": "coinbase",
578
+ "display_name": "Coinbase",
579
+ "logo": "https://app.wealthica.com/images/institutions/coinbase.png",
580
+ "auth_type": "oauth",
581
+ "available_scopes": [],
582
+ "available_currencies": null,
583
+ "resource_type": "provider",
584
+ "status": null,
585
+ "is_beta": true,
586
+ "connect_notice": "",
587
+ "credentials": ["code"]
588
+ },
589
+ {
590
+ "name": "bitcoin",
591
+ "display_name": "Bitcoin Address",
592
+ "logo": "https://app.wealthica.com/images/institutions/bitcoin.png",
593
+ "auth_type": "wallet",
594
+ "available_scopes": [],
595
+ "available_currencies": null,
596
+ "resource_type": "provider",
597
+ "status": null,
598
+ "is_beta": true,
599
+ "connect_notice": "",
600
+ "credentials": ["wallet"]
601
+ }
602
+ ]
603
+ ```
604
+
605
+ #### wealthica.providers.getOne(id)
606
+
607
+ This method retrieves a single provider.
608
+
609
+ ```javascript
610
+ const provider = await wealthica.providers.getOne('coinbase');
611
+ ```
612
+
613
+ ```json
614
+ {
615
+ "name": "coinbase",
616
+ "display_name": "Coinbase",
617
+ "logo": "https://app.wealthica.com/images/institutions/coinbase.png",
618
+ "auth_type": "oauth",
619
+ "available_scopes": [],
620
+ "available_currencies": null,
621
+ "resource_type": "provider",
622
+ "status": null,
623
+ "is_beta": true,
624
+ "connect_notice": "",
625
+ "credentials": ["code"]
626
+ }
627
+ ```
628
+
629
+ ## Development
630
+
631
+ ### Install
632
+
633
+ ```
634
+ yarn install
635
+ ```
636
+
637
+ ### Build
638
+
639
+ ```
640
+ yarn build
641
+ ```
642
+
643
+ ### Test
644
+
645
+ ```
646
+ yarn build
647
+ yarn test
648
+ ```
649
+
650
+ ### Release
651
+ ```
652
+ npm version patch # or minor/major
653
+ git push && git push --tags
654
+ # wait until merged then
655
+ npm publish
656
+ ```