@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.
Files changed (2) hide show
  1. package/README.md +24 -32
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -3,17 +3,16 @@
3
3
  [![NPM Version](https://img.shields.io/npm/v/@tuwaio/orbit-solana.svg)](https://www.npmjs.com/package/@tuwaio/orbit-solana)
4
4
  [![License](https://img.shields.io/npm/l/@tuwaio/orbit-solana.svg)](./LICENSE)
5
5
 
6
- `@tuwaio/orbit-solana` provides concrete implementations and utilities tailored specifically for the Solana blockchain. Built entirely in **TypeScript** and powered by **`gill`** (the modern improvement layer over `@solana/kit`), it acts as the Solana adapter for the Orbit Utils ecosystem, simplifying wallet discovery via standard specifications and optimizing RPC client performance.
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 clients (`createSolanaClientWithCache`, `createSolanaRPC`) to eliminate instantiation overhead.
13
- - **Wallet Standard Support:** Dynamic wallet discovery (`getAvailableSolanaConnectors`) and active wallet retrieval (`getConnectedSolanaConnector`) conforming to the official `@wallet-standard` specifications.
14
- - **Account Metadata Lookups:** Retrieves user-defined account labels (names) and icons (avatars) directly from connected Wallet Standard accounts with cache persistence.
15
- - **Cluster Moniker Helpers:** Utilities to resolve Solana cluster parameters (mainnet, devnet, testnet) and fetch matching RPC nodes.
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
- ## 🚀 Quick Start
30
+ ## 🚀 Technical Integration
32
31
 
33
- ### Wallet Discovery
32
+ ### Cached RPC Connection
34
33
 
35
- Locate installed wallets supporting the modern Wallet Standard:
34
+ Establish cached RPC endpoints dynamically:
36
35
 
37
36
  ```typescript
38
- import { getAvailableSolanaConnectors } from '@tuwaio/orbit-solana';
37
+ import { createSolanaClientWithCache } from '@tuwaio/orbit-solana';
39
38
 
40
- const wallets = getAvailableSolanaConnectors();
41
- console.log(
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
- ### Cached RPC Operations
43
+ ### Wallet Standard Discovery
48
44
 
49
- Obtain a cached public Solana client for network requests:
45
+ Query the browser runtime for installed Wallet Standard adapters:
50
46
 
51
47
  ```typescript
52
- import { createSolanaClientWithCache } from '@tuwaio/orbit-solana';
53
-
54
- // Obtain cached mainnet client
55
- const client = createSolanaClientWithCache({ rpcUrlOrMoniker: 'mainnet' });
48
+ import { getAvailableSolanaConnectors } from '@tuwaio/orbit-solana';
56
49
 
57
- // Perform RPC actions
58
- // const balance = await client.rpc.getBalance(address).send();
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` exports the following modules:
61
+ `@tuwaio/orbit-solana` exposes the following modules:
66
62
 
67
- - **RPC Client Factory:** `createSolanaClientWithCache`, `createSolanaRPC`.
68
- - **Wallet Discoverer:** `getAvailableSolanaConnectors`, `getConnectedSolanaConnector`.
69
- - **Account Info Resolvers:** `getSolanaAddressName`, `getSolanaAddressAvatar`.
63
+ - **RPC Factory:** `createSolanaClientWithCache`, `createSolanaRPC`.
64
+ - **Connector Discovery:** `getAvailableSolanaConnectors`, `getConnectedSolanaConnector`.
65
+ - **Account Resolvers:** `getSolanaAddressName`, `getSolanaAddressAvatar`.
70
66
  - **Network Helpers:** `getCluster`, `getRpcUrlForCluster`.
71
- - **URL Builder:** `getSolanaExplorerLink`.
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.9",
3
+ "version": "0.2.11",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
7
- "description": "The core, with web3 Solana utilities and helpers for TUWA projects.",
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.11"
52
+ "@tuwaio/orbit-core": "^0.2.13"
53
53
  },
54
54
  "scripts": {
55
55
  "start": "tsup src/index.ts --watch",