@arcium-hq/client 0.4.0 → 0.5.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/README.md CHANGED
@@ -130,6 +130,7 @@ The SDK provides helper functions to derive all necessary Arcium PDAs:
130
130
 
131
131
  ```typescript
132
132
  import {
133
+ getArciumEnv,
133
134
  getMXEAccAddress,
134
135
  getMempoolAccAddress,
135
136
  getCompDefAccAddress,
@@ -137,13 +138,18 @@ import {
137
138
  getComputationAccAddress,
138
139
  getCompDefAccOffset,
139
140
  getArciumAccountBaseSeed,
140
- getArciumProgAddress,
141
+ getArciumProgramId,
141
142
  } from "@arcium-hq/client";
142
143
 
143
- // Get various account addresses
144
+ // Get cluster offset from environment
145
+ const arciumEnv = getArciumEnv();
146
+
147
+ // Get MXE account address (uses MXE program ID)
144
148
  const mxeAccount = getMXEAccAddress(program.programId);
145
- const mempoolAccount = getMempoolAccAddress(program.programId);
146
- const executingPool = getExecutingPoolAccAddress(program.programId);
149
+
150
+ // Get pool addresses (use cluster offset, not program ID)
151
+ const mempoolAccount = getMempoolAccAddress(arciumEnv.arciumClusterOffset);
152
+ const executingPool = getExecutingPoolAccAddress(arciumEnv.arciumClusterOffset);
147
153
 
148
154
  // Get computation definition address
149
155
  const compDefOffset = getCompDefAccOffset("your_computation_name");
@@ -152,9 +158,9 @@ const compDefAccount = getCompDefAccAddress(
152
158
  Buffer.from(compDefOffset).readUInt32LE()
153
159
  );
154
160
 
155
- // Get computation account for a specific offset
161
+ // Get computation account for a specific offset (uses cluster offset)
156
162
  const computationAccount = getComputationAccAddress(
157
- program.programId,
163
+ arciumEnv.arciumClusterOffset,
158
164
  computationOffset
159
165
  );
160
166
  ```
@@ -201,6 +207,6 @@ await provider.sendAndConfirm(finalizeTx);
201
207
 
202
208
  ## API Reference
203
209
 
204
- <!-- TODO: Add API reference url -->
205
-
206
- For detailed API documentation, please refer to the [API reference](https://github.com/arcium-hq) included with the package.
210
+ - **[API Reference](https://ts.arcium.com/api)** - Complete API documentation
211
+ - **[Developer Docs](https://docs.arcium.com/developers/js-client-library)** - Guides and tutorials
212
+ - **[Examples](https://github.com/arcium-hq/examples)** - Code examples