@witnet/sdk 1.2.7 โ 3.0.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/.env_witnet +18 -18
- package/LICENSE +21 -21
- package/README.md +116 -116
- package/dist/package.json +14 -3
- package/dist/src/bin/helpers.d.ts.map +1 -1
- package/dist/src/bin/helpers.js +22 -54
- package/dist/src/lib/crypto/account.d.ts.map +1 -1
- package/dist/src/lib/crypto/account.js +3 -9
- package/dist/src/lib/crypto/coinbase.d.ts.map +1 -1
- package/dist/src/lib/crypto/coinbase.js +2 -2
- package/dist/src/lib/crypto/interfaces.d.ts.map +1 -1
- package/dist/src/lib/crypto/interfaces.js +1 -1
- package/dist/src/lib/crypto/payloads/DataRequestPayload.d.ts +4 -6
- package/dist/src/lib/crypto/payloads/DataRequestPayload.d.ts.map +1 -1
- package/dist/src/lib/crypto/payloads/DataRequestPayload.js +20 -71
- package/dist/src/lib/crypto/payloads/StakePayload.d.ts.map +1 -1
- package/dist/src/lib/crypto/payloads/StakePayload.js +4 -9
- package/dist/src/lib/crypto/payloads/UnstakePayload.d.ts.map +1 -1
- package/dist/src/lib/crypto/payloads/UnstakePayload.js +4 -7
- package/dist/src/lib/crypto/payloads/ValueTransferPayload.d.ts.map +1 -1
- package/dist/src/lib/crypto/payloads/ValueTransferPayload.js +4 -9
- package/dist/src/lib/crypto/payloads.d.ts.map +1 -1
- package/dist/src/lib/crypto/payloads.js +6 -13
- package/dist/src/lib/crypto/signer.d.ts.map +1 -1
- package/dist/src/lib/crypto/signer.js +2 -2
- package/dist/src/lib/crypto/transmitters/DataRequests.d.ts.map +1 -1
- package/dist/src/lib/crypto/transmitters/DataRequests.js +2 -2
- package/dist/src/lib/crypto/transmitters/StakeDeposits.d.ts.map +1 -1
- package/dist/src/lib/crypto/transmitters/StakeDeposits.js +2 -2
- package/dist/src/lib/crypto/transmitters/StakeWithdrawals.d.ts.map +1 -1
- package/dist/src/lib/crypto/transmitters/StakeWithdrawals.js +2 -2
- package/dist/src/lib/crypto/transmitters/ValueTransfers.d.ts.map +1 -1
- package/dist/src/lib/crypto/transmitters/ValueTransfers.js +2 -2
- package/dist/src/lib/crypto/transmitters.d.ts.map +1 -1
- package/dist/src/lib/crypto/transmitters.js +22 -31
- package/dist/src/lib/crypto/types.d.ts.map +1 -1
- package/dist/src/lib/crypto/types.js +6 -13
- package/dist/src/lib/crypto/utils.d.ts.map +1 -1
- package/dist/src/lib/crypto/utils.js +5 -9
- package/dist/src/lib/crypto/wallet.d.ts.map +1 -1
- package/dist/src/lib/crypto/wallet.js +9 -23
- package/dist/src/lib/radon/ccdr/eth.d.ts.map +1 -1
- package/dist/src/lib/radon/ccdr/eth.js +12 -32
- package/dist/src/lib/radon/ccdr/wit.d.ts.map +1 -1
- package/dist/src/lib/radon/ccdr/wit.js +3 -6
- package/dist/src/lib/radon/index.d.ts.map +1 -1
- package/dist/src/lib/radon/index.js +18 -41
- package/dist/src/lib/radon/reducers.js +2 -2
- package/dist/src/lib/radon/types.d.ts.map +1 -1
- package/dist/src/lib/radon/types.js +6 -32
- package/dist/src/lib/radon/utils.d.ts +1 -1
- package/dist/src/lib/radon/utils.d.ts.map +1 -1
- package/dist/src/lib/radon/utils.js +3 -6
- package/dist/src/lib/rest/kermit.d.ts.map +1 -1
- package/dist/src/lib/rest/kermit.js +1 -1
- package/dist/src/lib/rpc/nodes.d.ts.map +1 -1
- package/dist/src/lib/rpc/nodes.js +8 -28
- package/dist/src/lib/rpc/provider.d.ts.map +1 -1
- package/dist/src/lib/rpc/provider.js +16 -38
- package/dist/src/lib/rpc/types.d.ts.map +1 -1
- package/dist/src/lib/rpc/types.js +1 -1
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +2 -5
- package/dist/witnet/assets/index.cjs +1 -1
- package/dist/witnet/assets/modals/index.cjs +1 -1
- package/dist/witnet/assets/modals/web3/eth.cjs +2 -2
- package/dist/witnet/assets/modals/web3/ipfs.cjs +2 -2
- package/dist/witnet/assets/modals/web3/wit.cjs +4 -11
- package/dist/witnet/assets/requests.cjs +3 -11
- package/package.json +7 -3
- package/src/bin/bots/watcher.cjs +27 -93
- package/src/bin/cli/inspect.js +30 -119
- package/src/bin/cli/network.js +46 -202
- package/src/bin/cli/nodes.js +12 -58
- package/src/bin/cli/radon.js +80 -265
- package/src/bin/cli/wallet.js +69 -241
- package/src/bin/helpers.js +56 -162
- package/src/bin/index.js +21 -51
- package/witnet/assets/_index.cjs +5 -5
- package/witnet/assets/_requests.cjs +25 -25
- package/witnet/assets/_sources.cjs +36 -36
- package/witnet/assets/_templates.cjs +36 -36
- package/witnet/assets/index.cjs +4 -4
- package/witnet/assets/modals/index.cjs +7 -7
- package/witnet/assets/modals/web3/eth.cjs +22 -27
- package/witnet/assets/modals/web3/ipfs.cjs +17 -22
- package/witnet/assets/modals/web3/wit.cjs +16 -28
- package/witnet/assets/requests.cjs +41 -49
package/.env_witnet
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
### @witnet/sdk
|
|
2
|
-
WITNET_SDK_FARM_NODES=
|
|
3
|
-
WITNET_SDK_KERMIT_URL
|
|
4
|
-
WITNET_SDK_PROVIDER_URL=
|
|
5
|
-
WITNET_SDK_RADON_ASSETS_PATH=
|
|
6
|
-
WITNET_SDK_WALLET_MASTER_KEY=
|
|
7
|
-
|
|
8
|
-
### @witnet/sdk watcher
|
|
9
|
-
WITNET_SDK_WATCHER_BALANCE_SCHEDULE=
|
|
10
|
-
WITNET_SDK_WATCHER_DRY_RUN_SCHEDULE=
|
|
11
|
-
WITNET_SDK_WATCHER_WIT_COOLDOWN_SECS=
|
|
12
|
-
WITNET_SDK_WATCHER_WIT_DEVIATION_PERCENTAGE=
|
|
13
|
-
WITNET_SDK_WATCHER_WIT_HEARTBEAT_SECS=
|
|
14
|
-
WITNET_SDK_WATCHER_WIT_MIN_BALANCE=
|
|
15
|
-
WITNET_SDK_WATCHER_WIT_NETWORK=
|
|
16
|
-
WITNET_SDK_WATCHER_WIT_NETWORK_PRIORITY=
|
|
17
|
-
WITNET_SDK_WATCHER_WIT_RADON_REQUEST=
|
|
18
|
-
WITNET_SDK_WATCHER_WIT_SIGNER=
|
|
1
|
+
### @witnet/sdk
|
|
2
|
+
WITNET_SDK_FARM_NODES=
|
|
3
|
+
WITNET_SDK_KERMIT_URL
|
|
4
|
+
WITNET_SDK_PROVIDER_URL=
|
|
5
|
+
WITNET_SDK_RADON_ASSETS_PATH=
|
|
6
|
+
WITNET_SDK_WALLET_MASTER_KEY=
|
|
7
|
+
|
|
8
|
+
### @witnet/sdk watcher
|
|
9
|
+
WITNET_SDK_WATCHER_BALANCE_SCHEDULE=
|
|
10
|
+
WITNET_SDK_WATCHER_DRY_RUN_SCHEDULE=
|
|
11
|
+
WITNET_SDK_WATCHER_WIT_COOLDOWN_SECS=
|
|
12
|
+
WITNET_SDK_WATCHER_WIT_DEVIATION_PERCENTAGE=
|
|
13
|
+
WITNET_SDK_WATCHER_WIT_HEARTBEAT_SECS=
|
|
14
|
+
WITNET_SDK_WATCHER_WIT_MIN_BALANCE=
|
|
15
|
+
WITNET_SDK_WATCHER_WIT_NETWORK=
|
|
16
|
+
WITNET_SDK_WATCHER_WIT_NETWORK_PRIORITY=
|
|
17
|
+
WITNET_SDK_WATCHER_WIT_RADON_REQUEST=
|
|
18
|
+
WITNET_SDK_WATCHER_WIT_SIGNER=
|
|
19
19
|
WITNET_SDK_WATCHER_WIT_WITNESSES=
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 The Witnet Project
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 The Witnet Project
|
|
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
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
# Witnet Javascript SDK and CLI tools
|
|
2
|
-
|
|
3
|
-
> Typescript library and CLI tooling for Web3 buidlers willing to interact with the Witnet blockchain.
|
|
4
|
-
> The **Witnet Javascript SDK** empowers devops and Web3 developers to seamlessly interact with the Witnet blockchain.
|
|
5
|
-
|
|
6
|
-
## โจ Overview
|
|
7
|
-
|
|
8
|
-
Users of the Witnet Javascript library or the embedded CLI tools, will be able to:
|
|
9
|
-
|
|
10
|
-
- ๐ Create self-custody HD-wallets to hold and transact with $WIT coins.
|
|
11
|
-
- ๐ฑ Stake and withdraw $WIT coins into and from Witnet validators.
|
|
12
|
-
- ๐งฎ Build oracle queries adapted to all sorts of data sources and use cases.
|
|
13
|
-
- ๐ฉบ Simulate resolution of oracle queries, locally and at no cost.
|
|
14
|
-
- ๐งโโ๏ธ Notarize resolution of oracle queries on the Witnet blockchain.
|
|
15
|
-
- โ๏ธ Check dynamic information on the Witnet P2P network.
|
|
16
|
-
- ๐ Explore public data on the Witnet blockchain.
|
|
17
|
-
- ๐ชช Generate legit stake-authorization codes for external customers.
|
|
18
|
-
|
|
19
|
-
## ๐ฆ Installation
|
|
20
|
-
|
|
21
|
-
### CLI as a global binary
|
|
22
|
-
Install the `witsdk` binary:
|
|
23
|
-
```bash
|
|
24
|
-
$ npm install -g @witnet/sdk
|
|
25
|
-
$ witsdk --version
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### SDK as project dependency
|
|
29
|
-
- Add the @witnet/sdk package to your project:
|
|
30
|
-
```bash
|
|
31
|
-
$ npm install --save-dev @witnet/sdk`
|
|
32
|
-
```
|
|
33
|
-
- Import from Javascript:
|
|
34
|
-
```javascript
|
|
35
|
-
const { requests, modals } = require("@witnet/sdk/assets")
|
|
36
|
-
const { utils, Witnet } = require("@witnet/sdk")
|
|
37
|
-
```
|
|
38
|
-
- Import from Typescript:
|
|
39
|
-
```typescript
|
|
40
|
-
import { requests, modals } from "@witnet/sdk/assets"
|
|
41
|
-
import { utils, Witnet } from "@witnet/sdk"
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## โ๏ธ Requirements
|
|
45
|
-
- Node.js >= 20.
|
|
46
|
-
- Witnet wallet with sufficient $WIT balance.
|
|
47
|
-
|
|
48
|
-
## ๐ง Configuration
|
|
49
|
-
Both the CLI and the library can be configured by using a **.env** file declaring this variable:
|
|
50
|
-
```bash
|
|
51
|
-
WITNET_SDK_WALLET_MASTER_KEY="xprv_string_here_as_exported_from_a_node_mww_or_sheikah"
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
You can optionally:
|
|
55
|
-
- Settle your preferred WIT/RPC provider, like a Witnet node of your own, or third-party providers, by using the command-line option `--provider` (if using the CLI), or by setting the `WITNET_SDK_PROVIDER_URL` environment variable.
|
|
56
|
-
|
|
57
|
-
## ๐งช Supported Networks
|
|
58
|
-
| Witnet Network | Network id | WIT/RPC endpoints |
|
|
59
|
-
| -: | :-: | :-
|
|
60
|
-
| Mainnet | `0x9fed` | https://rpc-01.witnet.io
|
|
61
|
-
| Testnet | `0x749f` | https://rpc-testnet.witnet.io
|
|
62
|
-
|
|
63
|
-
## ๐ ๏ธ Usage
|
|
64
|
-
|
|
65
|
-
### Library modules
|
|
66
|
-
|
|
67
|
-
> *Please, find Javascript and Typescript code snippets in the [Witnet Docs site](https://docs.witnet.io/witnet-sdk/how-to-guides).*
|
|
68
|
-
|
|
69
|
-
### CLI modules
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
#### `npx witsdk network`
|
|
73
|
-
Retrieve dynamic information from the Witnet's P2P network:
|
|
74
|
-

|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
#### `npx witsdk wallet`
|
|
78
|
-
Self-custody local wallet for spending and staking at will your own $WIT coins:
|
|
79
|
-

|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
#### `npx witsdk inspect`
|
|
83
|
-
Inspect public data from the Witnet blockchain:
|
|
84
|
-

|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
#### `npx witsdk radon`
|
|
88
|
-
- Manage pre-built Witnet-compliant data requests and templates (aka. Radon assets):
|
|
89
|
-

|
|
90
|
-
|
|
91
|
-
- If willing to customize Radon assets specific to your Web3 project, please initialize the **witnet/** workspace folder:
|
|
92
|
-
```bash
|
|
93
|
-
$ npx witsdk radon init
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
#### `npx witsdk nodes`
|
|
98
|
-
Interact with your own private Witnet nodes, if reachable:
|
|
99
|
-

|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## ๐ Security
|
|
103
|
-
- Do not share your private keys.
|
|
104
|
-
- Use trusted RPC endpoints when using third-party providers.
|
|
105
|
-
- Disable "sensitive methods" on your Witnet node if willing to publish any of its RPC ports.
|
|
106
|
-
|
|
107
|
-
## Documentation
|
|
108
|
-
Learn more about Witnet, the $WIT coin and the Wit/Oracle framework for smart contracts at:
|
|
109
|
-
|
|
110
|
-
๐ https://docs.witnet.io
|
|
111
|
-
๐ https://witnet.io
|
|
112
|
-
๐ https://witnet.foundation/
|
|
113
|
-
|
|
114
|
-
## ๐งพ License
|
|
115
|
-
MIT ยฉ 2025 โ Maintained by the [Witnet Project](https://github.com/witnet).
|
|
116
|
-
|
|
1
|
+
# Witnet Javascript SDK and CLI tools
|
|
2
|
+
|
|
3
|
+
> Typescript library and CLI tooling for Web3 buidlers willing to interact with the Witnet blockchain.
|
|
4
|
+
> The **Witnet Javascript SDK** empowers devops and Web3 developers to seamlessly interact with the Witnet blockchain.
|
|
5
|
+
|
|
6
|
+
## โจ Overview
|
|
7
|
+
|
|
8
|
+
Users of the Witnet Javascript library or the embedded CLI tools, will be able to:
|
|
9
|
+
|
|
10
|
+
- ๐ Create self-custody HD-wallets to hold and transact with $WIT coins.
|
|
11
|
+
- ๐ฑ Stake and withdraw $WIT coins into and from Witnet validators.
|
|
12
|
+
- ๐งฎ Build oracle queries adapted to all sorts of data sources and use cases.
|
|
13
|
+
- ๐ฉบ Simulate resolution of oracle queries, locally and at no cost.
|
|
14
|
+
- ๐งโโ๏ธ Notarize resolution of oracle queries on the Witnet blockchain.
|
|
15
|
+
- โ๏ธ Check dynamic information on the Witnet P2P network.
|
|
16
|
+
- ๐ Explore public data on the Witnet blockchain.
|
|
17
|
+
- ๐ชช Generate legit stake-authorization codes for external customers.
|
|
18
|
+
|
|
19
|
+
## ๐ฆ Installation
|
|
20
|
+
|
|
21
|
+
### CLI as a global binary
|
|
22
|
+
Install the `witsdk` binary:
|
|
23
|
+
```bash
|
|
24
|
+
$ npm install -g @witnet/sdk
|
|
25
|
+
$ witsdk --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### SDK as project dependency
|
|
29
|
+
- Add the @witnet/sdk package to your project:
|
|
30
|
+
```bash
|
|
31
|
+
$ npm install --save-dev @witnet/sdk`
|
|
32
|
+
```
|
|
33
|
+
- Import from Javascript:
|
|
34
|
+
```javascript
|
|
35
|
+
const { requests, modals } = require("@witnet/sdk/assets")
|
|
36
|
+
const { utils, Witnet } = require("@witnet/sdk")
|
|
37
|
+
```
|
|
38
|
+
- Import from Typescript:
|
|
39
|
+
```typescript
|
|
40
|
+
import { requests, modals } from "@witnet/sdk/assets"
|
|
41
|
+
import { utils, Witnet } from "@witnet/sdk"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## โ๏ธ Requirements
|
|
45
|
+
- Node.js >= 20.
|
|
46
|
+
- Witnet wallet with sufficient $WIT balance.
|
|
47
|
+
|
|
48
|
+
## ๐ง Configuration
|
|
49
|
+
Both the CLI and the library can be configured by using a **.env** file declaring this variable:
|
|
50
|
+
```bash
|
|
51
|
+
WITNET_SDK_WALLET_MASTER_KEY="xprv_string_here_as_exported_from_a_node_mww_or_sheikah"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You can optionally:
|
|
55
|
+
- Settle your preferred WIT/RPC provider, like a Witnet node of your own, or third-party providers, by using the command-line option `--provider` (if using the CLI), or by setting the `WITNET_SDK_PROVIDER_URL` environment variable.
|
|
56
|
+
|
|
57
|
+
## ๐งช Supported Networks
|
|
58
|
+
| Witnet Network | Network id | WIT/RPC endpoints |
|
|
59
|
+
| -: | :-: | :-
|
|
60
|
+
| Mainnet | `0x9fed` | https://rpc-01.witnet.io
|
|
61
|
+
| Testnet | `0x749f` | https://rpc-testnet.witnet.io
|
|
62
|
+
|
|
63
|
+
## ๐ ๏ธ Usage
|
|
64
|
+
|
|
65
|
+
### Library modules
|
|
66
|
+
|
|
67
|
+
> *Please, find Javascript and Typescript code snippets in the [Witnet Docs site](https://docs.witnet.io/witnet-sdk/how-to-guides).*
|
|
68
|
+
|
|
69
|
+
### CLI modules
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
#### `npx witsdk network`
|
|
73
|
+
Retrieve dynamic information from the Witnet's P2P network:
|
|
74
|
+

|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
#### `npx witsdk wallet`
|
|
78
|
+
Self-custody local wallet for spending and staking at will your own $WIT coins:
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
#### `npx witsdk inspect`
|
|
83
|
+
Inspect public data from the Witnet blockchain:
|
|
84
|
+

|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
#### `npx witsdk radon`
|
|
88
|
+
- Manage pre-built Witnet-compliant data requests and templates (aka. Radon assets):
|
|
89
|
+

|
|
90
|
+
|
|
91
|
+
- If willing to customize Radon assets specific to your Web3 project, please initialize the **witnet/** workspace folder:
|
|
92
|
+
```bash
|
|
93
|
+
$ npx witsdk radon init
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
#### `npx witsdk nodes`
|
|
98
|
+
Interact with your own private Witnet nodes, if reachable:
|
|
99
|
+

|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
## ๐ Security
|
|
103
|
+
- Do not share your private keys.
|
|
104
|
+
- Use trusted RPC endpoints when using third-party providers.
|
|
105
|
+
- Disable "sensitive methods" on your Witnet node if willing to publish any of its RPC ports.
|
|
106
|
+
|
|
107
|
+
## Documentation
|
|
108
|
+
Learn more about Witnet, the $WIT coin and the Wit/Oracle framework for smart contracts at:
|
|
109
|
+
|
|
110
|
+
๐ https://docs.witnet.io
|
|
111
|
+
๐ https://witnet.io
|
|
112
|
+
๐ https://witnet.foundation/
|
|
113
|
+
|
|
114
|
+
## ๐งพ License
|
|
115
|
+
MIT ยฉ 2025 โ Maintained by the [Witnet Project](https://github.com/witnet).
|
|
116
|
+
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@witnet/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Typescript library and CLI tooling for Web3 buidlers willing to interact with the Witnet blockchain.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/witnet/witnet-sdk"
|
|
8
|
+
},
|
|
5
9
|
"author": "Witnet Foundation",
|
|
6
10
|
"license": "MIT",
|
|
7
11
|
"private": false,
|
|
@@ -49,8 +53,8 @@
|
|
|
49
53
|
"scripts": {
|
|
50
54
|
"build": "pbjs --target json witnet/witnet.proto -o witnet/witnet.proto.json && npm run clean && tsc -p tsconfig.json",
|
|
51
55
|
"clean": "node ./scripts/clean.cjs dist",
|
|
52
|
-
"fmt": "npx biome check --unsafe
|
|
53
|
-
"fmt!": "npx biome check --write --unsafe
|
|
56
|
+
"fmt": "npx biome check --unsafe",
|
|
57
|
+
"fmt!": "npx biome check --write --unsafe",
|
|
54
58
|
"postinstall": "node scripts/postinstall.cjs",
|
|
55
59
|
"prepare": "pnpm run build",
|
|
56
60
|
"watcher": "node ./src/bin/bots/watcher.cjs",
|
|
@@ -87,5 +91,12 @@
|
|
|
87
91
|
"cross-env": "10.0.0",
|
|
88
92
|
"protobufjs-cli": "^1.1.3",
|
|
89
93
|
"typescript": "^5.9.3"
|
|
94
|
+
},
|
|
95
|
+
"pnpm": {
|
|
96
|
+
"onlyBuiltDependencies": [
|
|
97
|
+
"keccak",
|
|
98
|
+
"protobufjs",
|
|
99
|
+
"secp256k1"
|
|
100
|
+
]
|
|
90
101
|
}
|
|
91
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/bin/helpers.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/bin/helpers.js"],"names":[],"mappings":"AAqBA,kDAOC;AA2ED,mDAKC;AAED,iDAEC;AAED,qDAYC;AAED,gFAiBC;AAED,8DAsBC;AAED,uEAGC;AAED,yDAsCC;AAED,gEAKC;AAED,+CAMC;AAED,qEAUC;AAED,6CAOC;AAED,uDAMC;AAED,mDASC;AAED,iGAUC;AAED,mDAmBC;AAED,iDAwBC;AAED,4EAwBC;AAED,qDAoBC;AAED,8EAKC;AAED,oCAEC;AAED,8DAWC;AAED,wDAqBC;AAED,8CAEC;AAED,2DAeC;AAED;;EAWC;AAED,4FAaC;AAED,mEAaC;AAED,gDAEC;AAED,gEAQC;AAED,6CAyBC;AAED,mDAmCC;AAED,oDAWC;AAED,4CAeC;AAED,uDAuBC;AAED,gGAIC;AAED,6DAiEC;AAUD,0DAcC;AAED,iEAgBC;AAED,iEAIC;AAED,mEAqBC;AAED,4DAkCC;AAED,+EAgDC;AAED,+CAeC;AA11BM,0CACwF;AAExF,4CAON;AAWM,6DAeN;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,yCAAuD;AACvD,yCAAmD;AACnD,0CAAoD;AACpD,wCAAkD;AAClD,2CAAqD;AAErD,yCAAgD;AAChD,yCAAgD;AAChD,0CAAiD;AACjD,4CAAmD;AACnD,2CAAkD;AAClD,yCAA8C;AAC9C,yCAA8C;AAC9C,0CAA+C;AAC/C,4CAAmD;AACnD,wCAA6C;AAC7C,2CAAgD;AAEhD,wCAA6C;AAC7C,wCAA6C;AAC7C,wCAA6C;AAC7C,yCAA8C;AAC9C,2CAAkD;AAClD,0CAA+C;AAC/C,uCAA4C;AAC5C,yCAAgD;AAChD,0CAA+C"}
|