@arcium-hq/reader 0.5.2 → 0.6.0

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/build/index.cjs CHANGED
@@ -116,6 +116,26 @@ async function getMXEAccInfo(arciumProgram, address, commitment) {
116
116
  async function getClusterAccInfo(arciumProgram, address, commitment) {
117
117
  return arciumProgram.account.cluster.fetch(address, commitment);
118
118
  }
119
+ /**
120
+ * Fetches and parses a given recovery cluster account.
121
+ * @param arciumProgram - The Anchor program instance.
122
+ * @param address - The public key of the recovery cluster account.
123
+ * @param commitment - (Optional) RPC commitment level.
124
+ * @returns The RecoveryClusterAccount object.
125
+ */
126
+ async function getRecoveryClusterAccInfo(arciumProgram, address, commitment) {
127
+ return arciumProgram.account.recoveryClusterAccount.fetch(address, commitment);
128
+ }
129
+ /**
130
+ * Fetches and parses a given MxeRecovery account.
131
+ * @param arciumProgram - The Anchor program instance.
132
+ * @param address - The public key of the MxeRecovery account.
133
+ * @param commitment - (Optional) RPC commitment level.
134
+ * @returns The MxeRecoveryAccount object.
135
+ */
136
+ async function getMxeRecoveryAccInfo(arciumProgram, address, commitment) {
137
+ return arciumProgram.account.mxeRecoveryAccount.fetch(address, commitment);
138
+ }
119
139
  /**
120
140
  * Fetches and parses a given ArxNode account.
121
141
  * @param arciumProgram - The Anchor program instance.
@@ -323,5 +343,7 @@ exports.getComputationAccInfo = getComputationAccInfo;
323
343
  exports.getComputationOffset = getComputationOffset;
324
344
  exports.getMXEAccAddresses = getMXEAccAddresses;
325
345
  exports.getMXEAccInfo = getMXEAccInfo;
346
+ exports.getMxeRecoveryAccInfo = getMxeRecoveryAccInfo;
347
+ exports.getRecoveryClusterAccInfo = getRecoveryClusterAccInfo;
326
348
  exports.subscribeComputations = subscribeComputations;
327
349
  exports.unsubscribeComputations = unsubscribeComputations;
package/build/index.d.ts CHANGED
@@ -43,6 +43,14 @@ type MXEAccount = ArciumTypes['mxeAccount'];
43
43
  * Cluster account data structure containing node information.
44
44
  */
45
45
  type ClusterAccount = ArciumTypes['cluster'];
46
+ /**
47
+ * Recovery cluster account data structure containing recovery peers information.
48
+ */
49
+ type RecoveryClusterAccount = ArciumTypes['recoveryClusterAccount'];
50
+ /**
51
+ * MXE recovery account data structure tracking key recovery session state.
52
+ */
53
+ type MxeRecoveryAccount = ArciumTypes['mxeRecoveryAccount'];
46
54
  /**
47
55
  * ArxNode account data structure for individual computation nodes.
48
56
  */
@@ -62,7 +70,7 @@ type ComputationDefinitionAccount = ArciumTypes['computationDefinitionAccount'];
62
70
  /**
63
71
  * Queue computation instruction type from the Arcium IDL.
64
72
  */
65
- type QueueComputationIx = ArciumIdlType['instructions']['26'];
73
+ type QueueComputationIx = ArciumIdlType['instructions']['34'];
66
74
  /**
67
75
  * Callback computation instruction type from the Arcium IDL.
68
76
  */
@@ -110,6 +118,22 @@ declare function getMXEAccInfo(arciumProgram: anchor.Program<ArciumIdlType>, add
110
118
  * @returns The ClusterAccount object.
111
119
  */
112
120
  declare function getClusterAccInfo(arciumProgram: anchor.Program<ArciumIdlType>, address: PublicKey, commitment?: anchor.web3.Commitment): Promise<ClusterAccount>;
121
+ /**
122
+ * Fetches and parses a given recovery cluster account.
123
+ * @param arciumProgram - The Anchor program instance.
124
+ * @param address - The public key of the recovery cluster account.
125
+ * @param commitment - (Optional) RPC commitment level.
126
+ * @returns The RecoveryClusterAccount object.
127
+ */
128
+ declare function getRecoveryClusterAccInfo(arciumProgram: anchor.Program<ArciumIdlType>, address: PublicKey, commitment?: anchor.web3.Commitment): Promise<RecoveryClusterAccount>;
129
+ /**
130
+ * Fetches and parses a given MxeRecovery account.
131
+ * @param arciumProgram - The Anchor program instance.
132
+ * @param address - The public key of the MxeRecovery account.
133
+ * @param commitment - (Optional) RPC commitment level.
134
+ * @returns The MxeRecoveryAccount object.
135
+ */
136
+ declare function getMxeRecoveryAccInfo(arciumProgram: anchor.Program<ArciumIdlType>, address: PublicKey, commitment?: anchor.web3.Commitment): Promise<MxeRecoveryAccount>;
113
137
  /**
114
138
  * Fetches and parses a given ArxNode account.
115
139
  * @param arciumProgram - The Anchor program instance.
@@ -157,5 +181,5 @@ declare function unsubscribeComputations(conn: Connection, subscriptionId: numbe
157
181
  */
158
182
  declare function getComputationOffset(tx: anchor.web3.VersionedTransactionResponse): anchor.BN | undefined;
159
183
 
160
- export { getArxNodeAccAddresses, getArxNodeAccInfo, getClusterAccAddresses, getClusterAccInfo, getCompDefAccInfo, getComputationAccInfo, getComputationOffset, getMXEAccAddresses, getMXEAccInfo, subscribeComputations, unsubscribeComputations };
161
- export type { ArciumEvent, ArciumEventData, ArciumEventName, ArciumInstructionName, ArciumTypes, ArxNodeAccount, CallbackComputationIx, ClusterAccount, ComputationAccount, ComputationDefinitionAccount, ComputationReference, ComputationStatus, Connection, MXEAccount, Program, PublicKey, QueueComputationIx };
184
+ export { getArxNodeAccAddresses, getArxNodeAccInfo, getClusterAccAddresses, getClusterAccInfo, getCompDefAccInfo, getComputationAccInfo, getComputationOffset, getMXEAccAddresses, getMXEAccInfo, getMxeRecoveryAccInfo, getRecoveryClusterAccInfo, subscribeComputations, unsubscribeComputations };
185
+ export type { ArciumEvent, ArciumEventData, ArciumEventName, ArciumInstructionName, ArciumTypes, ArxNodeAccount, CallbackComputationIx, ClusterAccount, ComputationAccount, ComputationDefinitionAccount, ComputationReference, ComputationStatus, Connection, MXEAccount, MxeRecoveryAccount, Program, PublicKey, QueueComputationIx, RecoveryClusterAccount };
package/build/index.mjs CHANGED
@@ -96,6 +96,26 @@ async function getMXEAccInfo(arciumProgram, address, commitment) {
96
96
  async function getClusterAccInfo(arciumProgram, address, commitment) {
97
97
  return arciumProgram.account.cluster.fetch(address, commitment);
98
98
  }
99
+ /**
100
+ * Fetches and parses a given recovery cluster account.
101
+ * @param arciumProgram - The Anchor program instance.
102
+ * @param address - The public key of the recovery cluster account.
103
+ * @param commitment - (Optional) RPC commitment level.
104
+ * @returns The RecoveryClusterAccount object.
105
+ */
106
+ async function getRecoveryClusterAccInfo(arciumProgram, address, commitment) {
107
+ return arciumProgram.account.recoveryClusterAccount.fetch(address, commitment);
108
+ }
109
+ /**
110
+ * Fetches and parses a given MxeRecovery account.
111
+ * @param arciumProgram - The Anchor program instance.
112
+ * @param address - The public key of the MxeRecovery account.
113
+ * @param commitment - (Optional) RPC commitment level.
114
+ * @returns The MxeRecoveryAccount object.
115
+ */
116
+ async function getMxeRecoveryAccInfo(arciumProgram, address, commitment) {
117
+ return arciumProgram.account.mxeRecoveryAccount.fetch(address, commitment);
118
+ }
99
119
  /**
100
120
  * Fetches and parses a given ArxNode account.
101
121
  * @param arciumProgram - The Anchor program instance.
@@ -246,4 +266,4 @@ function getComputationEventsFromLogs(logs) {
246
266
  });
247
267
  }
248
268
 
249
- export { getArxNodeAccAddresses, getArxNodeAccInfo, getClusterAccAddresses, getClusterAccInfo, getCompDefAccInfo, getComputationAccInfo, getComputationOffset, getMXEAccAddresses, getMXEAccInfo, subscribeComputations, unsubscribeComputations };
269
+ export { getArxNodeAccAddresses, getArxNodeAccInfo, getClusterAccAddresses, getClusterAccInfo, getCompDefAccInfo, getComputationAccInfo, getComputationOffset, getMXEAccAddresses, getMXEAccInfo, getMxeRecoveryAccInfo, getRecoveryClusterAccInfo, subscribeComputations, unsubscribeComputations };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcium-hq/reader",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "Reader SDK for fetching onchain data for Arcium network programs",
5
5
  "author": "Arcium",
6
6
  "license": "GPL-3.0-only",
@@ -57,7 +57,7 @@
57
57
  "@coral-xyz/anchor": "^0.32.1",
58
58
  "@noble/curves": "^1.9.5",
59
59
  "@noble/hashes": "^1.7.1",
60
- "@arcium-hq/client": "0.5.2"
60
+ "@arcium-hq/client": "0.6.0"
61
61
  },
62
62
  "keywords": [
63
63
  "Cryptography",