@xyo-network/witness-blockchain-abstract 5.3.24 → 5.3.26

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.
Files changed (2) hide show
  1. package/README.md +217 -10
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,23 +1,230 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/witness-blockchain-abstract
2
4
 
3
- [![logo][]](https://xyo.network)
5
+ [![npm][npm-badge]][npm-link]
6
+ [![license][license-badge]][license-link]
7
+
8
+ > Primary SDK for using XYO Protocol 2.0
9
+
10
+ ## Install
11
+
12
+ Using npm:
4
13
 
5
- Version: 5.0.2
14
+ ```sh
15
+ npm install {{name}}
16
+ ```
6
17
 
7
- Primary SDK for using XYO Protocol 2.0
18
+ Using yarn:
8
19
 
9
- ## Documentation
20
+ ```sh
21
+ yarn add {{name}}
22
+ ```
10
23
 
11
- [TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__witness-blockchain-abstract)
24
+ Using pnpm:
25
+
26
+ ```sh
27
+ pnpm add {{name}}
28
+ ```
29
+
30
+ Using bun:
31
+
32
+ ```sh
33
+ bun add {{name}}
34
+ ```
12
35
 
13
- Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
14
36
 
15
37
  ## License
16
38
 
17
- > See the [LICENSE](LICENSE) file for license details
39
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
+
41
+ ## Reference
42
+
43
+ ### packages
44
+
45
+ ### modules
46
+
47
+ ### packages
48
+
49
+ ### witness
50
+
51
+ ### packages
52
+
53
+ ### blockchain
54
+
55
+ ### packages
56
+
57
+ ### abstract
58
+
59
+ ### .temp-typedoc
60
+
61
+ ### functions
62
+
63
+ ### <a id="checkIpfsUrl"></a>checkIpfsUrl
64
+
65
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
66
+
67
+ ***
68
+
69
+ ```ts
70
+ function checkIpfsUrl(urlToCheck, ipfsGateway?): string;
71
+ ```
72
+
73
+ Returns the equivalent IPFS gateway URL for the supplied URL.
74
+
75
+ ## Parameters
76
+
77
+ ### urlToCheck
78
+
79
+ `string`
80
+
81
+ The URL to check
82
+
83
+ ### ipfsGateway?
84
+
85
+ `string`
86
+
87
+ ## Returns
88
+
89
+ `string`
90
+
91
+ If the supplied URL is an IPFS URL, it converts the URL to the
92
+ equivalent IPFS gateway URL. Otherwise, returns the original URL.
93
+
94
+ ### <a id="getProviderFromEnv"></a>getProviderFromEnv
95
+
96
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
97
+
98
+ ***
99
+
100
+ ```ts
101
+ function getProviderFromEnv(chainId?, __namedParameters?): Provider;
102
+ ```
103
+
104
+ ## Parameters
105
+
106
+ ### chainId?
107
+
108
+ `number` = `0x01`
109
+
110
+ ### \_\_namedParameters?
111
+
112
+ [`GetProvidersFromEnvOptions`](#../interfaces/GetProvidersFromEnvOptions) = `{}`
113
+
114
+ ## Returns
115
+
116
+ `Provider`
117
+
118
+ ### <a id="getProvidersFromEnv"></a>getProvidersFromEnv
119
+
120
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
121
+
122
+ ***
123
+
124
+ ```ts
125
+ function getProvidersFromEnv(
126
+ count?,
127
+ chainId?,
128
+ options?): Provider[];
129
+ ```
130
+
131
+ ## Parameters
132
+
133
+ ### count?
134
+
135
+ `number` = `1`
136
+
137
+ ### chainId?
138
+
139
+ `number` = `0x01`
140
+
141
+ ### options?
142
+
143
+ [`GetProvidersFromEnvOptions`](#../interfaces/GetProvidersFromEnvOptions) = `{}`
144
+
145
+ ## Returns
146
+
147
+ `Provider`[]
148
+
149
+ ### <a id="getSharedProviderFromEnv"></a>getSharedProviderFromEnv
150
+
151
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
152
+
153
+ ***
154
+
155
+ ```ts
156
+ function getSharedProviderFromEnv(chainId?, options?): Provider;
157
+ ```
158
+
159
+ ## Parameters
160
+
161
+ ### chainId?
162
+
163
+ `number` = `0x01`
164
+
165
+ ### options?
166
+
167
+ ### providerSource?
168
+
169
+ [`ProviderSource`](#../type-aliases/ProviderSource)
170
+
171
+ ### providerType?
172
+
173
+ [`ProviderType`](#../type-aliases/ProviderType)
174
+
175
+ ## Returns
176
+
177
+ `Provider`
178
+
179
+ ### interfaces
180
+
181
+ ### <a id="GetProvidersFromEnvOptions"></a>GetProvidersFromEnvOptions
182
+
183
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
184
+
185
+ ***
186
+
187
+ ## Properties
188
+
189
+ ### providerSource?
190
+
191
+ ```ts
192
+ optional providerSource?: ProviderSource;
193
+ ```
194
+
195
+ ***
196
+
197
+ ### providerType?
198
+
199
+ ```ts
200
+ optional providerType?: ProviderType;
201
+ ```
202
+
203
+ ### type-aliases
204
+
205
+ ### <a id="ProviderSource"></a>ProviderSource
206
+
207
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
208
+
209
+ ***
210
+
211
+ ```ts
212
+ type ProviderSource = "infura" | "quicknode";
213
+ ```
214
+
215
+ ### <a id="ProviderType"></a>ProviderType
216
+
217
+ [**@xyo-network/witness-blockchain-abstract**](#../README)
218
+
219
+ ***
18
220
 
19
- ## Credits
221
+ ```ts
222
+ type ProviderType = "rpc" | "wss";
223
+ ```
20
224
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
225
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
226
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
227
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/witness-blockchain-abstract.svg
228
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/witness-blockchain-abstract
229
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/witness-blockchain-abstract.svg
230
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/witness-blockchain-abstract",
3
- "version": "5.3.24",
3
+ "version": "5.3.26",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -22,11 +22,11 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/neutral/index.d.ts",
25
+ "import": "./dist/neutral/index.mjs",
25
26
  "default": "./dist/neutral/index.mjs"
26
27
  },
27
28
  "./package.json": "./package.json"
28
29
  },
29
- "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
@@ -37,8 +37,8 @@
37
37
  ],
38
38
  "devDependencies": {
39
39
  "@opentelemetry/api": "^1.9.1",
40
- "@xylabs/sdk-js": "^5.0.93",
41
- "@xylabs/tsconfig": "~7.6.16",
40
+ "@xylabs/sdk-js": "^5.0.94",
41
+ "@xylabs/tsconfig": "~7.7.5",
42
42
  "axios": "^1.14.0",
43
43
  "ethers": "^6.16.0",
44
44
  "typescript": "~5.9.3",