@solana/web3.js 0.0.0-1651175667721-next → 0.0.0-development

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 (62) hide show
  1. package/README.md +8 -11
  2. package/lib/index.browser.cjs.js +7421 -7528
  3. package/lib/index.browser.cjs.js.map +1 -1
  4. package/lib/index.browser.esm.js +7403 -7519
  5. package/lib/index.browser.esm.js.map +1 -1
  6. package/lib/index.cjs.js +7513 -7065
  7. package/lib/index.cjs.js.map +1 -1
  8. package/lib/index.d.ts +760 -289
  9. package/lib/index.esm.js +7500 -7062
  10. package/lib/index.esm.js.map +1 -1
  11. package/lib/index.iife.js +22418 -26907
  12. package/lib/index.iife.js.map +1 -1
  13. package/lib/index.iife.min.js +8 -4
  14. package/lib/index.iife.min.js.map +1 -1
  15. package/lib/index.native.js +10112 -0
  16. package/lib/index.native.js.map +1 -0
  17. package/package.json +19 -16
  18. package/src/__forks__/browser/fetch-impl.ts +4 -0
  19. package/src/__forks__/react-native/fetch-impl.ts +4 -0
  20. package/src/account-data.ts +39 -0
  21. package/src/account.ts +1 -1
  22. package/src/connection.ts +734 -285
  23. package/src/errors.ts +41 -0
  24. package/src/fee-calculator.ts +2 -0
  25. package/src/fetch-impl.ts +13 -0
  26. package/src/index.ts +3 -11
  27. package/src/layout.ts +16 -4
  28. package/src/loader.ts +4 -5
  29. package/src/message/index.ts +32 -0
  30. package/src/{message.ts → message/legacy.ts} +11 -43
  31. package/src/nonce-account.ts +1 -1
  32. package/src/programs/address-lookup-table/index.ts +435 -0
  33. package/src/programs/address-lookup-table/state.ts +84 -0
  34. package/src/{compute-budget.ts → programs/compute-budget.ts} +95 -6
  35. package/src/{ed25519-program.ts → programs/ed25519.ts} +4 -4
  36. package/src/programs/index.ts +7 -0
  37. package/src/{secp256k1-program.ts → programs/secp256k1.ts} +10 -9
  38. package/src/{stake-program.ts → programs/stake.ts} +7 -7
  39. package/src/{system-program.ts → programs/system.ts} +55 -18
  40. package/src/{vote-program.ts → programs/vote.ts} +28 -7
  41. package/src/publickey.ts +13 -8
  42. package/src/{transaction-constants.ts → transaction/constants.ts} +0 -0
  43. package/src/transaction/expiry-custom-errors.ts +35 -0
  44. package/src/transaction/index.ts +3 -0
  45. package/src/{transaction.ts → transaction/legacy.ts} +116 -49
  46. package/src/{util → utils}/assert.ts +0 -0
  47. package/src/utils/bigint.ts +43 -0
  48. package/src/{util → utils}/borsh-schema.ts +0 -0
  49. package/src/{util → utils}/cluster.ts +0 -0
  50. package/src/utils/index.ts +4 -0
  51. package/src/utils/makeWebsocketUrl.ts +26 -0
  52. package/src/{util → utils}/promise-timeout.ts +0 -0
  53. package/src/utils/secp256k1.ts +18 -0
  54. package/src/utils/send-and-confirm-raw-transaction.ts +92 -0
  55. package/src/{util → utils}/send-and-confirm-transaction.ts +20 -6
  56. package/src/{util → utils}/shortvec-encoding.ts +0 -0
  57. package/src/{util → utils}/sleep.ts +0 -0
  58. package/src/{util → utils}/to-buffer.ts +0 -0
  59. package/src/validator-info.ts +4 -6
  60. package/src/vote-account.ts +1 -1
  61. package/src/util/send-and-confirm-raw-transaction.ts +0 -46
  62. package/src/util/url.ts +0 -18
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
- [Latest API Documentation](https://solana-labs.github.io/solana-web3.js/)
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
@@ -116,6 +109,10 @@ Each Github release features a tarball containing API documentation and a
116
109
  minified version of the module suitable for direct use in a browser environment
117
110
  (`<script>` tag)
118
111
 
112
+ ## Contributing
113
+
114
+ If you have an issue to report or would like to contribute a pull request, please do so against the monorepo at https://github.com/solana-labs/solana. We are not able to merge pull requests into the mirror repo https://github.com/solana-labs/solana-web3.js and issues filed there may go unnoticed.
115
+
119
116
  ## Disclaimer
120
117
 
121
118
  All claims, content, designs, algorithms, estimates, roadmaps,