@tuwaio/orbit-solana 0.2.9 → 0.2.11
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 +24 -32
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,17 +3,16 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@tuwaio/orbit-solana)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
|
|
6
|
-
`@tuwaio/orbit-solana` provides concrete implementations
|
|
6
|
+
`@tuwaio/orbit-solana` provides concrete implementations of low-level Solana-specific communication primitives for Layer 2 (L2) of the TUWA Orbit stack. Engineered strictly on top of **`gill`** (the modern high-performance alternative to legacy Solana web3.js classes), this package integrates Wallet Standard capabilities for discovery and persistent caching of RPC connections.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
## 🏛️ Core Capabilities
|
|
11
11
|
|
|
12
|
-
- **Gill RPC Caching:** Creates and caches high-performance Solana RPC
|
|
13
|
-
- **Wallet Standard
|
|
14
|
-
- **
|
|
15
|
-
- **Cluster
|
|
16
|
-
- **Explorer Link Factory:** Generates explorer URLs (e.g. Solscan) automatically handling the active cluster parameters.
|
|
12
|
+
- **Gill RPC Caching:** Creates and caches high-performance Solana RPC connections (`createSolanaClientWithCache`, `createSolanaRPC`) to optimize transaction dispatching and query pipelines.
|
|
13
|
+
- **Wallet Standard Integration:** Low-level discovery routines (`getAvailableSolanaConnectors`, `getConnectedSolanaConnector`) that strictly align with the `@wallet-standard/app` specifications.
|
|
14
|
+
- **Profile Metadata Engine:** Resolves user-defined account descriptors (names, avatars) directly from Wallet Standard providers.
|
|
15
|
+
- **Cluster Parameter Resolution:** Maps Solana RPC clusters (mainnet, devnet, testnet) to explorer endpoints and RPC configurations.
|
|
17
16
|
|
|
18
17
|
---
|
|
19
18
|
|
|
@@ -28,54 +27,47 @@ pnpm add @tuwaio/orbit-solana @tuwaio/orbit-core gill @wallet-standard/app @wall
|
|
|
28
27
|
|
|
29
28
|
---
|
|
30
29
|
|
|
31
|
-
## 🚀
|
|
30
|
+
## 🚀 Technical Integration
|
|
32
31
|
|
|
33
|
-
###
|
|
32
|
+
### Cached RPC Connection
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
Establish cached RPC endpoints dynamically:
|
|
36
35
|
|
|
37
36
|
```typescript
|
|
38
|
-
import {
|
|
37
|
+
import { createSolanaClientWithCache } from '@tuwaio/orbit-solana';
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'Detected Wallets:',
|
|
43
|
-
wallets.map((w) => w.name),
|
|
44
|
-
); // ['Phantom', 'Solflare', ...]
|
|
39
|
+
// Obtain cached connection primitive
|
|
40
|
+
const client = createSolanaClientWithCache({ rpcUrlOrMoniker: 'mainnet' });
|
|
45
41
|
```
|
|
46
42
|
|
|
47
|
-
###
|
|
43
|
+
### Wallet Standard Discovery
|
|
48
44
|
|
|
49
|
-
|
|
45
|
+
Query the browser runtime for installed Wallet Standard adapters:
|
|
50
46
|
|
|
51
47
|
```typescript
|
|
52
|
-
import {
|
|
53
|
-
|
|
54
|
-
// Obtain cached mainnet client
|
|
55
|
-
const client = createSolanaClientWithCache({ rpcUrlOrMoniker: 'mainnet' });
|
|
48
|
+
import { getAvailableSolanaConnectors } from '@tuwaio/orbit-solana';
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
const connectors = getAvailableSolanaConnectors();
|
|
51
|
+
console.log(
|
|
52
|
+
'Available Standard Adapters:',
|
|
53
|
+
connectors.map((c) => c.name),
|
|
54
|
+
);
|
|
59
55
|
```
|
|
60
56
|
|
|
61
57
|
---
|
|
62
58
|
|
|
63
59
|
## 🔧 API & Module Architecture
|
|
64
60
|
|
|
65
|
-
`@tuwaio/orbit-solana`
|
|
61
|
+
`@tuwaio/orbit-solana` exposes the following modules:
|
|
66
62
|
|
|
67
|
-
- **RPC
|
|
68
|
-
- **
|
|
69
|
-
- **Account
|
|
63
|
+
- **RPC Factory:** `createSolanaClientWithCache`, `createSolanaRPC`.
|
|
64
|
+
- **Connector Discovery:** `getAvailableSolanaConnectors`, `getConnectedSolanaConnector`.
|
|
65
|
+
- **Account Resolvers:** `getSolanaAddressName`, `getSolanaAddressAvatar`.
|
|
70
66
|
- **Network Helpers:** `getCluster`, `getRpcUrlForCluster`.
|
|
71
|
-
- **
|
|
67
|
+
- **Explorer Helpers:** `getSolanaExplorerLink`.
|
|
72
68
|
|
|
73
69
|
---
|
|
74
70
|
|
|
75
|
-
## 🤝 Contributing
|
|
76
|
-
|
|
77
|
-
Please read our main **[Contribution Guidelines](https://github.com/TuwaIO/workflows/blob/main/CONTRIBUTING.md)** before submitting pull requests.
|
|
78
|
-
|
|
79
71
|
## 📄 License
|
|
80
72
|
|
|
81
73
|
Licensed under the **Apache-2.0 License**. See the [LICENSE](./LICENSE) file for details.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/orbit-solana",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
|
-
"description": "
|
|
7
|
+
"description": "Layer 2 (L2) of the TUWA Ecosystem. Low-level Solana-specific communication primitives and RPC caching utilities powered strictly by gill.",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"module": "./dist/index.mjs",
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@wallet-standard/app": "^1.1.1",
|
|
50
50
|
"@wallet-standard/ui-core": "^1.0.1",
|
|
51
51
|
"@wallet-standard/ui-registry": "^1.1.1",
|
|
52
|
-
"@tuwaio/orbit-core": "^0.2.
|
|
52
|
+
"@tuwaio/orbit-core": "^0.2.13"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"start": "tsup src/index.ts --watch",
|