@arcium-hq/client 0.3.0 → 0.4.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
@@ -1079,7 +1079,7 @@ function getCounter(nonce, nBlocks) {
1079
1079
  // SHA3-512 instead of SHA-512 since its multiplicative depth is much lower, which
1080
1080
  // makes it much better suited to be evaluated in MPC.
1081
1081
  // Those are the parameters specified [here](https://datatracker.ietf.org/doc/html/rfc8032#section-5.1)
1082
- // (except for the hash function, see above). The below is copied from [here](https://github.com/paulmillr/noble-curves/blob/main/src/ed25519.ts#L111).
1082
+ // (except for the hash function, see above). The below is copied from [here](https://github.com/paulmillr/noble-curves/blob/main/src/ed25519.ts).
1083
1083
  const arcisEd25519Defaults = (() => ({
1084
1084
  a: BigInt('57896044618658097711785492504343953926634992332820282019728792003956564819948'),
1085
1085
  d: BigInt('37095705934669439343138083508754565189542113879843219016388785533085940283555'),
@@ -1093,6 +1093,34 @@ const arcisEd25519Defaults = (() => ({
1093
1093
  adjustScalarBytes,
1094
1094
  uvRatio,
1095
1095
  }))();
1096
+ /**
1097
+ * Ed25519 curve instance using SHA3-512 for hashing, suitable for MPC (ArcisEd25519 signature scheme).
1098
+ * This is essentially Ed25519 but with SHA3-512 instead of SHA-512 for lower multiplicative depth.
1099
+ * See: https://datatracker.ietf.org/doc/html/rfc8032#section-5.1
1100
+ */
1101
+ const arcisEd25519 = (() => edwards.twistedEdwards(arcisEd25519Defaults))();
1102
+ // Helper function for the sqrt in Fp.
1103
+ function ed25519_pow_2_252_3(x) {
1104
+ // prettier-ignore
1105
+ const _10n = BigInt(10), _20n = BigInt(20), _40n = BigInt(40), _80n = BigInt(80);
1106
+ const P = ed25519.ed25519.CURVE.Fp.ORDER;
1107
+ const x2 = (x * x) % P;
1108
+ const b2 = (x2 * x) % P; // x^3, 11
1109
+ const b4 = (modular.pow2(b2, 2n, P) * b2) % P; // x^15, 1111
1110
+ const b5 = (modular.pow2(b4, 1n, P) * x) % P; // x^31
1111
+ const b10 = (modular.pow2(b5, 5n, P) * b5) % P;
1112
+ const b20 = (modular.pow2(b10, _10n, P) * b10) % P;
1113
+ const b40 = (modular.pow2(b20, _20n, P) * b20) % P;
1114
+ const b80 = (modular.pow2(b40, _40n, P) * b40) % P;
1115
+ const b160 = (modular.pow2(b80, _80n, P) * b80) % P;
1116
+ const b240 = (modular.pow2(b160, _80n, P) * b80) % P;
1117
+ const b250 = (modular.pow2(b240, _10n, P) * b10) % P;
1118
+ const pow_p_5_8 = (modular.pow2(b250, 2n, P) * x) % P;
1119
+ // ^ To pow to (p+3)/8, multiply it by x.
1120
+ return { pow_p_5_8, b2 };
1121
+ }
1122
+ // Fp.sqrt(Fp.neg(1))
1123
+ const ED25519_SQRT_M1 = /* @__PURE__ */ BigInt('19681161376707505956807079304988542015446066515923890162744021073123829784752');
1096
1124
  /**
1097
1125
  * Clamps a 32-byte scalar as required by the Ed25519 signature scheme.
1098
1126
  * See: https://datatracker.ietf.org/doc/html/rfc8032#section-5.1.5
@@ -1107,19 +1135,30 @@ function adjustScalarBytes(bytes) {
1107
1135
  return clamped;
1108
1136
  }
1109
1137
  /**
1110
- * Dummy function for compatibility; not used in the ArcisEd25519 signature scheme.
1111
- * Always returns { isValid: true, value: 0n }.
1112
- * @returns An object with isValid: true and value: 0n.
1138
+ * Helper function for decompression, calculating √(u/v).
1139
+ * @returns An object with isValid and value.
1113
1140
  */
1114
- function uvRatio() {
1115
- return { isValid: true, value: 0n };
1141
+ function uvRatio(u, v) {
1142
+ const P = ed25519.ed25519.CURVE.Fp.ORDER;
1143
+ const v3 = modular.mod(v * v * v, P); // v³
1144
+ const v7 = modular.mod(v3 * v3 * v, P); // v⁷
1145
+ // (p+3)/8 and (p-5)/8
1146
+ const pow = ed25519_pow_2_252_3(u * v7).pow_p_5_8;
1147
+ let x = modular.mod(u * v3 * pow, P); // (uv³)(uv⁷)^(p-5)/8
1148
+ const vx2 = modular.mod(v * x * x, P); // vx²
1149
+ const root1 = x; // First root candidate
1150
+ const root2 = modular.mod(x * ED25519_SQRT_M1, P); // Second root candidate
1151
+ const useRoot1 = vx2 === u; // If vx² = u (mod p), x is a square root
1152
+ const useRoot2 = vx2 === modular.mod(-u, P); // If vx² = -u, set x <-- x * 2^((p-1)/4)
1153
+ const noRoot = vx2 === modular.mod(-u * ED25519_SQRT_M1, P); // There is no valid root, vx² = -u√(-1)
1154
+ if (useRoot1)
1155
+ x = root1;
1156
+ if (useRoot2 || noRoot)
1157
+ x = root2; // We return root2 anyway, for const-time
1158
+ if (modular.isNegativeLE(x, P))
1159
+ x = modular.mod(-x, P);
1160
+ return { isValid: useRoot1 || useRoot2, value: x };
1116
1161
  }
1117
- /**
1118
- * Ed25519 curve instance using SHA3-512 for hashing, suitable for MPC (ArcisEd25519 signature scheme).
1119
- * This is essentially Ed25519 but with SHA3-512 instead of SHA-512 for lower multiplicative depth.
1120
- * See: https://datatracker.ietf.org/doc/html/rfc8032#section-5.1
1121
- */
1122
- const arcisEd25519 = (() => edwards.twistedEdwards(arcisEd25519Defaults))();
1123
1162
 
1124
1163
  /**
1125
1164
  * AES-128 cipher in Counter (CTR) mode, using HKDF-SHA3-256 to derive the key from a shared secret.
@@ -1268,10 +1307,10 @@ class Aes256Cipher {
1268
1307
  }
1269
1308
  }
1270
1309
 
1271
- var address = "BKck65TgoKRokMjQM3datB9oRwJ8rAj2jxPXvHXUvcL6";
1310
+ var address = "Bv3Fb9VjzjWGfX18QTUcVycAfeLoQ5zZN6vv2g3cTZxp";
1272
1311
  var metadata = {
1273
1312
  name: "arcium",
1274
- version: "0.3.0",
1313
+ version: "0.4.0",
1275
1314
  spec: "0.1.0",
1276
1315
  description: "The Arcium program"
1277
1316
  };
@@ -1764,20 +1803,24 @@ var instructions = [
1764
1803
  name: "ExecutionStatus"
1765
1804
  }
1766
1805
  }
1806
+ },
1807
+ {
1808
+ name: "callback_transaction_index",
1809
+ type: "u8"
1767
1810
  }
1768
1811
  ]
1769
1812
  },
1770
1813
  {
1771
- name: "deactivate_arx",
1814
+ name: "claim_failure_append",
1772
1815
  discriminator: [
1773
- 117,
1774
- 244,
1775
- 137,
1776
- 148,
1777
- 25,
1778
- 190,
1779
- 175,
1780
- 164
1816
+ 92,
1817
+ 52,
1818
+ 184,
1819
+ 203,
1820
+ 76,
1821
+ 221,
1822
+ 128,
1823
+ 69
1781
1824
  ],
1782
1825
  accounts: [
1783
1826
  {
@@ -1786,156 +1829,233 @@ var instructions = [
1786
1829
  signer: true
1787
1830
  },
1788
1831
  {
1789
- name: "arx_node_acc",
1832
+ name: "failure_acc",
1790
1833
  writable: true,
1791
1834
  pda: {
1792
1835
  seeds: [
1793
1836
  {
1794
1837
  kind: "const",
1795
1838
  value: [
1796
- 65,
1839
+ 70,
1840
+ 97,
1841
+ 105,
1842
+ 108,
1843
+ 117,
1797
1844
  114,
1798
- 120,
1799
- 78,
1845
+ 101,
1846
+ 67,
1847
+ 108,
1848
+ 97,
1849
+ 105,
1850
+ 109,
1851
+ 65,
1852
+ 99,
1853
+ 99,
1800
1854
  111,
1855
+ 117,
1856
+ 110,
1857
+ 116,
1858
+ 72,
1859
+ 101,
1860
+ 97,
1801
1861
  100,
1802
- 101
1862
+ 101,
1863
+ 114
1803
1864
  ]
1804
1865
  },
1805
1866
  {
1806
1867
  kind: "arg",
1807
- path: "_node_offset"
1868
+ path: "mxe_program"
1869
+ },
1870
+ {
1871
+ kind: "arg",
1872
+ path: "comp_offset"
1808
1873
  }
1809
1874
  ]
1810
1875
  }
1811
1876
  },
1812
1877
  {
1813
- name: "clock",
1878
+ name: "system_program",
1879
+ address: "11111111111111111111111111111111"
1880
+ }
1881
+ ],
1882
+ args: [
1883
+ {
1884
+ name: "comp_offset",
1885
+ type: "u64"
1886
+ },
1887
+ {
1888
+ name: "node_offset",
1889
+ type: "u32"
1890
+ },
1891
+ {
1892
+ name: "mxe_program",
1893
+ type: "pubkey"
1894
+ },
1895
+ {
1896
+ name: "chunk",
1897
+ type: "bytes"
1898
+ },
1899
+ {
1900
+ name: "failure_claim_offset",
1901
+ type: "u32"
1902
+ }
1903
+ ]
1904
+ },
1905
+ {
1906
+ name: "claim_failure_finalize",
1907
+ discriminator: [
1908
+ 192,
1909
+ 133,
1910
+ 215,
1911
+ 19,
1912
+ 76,
1913
+ 107,
1914
+ 111,
1915
+ 217
1916
+ ],
1917
+ accounts: [
1918
+ {
1919
+ name: "signer",
1920
+ signer: true
1921
+ },
1922
+ {
1923
+ name: "failure_acc",
1924
+ writable: true,
1814
1925
  pda: {
1815
1926
  seeds: [
1816
1927
  {
1817
1928
  kind: "const",
1818
1929
  value: [
1930
+ 70,
1931
+ 97,
1932
+ 105,
1933
+ 108,
1934
+ 117,
1935
+ 114,
1936
+ 101,
1819
1937
  67,
1820
1938
  108,
1821
- 111,
1822
- 99,
1823
- 107,
1939
+ 97,
1940
+ 105,
1941
+ 109,
1824
1942
  65,
1825
1943
  99,
1826
1944
  99,
1827
1945
  111,
1828
1946
  117,
1829
1947
  110,
1830
- 116
1831
- ]
1832
- }
1833
- ]
1834
- }
1835
- },
1836
- {
1837
- name: "cluster_acc_0",
1838
- optional: true,
1839
- pda: {
1840
- seeds: [
1841
- {
1842
- kind: "const",
1843
- value: [
1844
- 67,
1845
- 108,
1846
- 117,
1847
- 115,
1848
1948
  116,
1949
+ 72,
1950
+ 101,
1951
+ 97,
1952
+ 100,
1849
1953
  101,
1850
1954
  114
1851
1955
  ]
1852
1956
  },
1853
1957
  {
1854
- kind: "account",
1855
- path: "arx_node_acc.cluster_memberships",
1856
- account: "ArxNode"
1958
+ kind: "arg",
1959
+ path: "_mxe_program"
1960
+ },
1961
+ {
1962
+ kind: "arg",
1963
+ path: "comp_offset"
1857
1964
  }
1858
1965
  ]
1859
1966
  }
1860
1967
  },
1861
1968
  {
1862
- name: "cluster_acc_1",
1863
- optional: true,
1969
+ name: "executing_pool",
1970
+ writable: true,
1864
1971
  pda: {
1865
1972
  seeds: [
1866
1973
  {
1867
1974
  kind: "const",
1868
1975
  value: [
1869
- 67,
1870
- 108,
1871
- 117,
1872
- 115,
1873
- 116,
1976
+ 69,
1977
+ 120,
1874
1978
  101,
1875
- 114
1979
+ 99,
1980
+ 112,
1981
+ 111,
1982
+ 111,
1983
+ 108
1876
1984
  ]
1877
1985
  },
1878
1986
  {
1879
- kind: "account",
1880
- path: "arx_node_acc.cluster_memberships.get(1).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
1881
- account: "ArxNode"
1987
+ kind: "arg",
1988
+ path: "_mxe_program"
1882
1989
  }
1883
1990
  ]
1884
1991
  }
1885
1992
  },
1886
1993
  {
1887
- name: "cluster_acc_2",
1888
- optional: true,
1994
+ name: "mempool",
1995
+ writable: true,
1889
1996
  pda: {
1890
1997
  seeds: [
1891
1998
  {
1892
1999
  kind: "const",
1893
2000
  value: [
1894
- 67,
1895
- 108,
1896
- 117,
1897
- 115,
1898
- 116,
2001
+ 77,
1899
2002
  101,
1900
- 114
2003
+ 109,
2004
+ 112,
2005
+ 111,
2006
+ 111,
2007
+ 108
1901
2008
  ]
1902
2009
  },
1903
2010
  {
1904
- kind: "account",
1905
- path: "arx_node_acc.cluster_memberships.get(2).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
1906
- account: "ArxNode"
2011
+ kind: "arg",
2012
+ path: "_mxe_program"
1907
2013
  }
1908
2014
  ]
1909
2015
  }
1910
2016
  },
1911
2017
  {
1912
- name: "cluster_acc_3",
1913
- optional: true,
2018
+ name: "comp",
2019
+ writable: true,
1914
2020
  pda: {
1915
2021
  seeds: [
1916
2022
  {
1917
2023
  kind: "const",
1918
2024
  value: [
1919
2025
  67,
1920
- 108,
2026
+ 111,
2027
+ 109,
2028
+ 112,
1921
2029
  117,
1922
- 115,
1923
2030
  116,
1924
- 101,
1925
- 114
2031
+ 97,
2032
+ 116,
2033
+ 105,
2034
+ 111,
2035
+ 110,
2036
+ 65,
2037
+ 99,
2038
+ 99,
2039
+ 111,
2040
+ 117,
2041
+ 110,
2042
+ 116
1926
2043
  ]
1927
2044
  },
1928
2045
  {
1929
- kind: "account",
1930
- path: "arx_node_acc.cluster_memberships.get(3).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
1931
- account: "ArxNode"
2046
+ kind: "arg",
2047
+ path: "_mxe_program"
2048
+ },
2049
+ {
2050
+ kind: "arg",
2051
+ path: "comp_offset"
1932
2052
  }
1933
2053
  ]
1934
2054
  }
1935
2055
  },
1936
2056
  {
1937
- name: "cluster_acc_4",
1938
- optional: true,
2057
+ name: "cluster_acc",
2058
+ writable: true,
1939
2059
  pda: {
1940
2060
  seeds: [
1941
2061
  {
@@ -1952,40 +2072,124 @@ var instructions = [
1952
2072
  },
1953
2073
  {
1954
2074
  kind: "account",
1955
- path: "arx_node_acc.cluster_memberships.get(4).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
1956
- account: "ArxNode"
2075
+ path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2076
+ account: "MXEAccount"
1957
2077
  }
1958
2078
  ]
1959
2079
  }
1960
2080
  },
1961
2081
  {
1962
- name: "cluster_acc_5",
1963
- optional: true,
2082
+ name: "mxe",
1964
2083
  pda: {
1965
2084
  seeds: [
1966
2085
  {
1967
2086
  kind: "const",
1968
2087
  value: [
1969
- 67,
1970
- 108,
2088
+ 77,
2089
+ 88,
2090
+ 69,
2091
+ 65,
2092
+ 99,
2093
+ 99,
2094
+ 111,
1971
2095
  117,
1972
- 115,
1973
- 116,
1974
- 101,
1975
- 114
2096
+ 110,
2097
+ 116
1976
2098
  ]
1977
2099
  },
1978
2100
  {
1979
- kind: "account",
1980
- path: "arx_node_acc.cluster_memberships.get(5).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
1981
- account: "ArxNode"
2101
+ kind: "arg",
2102
+ path: "_mxe_program"
1982
2103
  }
1983
2104
  ]
1984
2105
  }
1985
- },
1986
- {
1987
- name: "cluster_acc_6",
1988
- optional: true,
2106
+ }
2107
+ ],
2108
+ args: [
2109
+ {
2110
+ name: "comp_offset",
2111
+ type: "u64"
2112
+ },
2113
+ {
2114
+ name: "node_offset",
2115
+ type: "u32"
2116
+ },
2117
+ {
2118
+ name: "mxe_program",
2119
+ type: "pubkey"
2120
+ }
2121
+ ]
2122
+ },
2123
+ {
2124
+ name: "claim_failure_init",
2125
+ discriminator: [
2126
+ 204,
2127
+ 106,
2128
+ 245,
2129
+ 73,
2130
+ 212,
2131
+ 136,
2132
+ 61,
2133
+ 99
2134
+ ],
2135
+ accounts: [
2136
+ {
2137
+ name: "signer",
2138
+ writable: true,
2139
+ signer: true
2140
+ },
2141
+ {
2142
+ name: "node_acc",
2143
+ pda: {
2144
+ seeds: [
2145
+ {
2146
+ kind: "const",
2147
+ value: [
2148
+ 65,
2149
+ 114,
2150
+ 120,
2151
+ 78,
2152
+ 111,
2153
+ 100,
2154
+ 101
2155
+ ]
2156
+ },
2157
+ {
2158
+ kind: "arg",
2159
+ path: "node_offset"
2160
+ }
2161
+ ]
2162
+ }
2163
+ },
2164
+ {
2165
+ name: "mxe",
2166
+ pda: {
2167
+ seeds: [
2168
+ {
2169
+ kind: "const",
2170
+ value: [
2171
+ 77,
2172
+ 88,
2173
+ 69,
2174
+ 65,
2175
+ 99,
2176
+ 99,
2177
+ 111,
2178
+ 117,
2179
+ 110,
2180
+ 116
2181
+ ]
2182
+ },
2183
+ {
2184
+ kind: "arg",
2185
+ path: "_mxe_program"
2186
+ }
2187
+ ]
2188
+ }
2189
+ },
2190
+ {
2191
+ name: "cluster_acc",
2192
+ writable: true,
1989
2193
  pda: {
1990
2194
  seeds: [
1991
2195
  {
@@ -2002,133 +2206,203 @@ var instructions = [
2002
2206
  },
2003
2207
  {
2004
2208
  kind: "account",
2005
- path: "arx_node_acc.cluster_memberships.get(6).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2006
- account: "ArxNode"
2209
+ path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2210
+ account: "MXEAccount"
2007
2211
  }
2008
2212
  ]
2009
2213
  }
2010
2214
  },
2011
2215
  {
2012
- name: "cluster_acc_7",
2013
- optional: true,
2216
+ name: "comp_acc",
2014
2217
  pda: {
2015
2218
  seeds: [
2016
2219
  {
2017
2220
  kind: "const",
2018
2221
  value: [
2019
2222
  67,
2020
- 108,
2223
+ 111,
2224
+ 109,
2225
+ 112,
2021
2226
  117,
2022
- 115,
2023
2227
  116,
2024
- 101,
2025
- 114
2228
+ 97,
2229
+ 116,
2230
+ 105,
2231
+ 111,
2232
+ 110,
2233
+ 65,
2234
+ 99,
2235
+ 99,
2236
+ 111,
2237
+ 117,
2238
+ 110,
2239
+ 116
2026
2240
  ]
2027
2241
  },
2028
2242
  {
2029
- kind: "account",
2030
- path: "arx_node_acc.cluster_memberships.get(7).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2031
- account: "ArxNode"
2243
+ kind: "arg",
2244
+ path: "_mxe_program"
2245
+ },
2246
+ {
2247
+ kind: "arg",
2248
+ path: "comp_offset"
2032
2249
  }
2033
2250
  ]
2034
2251
  }
2035
2252
  },
2036
2253
  {
2037
- name: "cluster_acc_8",
2038
- optional: true,
2254
+ name: "comp_def_acc",
2039
2255
  pda: {
2040
2256
  seeds: [
2041
2257
  {
2042
2258
  kind: "const",
2043
2259
  value: [
2044
2260
  67,
2045
- 108,
2261
+ 111,
2262
+ 109,
2263
+ 112,
2046
2264
  117,
2047
- 115,
2048
2265
  116,
2266
+ 97,
2267
+ 116,
2268
+ 105,
2269
+ 111,
2270
+ 110,
2271
+ 68,
2049
2272
  101,
2050
- 114
2273
+ 102,
2274
+ 105,
2275
+ 110,
2276
+ 105,
2277
+ 116,
2278
+ 105,
2279
+ 111,
2280
+ 110,
2281
+ 65,
2282
+ 99,
2283
+ 99,
2284
+ 111,
2285
+ 117,
2286
+ 110,
2287
+ 116
2051
2288
  ]
2052
2289
  },
2290
+ {
2291
+ kind: "arg",
2292
+ path: "_mxe_program"
2293
+ },
2053
2294
  {
2054
2295
  kind: "account",
2055
- path: "arx_node_acc.cluster_memberships.get(8).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2056
- account: "ArxNode"
2296
+ path: "comp_acc.computation_definition_offset",
2297
+ account: "ComputationAccount"
2057
2298
  }
2058
2299
  ]
2059
2300
  }
2060
2301
  },
2061
2302
  {
2062
- name: "cluster_acc_9",
2063
- optional: true,
2303
+ name: "failure_acc",
2304
+ writable: true,
2064
2305
  pda: {
2065
2306
  seeds: [
2066
2307
  {
2067
2308
  kind: "const",
2068
2309
  value: [
2310
+ 70,
2311
+ 97,
2312
+ 105,
2313
+ 108,
2314
+ 117,
2315
+ 114,
2316
+ 101,
2069
2317
  67,
2070
2318
  108,
2319
+ 97,
2320
+ 105,
2321
+ 109,
2322
+ 65,
2323
+ 99,
2324
+ 99,
2325
+ 111,
2071
2326
  117,
2072
- 115,
2327
+ 110,
2073
2328
  116,
2329
+ 72,
2330
+ 101,
2331
+ 97,
2332
+ 100,
2074
2333
  101,
2075
2334
  114
2076
2335
  ]
2077
2336
  },
2078
2337
  {
2079
- kind: "account",
2080
- path: "arx_node_acc.cluster_memberships.get(9).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2081
- account: "ArxNode"
2338
+ kind: "arg",
2339
+ path: "_mxe_program"
2340
+ },
2341
+ {
2342
+ kind: "arg",
2343
+ path: "comp_offset"
2082
2344
  }
2083
2345
  ]
2084
2346
  }
2347
+ },
2348
+ {
2349
+ name: "system_program",
2350
+ address: "11111111111111111111111111111111"
2085
2351
  }
2086
2352
  ],
2087
2353
  args: [
2354
+ {
2355
+ name: "comp_offset",
2356
+ type: "u64"
2357
+ },
2088
2358
  {
2089
2359
  name: "node_offset",
2090
2360
  type: "u32"
2361
+ },
2362
+ {
2363
+ name: "mxe_program",
2364
+ type: "pubkey"
2091
2365
  }
2092
2366
  ]
2093
2367
  },
2094
2368
  {
2095
- name: "deactivate_cluster",
2369
+ name: "deactivate_arx",
2096
2370
  discriminator: [
2097
- 13,
2098
- 42,
2099
- 182,
2100
- 159,
2101
- 184,
2102
- 10,
2103
- 212,
2104
- 178
2371
+ 117,
2372
+ 244,
2373
+ 137,
2374
+ 148,
2375
+ 25,
2376
+ 190,
2377
+ 175,
2378
+ 164
2105
2379
  ],
2106
2380
  accounts: [
2107
2381
  {
2108
- name: "authority",
2382
+ name: "signer",
2109
2383
  writable: true,
2110
2384
  signer: true
2111
2385
  },
2112
2386
  {
2113
- name: "cluster_acc",
2387
+ name: "arx_node_acc",
2114
2388
  writable: true,
2115
2389
  pda: {
2116
2390
  seeds: [
2117
2391
  {
2118
2392
  kind: "const",
2119
2393
  value: [
2120
- 67,
2121
- 108,
2122
- 117,
2123
- 115,
2124
- 116,
2125
- 101,
2126
- 114
2394
+ 65,
2395
+ 114,
2396
+ 120,
2397
+ 78,
2398
+ 111,
2399
+ 100,
2400
+ 101
2127
2401
  ]
2128
2402
  },
2129
2403
  {
2130
2404
  kind: "arg",
2131
- path: "_id"
2405
+ path: "_node_offset"
2132
2406
  }
2133
2407
  ]
2134
2408
  }
@@ -2158,283 +2432,280 @@ var instructions = [
2158
2432
  }
2159
2433
  },
2160
2434
  {
2161
- name: "system_program",
2162
- address: "11111111111111111111111111111111"
2163
- }
2164
- ],
2165
- args: [
2166
- {
2167
- name: "cluster_id",
2168
- type: "u32"
2169
- },
2170
- {
2171
- name: "deactivation_epoch",
2172
- type: {
2173
- defined: {
2174
- name: "Epoch"
2175
- }
2176
- }
2177
- }
2178
- ]
2179
- },
2180
- {
2181
- name: "dummy_instruction",
2182
- docs: [
2183
- "Only present so the mempool and execpool accounts are actually included in the idl, since we",
2184
- "don't explicitly declare them in the accounts section of the other instructions."
2185
- ],
2186
- discriminator: [
2187
- 57,
2188
- 4,
2189
- 200,
2190
- 151,
2191
- 58,
2192
- 19,
2193
- 120,
2194
- 9
2195
- ],
2196
- accounts: [
2197
- {
2198
- name: "tiny_mempool"
2199
- },
2200
- {
2201
- name: "tiny_execpool"
2202
- },
2203
- {
2204
- name: "small_mempool"
2205
- },
2206
- {
2207
- name: "small_execpool"
2208
- },
2209
- {
2210
- name: "medium_mempool"
2211
- },
2212
- {
2213
- name: "medium_execpool"
2214
- },
2215
- {
2216
- name: "large_mempool"
2217
- },
2218
- {
2219
- name: "large_execpool"
2220
- }
2221
- ],
2222
- args: [
2223
- ]
2224
- },
2225
- {
2226
- name: "embiggen_raw_circuit_acc",
2227
- discriminator: [
2228
- 92,
2229
- 195,
2230
- 192,
2231
- 21,
2232
- 193,
2233
- 242,
2234
- 135,
2235
- 194
2236
- ],
2237
- accounts: [
2238
- {
2239
- name: "signer",
2240
- writable: true,
2241
- signer: true
2242
- },
2243
- {
2244
- name: "comp_def_acc",
2435
+ name: "cluster_acc_0",
2436
+ optional: true,
2245
2437
  pda: {
2246
2438
  seeds: [
2247
2439
  {
2248
2440
  kind: "const",
2249
2441
  value: [
2250
2442
  67,
2251
- 111,
2252
- 109,
2253
- 112,
2443
+ 108,
2254
2444
  117,
2445
+ 115,
2255
2446
  116,
2256
- 97,
2257
- 116,
2258
- 105,
2259
- 111,
2260
- 110,
2261
- 68,
2262
2447
  101,
2263
- 102,
2264
- 105,
2265
- 110,
2266
- 105,
2267
- 116,
2268
- 105,
2269
- 111,
2270
- 110,
2271
- 65,
2272
- 99,
2273
- 99,
2274
- 111,
2275
- 117,
2276
- 110,
2277
- 116
2448
+ 114
2278
2449
  ]
2279
2450
  },
2280
2451
  {
2281
- kind: "arg",
2282
- path: "_mxe_program"
2452
+ kind: "account",
2453
+ path: "arx_node_acc.cluster_memberships",
2454
+ account: "ArxNode"
2455
+ }
2456
+ ]
2457
+ }
2458
+ },
2459
+ {
2460
+ name: "cluster_acc_1",
2461
+ optional: true,
2462
+ pda: {
2463
+ seeds: [
2464
+ {
2465
+ kind: "const",
2466
+ value: [
2467
+ 67,
2468
+ 108,
2469
+ 117,
2470
+ 115,
2471
+ 116,
2472
+ 101,
2473
+ 114
2474
+ ]
2283
2475
  },
2284
2476
  {
2285
- kind: "arg",
2286
- path: "_comp_offset"
2477
+ kind: "account",
2478
+ path: "arx_node_acc.cluster_memberships.get(1).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2479
+ account: "ArxNode"
2287
2480
  }
2288
2481
  ]
2289
2482
  }
2290
2483
  },
2291
2484
  {
2292
- name: "comp_def_raw",
2293
- writable: true,
2485
+ name: "cluster_acc_2",
2486
+ optional: true,
2294
2487
  pda: {
2295
2488
  seeds: [
2296
2489
  {
2297
2490
  kind: "const",
2298
2491
  value: [
2299
2492
  67,
2300
- 111,
2301
- 109,
2302
- 112,
2493
+ 108,
2303
2494
  117,
2495
+ 115,
2304
2496
  116,
2305
- 97,
2306
- 116,
2307
- 105,
2308
- 111,
2309
- 110,
2310
- 68,
2311
2497
  101,
2312
- 102,
2313
- 105,
2314
- 110,
2315
- 105,
2316
- 116,
2317
- 105,
2318
- 111,
2319
- 110,
2320
- 82,
2321
- 97,
2322
- 119
2498
+ 114
2323
2499
  ]
2324
2500
  },
2325
2501
  {
2326
2502
  kind: "account",
2327
- path: "comp_def_acc"
2503
+ path: "arx_node_acc.cluster_memberships.get(2).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2504
+ account: "ArxNode"
2505
+ }
2506
+ ]
2507
+ }
2508
+ },
2509
+ {
2510
+ name: "cluster_acc_3",
2511
+ optional: true,
2512
+ pda: {
2513
+ seeds: [
2514
+ {
2515
+ kind: "const",
2516
+ value: [
2517
+ 67,
2518
+ 108,
2519
+ 117,
2520
+ 115,
2521
+ 116,
2522
+ 101,
2523
+ 114
2524
+ ]
2328
2525
  },
2329
2526
  {
2330
- kind: "arg",
2331
- path: "_raw_circuit_index"
2527
+ kind: "account",
2528
+ path: "arx_node_acc.cluster_memberships.get(3).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2529
+ account: "ArxNode"
2332
2530
  }
2333
2531
  ]
2334
2532
  }
2335
2533
  },
2336
2534
  {
2337
- name: "system_program",
2338
- address: "11111111111111111111111111111111"
2339
- }
2340
- ],
2341
- args: [
2342
- {
2343
- name: "comp_offset",
2344
- type: "u32"
2535
+ name: "cluster_acc_4",
2536
+ optional: true,
2537
+ pda: {
2538
+ seeds: [
2539
+ {
2540
+ kind: "const",
2541
+ value: [
2542
+ 67,
2543
+ 108,
2544
+ 117,
2545
+ 115,
2546
+ 116,
2547
+ 101,
2548
+ 114
2549
+ ]
2550
+ },
2551
+ {
2552
+ kind: "account",
2553
+ path: "arx_node_acc.cluster_memberships.get(4).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2554
+ account: "ArxNode"
2555
+ }
2556
+ ]
2557
+ }
2345
2558
  },
2346
2559
  {
2347
- name: "mxe_program",
2348
- type: "pubkey"
2560
+ name: "cluster_acc_5",
2561
+ optional: true,
2562
+ pda: {
2563
+ seeds: [
2564
+ {
2565
+ kind: "const",
2566
+ value: [
2567
+ 67,
2568
+ 108,
2569
+ 117,
2570
+ 115,
2571
+ 116,
2572
+ 101,
2573
+ 114
2574
+ ]
2575
+ },
2576
+ {
2577
+ kind: "account",
2578
+ path: "arx_node_acc.cluster_memberships.get(5).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2579
+ account: "ArxNode"
2580
+ }
2581
+ ]
2582
+ }
2349
2583
  },
2350
2584
  {
2351
- name: "raw_circuit_index",
2352
- type: "u8"
2353
- }
2354
- ]
2355
- },
2356
- {
2357
- name: "finalize_computation",
2358
- discriminator: [
2359
- 43,
2360
- 29,
2361
- 152,
2362
- 92,
2363
- 241,
2364
- 179,
2365
- 193,
2366
- 210
2367
- ],
2368
- accounts: [
2369
- {
2370
- name: "signer",
2371
- writable: true,
2372
- signer: true
2585
+ name: "cluster_acc_6",
2586
+ optional: true,
2587
+ pda: {
2588
+ seeds: [
2589
+ {
2590
+ kind: "const",
2591
+ value: [
2592
+ 67,
2593
+ 108,
2594
+ 117,
2595
+ 115,
2596
+ 116,
2597
+ 101,
2598
+ 114
2599
+ ]
2600
+ },
2601
+ {
2602
+ kind: "account",
2603
+ path: "arx_node_acc.cluster_memberships.get(6).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2604
+ account: "ArxNode"
2605
+ }
2606
+ ]
2607
+ }
2373
2608
  },
2374
2609
  {
2375
- name: "comp",
2376
- writable: true,
2610
+ name: "cluster_acc_7",
2611
+ optional: true,
2377
2612
  pda: {
2378
2613
  seeds: [
2379
2614
  {
2380
2615
  kind: "const",
2381
2616
  value: [
2382
2617
  67,
2383
- 111,
2384
- 109,
2385
- 112,
2618
+ 108,
2386
2619
  117,
2620
+ 115,
2387
2621
  116,
2388
- 97,
2389
- 116,
2390
- 105,
2391
- 111,
2392
- 110,
2393
- 65,
2394
- 99,
2395
- 99,
2396
- 111,
2397
- 117,
2398
- 110,
2399
- 116
2622
+ 101,
2623
+ 114
2400
2624
  ]
2401
2625
  },
2402
2626
  {
2403
- kind: "arg",
2404
- path: "_mxe_program"
2627
+ kind: "account",
2628
+ path: "arx_node_acc.cluster_memberships.get(7).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2629
+ account: "ArxNode"
2630
+ }
2631
+ ]
2632
+ }
2633
+ },
2634
+ {
2635
+ name: "cluster_acc_8",
2636
+ optional: true,
2637
+ pda: {
2638
+ seeds: [
2639
+ {
2640
+ kind: "const",
2641
+ value: [
2642
+ 67,
2643
+ 108,
2644
+ 117,
2645
+ 115,
2646
+ 116,
2647
+ 101,
2648
+ 114
2649
+ ]
2405
2650
  },
2406
2651
  {
2407
- kind: "arg",
2408
- path: "comp_offset"
2652
+ kind: "account",
2653
+ path: "arx_node_acc.cluster_memberships.get(8).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2654
+ account: "ArxNode"
2409
2655
  }
2410
2656
  ]
2411
2657
  }
2412
2658
  },
2413
2659
  {
2414
- name: "mxe",
2660
+ name: "cluster_acc_9",
2661
+ optional: true,
2415
2662
  pda: {
2416
2663
  seeds: [
2417
2664
  {
2418
2665
  kind: "const",
2419
2666
  value: [
2420
- 77,
2421
- 88,
2422
- 69,
2423
- 65,
2424
- 99,
2425
- 99,
2426
- 111,
2667
+ 67,
2668
+ 108,
2427
2669
  117,
2428
- 110,
2429
- 116
2670
+ 115,
2671
+ 116,
2672
+ 101,
2673
+ 114
2430
2674
  ]
2431
2675
  },
2432
2676
  {
2433
- kind: "arg",
2434
- path: "_mxe_program"
2677
+ kind: "account",
2678
+ path: "arx_node_acc.cluster_memberships.get(9).ok_or(ArciumError ::\nInvalidClusterMembership) ? ",
2679
+ account: "ArxNode"
2435
2680
  }
2436
2681
  ]
2437
2682
  }
2683
+ }
2684
+ ],
2685
+ args: [
2686
+ {
2687
+ name: "node_offset",
2688
+ type: "u32"
2689
+ }
2690
+ ]
2691
+ },
2692
+ {
2693
+ name: "deactivate_cluster",
2694
+ discriminator: [
2695
+ 13,
2696
+ 42,
2697
+ 182,
2698
+ 159,
2699
+ 184,
2700
+ 10,
2701
+ 212,
2702
+ 178
2703
+ ],
2704
+ accounts: [
2705
+ {
2706
+ name: "authority",
2707
+ writable: true,
2708
+ signer: true
2438
2709
  },
2439
2710
  {
2440
2711
  name: "cluster_acc",
@@ -2454,61 +2725,118 @@ var instructions = [
2454
2725
  ]
2455
2726
  },
2456
2727
  {
2457
- kind: "account",
2458
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2459
- account: "MXEAccount"
2728
+ kind: "arg",
2729
+ path: "_id"
2460
2730
  }
2461
2731
  ]
2462
2732
  }
2463
2733
  },
2464
2734
  {
2465
- name: "executing_pool",
2466
- writable: true,
2735
+ name: "clock",
2467
2736
  pda: {
2468
2737
  seeds: [
2469
2738
  {
2470
2739
  kind: "const",
2471
2740
  value: [
2472
- 69,
2473
- 120,
2474
- 101,
2475
- 99,
2476
- 112,
2741
+ 67,
2742
+ 108,
2477
2743
  111,
2744
+ 99,
2745
+ 107,
2746
+ 65,
2747
+ 99,
2748
+ 99,
2478
2749
  111,
2479
- 108
2750
+ 117,
2751
+ 110,
2752
+ 116
2480
2753
  ]
2481
- },
2482
- {
2483
- kind: "arg",
2484
- path: "_mxe_program"
2485
2754
  }
2486
2755
  ]
2487
2756
  }
2488
2757
  },
2489
2758
  {
2490
- name: "mempool",
2491
- writable: true,
2492
- pda: {
2493
- seeds: [
2494
- {
2495
- kind: "const",
2496
- value: [
2497
- 77,
2498
- 101,
2499
- 109,
2500
- 112,
2501
- 111,
2502
- 111,
2503
- 108
2504
- ]
2505
- },
2506
- {
2507
- kind: "arg",
2508
- path: "_mxe_program"
2509
- }
2510
- ]
2759
+ name: "system_program",
2760
+ address: "11111111111111111111111111111111"
2761
+ }
2762
+ ],
2763
+ args: [
2764
+ {
2765
+ name: "cluster_id",
2766
+ type: "u32"
2767
+ },
2768
+ {
2769
+ name: "deactivation_epoch",
2770
+ type: {
2771
+ defined: {
2772
+ name: "Epoch"
2773
+ }
2511
2774
  }
2775
+ }
2776
+ ]
2777
+ },
2778
+ {
2779
+ name: "dummy_instruction",
2780
+ docs: [
2781
+ "Only present so the mempool and execpool accounts are actually included in the idl, since we",
2782
+ "don't explicitly declare them in the accounts section of the other instructions."
2783
+ ],
2784
+ discriminator: [
2785
+ 57,
2786
+ 4,
2787
+ 200,
2788
+ 151,
2789
+ 58,
2790
+ 19,
2791
+ 120,
2792
+ 9
2793
+ ],
2794
+ accounts: [
2795
+ {
2796
+ name: "tiny_mempool"
2797
+ },
2798
+ {
2799
+ name: "tiny_execpool"
2800
+ },
2801
+ {
2802
+ name: "small_mempool"
2803
+ },
2804
+ {
2805
+ name: "small_execpool"
2806
+ },
2807
+ {
2808
+ name: "medium_mempool"
2809
+ },
2810
+ {
2811
+ name: "medium_execpool"
2812
+ },
2813
+ {
2814
+ name: "large_mempool"
2815
+ },
2816
+ {
2817
+ name: "large_execpool"
2818
+ }
2819
+ ],
2820
+ args: [
2821
+ ]
2822
+ },
2823
+ {
2824
+ name: "embiggen_raw_circuit_acc",
2825
+ discriminator: [
2826
+ 92,
2827
+ 195,
2828
+ 192,
2829
+ 21,
2830
+ 193,
2831
+ 242,
2832
+ 135,
2833
+ 194
2834
+ ],
2835
+ accounts: [
2836
+ {
2837
+ name: "signer",
2838
+ writable: true,
2839
+ signer: true
2512
2840
  },
2513
2841
  {
2514
2842
  name: "comp_def_acc",
@@ -2553,31 +2881,52 @@ var instructions = [
2553
2881
  },
2554
2882
  {
2555
2883
  kind: "arg",
2556
- path: "_comp_def_offset"
2884
+ path: "_comp_offset"
2557
2885
  }
2558
2886
  ]
2559
2887
  }
2560
2888
  },
2561
2889
  {
2562
- name: "clock",
2890
+ name: "comp_def_raw",
2891
+ writable: true,
2563
2892
  pda: {
2564
2893
  seeds: [
2565
2894
  {
2566
2895
  kind: "const",
2567
2896
  value: [
2568
2897
  67,
2569
- 108,
2570
- 111,
2571
- 99,
2572
- 107,
2573
- 65,
2574
- 99,
2575
- 99,
2576
2898
  111,
2899
+ 109,
2900
+ 112,
2577
2901
  117,
2902
+ 116,
2903
+ 97,
2904
+ 116,
2905
+ 105,
2906
+ 111,
2578
2907
  110,
2579
- 116
2908
+ 68,
2909
+ 101,
2910
+ 102,
2911
+ 105,
2912
+ 110,
2913
+ 105,
2914
+ 116,
2915
+ 105,
2916
+ 111,
2917
+ 110,
2918
+ 82,
2919
+ 97,
2920
+ 119
2580
2921
  ]
2922
+ },
2923
+ {
2924
+ kind: "account",
2925
+ path: "comp_def_acc"
2926
+ },
2927
+ {
2928
+ kind: "arg",
2929
+ path: "_raw_circuit_index"
2581
2930
  }
2582
2931
  ]
2583
2932
  }
@@ -2590,15 +2939,15 @@ var instructions = [
2590
2939
  args: [
2591
2940
  {
2592
2941
  name: "comp_offset",
2593
- type: "u64"
2594
- },
2595
- {
2596
- name: "comp_def_offset",
2597
2942
  type: "u32"
2598
2943
  },
2599
2944
  {
2600
2945
  name: "mxe_program",
2601
2946
  type: "pubkey"
2947
+ },
2948
+ {
2949
+ name: "raw_circuit_index",
2950
+ type: "u8"
2602
2951
  }
2603
2952
  ]
2604
2953
  },
@@ -3270,10 +3619,6 @@ var instructions = [
3270
3619
  type: {
3271
3620
  option: "pubkey"
3272
3621
  }
3273
- },
3274
- {
3275
- name: "finalize_during_callback",
3276
- type: "bool"
3277
3622
  }
3278
3623
  ]
3279
3624
  },
@@ -4097,7 +4442,7 @@ var instructions = [
4097
4442
  name: "queue_computation",
4098
4443
  docs: [
4099
4444
  "Queues a computation.",
4100
- "cu_price_micro: The priority price of a CU, in thousandths of a $ARX. Used",
4445
+ "cu_price_micro: The priority price of a CU, in thousandths of lamports. Used",
4101
4446
  "to calculate the priority fee and rounded down."
4102
4447
  ],
4103
4448
  discriminator: [
@@ -4432,16 +4777,100 @@ var instructions = [
4432
4777
  }
4433
4778
  },
4434
4779
  {
4435
- name: "input_delivery_fee",
4780
+ name: "callback_transactions_required",
4781
+ type: "u8"
4782
+ },
4783
+ {
4784
+ name: "output_delivery_fee",
4785
+ type: "u64"
4786
+ },
4787
+ {
4788
+ name: "cu_price_micro",
4789
+ type: "u64"
4790
+ }
4791
+ ]
4792
+ },
4793
+ {
4794
+ name: "reclaim_failure_rent",
4795
+ discriminator: [
4796
+ 159,
4797
+ 99,
4798
+ 116,
4799
+ 180,
4800
+ 42,
4801
+ 9,
4802
+ 202,
4803
+ 219
4804
+ ],
4805
+ accounts: [
4806
+ {
4807
+ name: "signer",
4808
+ writable: true,
4809
+ signer: true
4810
+ },
4811
+ {
4812
+ name: "failure_acc",
4813
+ writable: true,
4814
+ pda: {
4815
+ seeds: [
4816
+ {
4817
+ kind: "const",
4818
+ value: [
4819
+ 70,
4820
+ 97,
4821
+ 105,
4822
+ 108,
4823
+ 117,
4824
+ 114,
4825
+ 101,
4826
+ 67,
4827
+ 108,
4828
+ 97,
4829
+ 105,
4830
+ 109,
4831
+ 65,
4832
+ 99,
4833
+ 99,
4834
+ 111,
4835
+ 117,
4836
+ 110,
4837
+ 116,
4838
+ 72,
4839
+ 101,
4840
+ 97,
4841
+ 100,
4842
+ 101,
4843
+ 114
4844
+ ]
4845
+ },
4846
+ {
4847
+ kind: "arg",
4848
+ path: "mxe_program"
4849
+ },
4850
+ {
4851
+ kind: "arg",
4852
+ path: "comp_offset"
4853
+ }
4854
+ ]
4855
+ }
4856
+ },
4857
+ {
4858
+ name: "clock",
4859
+ address: "SysvarC1ock11111111111111111111111111111111"
4860
+ }
4861
+ ],
4862
+ args: [
4863
+ {
4864
+ name: "comp_offset",
4436
4865
  type: "u64"
4437
4866
  },
4438
4867
  {
4439
- name: "output_delivery_fee",
4440
- type: "u64"
4868
+ name: "node_offset",
4869
+ type: "u32"
4441
4870
  },
4442
4871
  {
4443
- name: "cu_price_micro",
4444
- type: "u64"
4872
+ name: "mxe_program",
4873
+ type: "pubkey"
4445
4874
  }
4446
4875
  ]
4447
4876
  },
@@ -4836,6 +5265,33 @@ var instructions = [
4836
5265
  32
4837
5266
  ]
4838
5267
  }
5268
+ },
5269
+ {
5270
+ name: "mxe_ed25519_verifying_key",
5271
+ type: {
5272
+ array: [
5273
+ "u8",
5274
+ 32
5275
+ ]
5276
+ }
5277
+ },
5278
+ {
5279
+ name: "mxe_elgamal_pubkey",
5280
+ type: {
5281
+ array: [
5282
+ "u8",
5283
+ 32
5284
+ ]
5285
+ }
5286
+ },
5287
+ {
5288
+ name: "mxe_pubkey_validity_proof",
5289
+ type: {
5290
+ array: [
5291
+ "u8",
5292
+ 64
5293
+ ]
5294
+ }
4839
5295
  }
4840
5296
  ]
4841
5297
  },
@@ -5186,6 +5642,19 @@ var accounts = [
5186
5642
  136
5187
5643
  ]
5188
5644
  },
5645
+ {
5646
+ name: "FailureClaimAccountHeader",
5647
+ discriminator: [
5648
+ 132,
5649
+ 11,
5650
+ 106,
5651
+ 171,
5652
+ 253,
5653
+ 138,
5654
+ 56,
5655
+ 78
5656
+ ]
5657
+ },
5189
5658
  {
5190
5659
  name: "FeePool",
5191
5660
  discriminator: [
@@ -5344,6 +5813,19 @@ var events = [
5344
5813
  19
5345
5814
  ]
5346
5815
  },
5816
+ {
5817
+ name: "ClaimFailureEvent",
5818
+ discriminator: [
5819
+ 143,
5820
+ 97,
5821
+ 229,
5822
+ 166,
5823
+ 72,
5824
+ 218,
5825
+ 87,
5826
+ 145
5827
+ ]
5828
+ },
5347
5829
  {
5348
5830
  name: "FinalizeComputationEvent",
5349
5831
  discriminator: [
@@ -5357,6 +5839,19 @@ var events = [
5357
5839
  249
5358
5840
  ]
5359
5841
  },
5842
+ {
5843
+ name: "FinalizeFailureDataEvent",
5844
+ discriminator: [
5845
+ 132,
5846
+ 26,
5847
+ 138,
5848
+ 201,
5849
+ 214,
5850
+ 29,
5851
+ 244,
5852
+ 167
5853
+ ]
5854
+ },
5360
5855
  {
5361
5856
  name: "InitComputationEvent",
5362
5857
  discriminator: [
@@ -5477,8 +5972,8 @@ var errors = [
5477
5972
  },
5478
5973
  {
5479
5974
  code: 6205,
5480
- name: "InvalidFinalizeTx",
5481
- msg: "Finalize tx is invalid"
5975
+ name: "InvalidCallbackTx",
5976
+ msg: "Callback tx is invalid"
5482
5977
  },
5483
5978
  {
5484
5979
  code: 6206,
@@ -5683,8 +6178,17 @@ var types = [
5683
6178
  {
5684
6179
  name: "PrimitiveError"
5685
6180
  },
6181
+ {
6182
+ name: "InvalidBatchLength"
6183
+ },
5686
6184
  {
5687
6185
  name: "QuadraticNonResidue"
6186
+ },
6187
+ {
6188
+ name: "BitConversionError"
6189
+ },
6190
+ {
6191
+ name: "ChannelClosed"
5688
6192
  }
5689
6193
  ]
5690
6194
  }
@@ -6104,6 +6608,22 @@ var types = [
6104
6608
  ]
6105
6609
  }
6106
6610
  },
6611
+ {
6612
+ name: "ClaimFailureEvent",
6613
+ type: {
6614
+ kind: "struct",
6615
+ fields: [
6616
+ {
6617
+ name: "computation_offset",
6618
+ type: "u64"
6619
+ },
6620
+ {
6621
+ name: "mxe_program_id",
6622
+ type: "pubkey"
6623
+ }
6624
+ ]
6625
+ }
6626
+ },
6107
6627
  {
6108
6628
  name: "ClockAccount",
6109
6629
  docs: [
@@ -6328,6 +6848,14 @@ var types = [
6328
6848
  }
6329
6849
  }
6330
6850
  },
6851
+ {
6852
+ name: "callback_transactions_required",
6853
+ type: "u8"
6854
+ },
6855
+ {
6856
+ name: "callback_transactions_submitted_bm",
6857
+ type: "u16"
6858
+ },
6331
6859
  {
6332
6860
  name: "bump",
6333
6861
  type: "u8"
@@ -6352,13 +6880,6 @@ var types = [
6352
6880
  option: "pubkey"
6353
6881
  }
6354
6882
  },
6355
- {
6356
- name: "finalize_during_callback",
6357
- docs: [
6358
- "Whether to we need a separate callback and finalize instruction or if we can do it in one."
6359
- ],
6360
- type: "bool"
6361
- },
6362
6883
  {
6363
6884
  name: "cu_amount",
6364
6885
  docs: [
@@ -6528,9 +7049,6 @@ var types = [
6528
7049
  {
6529
7050
  name: "Queued"
6530
7051
  },
6531
- {
6532
- name: "Executed"
6533
- },
6534
7052
  {
6535
7053
  name: "Finalized"
6536
7054
  }
@@ -6569,21 +7087,12 @@ var types = [
6569
7087
  name: "bump",
6570
7088
  type: "u8"
6571
7089
  },
6572
- {
6573
- name: "comp_status",
6574
- type: {
6575
- array: [
6576
- "u8",
6577
- 13
6578
- ]
6579
- }
6580
- },
6581
7090
  {
6582
7091
  name: "padding",
6583
7092
  type: {
6584
7093
  array: [
6585
7094
  "u8",
6586
- 2
7095
+ 7
6587
7096
  ]
6588
7097
  }
6589
7098
  },
@@ -6675,18 +7184,10 @@ var types = [
6675
7184
  ],
6676
7185
  type: "u64"
6677
7186
  },
6678
- {
6679
- name: "input_delivery_fee",
6680
- docs: [
6681
- "A fee for data relaying used with [super::mxe::DataProvisioning::Protected] data",
6682
- "provisioning."
6683
- ],
6684
- type: "u64"
6685
- },
6686
7187
  {
6687
7188
  name: "output_delivery_fee",
6688
7189
  docs: [
6689
- "A fee for relayer based (unverifiable) off-chain output delivery."
7190
+ "A fee for output delivery fees (i.e. tx fees)."
6690
7191
  ],
6691
7192
  type: "u64"
6692
7193
  }
@@ -6720,6 +7221,43 @@ var types = [
6720
7221
  ]
6721
7222
  }
6722
7223
  },
7224
+ {
7225
+ name: "FailureClaimAccountHeader",
7226
+ serialization: "bytemuckunsafe",
7227
+ repr: {
7228
+ kind: "c"
7229
+ },
7230
+ type: {
7231
+ kind: "struct",
7232
+ fields: [
7233
+ {
7234
+ name: "bump",
7235
+ type: "u8"
7236
+ },
7237
+ {
7238
+ name: "is_complete",
7239
+ type: "bool"
7240
+ },
7241
+ {
7242
+ name: "padding",
7243
+ type: {
7244
+ array: [
7245
+ "u8",
7246
+ 6
7247
+ ]
7248
+ }
7249
+ },
7250
+ {
7251
+ name: "challenge_end_slot",
7252
+ type: "u64"
7253
+ },
7254
+ {
7255
+ name: "poster",
7256
+ type: "pubkey"
7257
+ }
7258
+ ]
7259
+ }
7260
+ },
6723
7261
  {
6724
7262
  name: "FeePool",
6725
7263
  type: {
@@ -6748,6 +7286,22 @@ var types = [
6748
7286
  ]
6749
7287
  }
6750
7288
  },
7289
+ {
7290
+ name: "FinalizeFailureDataEvent",
7291
+ type: {
7292
+ kind: "struct",
7293
+ fields: [
7294
+ {
7295
+ name: "computation_offset",
7296
+ type: "u64"
7297
+ },
7298
+ {
7299
+ name: "mxe_program_id",
7300
+ type: "pubkey"
7301
+ }
7302
+ ]
7303
+ }
7304
+ },
6751
7305
  {
6752
7306
  name: "InitComputationEvent",
6753
7307
  type: {
@@ -6982,13 +7536,27 @@ var types = [
6982
7536
  }
6983
7537
  },
6984
7538
  {
6985
- name: "x25519_pubkey",
7539
+ name: "utility_pubkeys",
6986
7540
  docs: [
6987
- "The x25519 pubkey (256 bits curve25519), used for encrypted data."
7541
+ "The utility pubkeys, consisting of",
7542
+ "- x25519 pubkey (32 bytes), used for key exchange",
7543
+ "- ed25519 verifying key (32 bytes), used for signature verification",
7544
+ "- ElGamal pubkey (32 bytes), used for c-spl",
7545
+ "- ElGamal pubkey validity proof (64 bytes), used for c-spl"
6988
7546
  ],
6989
7547
  type: {
6990
7548
  defined: {
6991
- name: "X25519Pubkey"
7549
+ name: "SetUnset",
7550
+ generics: [
7551
+ {
7552
+ kind: "type",
7553
+ type: {
7554
+ defined: {
7555
+ name: "UtilityPubkeys"
7556
+ }
7557
+ }
7558
+ }
7559
+ ]
6992
7560
  }
6993
7561
  }
6994
7562
  },
@@ -7428,6 +7996,9 @@ var types = [
7428
7996
  },
7429
7997
  {
7430
7998
  name: "PlaintextFloat"
7999
+ },
8000
+ {
8001
+ name: "PlaintextPoint"
7431
8002
  }
7432
8003
  ]
7433
8004
  }
@@ -7499,6 +8070,39 @@ var types = [
7499
8070
  ]
7500
8071
  }
7501
8072
  },
8073
+ {
8074
+ name: "SetUnset",
8075
+ generics: [
8076
+ {
8077
+ kind: "type",
8078
+ name: "T"
8079
+ }
8080
+ ],
8081
+ type: {
8082
+ kind: "enum",
8083
+ variants: [
8084
+ {
8085
+ name: "Set",
8086
+ fields: [
8087
+ {
8088
+ generic: "T"
8089
+ }
8090
+ ]
8091
+ },
8092
+ {
8093
+ name: "Unset",
8094
+ fields: [
8095
+ {
8096
+ generic: "T"
8097
+ },
8098
+ {
8099
+ vec: "bool"
8100
+ }
8101
+ ]
8102
+ }
8103
+ ]
8104
+ }
8105
+ },
7502
8106
  {
7503
8107
  name: "SmallExecPool",
7504
8108
  serialization: "bytemuckunsafe",
@@ -7872,34 +8476,45 @@ var types = [
7872
8476
  }
7873
8477
  },
7874
8478
  {
7875
- name: "X25519Pubkey",
8479
+ name: "UtilityPubkeys",
7876
8480
  type: {
7877
- kind: "enum",
7878
- variants: [
8481
+ kind: "struct",
8482
+ fields: [
7879
8483
  {
7880
- name: "Set",
7881
- fields: [
7882
- {
7883
- array: [
7884
- "u8",
7885
- 32
7886
- ]
7887
- }
7888
- ]
8484
+ name: "x25519_pubkey",
8485
+ type: {
8486
+ array: [
8487
+ "u8",
8488
+ 32
8489
+ ]
8490
+ }
7889
8491
  },
7890
8492
  {
7891
- name: "Unset",
7892
- fields: [
7893
- {
7894
- array: [
7895
- "u8",
7896
- 32
7897
- ]
7898
- },
7899
- {
7900
- vec: "bool"
7901
- }
7902
- ]
8493
+ name: "ed25519_verifying_key",
8494
+ type: {
8495
+ array: [
8496
+ "u8",
8497
+ 32
8498
+ ]
8499
+ }
8500
+ },
8501
+ {
8502
+ name: "elgamal_pubkey",
8503
+ type: {
8504
+ array: [
8505
+ "u8",
8506
+ 32
8507
+ ]
8508
+ }
8509
+ },
8510
+ {
8511
+ name: "pubkey_validity_proof",
8512
+ type: {
8513
+ array: [
8514
+ "u8",
8515
+ 64
8516
+ ]
8517
+ }
7903
8518
  }
7904
8519
  ]
7905
8520
  }
@@ -7938,10 +8553,10 @@ const ARCIUM_ADDR = address;
7938
8553
  */
7939
8554
  const CLOCK_ACC_SEED = 'ClockAccount';
7940
8555
  /**
7941
- * Seed for StakingPoolAccount PDA
8556
+ * Seed for FeePool PDA
7942
8557
  * @constant {string}
7943
8558
  */
7944
- const POOL_ACC_SEED = 'StakingPoolAccount';
8559
+ const POOL_ACC_SEED = 'FeePool';
7945
8560
  /**
7946
8561
  * Seed for ComputationAccount PDA
7947
8562
  * @constant {string}
@@ -8003,7 +8618,7 @@ const MAX_EMBIGGEN_IX_PER_TX = 18;
8003
8618
  * @returns The Arcium program's public key.
8004
8619
  */
8005
8620
  function getArciumProgramId() {
8006
- return new web3_js.PublicKey('BKck65TgoKRokMjQM3datB9oRwJ8rAj2jxPXvHXUvcL6');
8621
+ return new web3_js.PublicKey('Bv3Fb9VjzjWGfX18QTUcVycAfeLoQ5zZN6vv2g3cTZxp');
8007
8622
  }
8008
8623
  /**
8009
8624
  * Derives the computation account address for a given MXE program ID and offset.
@@ -8034,10 +8649,10 @@ function getExecutingPoolAccAddress(mxeProgramId) {
8034
8649
  return generateArciumPDAFrom(seeds)[0];
8035
8650
  }
8036
8651
  /**
8037
- * Derives the staking pool account address.
8038
- * @returns The derived staking pool account public key.
8652
+ * Derives the fee pool account address.
8653
+ * @returns The derived fee pool account public key.
8039
8654
  */
8040
- function getStakingPoolAccAddress() {
8655
+ function getFeePoolAccAddress() {
8041
8656
  const seeds = [Buffer.from(POOL_ACC_SEED)];
8042
8657
  return generateArciumPDAFrom(seeds)[0];
8043
8658
  }
@@ -8259,14 +8874,36 @@ async function getMXEPublicKey(provider, mxeProgramID) {
8259
8874
  const program = getArciumProgram(provider);
8260
8875
  const mxeAccAddress = getMXEAccAddress(mxeProgramID);
8261
8876
  const mxeAccInfo = await program.account.mxeAccount.fetch(mxeAccAddress);
8262
- if ('set' in mxeAccInfo.x25519Pubkey) {
8263
- const setData = mxeAccInfo.x25519Pubkey.set;
8264
- return new Uint8Array([...setData[0]]);
8877
+ if ('set' in mxeAccInfo.utilityPubkeys) {
8878
+ const setData = mxeAccInfo.utilityPubkeys.set;
8879
+ return new Uint8Array(setData[0].x25519Pubkey);
8880
+ }
8881
+ else if ('unset' in mxeAccInfo.utilityPubkeys) {
8882
+ const unsetData = mxeAccInfo.utilityPubkeys.unset;
8883
+ if (unsetData[1].every(Boolean)) {
8884
+ return new Uint8Array(unsetData[0].x25519Pubkey);
8885
+ }
8886
+ }
8887
+ return null;
8888
+ }
8889
+ /**
8890
+ * Fetches and extracts the MXE arcis ed25519 verifying key from the MXE account.
8891
+ * @param provider - The Anchor provider to use for fetching accounts.
8892
+ * @param mxeProgramID - The public key of the MXE program.
8893
+ * @returns The MXE's arcis ed25519 verifying key as a Uint8Array, or null if not set.
8894
+ */
8895
+ async function getMXEArcisEd25519VerifyingKey(provider, mxeProgramID) {
8896
+ const program = getArciumProgram(provider);
8897
+ const mxeAccAddress = getMXEAccAddress(mxeProgramID);
8898
+ const mxeAccInfo = await program.account.mxeAccount.fetch(mxeAccAddress);
8899
+ if ('set' in mxeAccInfo.utilityPubkeys) {
8900
+ const setData = mxeAccInfo.utilityPubkeys.set;
8901
+ return new Uint8Array(setData[0].ed25519VerifyingKey);
8265
8902
  }
8266
- else if ('unset' in mxeAccInfo.x25519Pubkey) {
8267
- const unsetData = mxeAccInfo.x25519Pubkey.unset;
8903
+ else if ('unset' in mxeAccInfo.utilityPubkeys) {
8904
+ const unsetData = mxeAccInfo.utilityPubkeys.unset;
8268
8905
  if (unsetData[1].every(Boolean)) {
8269
- return new Uint8Array([...unsetData[0]]);
8906
+ return new Uint8Array(unsetData[0].ed25519VerifyingKey);
8270
8907
  }
8271
8908
  }
8272
8909
  return null;
@@ -8564,11 +9201,12 @@ exports.getCompDefAccOffset = getCompDefAccOffset;
8564
9201
  exports.getComputationAccAddress = getComputationAccAddress;
8565
9202
  exports.getExecutingPoolAccAddress = getExecutingPoolAccAddress;
8566
9203
  exports.getExecutingPoolAccData = getExecutingPoolAccData;
9204
+ exports.getFeePoolAccAddress = getFeePoolAccAddress;
8567
9205
  exports.getMXEAccAddress = getMXEAccAddress;
9206
+ exports.getMXEArcisEd25519VerifyingKey = getMXEArcisEd25519VerifyingKey;
8568
9207
  exports.getMXEPublicKey = getMXEPublicKey;
8569
9208
  exports.getMempoolAccAddress = getMempoolAccAddress;
8570
9209
  exports.getMempoolAccData = getMempoolAccData;
8571
- exports.getStakingPoolAccAddress = getStakingPoolAccAddress;
8572
9210
  exports.positiveModulo = positiveModulo;
8573
9211
  exports.randMatrix = randMatrix;
8574
9212
  exports.serializeLE = serializeLE;