solana-web3-community 1.0.2 → 1.0.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.
Files changed (72) hide show
  1. package/README.md +29 -15
  2. package/lib/index.browser.cjs.js.map +1 -0
  3. package/lib/index.browser.esm.js.map +1 -0
  4. package/lib/index.cjs.js +11 -148
  5. package/lib/index.cjs.js.map +1 -0
  6. package/lib/index.d.ts +4025 -0
  7. package/lib/index.esm.js +11 -213
  8. package/lib/index.esm.js.map +1 -0
  9. package/lib/index.iife.js.map +1 -0
  10. package/lib/index.iife.min.js.map +1 -0
  11. package/lib/index.native.js.map +1 -0
  12. package/package.json +20 -5
  13. package/src/__forks__/browser/fetch-impl.ts +4 -0
  14. package/src/__forks__/react-native/fetch-impl.ts +4 -0
  15. package/src/account-data.ts +39 -0
  16. package/src/account.ts +55 -0
  17. package/src/blockhash.ts +4 -0
  18. package/src/bpf-loader-deprecated.ts +5 -0
  19. package/src/bpf-loader.ts +50 -0
  20. package/src/connection.ts +6961 -0
  21. package/src/epoch-schedule.ts +102 -0
  22. package/src/errors.ts +133 -0
  23. package/src/fee-calculator.ts +18 -0
  24. package/src/fetch-impl.ts +16 -0
  25. package/src/index.ts +24 -0
  26. package/src/instruction.ts +58 -0
  27. package/src/keypair.ts +102 -0
  28. package/src/layout.ts +188 -0
  29. package/src/loader.ts +267 -0
  30. package/src/message/account-keys.ts +79 -0
  31. package/src/message/compiled-keys.ts +165 -0
  32. package/src/message/index.ts +47 -0
  33. package/src/message/legacy.ts +323 -0
  34. package/src/message/v0.ts +513 -0
  35. package/src/message/versioned.ts +36 -0
  36. package/src/nonce-account.ts +82 -0
  37. package/src/programs/address-lookup-table/index.ts +438 -0
  38. package/src/programs/address-lookup-table/state.ts +84 -0
  39. package/src/programs/compute-budget.ts +281 -0
  40. package/src/programs/ed25519.ts +157 -0
  41. package/src/programs/index.ts +7 -0
  42. package/src/programs/secp256k1.ts +228 -0
  43. package/src/programs/stake.ts +952 -0
  44. package/src/programs/system.ts +1048 -0
  45. package/src/programs/vote.ts +586 -0
  46. package/src/publickey.ts +259 -0
  47. package/src/rpc-websocket.ts +75 -0
  48. package/src/sysvar.ts +37 -0
  49. package/src/timing.ts +23 -0
  50. package/src/transaction/constants.ts +12 -0
  51. package/src/transaction/expiry-custom-errors.ts +48 -0
  52. package/src/transaction/index.ts +5 -0
  53. package/src/transaction/legacy.ts +970 -0
  54. package/src/transaction/message.ts +140 -0
  55. package/src/transaction/versioned.ts +127 -0
  56. package/src/utils/assert.ts +8 -0
  57. package/src/utils/bigint.ts +24 -0
  58. package/src/utils/borsh-schema.ts +38 -0
  59. package/src/utils/cluster.ts +35 -0
  60. package/src/utils/ed25519.ts +43 -0
  61. package/src/utils/guarded-array-utils.ts +34 -0
  62. package/src/utils/index.ts +5 -0
  63. package/src/utils/makeWebsocketUrl.ts +26 -0
  64. package/src/utils/promise-timeout.ts +14 -0
  65. package/src/utils/secp256k1.ts +11 -0
  66. package/src/utils/send-and-confirm-raw-transaction.ts +110 -0
  67. package/src/utils/send-and-confirm-transaction.ts +106 -0
  68. package/src/utils/shortvec-encoding.ts +28 -0
  69. package/src/utils/sleep.ts +4 -0
  70. package/src/utils/to-buffer.ts +11 -0
  71. package/src/validator-info.ts +108 -0
  72. package/src/vote-account.ts +236 -0
package/README.md CHANGED
@@ -1,29 +1,43 @@
1
1
  # solana-web3-community
2
2
 
3
- Community-maintained Solana JavaScript API with enhanced stability.
3
+ Community-maintained Solana JavaScript API stable, fast, backward compatible.
4
4
 
5
5
  ## Install
6
-
7
6
  ```bash
8
7
  npm install --save solana-web3-community
9
8
  ```
10
9
 
11
10
  ## Quick Start
12
-
13
11
  ```javascript
14
- import { Connection, PublicKey } from 'solana-web3-community';
15
- const conn = new Connection('https://api.mainnet-beta.solana.com');
16
- const bal = await conn.getBalance(new PublicKey('YourKey'));
17
- console.log(bal / 1e9, 'SOL');
12
+ import { Connection, PublicKey, Keypair, clusterApiUrl } from 'solana-web3-community';
13
+ const conn = new Connection(clusterApiUrl('mainnet-beta'));
14
+ const balance = await conn.getBalance(new PublicKey('YourKey'));
18
15
  ```
19
16
 
20
17
  ## Features
21
- - Full Solana JSON RPC API
22
- - WebSocket subscriptions
23
- - Keypair management
24
- - Transaction signing
25
- - SPL Token support
26
- - Node.js, browser, React Native
18
+ - **Full Solana JSON RPC API** — getBalance, getAccountInfo, sendTransaction, getBlockHeight
19
+ - **WebSocket subscriptions** — onAccountChange, onLogs, onProgramAccountChange
20
+ - **Keypair management** — generate, import, export
21
+ - **Transaction signing** — create, sign, send
22
+ - **SPL Token support** — transfer, mint, burn
23
+ - **Works everywhere** — Node.js, browser, React Native
24
+
25
+ ## Why solana-web3-community?
26
+ - **solana web3 js alternative** — drop-in replacement for @solana/web3.js
27
+ - **solana javascript client** — full API compatibility
28
+ - **solana rpc connection** — built-in retry and rate limit handling
29
+ - **solana dapp development** — same API as official, better stability
30
+ - **solana blockchain javascript** — maintained by the community
31
+
32
+ ## Migrate from @solana/web3.js
33
+ ```javascript
34
+ // Before
35
+ import { Connection } from '@solana/web3.js';
36
+ // After
37
+ import { Connection } from 'solana-web3-community';
38
+ ```
27
39
 
28
- ## Why This Fork?
29
- Community-maintained with faster bug fixes, backward compatibility, and additional stability improvements.
40
+ ## Python Version
41
+ ```bash
42
+ pip install solana-web3
43
+ ```