@solana/web3.js 1.75.0 → 2.0.0-experimental.239bb91

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 (97) hide show
  1. package/dist/index.browser.cjs +77 -0
  2. package/dist/index.browser.cjs.map +1 -0
  3. package/dist/index.browser.js +68 -0
  4. package/dist/index.browser.js.map +1 -0
  5. package/dist/index.development.js +539 -0
  6. package/dist/index.development.js.map +1 -0
  7. package/dist/index.native.js +70 -0
  8. package/dist/index.native.js.map +1 -0
  9. package/dist/index.node.cjs +79 -0
  10. package/dist/index.node.cjs.map +1 -0
  11. package/dist/index.node.js +68 -0
  12. package/dist/index.node.js.map +1 -0
  13. package/dist/index.production.min.js +13 -0
  14. package/dist/types/index.d.ts +4 -0
  15. package/dist/types/rpc-default-config.d.ts +3 -0
  16. package/dist/types/rpc-integer-overflow-error.d.ts +8 -0
  17. package/dist/types/rpc-transport.d.ts +4 -0
  18. package/dist/types/rpc.d.ts +5 -0
  19. package/package.json +86 -113
  20. package/README.md +0 -155
  21. package/lib/index.browser.cjs.js +0 -9510
  22. package/lib/index.browser.cjs.js.map +0 -1
  23. package/lib/index.browser.esm.js +0 -9404
  24. package/lib/index.browser.esm.js.map +0 -1
  25. package/lib/index.cjs.js +0 -12034
  26. package/lib/index.cjs.js.map +0 -1
  27. package/lib/index.d.ts +0 -3885
  28. package/lib/index.esm.js +0 -11921
  29. package/lib/index.esm.js.map +0 -1
  30. package/lib/index.iife.js +0 -24593
  31. package/lib/index.iife.js.map +0 -1
  32. package/lib/index.iife.min.js +0 -13
  33. package/lib/index.iife.min.js.map +0 -1
  34. package/lib/index.native.js +0 -9510
  35. package/lib/index.native.js.map +0 -1
  36. package/src/__forks__/browser/fetch-impl.ts +0 -4
  37. package/src/__forks__/browser/rpc-websocket-factory.ts +0 -1
  38. package/src/__forks__/react-native/fetch-impl.ts +0 -4
  39. package/src/__forks__/react-native/rpc-websocket-factory.ts +0 -1
  40. package/src/account-data.ts +0 -39
  41. package/src/account.ts +0 -55
  42. package/src/blockhash.ts +0 -4
  43. package/src/bpf-loader-deprecated.ts +0 -5
  44. package/src/bpf-loader.ts +0 -45
  45. package/src/connection.ts +0 -6734
  46. package/src/epoch-schedule.ts +0 -102
  47. package/src/errors.ts +0 -50
  48. package/src/fee-calculator.ts +0 -18
  49. package/src/fetch-impl.ts +0 -13
  50. package/src/index.ts +0 -24
  51. package/src/instruction.ts +0 -58
  52. package/src/keypair.ts +0 -93
  53. package/src/layout.ts +0 -188
  54. package/src/loader.ts +0 -236
  55. package/src/message/account-keys.ts +0 -79
  56. package/src/message/compiled-keys.ts +0 -165
  57. package/src/message/index.ts +0 -47
  58. package/src/message/legacy.ts +0 -326
  59. package/src/message/v0.ts +0 -496
  60. package/src/message/versioned.ts +0 -36
  61. package/src/nonce-account.ts +0 -82
  62. package/src/programs/address-lookup-table/index.ts +0 -435
  63. package/src/programs/address-lookup-table/state.ts +0 -84
  64. package/src/programs/compute-budget.ts +0 -281
  65. package/src/programs/ed25519.ts +0 -157
  66. package/src/programs/index.ts +0 -7
  67. package/src/programs/secp256k1.ts +0 -228
  68. package/src/programs/stake.ts +0 -935
  69. package/src/programs/system.ts +0 -1048
  70. package/src/programs/vote.ts +0 -541
  71. package/src/publickey.ts +0 -259
  72. package/src/rpc-websocket-factory.ts +0 -4
  73. package/src/rpc-websocket.ts +0 -79
  74. package/src/sysvar.ts +0 -37
  75. package/src/timing.ts +0 -23
  76. package/src/transaction/constants.ts +0 -12
  77. package/src/transaction/expiry-custom-errors.ts +0 -48
  78. package/src/transaction/index.ts +0 -5
  79. package/src/transaction/legacy.ts +0 -908
  80. package/src/transaction/message.ts +0 -140
  81. package/src/transaction/versioned.ts +0 -126
  82. package/src/utils/assert.ts +0 -8
  83. package/src/utils/bigint.ts +0 -43
  84. package/src/utils/borsh-schema.ts +0 -38
  85. package/src/utils/cluster.ts +0 -31
  86. package/src/utils/ed25519.ts +0 -46
  87. package/src/utils/index.ts +0 -5
  88. package/src/utils/makeWebsocketUrl.ts +0 -26
  89. package/src/utils/promise-timeout.ts +0 -14
  90. package/src/utils/secp256k1.ts +0 -18
  91. package/src/utils/send-and-confirm-raw-transaction.ts +0 -102
  92. package/src/utils/send-and-confirm-transaction.ts +0 -98
  93. package/src/utils/shortvec-encoding.ts +0 -28
  94. package/src/utils/sleep.ts +0 -4
  95. package/src/utils/to-buffer.ts +0 -11
  96. package/src/validator-info.ts +0 -104
  97. package/src/vote-account.ts +0 -236
package/README.md DELETED
@@ -1,155 +0,0 @@
1
- [![npm][npm-image]][npm-url]
2
- [![npm-downloads][npm-downloads-image]][npm-url]
3
- [![semantic-release][semantic-release-image]][semantic-release-url]
4
- <br />
5
- [![code-style-prettier][code-style-prettier-image]][code-style-prettier-url]
6
-
7
- [code-style-prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square
8
- [code-style-prettier-url]: https://github.com/prettier/prettier
9
- [npm-downloads-image]: https://img.shields.io/npm/dm/@solana/web3.js.svg?style=flat
10
- [npm-image]: https://img.shields.io/npm/v/@solana/web3.js.svg?style=flat
11
- [npm-url]: https://www.npmjs.com/package/@solana/web3.js
12
- [semantic-release-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
13
- [semantic-release-url]: https://github.com/semantic-release/semantic-release
14
-
15
- # Solana JavaScript SDK
16
-
17
- Use this to interact with accounts and programs on the Solana network through the Solana [JSON RPC API](https://docs.solana.com/apps/jsonrpc-api).
18
-
19
- ## Installation
20
-
21
- ### For use in Node.js or a web application
22
-
23
- ```
24
- $ npm install --save @solana/web3.js
25
- ```
26
-
27
- ### For use in a browser, without a build system
28
-
29
- ```html
30
- <!-- Development (un-minified) -->
31
- <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
32
-
33
- <!-- Production (minified) -->
34
- <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.min.js"></script>
35
- ```
36
-
37
- ## Documentation and examples
38
-
39
- - [The Solana Cookbook](https://solanacookbook.com/) has extensive task-based documentation using this library.
40
- - For more detail on individual functions, see the [latest API Documentation](https://solana-labs.github.io/solana-web3.js)
41
-
42
- ## Getting help
43
-
44
- Have a question or a problem? Check the [Solana Stack Exchange](https://solana.stackexchange.com) to see if anyone else is having the same one. If not, [post a new question](https://solana.stackexchange.com/questions/ask).
45
-
46
- Include:
47
-
48
- - A detailed description of what you're trying to achieve
49
- - Source code, if possible
50
- - The text of any errors you encountered, with stacktraces if available
51
-
52
- ## Compatibility
53
-
54
- This library requires a JavaScript runtime that supports [`BigInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) and the [exponentiation operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Exponentiation). Both are supported in the following runtimes:
55
-
56
- - Browsers, by [release date](https://caniuse.com/bigint):
57
- - Chrome: May 2018
58
- - Firefox: July 2019
59
- - Safari: September 2020
60
- - Mobile Safari: September 2020
61
- - Edge: January 2020
62
- - Opera: June 2018
63
- - Samsung Internet: April 2019
64
- - Runtimes, [by version](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt):
65
- - Deno: >=1.0
66
- - Node: >=10.4.0
67
- - React Native:
68
- - \>=0.7.0 using the [Hermes](https://reactnative.dev/blog/2022/07/08/hermes-as-the-default) engine ([integration guide](https://solanacookbook.com/integrations/react-native.html#how-to-use-solana-web3-js-in-a-react-native-app)):
69
-
70
- ## Development environment setup
71
-
72
- ### Testing
73
-
74
- #### Unit tests
75
-
76
- To run the full suite of unit tests, excute the following in the root:
77
-
78
- ```shell
79
- $ npm test
80
- ```
81
-
82
- #### Integration tests
83
-
84
- Integration tests require a validator client running on your machine.
85
-
86
- To install a test validator:
87
-
88
- ```shell
89
- $ npm run test:live-with-test-validator:setup
90
- ```
91
-
92
- To start the test validator and run all of the integration tests in live mode:
93
-
94
- ```shell
95
- $ cd packages/library-legacy
96
- $ npm run test:live-with-test-validator
97
- ```
98
-
99
- ### Speed up build times with remote caching
100
-
101
- Cache build artifacts remotely so that you, others, and the CI server can take advantage of each others' build efforts.
102
-
103
- 1. Log the Turborepo CLI into the Solana Vercel account
104
- ```shell
105
- pnpm turbo login
106
- ```
107
- 2. Link the repository to the remote cache
108
- ```shell
109
- pnpm turbo link
110
- ```
111
-
112
- ## Contributing
113
-
114
- If you found a bug or would like to request a feature, please [file an issue](https://github.com/solana-labs/solana-web3.js/issues/new). If, based on the discussion on an issue you would like to offer a code change, please make a [pull request](https://github.com/solana-labs/solana-web3.js/compare). If neither of these describes what you would like to contribute, read the [getting help](#getting-help) section above.
115
-
116
- ## Disclaimer
117
-
118
- All claims, content, designs, algorithms, estimates, roadmaps,
119
- specifications, and performance measurements described in this project
120
- are done with the Solana Foundation's ("SF") best efforts. It is up to
121
- the reader to check and validate their accuracy and truthfulness.
122
- Furthermore nothing in this project constitutes a solicitation for
123
- investment.
124
-
125
- Any content produced by SF or developer resources that SF provides, are
126
- for educational and inspiration purposes only. SF does not encourage,
127
- induce or sanction the deployment, integration or use of any such
128
- applications (including the code comprising the Solana blockchain
129
- protocol) in violation of applicable laws or regulations and hereby
130
- prohibits any such deployment, integration or use. This includes use of
131
- any such applications by the reader (a) in violation of export control
132
- or sanctions laws of the United States or any other applicable
133
- jurisdiction, (b) if the reader is located in or ordinarily resident in
134
- a country or territory subject to comprehensive sanctions administered
135
- by the U.S. Office of Foreign Assets Control (OFAC), or (c) if the
136
- reader is or is working on behalf of a Specially Designated National
137
- (SDN) or a person subject to similar blocking or denied party
138
- prohibitions.
139
-
140
- The reader should be aware that U.S. export control and sanctions laws
141
- prohibit U.S. persons (and other persons that are subject to such laws)
142
- from transacting with persons in certain countries and territories or
143
- that are on the SDN list. As a project based primarily on open-source
144
- software, it is possible that such sanctioned persons may nevertheless
145
- bypass prohibitions, obtain the code comprising the Solana blockchain
146
- protocol (or other project code or applications) and deploy, integrate,
147
- or otherwise use it. Accordingly, there is a risk to individuals that
148
- other persons using the Solana blockchain protocol may be sanctioned
149
- persons and that transactions with such persons would be a violation of
150
- U.S. export controls and sanctions law. This risk applies to
151
- individuals, organizations, and other ecosystem participants that
152
- deploy, integrate, or use the Solana blockchain protocol code directly
153
- (e.g., as a node operator), and individuals that transact on the Solana
154
- blockchain through light clients, third party interfaces, and/or wallet
155
- software.