@ardrive/turbo-sdk 1.1.0 → 1.1.1-alpha.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/README.md +28 -6
- package/bundles/web.bundle.min.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.d.ts.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
@@ -19,8 +19,8 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
|
|
19
19
|
- [TurboUnauthenticatedClient](#turbounauthenticatedclient)
|
20
20
|
- [TurboAuthenticatedClient](#turboauthenticatedclient)
|
21
21
|
- [Examples](./examples)
|
22
|
-
- [CJS](./examples/cjs/index.
|
23
|
-
- [ESM](./examples/esm/index.
|
22
|
+
- [CJS](./examples/cjs/index.js)
|
23
|
+
- [ESM](./examples/esm/index.mjs)
|
24
24
|
- [Web](./examples/web/index.html)
|
25
25
|
- [Developers](#developers)
|
26
26
|
- [Requirements](#requirements)
|
@@ -95,12 +95,14 @@ try {
|
|
95
95
|
|
96
96
|
## Usage
|
97
97
|
|
98
|
-
The SDK is provided in both CommonJS and ESM formats, and it's compatible with bundlers such as Webpack, Rollup, and ESbuild. Utilize the
|
98
|
+
The SDK is provided in both CommonJS and ESM formats, and it's compatible with bundlers such as Webpack, Rollup, and ESbuild. Utilize the appropriately named exports provided by this SDK's [package.json] based on your project's configuration. Refer to the [examples] directory to see how to use the SDK in various environments.
|
99
99
|
|
100
100
|
### Web
|
101
101
|
|
102
102
|
#### Bundlers (Webpack, Rollup, ESbuild, etc.)
|
103
103
|
|
104
|
+
CommonJS:
|
105
|
+
|
104
106
|
```javascript
|
105
107
|
import { TurboFactory } from '@ardrive/turbo-sdk';
|
106
108
|
|
@@ -108,6 +110,15 @@ const turbo = TurboFactory.unauthenticated();
|
|
108
110
|
const rates = await turbo.getFiatRates();
|
109
111
|
```
|
110
112
|
|
113
|
+
ESM:
|
114
|
+
|
115
|
+
```javascript
|
116
|
+
import { TurboFactory } from '@ardrive/turbo-sdk/web';
|
117
|
+
|
118
|
+
const turbo = TurboFactory.unauthenticated();
|
119
|
+
const rates = await turbo.getFiatRates();
|
120
|
+
```
|
121
|
+
|
111
122
|
#### Browser
|
112
123
|
|
113
124
|
```html
|
@@ -143,7 +154,7 @@ Project's `tsconfig.json`:
|
|
143
154
|
}
|
144
155
|
```
|
145
156
|
|
146
|
-
Usage:
|
157
|
+
Usage (Node & Web):
|
147
158
|
|
148
159
|
```javascript
|
149
160
|
const { TurboFactory } = require('@ardrive/turbo-sdk');
|
@@ -174,7 +185,9 @@ Project's `tsconfig.json`:
|
|
174
185
|
}
|
175
186
|
```
|
176
187
|
|
177
|
-
Usage
|
188
|
+
#### Usage
|
189
|
+
|
190
|
+
Node:
|
178
191
|
|
179
192
|
```javascript
|
180
193
|
import { TurboFactory } from '@ardrive/turbo-sdk/node';
|
@@ -183,6 +196,15 @@ const turbo = TurboFactory.unauthenticated();
|
|
183
196
|
const rates = await turbo.getFiatRates();
|
184
197
|
```
|
185
198
|
|
199
|
+
Web:
|
200
|
+
|
201
|
+
```javascript
|
202
|
+
import { TurboFactory } from '@ardrive/turbo-sdk/web';
|
203
|
+
|
204
|
+
const turbo = TurboFactory.unauthenticated();
|
205
|
+
const rates = await turbo.getFiatRates();
|
206
|
+
```
|
207
|
+
|
186
208
|
### Typescript
|
187
209
|
|
188
210
|
The SDK provides TypeScript types. When you import the SDK in a TypeScript project:
|
@@ -361,7 +383,7 @@ Types are exported from `./lib/types/[node/web]/index.d.ts` and should be automa
|
|
361
383
|
- `yarn test` - runs integration tests
|
362
384
|
- `yarn example:web` - opens up the example web page
|
363
385
|
- `yarn example:cjs` - runs example CJS node script
|
364
|
-
- `yarn example:
|
386
|
+
- `yarn example:esm` - runs example ESM node script
|
365
387
|
|
366
388
|
### Linting & Formatting
|
367
389
|
|
@@ -63824,7 +63824,7 @@ var import_winston = __toESM(require_winston(), 1);
|
|
63824
63824
|
|
63825
63825
|
// src/version.ts
|
63826
63826
|
init_shim();
|
63827
|
-
var version = "1.1.0
|
63827
|
+
var version = "1.1.0";
|
63828
63828
|
|
63829
63829
|
// src/common/logger.ts
|
63830
63830
|
var TurboWinstonLogger = class {
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED
@@ -14,5 +14,5 @@
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License
|
15
15
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
16
|
*/
|
17
|
-
export declare const version = "1.1.0
|
17
|
+
export declare const version = "1.1.0";
|
18
18
|
//# sourceMappingURL=version.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.1-alpha.1",
|
4
4
|
"main": "./lib/cjs/node/index.js",
|
5
5
|
"types": "./lib/types/node/index.d.ts",
|
6
6
|
"module": "./lib/esm/node/index.js",
|
@@ -25,7 +25,8 @@
|
|
25
25
|
".": {
|
26
26
|
"import": "./lib/esm/node/index.js",
|
27
27
|
"require": "./lib/cjs/node/index.js",
|
28
|
-
"types": "./lib/types/node/index.d.ts"
|
28
|
+
"types": "./lib/types/node/index.d.ts",
|
29
|
+
"browser": "./bundles/web.bundle.min.js"
|
29
30
|
},
|
30
31
|
"./node": {
|
31
32
|
"import": "./lib/esm/node/index.js",
|
@@ -33,8 +34,8 @@
|
|
33
34
|
"types": "./lib/types/node/index.d.ts"
|
34
35
|
},
|
35
36
|
"./web": {
|
36
|
-
"import": "./
|
37
|
-
"require": "./
|
37
|
+
"import": "./bundles/web.bundle.min.js",
|
38
|
+
"require": "./bundles/web.bundle.min.js",
|
38
39
|
"types": "./lib/types/web/index.d.ts",
|
39
40
|
"browser": "./bundles/web.bundle.min.js"
|
40
41
|
}
|