Skip to content

Commit 11b29ec

Browse files
authored
docs: update sdk readme for release (#314)
1 parent d953eb6 commit 11b29ec

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

sdks/ts/README.md

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
# Kora TypeScript SDK
22

3-
A TypeScript SDK for interacting with the Kora RPC server. This SDK provides a type-safe interface to all Kora RPC methods.
3+
A TypeScript SDK for interacting with the Kora RPC server. This SDK provides a type-safe interface to all Kora RPC methods (requires a Kora RPC server to be running).
44

5-
## Development
5+
6+
## Installation
7+
8+
```bash
9+
pnpm install @solana/kora
10+
```
11+
12+
## Quick Start
13+
14+
```typescript
15+
import { KoraClient } from '@solana/kora';
16+
17+
// Initialize the client with your RPC endpoint
18+
const client = new KoraClient({ rpcUrl: 'http://localhost:8080' });
19+
20+
// Example: Get Kora to sign a transaction
21+
const result = await client.signTransaction({
22+
transaction: 'myBase64EncodedTransaction'
23+
});
24+
25+
// Access the signed transaction (base64 encoded)
26+
console.log('Signed transaction:', result.signed_transaction);
27+
```
28+
29+
**[→ API Reference](https://launch.solana.com/docs/kora/json-rpc-api)**
30+
**[→ Quick Start](https://launch.solana.com/docs/kora/getting-started/quick-start)**
31+
32+
## Local Development
633

734
### Building from Source
835

@@ -33,28 +60,3 @@ pnpm test:ci:integration
3360

3461
This will start a local test validator and run all tests.
3562

36-
37-
## Quick Start
38-
39-
```typescript
40-
import { KoraClient } from '@solana/kora';
41-
42-
// Initialize the client with your RPC endpoint
43-
const client = new KoraClient({ rpcUrl: 'http://localhost:8080' });
44-
45-
// Example: Transfer tokens
46-
const result = await client.transferTransaction({
47-
amount: 1000000, // 1 USDC (6 decimals)
48-
token: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC mint
49-
source: "sourceAddress",
50-
destination: "destinationAddress"
51-
});
52-
53-
// Access the base64 encoded transaction, base64 encoded message, and parsed instructions directly
54-
console.log('Transaction:', result.transaction);
55-
console.log('Message:', result.message);
56-
console.log('Instructions:', result.instructions);
57-
```
58-
59-
**[→ API Reference](https://launch.solana.com/docs/kora/json-rpc-api)**
60-
**[→ Quick Start](https://launch.solana.com/docs/kora/getting-started/quick-start)**

0 commit comments

Comments
 (0)