@owney/sdk 0.7.25-beta.6 → 0.7.25-beta.8
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 +17 -23
- package/dist/index.cjs +356 -153
- package/dist/index.d.cts +166 -147
- package/dist/index.d.ts +166 -147
- package/dist/index.js +356 -153
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,11 +16,7 @@ import { OwneySDK } from "@owney/sdk";
|
|
|
16
16
|
// Create the SDK instance
|
|
17
17
|
const sdk = new OwneySDK({
|
|
18
18
|
apiKey: "your-owney-api-key",
|
|
19
|
-
|
|
20
|
-
1: "https://eth-mainnet.g.alchemy.com/v2/<key>",
|
|
21
|
-
8453: "https://base-mainnet.g.alchemy.com/v2/<key>",
|
|
22
|
-
42161: "https://arb-mainnet.g.alchemy.com/v2/<key>",
|
|
23
|
-
},
|
|
19
|
+
routingApiBaseUrl: "https://your-routing-api.example",
|
|
24
20
|
});
|
|
25
21
|
|
|
26
22
|
// Connect with an EIP-1193 wallet provider
|
|
@@ -42,6 +38,7 @@ Create a new SDK instance.
|
|
|
42
38
|
| Param | Type | Description |
|
|
43
39
|
| --------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
44
40
|
| `config.apiKey` | `string` | Your Owney API key, used to authenticate with the routing API and fetch agent-specific keys |
|
|
41
|
+
| `config.routingApiBaseUrl` | `string` (optional) | Routing API URL; required for proxy reads unless the SDK build has `OWNEY_ROUTING_API_BASE_URL` or all `rpcUrls` are set |
|
|
45
42
|
| `config.rpcUrls` | `{ 1?: string; 8453?: string; 42161?: string }` (optional) | Per-chain RPC overrides used by agent reads and transaction-receipt polling |
|
|
46
43
|
| `config.zyfaiRpcUrls` | Same as `rpcUrls` (deprecated) | Legacy Zyfai-only override; use `rpcUrls` for all application-owned reads |
|
|
47
44
|
|
|
@@ -50,11 +47,7 @@ import { OwneySDK } from "@owney/sdk";
|
|
|
50
47
|
|
|
51
48
|
const sdk = new OwneySDK({
|
|
52
49
|
apiKey: "your-owney-api-key",
|
|
53
|
-
|
|
54
|
-
1: "https://eth-mainnet.g.alchemy.com/v2/<key>",
|
|
55
|
-
8453: "https://base-mainnet.g.alchemy.com/v2/<key>",
|
|
56
|
-
42161: "https://arb-mainnet.g.alchemy.com/v2/<key>",
|
|
57
|
-
},
|
|
50
|
+
routingApiBaseUrl: "https://your-routing-api.example",
|
|
58
51
|
});
|
|
59
52
|
```
|
|
60
53
|
|
|
@@ -68,16 +61,18 @@ switching, signatures, and transaction submission.
|
|
|
68
61
|
supported chain using this precedence:
|
|
69
62
|
|
|
70
63
|
1. The caller-provided `rpcUrls[chainId]`, when present and non-empty.
|
|
71
|
-
2. The Owney
|
|
64
|
+
2. The Owney routing API read-only RPC proxy for that chain.
|
|
72
65
|
|
|
73
|
-
The
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
The Alchemy credential stays on the routing API server. The SDK sends its
|
|
67
|
+
existing organization key to the proxy for per-organization rate limiting.
|
|
68
|
+
The proxy base URL must be provided through `routingApiBaseUrl` or the SDK
|
|
69
|
+
build's `OWNEY_ROUTING_API_BASE_URL`; there is no hardcoded production fallback.
|
|
76
70
|
|
|
77
71
|
```typescript
|
|
78
|
-
//
|
|
72
|
+
// All supported chains use the Owney routing API proxy.
|
|
79
73
|
const sdk = new OwneySDK({
|
|
80
74
|
apiKey: "your-owney-api-key",
|
|
75
|
+
routingApiBaseUrl: "https://your-routing-api.example",
|
|
81
76
|
});
|
|
82
77
|
```
|
|
83
78
|
|
|
@@ -86,9 +81,10 @@ Overrides can be complete or partial:
|
|
|
86
81
|
```typescript
|
|
87
82
|
const sdk = new OwneySDK({
|
|
88
83
|
apiKey: "your-owney-api-key",
|
|
84
|
+
routingApiBaseUrl: "https://your-routing-api.example",
|
|
89
85
|
rpcUrls: {
|
|
90
|
-
// Ethereum and Arbitrum continue using
|
|
91
|
-
8453: "https://
|
|
86
|
+
// Ethereum and Arbitrum continue using the routing API proxy.
|
|
87
|
+
8453: "https://your-own-rpc.example/rpc",
|
|
92
88
|
},
|
|
93
89
|
});
|
|
94
90
|
```
|
|
@@ -106,12 +102,10 @@ The resolved URLs are shared across Owney-owned reads and agent integrations:
|
|
|
106
102
|
|
|
107
103
|
Notes:
|
|
108
104
|
|
|
109
|
-
- Owney mini-apps
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
- Partial maps override only the supplied chains; missing chains retain Owney
|
|
114
|
-
SDK defaults.
|
|
105
|
+
- Owney mini-apps pass the same routing API proxy URLs to Wagmi and the SDK.
|
|
106
|
+
- SDK consumers may override endpoints if they operate their own RPC provider.
|
|
107
|
+
- Partial maps override only the supplied chains; missing chains use Owney's
|
|
108
|
+
routing API proxy.
|
|
115
109
|
- HTTP reads use bounded retries and honor provider `Retry-After` responses.
|
|
116
110
|
- `zyfaiRpcUrls` remains available for compatibility but applies only to Zyfai.
|
|
117
111
|
|