@edge-markets/connect 1.3.0 → 1.4.0

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/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # @edgeboost/edge-connect-sdk
1
+ # @edge-markets/connect
2
2
 
3
3
  Core types, configuration, and utilities for EDGE Connect SDK.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @edgeboost/edge-connect-sdk
8
+ npm install @edge-markets/connect
9
9
  # or
10
- pnpm add @edgeboost/edge-connect-sdk
10
+ pnpm add @edge-markets/connect
11
11
  # or
12
- yarn add @edgeboost/edge-connect-sdk
12
+ yarn add @edge-markets/connect
13
13
  ```
14
14
 
15
15
  ## Usage
@@ -24,7 +24,7 @@ import type {
24
24
  Balance,
25
25
  Transfer,
26
26
  EdgeTokens,
27
- } from '@edgeboost/edge-connect-sdk'
27
+ } from '@edge-markets/connect'
28
28
 
29
29
  // Types are generated from the OpenAPI spec
30
30
  const user: User = {
@@ -45,7 +45,7 @@ import {
45
45
  getEnvironmentConfig,
46
46
  EDGE_SCOPES,
47
47
  formatScopeForEnvironment,
48
- } from '@edgeboost/edge-connect-sdk'
48
+ } from '@edge-markets/connect'
49
49
 
50
50
  const config = getEnvironmentConfig('staging')
51
51
  console.log(config.apiBaseUrl) // https://...
@@ -64,10 +64,11 @@ import {
64
64
  EdgeError,
65
65
  EdgeConsentRequiredError,
66
66
  isConsentRequiredError,
67
- } from '@edgeboost/edge-connect-sdk'
67
+ } from '@edge-markets/connect'
68
68
 
69
69
  try {
70
- const balance = await edge.getBalance(accessToken)
70
+ const client = edge.forUser(accessToken)
71
+ const balance = await client.getBalance()
71
72
  } catch (error) {
72
73
  if (isConsentRequiredError(error)) {
73
74
  // User needs to grant consent - redirect to EdgeLink
@@ -124,17 +125,9 @@ isApiError(error) // API error
124
125
 
125
126
  ## Related Packages
126
127
 
127
- - `@edgeboost/edge-connect-link` - Browser SDK for popup authentication
128
- - `@edgeboost/edge-connect-server` - Server SDK for token exchange and API calls
128
+ - `@edge-markets/connect-link` - Browser SDK for popup authentication
129
+ - `@edge-markets/connect-node` - Server SDK for token exchange and API calls
129
130
 
130
131
  ## License
131
132
 
132
133
  MIT
133
-
134
-
135
-
136
-
137
-
138
-
139
-
140
-