@solana/kora 0.2.0-beta.6 → 0.2.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solana/kora",
3
- "version": "0.2.0-beta.6",
3
+ "version": "0.2.1",
4
4
  "description": "TypeScript SDK for Kora RPC",
5
5
  "main": "dist/src/index.js",
6
6
  "type": "module",
@@ -22,18 +22,23 @@
22
22
  "directory": "sdks/ts"
23
23
  },
24
24
  "peerDependencies": {
25
- "@solana-program/compute-budget": "^0.15.0",
25
+ "@solana-program/compute-budget": "^0.13.0",
26
26
  "@solana-program/token": "^0.12.0",
27
- "@solana/kit": "^6.3.0",
28
- "@solana/kit-plugin-instruction-plan": "^0.7.0",
27
+ "@solana/kit": "^6.1.0",
28
+ "@solana/kit-plugin-instruction-plan": "^0.6.0",
29
29
  "@solana/kit-plugin-payer": "^0.6.0",
30
- "@solana/kit-plugin-rpc": "^0.7.0"
30
+ "@solana/kit-plugin-rpc": "^0.6.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@eslint/js": "^9.39.3",
34
- "@solana-program/system": "^0.12.0",
34
+ "@solana-program/compute-budget": "^0.13.0",
35
+ "@solana-program/system": "^0.11.0",
36
+ "@solana-program/token": "^0.12.0",
35
37
  "@solana/eslint-config-solana": "6.0.0",
36
- "@solana/kit-client-litesvm": "^0.7.0",
38
+ "@solana/kit": "^6.1.0",
39
+ "@solana/kit-plugin-instruction-plan": "^0.6.0",
40
+ "@solana/kit-plugin-payer": "^0.6.0",
41
+ "@solana/kit-plugin-rpc": "^0.6.0",
37
42
  "@solana/prettier-config-solana": "^0.0.6",
38
43
  "@types/jest": "^29.5.12",
39
44
  "@types/node": "^20.17.27",
@@ -51,7 +56,8 @@
51
56
  "typedoc": "^0.28.9",
52
57
  "typedoc-plugin-markdown": "^4.8.0",
53
58
  "typescript": "^5.9.3",
54
- "typescript-eslint": "^8.56.1"
59
+ "typescript-eslint": "^8.56.1",
60
+ "ws": "^8.18.3"
55
61
  },
56
62
  "scripts": {
57
63
  "build": "tsc",
@@ -65,6 +71,8 @@
65
71
  "test:integration:privy": "KORA_SIGNER_TYPE=privy pnpm test integration.test.ts",
66
72
  "test:integration:turnkey": "KORA_SIGNER_TYPE=turnkey pnpm test integration.test.ts",
67
73
  "test:unit": "pnpm test unit.test.ts",
74
+ "test:ci:integration": "node scripts/test-with-validator.js",
75
+ "test:ci:integration:auth": "ENABLE_AUTH=true node scripts/test-with-validator.js",
68
76
  "test:ci:unit": "jest test/unit.test.ts",
69
77
  "lint": "eslint src/",
70
78
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
@@ -1,85 +0,0 @@
1
- import type { EstimateBundleFeeRequest, EstimateTransactionFeeRequest, GetPaymentInstructionRequest, GetVersionResponse, KitBlockhashResponse, KitConfigResponse, KitEstimateBundleFeeResponse, KitEstimateFeeResponse, KitPayerSignerResponse, KitPaymentInstructionResponse, KitSignAndSendBundleResponse, KitSignAndSendTransactionResponse, KitSignBundleResponse, KitSignTransactionResponse, KitSupportedTokensResponse, KoraPluginConfig, SignAndSendBundleRequest, SignAndSendTransactionRequest, SignBundleRequest, SignTransactionRequest } from './types/index.js';
2
- /**
3
- * Creates a Kora Kit plugin that adds Kora paymaster functionality to a Kit client.
4
- *
5
- * The plugin exposes all Kora RPC methods with Kit-typed responses (Address, Blockhash).
6
- *
7
- * **Note:** The plugin pattern with `createEmptyClient().use()` requires `@solana/kit` v5.4.0+.
8
- * For older kit versions, use `KoraClient` directly instead.
9
- *
10
- * @param config - Plugin configuration
11
- * @param config.endpoint - Kora RPC endpoint URL
12
- * @param config.apiKey - Optional API key for authentication
13
- * @param config.hmacSecret - Optional HMAC secret for signature-based authentication
14
- * @returns A Kit plugin function that adds `.kora` to the client
15
- *
16
- * @example
17
- * ```typescript
18
- * import { createEmptyClient } from '@solana/kit';
19
- * import { koraPlugin } from '@solana/kora';
20
- *
21
- * const client = createEmptyClient()
22
- * .use(koraPlugin({ endpoint: 'https://kora.example.com' }));
23
- *
24
- * // All responses have Kit-typed fields
25
- * const config = await client.kora.getConfig();
26
- * // config.fee_payers is Address[] not string[]
27
- *
28
- * const { signer_pubkey } = await client.kora.signTransaction({ transaction: tx });
29
- * // signer_pubkey is Address not string
30
- * ```
31
- */
32
- export declare function koraPlugin(config: KoraPluginConfig): <T extends object>(c: T) => T & {
33
- kora: {
34
- /**
35
- * Estimates the bundle fee with Kit-typed addresses.
36
- */
37
- estimateBundleFee(request: EstimateBundleFeeRequest): Promise<KitEstimateBundleFeeResponse>;
38
- /**
39
- * Estimates the transaction fee with Kit-typed addresses.
40
- */
41
- estimateTransactionFee(request: EstimateTransactionFeeRequest): Promise<KitEstimateFeeResponse>;
42
- /**
43
- * Gets the latest blockhash with Kit Blockhash type.
44
- */
45
- getBlockhash(): Promise<KitBlockhashResponse>;
46
- /**
47
- * Retrieves the current Kora server configuration with Kit-typed addresses.
48
- */
49
- getConfig(): Promise<KitConfigResponse>;
50
- /**
51
- * Retrieves the payer signer and payment destination with Kit-typed addresses.
52
- */
53
- getPayerSigner(): Promise<KitPayerSignerResponse>;
54
- /**
55
- * Creates a payment instruction with Kit-typed response.
56
- */
57
- getPaymentInstruction(request: GetPaymentInstructionRequest): Promise<KitPaymentInstructionResponse>;
58
- /**
59
- * Retrieves the list of tokens supported for fee payment with Kit-typed addresses.
60
- */
61
- getSupportedTokens(): Promise<KitSupportedTokensResponse>;
62
- /**
63
- * Gets the version of the Kora server.
64
- */
65
- getVersion(): Promise<GetVersionResponse>;
66
- /**
67
- * Signs and sends a bundle of transactions via Jito with Kit-typed response.
68
- */
69
- signAndSendBundle(request: SignAndSendBundleRequest): Promise<KitSignAndSendBundleResponse>;
70
- /**
71
- * Signs and sends a transaction with Kit-typed response.
72
- */
73
- signAndSendTransaction(request: SignAndSendTransactionRequest): Promise<KitSignAndSendTransactionResponse>;
74
- /**
75
- * Signs a bundle of transactions with Kit-typed response.
76
- */
77
- signBundle(request: SignBundleRequest): Promise<KitSignBundleResponse>;
78
- /**
79
- * Signs a transaction with Kit-typed response.
80
- */
81
- signTransaction(request: SignTransactionRequest): Promise<KitSignTransactionResponse>;
82
- };
83
- };
84
- /** Type representing the Kora API exposed by the plugin */
85
- export type KoraApi = ReturnType<ReturnType<typeof koraPlugin>>['kora'];