@solana/web3.js 1.47.3 → 1.47.4
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 +4 -11
- package/lib/index.browser.cjs.js +7 -1
- package/lib/index.browser.cjs.js.map +1 -1
- package/lib/index.browser.esm.js +7 -1
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +7 -1
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.esm.js +7 -1
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +7 -1
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/lib/index.native.js +10031 -0
- package/lib/index.native.js.map +1 -0
- package/package.json +3 -1
- package/src/__forks__/react-native/fetch-impl.ts +4 -0
- package/src/connection.ts +18 -2
- package/src/util/__forks__/react-native/url-impl.ts +2 -0
- package/src/util/{url.ts → makeWebsocketUrl.ts} +2 -0
- package/src/util/url-impl.ts +2 -0
package/README.md
CHANGED
|
@@ -23,7 +23,10 @@
|
|
|
23
23
|
|
|
24
24
|
This is the Solana Javascript API built on the Solana [JSON RPC API](https://docs.solana.com/apps/jsonrpc-api)
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
## Documentation and examples
|
|
27
|
+
|
|
28
|
+
- [The Solana Cookbook](https://solanacookbook.com/) has extensive task-based documentation using this library.
|
|
29
|
+
- For more detail on individual functions, see the [latest API Documentation](https://solana-labs.github.io/solana-web3.js/)
|
|
27
30
|
|
|
28
31
|
## Installation
|
|
29
32
|
|
|
@@ -84,16 +87,6 @@ console.log(solanaWeb3);
|
|
|
84
87
|
console.log(solanaWeb3);
|
|
85
88
|
```
|
|
86
89
|
|
|
87
|
-
## Examples
|
|
88
|
-
|
|
89
|
-
Example scripts for the web3.js repo and native programs:
|
|
90
|
-
|
|
91
|
-
- [Web3 Examples](https://github.com/solana-labs/solana/tree/master/web3.js/examples)
|
|
92
|
-
|
|
93
|
-
Example scripts for the Solana Program Library:
|
|
94
|
-
|
|
95
|
-
- [Token Program Examples](https://github.com/solana-labs/solana-program-library/tree/master/token/js/examples)
|
|
96
|
-
|
|
97
90
|
## Flow Support (Discontinued)
|
|
98
91
|
|
|
99
92
|
Flow types are no longer supported in new releases. The last release with Flow support is v1.37.2 and its
|
package/lib/index.browser.cjs.js
CHANGED
|
@@ -4448,6 +4448,8 @@ var fastStableStringify = function(val) {
|
|
|
4448
4448
|
|
|
4449
4449
|
var fastStableStringify$1 = fastStableStringify;
|
|
4450
4450
|
|
|
4451
|
+
const URL = globalThis.URL;
|
|
4452
|
+
|
|
4451
4453
|
const MINIMUM_SLOT_PER_EPOCH = 32; // Returns the number of trailing zeros in the binary representation of self.
|
|
4452
4454
|
|
|
4453
4455
|
function trailingZeros(n) {
|
|
@@ -4845,7 +4847,11 @@ const SimulatedTransactionResponseStruct = jsonRpcResultAndContext(superstruct.t
|
|
|
4845
4847
|
data: superstruct.array(superstruct.string()),
|
|
4846
4848
|
rentEpoch: superstruct.optional(superstruct.number())
|
|
4847
4849
|
}))))),
|
|
4848
|
-
unitsConsumed: superstruct.optional(superstruct.number())
|
|
4850
|
+
unitsConsumed: superstruct.optional(superstruct.number()),
|
|
4851
|
+
returnData: superstruct.optional(superstruct.nullable(superstruct.type({
|
|
4852
|
+
programId: superstruct.string(),
|
|
4853
|
+
data: superstruct.tuple([superstruct.string(), superstruct.literal('base64')])
|
|
4854
|
+
})))
|
|
4849
4855
|
}));
|
|
4850
4856
|
|
|
4851
4857
|
/**
|