bet-test-sdk 1.1.7 → 1.1.8
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 +23 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -14,6 +14,29 @@ The `BetSDK` is designed to interact with the bet.com decentralized application.
|
|
14
14
|
npm i bet-test-sdk
|
15
15
|
`
|
16
16
|
|
17
|
+
## Notice (for developers)
|
18
|
+
If you get an error about `crypto` when building dist with frameworks such as react, vue, nextjs, etc. on the frontend,
|
19
|
+
consider installing plugins such as node-polyfills OR add the crypto-browserify alias to the configuration file.
|
20
|
+
|
21
|
+
For example:
|
22
|
+
```
|
23
|
+
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
24
|
+
|
25
|
+
plugins: [
|
26
|
+
nodePolyfills({
|
27
|
+
include: ['crypto'],
|
28
|
+
}),
|
29
|
+
],
|
30
|
+
|
31
|
+
OR
|
32
|
+
|
33
|
+
resolve: {
|
34
|
+
alias: {
|
35
|
+
crypto: 'crypto-browserify',
|
36
|
+
}
|
37
|
+
},
|
38
|
+
```
|
39
|
+
|
17
40
|
## Usage Example
|
18
41
|
|
19
42
|
First you need to create a `.env` file and set your RPC URL like in the `.env.example`
|