@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/build/index.d.ts CHANGED
@@ -156,7 +156,7 @@ declare class RescueCipher {
156
156
  desc: RescueDesc;
157
157
  /**
158
158
  * Constructs a RescueCipher instance using a shared secret.
159
- * The key is derived using HKDF-RescuePrime and used to initialize the RescueDesc.
159
+ * The key is derived using RescuePrimeHash and used to initialize the RescueDesc.
160
160
  * @param sharedSecret - The shared secret to derive the cipher key from.
161
161
  */
162
162
  constructor(sharedSecret: Uint8Array);
@@ -193,21 +193,23 @@ declare class RescueCipher {
193
193
  }
194
194
 
195
195
  /**
196
- * The Rescue-Prime hash function, as described in https://eprint.iacr.org/2020/1143.pdf.
197
- * Used with fixed m = 6 and capacity = 1 (rate = 5). According to Section 2.2, this offers log2(CURVE25519_BASE_FIELD.ORDER) / 2 bits of security against collision, preimage, and second-preimage attacks.
198
- * See the referenced paper for further details.
196
+ * The Rescue-Prime hash function, as described in https://eprint.iacr.org/2020/1143.pdf, offering 256 bits
197
+ * of security against collision, preimage and second-preimage attacks for any field of size at least 102 bits.
198
+ * We use the sponge construction with fixed rate = 7 and capacity = 5 (i.e., m = 12), and truncate the
199
+ * output to 5 field elements.
199
200
  */
200
201
  declare class RescuePrimeHash {
201
202
  desc: RescueDesc;
202
203
  rate: number;
204
+ digestLength: number;
203
205
  /**
204
- * Constructs a RescuePrimeHash instance with m = 6 and capacity = 1.
206
+ * Constructs a RescuePrimeHash instance with rate = 7 and capacity = 5.
205
207
  */
206
208
  constructor();
207
209
  /**
208
210
  * Computes the Rescue-Prime hash of a message, with padding as described in Algorithm 2 of the paper.
209
211
  * @param message - The input message as an array of bigints.
210
- * @returns The hash output as an array of bigints (length = rate).
212
+ * @returns The hash output as an array of bigints (length = digestLength).
211
213
  */
212
214
  digest(message: bigint[]): bigint[];
213
215
  }
@@ -220,17 +222,23 @@ declare class RescuePrimeHash {
220
222
  declare const arcisEd25519: CurveFn;
221
223
 
222
224
  /**
223
- * AES-128 cipher in Counter (CTR) mode, using HKDF-SHA3-256 to derive the key from a shared secret.
225
+ * Supported AES key sizes in bits.
226
+ */
227
+ type AesKeyBits = 128 | 192 | 256;
228
+ /**
229
+ * Generic AES cipher in Counter (CTR) mode, using SHA3-256 to derive the key from a shared secret.
224
230
  * See: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf (Section 6.5) for details on CTR mode.
225
231
  */
226
- declare class Aes128Cipher {
227
- key: Uint8Array;
232
+ declare class AesCtrCipher {
233
+ protected key: Uint8Array;
234
+ private readonly keyBits;
228
235
  /**
229
- * Constructs an AES-128 cipher instance using a shared secret.
230
- * The key is derived using HKDF-SHA3-256.
236
+ * Constructs an AES cipher instance using a shared secret.
237
+ * The key is derived using SHA3-256.
231
238
  * @param sharedSecret - The shared secret to derive the AES key from.
239
+ * @param keyBits - The AES key size in bits (128, 192, or 256).
232
240
  */
233
- constructor(sharedSecret: Uint8Array);
241
+ constructor(sharedSecret: Uint8Array, keyBits: AesKeyBits);
234
242
  /**
235
243
  * Encrypts the plaintext array in Counter (CTR) mode.
236
244
  * @param plaintext - The data to encrypt.
@@ -250,63 +258,42 @@ declare class Aes128Cipher {
250
258
  }
251
259
 
252
260
  /**
253
- * AES-192 cipher in Counter (CTR) mode, using HKDF-SHA3-256 to derive the key from a shared secret.
261
+ * AES-128 cipher in Counter (CTR) mode, using SHA3-256 to derive the key from a shared secret.
254
262
  * See: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf (Section 6.5) for details on CTR mode.
255
263
  */
256
- declare class Aes192Cipher {
257
- key: Uint8Array;
264
+ declare class Aes128Cipher extends AesCtrCipher {
258
265
  /**
259
- * Constructs an AES-192 cipher instance using a shared secret.
260
- * The key is derived using HKDF-SHA3-256.
266
+ * Constructs an AES-128 cipher instance using a shared secret.
267
+ * The key is derived using SHA3-256.
261
268
  * @param sharedSecret - The shared secret to derive the AES key from.
262
269
  */
263
270
  constructor(sharedSecret: Uint8Array);
271
+ }
272
+
273
+ /**
274
+ * AES-192 cipher in Counter (CTR) mode, using SHA3-256 to derive the key from a shared secret.
275
+ * See: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf (Section 6.5) for details on CTR mode.
276
+ */
277
+ declare class Aes192Cipher extends AesCtrCipher {
264
278
  /**
265
- * Encrypts the plaintext array in Counter (CTR) mode.
266
- * @param plaintext - The data to encrypt.
267
- * @param nonce - An 8-byte nonce for CTR mode.
268
- * @returns The encrypted ciphertext as a Uint8Array.
269
- * @throws Error if the nonce is not 8 bytes long.
270
- */
271
- encrypt(plaintext: Uint8Array, nonce: Uint8Array): Uint8Array;
272
- /**
273
- * Decrypts the ciphertext array in Counter (CTR) mode.
274
- * @param ciphertext - The data to decrypt.
275
- * @param nonce - An 8-byte nonce for CTR mode.
276
- * @returns The decrypted plaintext as a Uint8Array.
277
- * @throws Error if the nonce is not 8 bytes long.
279
+ * Constructs an AES-192 cipher instance using a shared secret.
280
+ * The key is derived using SHA3-256.
281
+ * @param sharedSecret - The shared secret to derive the AES key from.
278
282
  */
279
- decrypt(ciphertext: Uint8Array, nonce: Uint8Array): Uint8Array;
283
+ constructor(sharedSecret: Uint8Array);
280
284
  }
281
285
 
282
286
  /**
283
- * AES-256 cipher in Counter (CTR) mode, using HKDF-SHA3-256 to derive the key from a shared secret.
287
+ * AES-256 cipher in Counter (CTR) mode, using SHA3-256 to derive the key from a shared secret.
284
288
  * See: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38a.pdf (Section 6.5) for details on CTR mode.
285
289
  */
286
- declare class Aes256Cipher {
287
- key: Uint8Array;
290
+ declare class Aes256Cipher extends AesCtrCipher {
288
291
  /**
289
292
  * Constructs an AES-256 cipher instance using a shared secret.
290
- * The key is derived using HKDF-SHA3-256.
293
+ * The key is derived using SHA3-256.
291
294
  * @param sharedSecret - The shared secret to derive the AES key from.
292
295
  */
293
296
  constructor(sharedSecret: Uint8Array);
294
- /**
295
- * Encrypts the plaintext array in Counter (CTR) mode.
296
- * @param plaintext - The data to encrypt.
297
- * @param nonce - An 8-byte nonce for CTR mode.
298
- * @returns The encrypted ciphertext as a Uint8Array.
299
- * @throws Error if the nonce is not 8 bytes long.
300
- */
301
- encrypt(plaintext: Uint8Array, nonce: Uint8Array): Uint8Array;
302
- /**
303
- * Decrypts the ciphertext array in Counter (CTR) mode.
304
- * @param ciphertext - The data to decrypt.
305
- * @param nonce - An 8-byte nonce for CTR mode.
306
- * @returns The decrypted plaintext as a Uint8Array.
307
- * @throws Error if the nonce is not 8 bytes long.
308
- */
309
- decrypt(ciphertext: Uint8Array, nonce: Uint8Array): Uint8Array;
310
297
  }
311
298
 
312
299
  /**
@@ -316,10 +303,10 @@ declare class Aes256Cipher {
316
303
  * IDL can be found at `target/idl/arcium.json`.
317
304
  */
318
305
  type Arcium = {
319
- "address": "Bv3Fb9VjzjWGfX18QTUcVycAfeLoQ5zZN6vv2g3cTZxp";
306
+ "address": "BpaW2ZmCJnDwizWY8eM34JtVqp2kRgnmQcedSVc9USdP";
320
307
  "metadata": {
321
308
  "name": "arcium";
322
- "version": "0.4.0";
309
+ "version": "0.5.1";
323
310
  "spec": "0.1.0";
324
311
  "description": "The Arcium program";
325
312
  };
@@ -672,8 +659,9 @@ type Arcium = {
672
659
  ];
673
660
  },
674
661
  {
675
- "kind": "arg";
676
- "path": "mxeProgram";
662
+ "kind": "account";
663
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
664
+ "account": "mxeAccount";
677
665
  },
678
666
  {
679
667
  "kind": "arg";
@@ -700,8 +688,9 @@ type Arcium = {
700
688
  ];
701
689
  },
702
690
  {
703
- "kind": "arg";
704
- "path": "mxeProgram";
691
+ "kind": "account";
692
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
693
+ "account": "mxeAccount";
705
694
  }
706
695
  ];
707
696
  };
@@ -725,8 +714,9 @@ type Arcium = {
725
714
  ];
726
715
  },
727
716
  {
728
- "kind": "arg";
729
- "path": "mxeProgram";
717
+ "kind": "account";
718
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
719
+ "account": "mxeAccount";
730
720
  }
731
721
  ];
732
722
  };
@@ -819,6 +809,79 @@ type Arcium = {
819
809
  }
820
810
  ];
821
811
  },
812
+ {
813
+ "name": "claimComputationRent";
814
+ "discriminator": [
815
+ 215,
816
+ 218,
817
+ 1,
818
+ 166,
819
+ 81,
820
+ 218,
821
+ 16,
822
+ 151
823
+ ];
824
+ "accounts": [
825
+ {
826
+ "name": "signer";
827
+ "writable": true;
828
+ "signer": true;
829
+ },
830
+ {
831
+ "name": "comp";
832
+ "writable": true;
833
+ "pda": {
834
+ "seeds": [
835
+ {
836
+ "kind": "const";
837
+ "value": [
838
+ 67,
839
+ 111,
840
+ 109,
841
+ 112,
842
+ 117,
843
+ 116,
844
+ 97,
845
+ 116,
846
+ 105,
847
+ 111,
848
+ 110,
849
+ 65,
850
+ 99,
851
+ 99,
852
+ 111,
853
+ 117,
854
+ 110,
855
+ 116
856
+ ];
857
+ },
858
+ {
859
+ "kind": "arg";
860
+ "path": "clusterOffset";
861
+ },
862
+ {
863
+ "kind": "arg";
864
+ "path": "compOffset";
865
+ }
866
+ ];
867
+ };
868
+ },
869
+ {
870
+ "name": "systemProgram";
871
+ "address": "11111111111111111111111111111111";
872
+ }
873
+ ];
874
+ "args": [
875
+ {
876
+ "name": "compOffset";
877
+ "type": "u64";
878
+ },
879
+ {
880
+ "name": "clusterOffset";
881
+ "type": "u32";
882
+ }
883
+ ];
884
+ },
822
885
  {
823
886
  "name": "claimFailureAppend";
824
887
  "discriminator": [
@@ -993,8 +1056,9 @@ type Arcium = {
993
1056
  ];
994
1057
  },
995
1058
  {
996
- "kind": "arg";
997
- "path": "mxeProgram";
1059
+ "kind": "account";
1060
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
1061
+ "account": "mxeAccount";
998
1062
  }
999
1063
  ];
1000
1064
  };
@@ -1017,8 +1081,9 @@ type Arcium = {
1017
1081
  ];
1018
1082
  },
1019
1083
  {
1020
- "kind": "arg";
1021
- "path": "mxeProgram";
1084
+ "kind": "account";
1085
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
1086
+ "account": "mxeAccount";
1022
1087
  }
1023
1088
  ];
1024
1089
  };
@@ -1052,8 +1117,9 @@ type Arcium = {
1052
1117
  ];
1053
1118
  },
1054
1119
  {
1055
- "kind": "arg";
1056
- "path": "mxeProgram";
1120
+ "kind": "account";
1121
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
1122
+ "account": "mxeAccount";
1057
1123
  },
1058
1124
  {
1059
1125
  "kind": "arg";
@@ -1249,8 +1315,9 @@ type Arcium = {
1249
1315
  ];
1250
1316
  },
1251
1317
  {
1252
- "kind": "arg";
1253
- "path": "mxeProgram";
1318
+ "kind": "account";
1319
+ "path": "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ";
1320
+ "account": "mxeAccount";
1254
1321
  },
1255
1322
  {
1256
1323
  "kind": "arg";
@@ -1441,7 +1508,7 @@ type Arcium = {
1441
1508
  };
1442
1509
  },
1443
1510
  {
1444
- "name": "clusterAcc0";
1511
+ "name": "clusterAcc";
1445
1512
  "optional": true;
1446
1513
  "pda": {
1447
1514
  "seeds": [
@@ -1459,40 +1526,40 @@ type Arcium = {
1459
1526
  },
1460
1527
  {
1461
1528
  "kind": "account";
1462
- "path": "arx_node_acc.cluster_memberships";
1463
- "account": "arxNode";
1529
+ "path": "arxNodeAcc";
1464
1530
  }
1465
1531
  ];
1466
1532
  };
1467
- },
1533
+ }
1534
+ ];
1535
+ "args": [
1468
1536
  {
1469
- "name": "clusterAcc1";
1470
- "optional": true;
1471
- "pda": {
1472
- "seeds": [
1473
- {
1474
- "kind": "const";
1475
- "value": [
1476
- 67,
1477
- 108,
1478
- 117,
1479
- 115,
1480
- 116,
1481
- 101,
1482
- 114
1483
- ];
1484
- },
1485
- {
1486
- "kind": "account";
1487
- "path": "arx_node_acc.cluster_memberships.get(1).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1488
- "account": "arxNode";
1489
- }
1490
- ];
1491
- };
1537
+ "name": "nodeOffset";
1538
+ "type": "u32";
1539
+ }
1540
+ ];
1541
+ },
1542
+ {
1543
+ "name": "deactivateCluster";
1544
+ "discriminator": [
1545
+ 13,
1546
+ 42,
1547
+ 182,
1548
+ 159,
1549
+ 184,
1550
+ 10,
1551
+ 212,
1552
+ 178
1553
+ ];
1554
+ "accounts": [
1555
+ {
1556
+ "name": "authority";
1557
+ "writable": true;
1558
+ "signer": true;
1492
1559
  },
1493
1560
  {
1494
- "name": "clusterAcc2";
1495
- "optional": true;
1561
+ "name": "clusterAcc";
1562
+ "writable": true;
1496
1563
  "pda": {
1497
1564
  "seeds": [
1498
1565
  {
@@ -1508,16 +1575,14 @@ type Arcium = {
1508
1575
  ];
1509
1576
  },
1510
1577
  {
1511
- "kind": "account";
1512
- "path": "arx_node_acc.cluster_memberships.get(2).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1513
- "account": "arxNode";
1578
+ "kind": "arg";
1579
+ "path": "id";
1514
1580
  }
1515
1581
  ];
1516
1582
  };
1517
1583
  },
1518
1584
  {
1519
- "name": "clusterAcc3";
1520
- "optional": true;
1585
+ "name": "clock";
1521
1586
  "pda": {
1522
1587
  "seeds": [
1523
1588
  {
@@ -1525,254 +1590,30 @@ type Arcium = {
1525
1590
  "value": [
1526
1591
  67,
1527
1592
  108,
1593
+ 111,
1594
+ 99,
1595
+ 107,
1596
+ 65,
1597
+ 99,
1598
+ 99,
1599
+ 111,
1528
1600
  117,
1529
- 115,
1530
- 116,
1531
- 101,
1532
- 114
1601
+ 110,
1602
+ 116
1533
1603
  ];
1534
- },
1535
- {
1536
- "kind": "account";
1537
- "path": "arx_node_acc.cluster_memberships.get(3).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1538
- "account": "arxNode";
1539
1604
  }
1540
1605
  ];
1541
1606
  };
1542
1607
  },
1543
1608
  {
1544
- "name": "clusterAcc4";
1545
- "optional": true;
1546
- "pda": {
1547
- "seeds": [
1548
- {
1549
- "kind": "const";
1550
- "value": [
1551
- 67,
1552
- 108,
1553
- 117,
1554
- 115,
1555
- 116,
1556
- 101,
1557
- 114
1558
- ];
1559
- },
1560
- {
1561
- "kind": "account";
1562
- "path": "arx_node_acc.cluster_memberships.get(4).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1563
- "account": "arxNode";
1564
- }
1565
- ];
1566
- };
1567
- },
1568
- {
1569
- "name": "clusterAcc5";
1570
- "optional": true;
1571
- "pda": {
1572
- "seeds": [
1573
- {
1574
- "kind": "const";
1575
- "value": [
1576
- 67,
1577
- 108,
1578
- 117,
1579
- 115,
1580
- 116,
1581
- 101,
1582
- 114
1583
- ];
1584
- },
1585
- {
1586
- "kind": "account";
1587
- "path": "arx_node_acc.cluster_memberships.get(5).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1588
- "account": "arxNode";
1589
- }
1590
- ];
1591
- };
1592
- },
1593
- {
1594
- "name": "clusterAcc6";
1595
- "optional": true;
1596
- "pda": {
1597
- "seeds": [
1598
- {
1599
- "kind": "const";
1600
- "value": [
1601
- 67,
1602
- 108,
1603
- 117,
1604
- 115,
1605
- 116,
1606
- 101,
1607
- 114
1608
- ];
1609
- },
1610
- {
1611
- "kind": "account";
1612
- "path": "arx_node_acc.cluster_memberships.get(6).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1613
- "account": "arxNode";
1614
- }
1615
- ];
1616
- };
1617
- },
1618
- {
1619
- "name": "clusterAcc7";
1620
- "optional": true;
1621
- "pda": {
1622
- "seeds": [
1623
- {
1624
- "kind": "const";
1625
- "value": [
1626
- 67,
1627
- 108,
1628
- 117,
1629
- 115,
1630
- 116,
1631
- 101,
1632
- 114
1633
- ];
1634
- },
1635
- {
1636
- "kind": "account";
1637
- "path": "arx_node_acc.cluster_memberships.get(7).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1638
- "account": "arxNode";
1639
- }
1640
- ];
1641
- };
1642
- },
1643
- {
1644
- "name": "clusterAcc8";
1645
- "optional": true;
1646
- "pda": {
1647
- "seeds": [
1648
- {
1649
- "kind": "const";
1650
- "value": [
1651
- 67,
1652
- 108,
1653
- 117,
1654
- 115,
1655
- 116,
1656
- 101,
1657
- 114
1658
- ];
1659
- },
1660
- {
1661
- "kind": "account";
1662
- "path": "arx_node_acc.cluster_memberships.get(8).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1663
- "account": "arxNode";
1664
- }
1665
- ];
1666
- };
1667
- },
1668
- {
1669
- "name": "clusterAcc9";
1670
- "optional": true;
1671
- "pda": {
1672
- "seeds": [
1673
- {
1674
- "kind": "const";
1675
- "value": [
1676
- 67,
1677
- 108,
1678
- 117,
1679
- 115,
1680
- 116,
1681
- 101,
1682
- 114
1683
- ];
1684
- },
1685
- {
1686
- "kind": "account";
1687
- "path": "arx_node_acc.cluster_memberships.get(9).ok_or(ArciumError ::\nInvalidClusterMembership) ? ";
1688
- "account": "arxNode";
1689
- }
1690
- ];
1691
- };
1692
- }
1693
- ];
1694
- "args": [
1695
- {
1696
- "name": "nodeOffset";
1697
- "type": "u32";
1698
- }
1699
- ];
1700
- },
1701
- {
1702
- "name": "deactivateCluster";
1703
- "discriminator": [
1704
- 13,
1705
- 42,
1706
- 182,
1707
- 159,
1708
- 184,
1709
- 10,
1710
- 212,
1711
- 178
1712
- ];
1713
- "accounts": [
1714
- {
1715
- "name": "authority";
1716
- "writable": true;
1717
- "signer": true;
1718
- },
1719
- {
1720
- "name": "clusterAcc";
1721
- "writable": true;
1722
- "pda": {
1723
- "seeds": [
1724
- {
1725
- "kind": "const";
1726
- "value": [
1727
- 67,
1728
- 108,
1729
- 117,
1730
- 115,
1731
- 116,
1732
- 101,
1733
- 114
1734
- ];
1735
- },
1736
- {
1737
- "kind": "arg";
1738
- "path": "id";
1739
- }
1740
- ];
1741
- };
1742
- },
1743
- {
1744
- "name": "clock";
1745
- "pda": {
1746
- "seeds": [
1747
- {
1748
- "kind": "const";
1749
- "value": [
1750
- 67,
1751
- 108,
1752
- 111,
1753
- 99,
1754
- 107,
1755
- 65,
1756
- 99,
1757
- 99,
1758
- 111,
1759
- 117,
1760
- 110,
1761
- 116
1762
- ];
1763
- }
1764
- ];
1765
- };
1766
- },
1767
- {
1768
- "name": "systemProgram";
1769
- "address": "11111111111111111111111111111111";
1770
- }
1771
- ];
1772
- "args": [
1773
- {
1774
- "name": "clusterId";
1775
- "type": "u32";
1609
+ "name": "systemProgram";
1610
+ "address": "11111111111111111111111111111111";
1611
+ }
1612
+ ];
1613
+ "args": [
1614
+ {
1615
+ "name": "clusterId";
1616
+ "type": "u32";
1776
1617
  },
1777
1618
  {
1778
1619
  "name": "deactivationEpoch";
@@ -2156,21 +1997,23 @@ type Arcium = {
2156
1997
  ];
2157
1998
  },
2158
1999
  {
2159
- "kind": "account";
2160
- "path": "mxeProgram";
2000
+ "kind": "arg";
2001
+ "path": "clusterOffset";
2161
2002
  }
2162
2003
  ];
2163
2004
  };
2164
2005
  },
2165
- {
2166
- "name": "mxeProgram";
2167
- },
2168
2006
  {
2169
2007
  "name": "systemProgram";
2170
2008
  "address": "11111111111111111111111111111111";
2171
2009
  }
2172
2010
  ];
2173
- "args": [];
2011
+ "args": [
2012
+ {
2013
+ "name": "clusterOffset";
2014
+ "type": "u32";
2015
+ }
2016
+ ];
2174
2017
  },
2175
2018
  {
2176
2019
  "name": "init";
@@ -2364,6 +2207,14 @@ type Arcium = {
2364
2207
  "name": "cuCapacityClaim";
2365
2208
  "type": "u64";
2366
2209
  },
2210
+ {
2211
+ "name": "blsPubkey";
2212
+ "type": {
2213
+ "defined": {
2214
+ "name": "bn254g2blsPublicKey";
2215
+ };
2216
+ };
2217
+ },
2367
2218
  {
2368
2219
  "name": "metadata";
2369
2220
  "type": {
@@ -2420,60 +2271,120 @@ type Arcium = {
2420
2271
  "name": "authority";
2421
2272
  },
2422
2273
  {
2423
- "name": "poolAccount";
2274
+ "name": "mempool";
2275
+ "docs": [
2276
+ "function"
2277
+ ];
2278
+ "writable": true;
2424
2279
  "pda": {
2425
2280
  "seeds": [
2426
2281
  {
2427
2282
  "kind": "const";
2428
2283
  "value": [
2429
- 70,
2430
- 101,
2284
+ 77,
2431
2285
  101,
2432
- 80,
2286
+ 109,
2287
+ 112,
2433
2288
  111,
2434
2289
  111,
2435
2290
  108
2436
2291
  ];
2292
+ },
2293
+ {
2294
+ "kind": "arg";
2295
+ "path": "id";
2437
2296
  }
2438
2297
  ];
2439
2298
  };
2440
2299
  },
2441
2300
  {
2442
- "name": "clock";
2301
+ "name": "execpool";
2302
+ "writable": true;
2443
2303
  "pda": {
2444
2304
  "seeds": [
2445
2305
  {
2446
2306
  "kind": "const";
2447
2307
  "value": [
2448
- 67,
2449
- 108,
2450
- 111,
2451
- 99,
2452
- 107,
2453
- 65,
2454
- 99,
2308
+ 69,
2309
+ 120,
2310
+ 101,
2455
2311
  99,
2312
+ 112,
2456
2313
  111,
2457
- 117,
2458
- 110,
2459
- 116
2314
+ 111,
2315
+ 108
2460
2316
  ];
2317
+ },
2318
+ {
2319
+ "kind": "arg";
2320
+ "path": "id";
2461
2321
  }
2462
2322
  ];
2463
2323
  };
2464
2324
  },
2465
2325
  {
2466
- "name": "systemProgram";
2467
- "address": "11111111111111111111111111111111";
2468
- }
2469
- ];
2470
- "args": [
2471
- {
2472
- "name": "clusterId";
2473
- "type": "u32";
2474
- },
2475
- {
2476
- "name": "maxSize";
2326
+ "name": "poolAccount";
2327
+ "pda": {
2328
+ "seeds": [
2329
+ {
2330
+ "kind": "const";
2331
+ "value": [
2332
+ 70,
2333
+ 101,
2334
+ 101,
2335
+ 80,
2336
+ 111,
2337
+ 111,
2338
+ 108
2339
+ ];
2340
+ }
2341
+ ];
2342
+ };
2343
+ },
2344
+ {
2345
+ "name": "clock";
2346
+ "pda": {
2347
+ "seeds": [
2348
+ {
2349
+ "kind": "const";
2350
+ "value": [
2351
+ 67,
2352
+ 108,
2353
+ 111,
2354
+ 99,
2355
+ 107,
2356
+ 65,
2357
+ 99,
2358
+ 99,
2359
+ 111,
2360
+ 117,
2361
+ 110,
2362
+ 116
2363
+ ];
2364
+ }
2365
+ ];
2366
+ };
2367
+ },
2368
+ {
2369
+ "name": "systemProgram";
2370
+ "address": "11111111111111111111111111111111";
2371
+ }
2372
+ ];
2373
+ "args": [
2374
+ {
2375
+ "name": "clusterId";
2376
+ "type": "u32";
2377
+ },
2378
+ {
2379
+ "name": "mempoolSize";
2380
+ "type": {
2381
+ "defined": {
2382
+ "name": "mempoolSize";
2383
+ };
2384
+ };
2385
+ },
2386
+ {
2387
+ "name": "maxSize";
2477
2388
  "type": "u32";
2478
2389
  },
2479
2390
  {
@@ -2684,19 +2595,17 @@ type Arcium = {
2684
2595
  };
2685
2596
  },
2686
2597
  {
2687
- "name": "mempool";
2688
- "docs": [
2689
- "function"
2690
- ];
2598
+ "name": "executingPool";
2691
2599
  "writable": true;
2692
2600
  "pda": {
2693
2601
  "seeds": [
2694
2602
  {
2695
2603
  "kind": "const";
2696
2604
  "value": [
2697
- 77,
2605
+ 69,
2606
+ 120,
2698
2607
  101,
2699
- 109,
2608
+ 99,
2700
2609
  112,
2701
2610
  111,
2702
2611
  111,
@@ -2704,24 +2613,23 @@ type Arcium = {
2704
2613
  ];
2705
2614
  },
2706
2615
  {
2707
- "kind": "account";
2708
- "path": "mxeProgram";
2616
+ "kind": "arg";
2617
+ "path": "clusterOffset";
2709
2618
  }
2710
2619
  ];
2711
2620
  };
2712
2621
  },
2713
2622
  {
2714
- "name": "execpool";
2623
+ "name": "mempool";
2715
2624
  "writable": true;
2716
2625
  "pda": {
2717
2626
  "seeds": [
2718
2627
  {
2719
2628
  "kind": "const";
2720
2629
  "value": [
2721
- 69,
2722
- 120,
2630
+ 77,
2723
2631
  101,
2724
- 99,
2632
+ 109,
2725
2633
  112,
2726
2634
  111,
2727
2635
  111,
@@ -2729,8 +2637,8 @@ type Arcium = {
2729
2637
  ];
2730
2638
  },
2731
2639
  {
2732
- "kind": "account";
2733
- "path": "mxeProgram";
2640
+ "kind": "arg";
2641
+ "path": "clusterOffset";
2734
2642
  }
2735
2643
  ];
2736
2644
  };
@@ -2740,7 +2648,6 @@ type Arcium = {
2740
2648
  "docs": [
2741
2649
  "Cluster to add to the MXE."
2742
2650
  ];
2743
- "writable": true;
2744
2651
  "pda": {
2745
2652
  "seeds": [
2746
2653
  {
@@ -2845,8 +2752,8 @@ type Arcium = {
2845
2752
  ];
2846
2753
  },
2847
2754
  {
2848
- "kind": "account";
2849
- "path": "mxeProgram";
2755
+ "kind": "arg";
2756
+ "path": "clusterOffset";
2850
2757
  },
2851
2758
  {
2852
2759
  "kind": "const";
@@ -2874,6 +2781,26 @@ type Arcium = {
2874
2781
  "constraint in tests because setting it would require us to deploy a program each time."
2875
2782
  ];
2876
2783
  },
2784
+ {
2785
+ "name": "poolAccount";
2786
+ "writable": true;
2787
+ "pda": {
2788
+ "seeds": [
2789
+ {
2790
+ "kind": "const";
2791
+ "value": [
2792
+ 70,
2793
+ 101,
2794
+ 101,
2795
+ 80,
2796
+ 111,
2797
+ 111,
2798
+ 108
2799
+ ];
2800
+ }
2801
+ ];
2802
+ };
2803
+ },
2877
2804
  {
2878
2805
  "name": "systemProgram";
2879
2806
  "docs": [
@@ -2886,14 +2813,6 @@ type Arcium = {
2886
2813
  {
2887
2814
  "name": "clusterOffset";
2888
2815
  "type": "u32";
2889
- },
2890
- {
2891
- "name": "mempoolSize";
2892
- "type": {
2893
- "defined": {
2894
- "name": "mempoolSize";
2895
- };
2896
- };
2897
2816
  }
2898
2817
  ];
2899
2818
  },
@@ -3533,7 +3452,7 @@ type Arcium = {
3533
3452
  },
3534
3453
  {
3535
3454
  "kind": "arg";
3536
- "path": "mxeProgram";
3455
+ "path": "cluster_index.map_or(mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? , | i |\nmxe.fallback_clusters [i as usize])";
3537
3456
  },
3538
3457
  {
3539
3458
  "kind": "arg";
@@ -3588,7 +3507,7 @@ type Arcium = {
3588
3507
  },
3589
3508
  {
3590
3509
  "kind": "arg";
3591
- "path": "mxeProgram";
3510
+ "path": "cluster_index.map_or(mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? , | i |\nmxe.fallback_clusters [i as usize])";
3592
3511
  }
3593
3512
  ];
3594
3513
  };
@@ -3612,7 +3531,7 @@ type Arcium = {
3612
3531
  },
3613
3532
  {
3614
3533
  "kind": "arg";
3615
- "path": "mxeProgram";
3534
+ "path": "cluster_index.map_or(mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? , | i |\nmxe.fallback_clusters [i as usize])";
3616
3535
  }
3617
3536
  ];
3618
3537
  };
@@ -3756,10 +3675,8 @@ type Arcium = {
3756
3675
  {
3757
3676
  "name": "args";
3758
3677
  "type": {
3759
- "vec": {
3760
- "defined": {
3761
- "name": "argument";
3762
- };
3678
+ "defined": {
3679
+ "name": "argumentList";
3763
3680
  };
3764
3681
  };
3765
3682
  },
@@ -3881,6 +3798,209 @@ type Arcium = {
3881
3798
  }
3882
3799
  ];
3883
3800
  },
3801
+ {
3802
+ "name": "requeueMxeKeygen";
3803
+ "docs": [
3804
+ "Re-queues the MXE keygen computation if it has expired from the mempool.",
3805
+ "This allows retrying the keygen if it wasn't processed in time."
3806
+ ];
3807
+ "discriminator": [
3808
+ 90,
3809
+ 98,
3810
+ 117,
3811
+ 181,
3812
+ 88,
3813
+ 71,
3814
+ 135,
3815
+ 30
3816
+ ];
3817
+ "accounts": [
3818
+ {
3819
+ "name": "signer";
3820
+ "writable": true;
3821
+ "signer": true;
3822
+ },
3823
+ {
3824
+ "name": "mxe";
3825
+ "pda": {
3826
+ "seeds": [
3827
+ {
3828
+ "kind": "const";
3829
+ "value": [
3830
+ 77,
3831
+ 88,
3832
+ 69,
3833
+ 65,
3834
+ 99,
3835
+ 99,
3836
+ 111,
3837
+ 117,
3838
+ 110,
3839
+ 116
3840
+ ];
3841
+ },
3842
+ {
3843
+ "kind": "account";
3844
+ "path": "mxeProgram";
3845
+ }
3846
+ ];
3847
+ };
3848
+ },
3849
+ {
3850
+ "name": "executingPool";
3851
+ "writable": true;
3852
+ "pda": {
3853
+ "seeds": [
3854
+ {
3855
+ "kind": "const";
3856
+ "value": [
3857
+ 69,
3858
+ 120,
3859
+ 101,
3860
+ 99,
3861
+ 112,
3862
+ 111,
3863
+ 111,
3864
+ 108
3865
+ ];
3866
+ },
3867
+ {
3868
+ "kind": "arg";
3869
+ "path": "clusterOffset";
3870
+ }
3871
+ ];
3872
+ };
3873
+ },
3874
+ {
3875
+ "name": "mempool";
3876
+ "writable": true;
3877
+ "pda": {
3878
+ "seeds": [
3879
+ {
3880
+ "kind": "const";
3881
+ "value": [
3882
+ 77,
3883
+ 101,
3884
+ 109,
3885
+ 112,
3886
+ 111,
3887
+ 111,
3888
+ 108
3889
+ ];
3890
+ },
3891
+ {
3892
+ "kind": "arg";
3893
+ "path": "clusterOffset";
3894
+ }
3895
+ ];
3896
+ };
3897
+ },
3898
+ {
3899
+ "name": "cluster";
3900
+ "pda": {
3901
+ "seeds": [
3902
+ {
3903
+ "kind": "const";
3904
+ "value": [
3905
+ 67,
3906
+ 108,
3907
+ 117,
3908
+ 115,
3909
+ 116,
3910
+ 101,
3911
+ 114
3912
+ ];
3913
+ },
3914
+ {
3915
+ "kind": "arg";
3916
+ "path": "clusterOffset";
3917
+ }
3918
+ ];
3919
+ };
3920
+ },
3921
+ {
3922
+ "name": "mxeKeygenComputation";
3923
+ "writable": true;
3924
+ "pda": {
3925
+ "seeds": [
3926
+ {
3927
+ "kind": "const";
3928
+ "value": [
3929
+ 67,
3930
+ 111,
3931
+ 109,
3932
+ 112,
3933
+ 117,
3934
+ 116,
3935
+ 97,
3936
+ 116,
3937
+ 105,
3938
+ 111,
3939
+ 110,
3940
+ 65,
3941
+ 99,
3942
+ 99,
3943
+ 111,
3944
+ 117,
3945
+ 110,
3946
+ 116
3947
+ ];
3948
+ },
3949
+ {
3950
+ "kind": "arg";
3951
+ "path": "clusterOffset";
3952
+ },
3953
+ {
3954
+ "kind": "const";
3955
+ "value": [
3956
+ 1,
3957
+ 0,
3958
+ 0,
3959
+ 0,
3960
+ 0,
3961
+ 0,
3962
+ 0,
3963
+ 0
3964
+ ];
3965
+ }
3966
+ ];
3967
+ };
3968
+ },
3969
+ {
3970
+ "name": "poolAccount";
3971
+ "writable": true;
3972
+ "pda": {
3973
+ "seeds": [
3974
+ {
3975
+ "kind": "const";
3976
+ "value": [
3977
+ 70,
3978
+ 101,
3979
+ 101,
3980
+ 80,
3981
+ 111,
3982
+ 111,
3983
+ 108
3984
+ ];
3985
+ }
3986
+ ];
3987
+ };
3988
+ },
3989
+ {
3990
+ "name": "mxeProgram";
3991
+ },
3992
+ {
3993
+ "name": "systemProgram";
3994
+ "address": "11111111111111111111111111111111";
3995
+ }
3996
+ ];
3997
+ "args": [
3998
+ {
3999
+ "name": "clusterOffset";
4000
+ "type": "u32";
4001
+ }
4002
+ ];
4003
+ },
3884
4004
  {
3885
4005
  "name": "setArxNodeConfig";
3886
4006
  "discriminator": [
@@ -4027,7 +4147,6 @@ type Arcium = {
4027
4147
  "docs": [
4028
4148
  "MXE account to set the cluster for."
4029
4149
  ];
4030
- "writable": true;
4031
4150
  "pda": {
4032
4151
  "seeds": [
4033
4152
  {
@@ -4057,7 +4176,6 @@ type Arcium = {
4057
4176
  "docs": [
4058
4177
  "Cluster to set for the MXE."
4059
4178
  ];
4060
- "writable": true;
4061
4179
  "pda": {
4062
4180
  "seeds": [
4063
4181
  {
@@ -4292,12 +4410,101 @@ type Arcium = {
4292
4410
  };
4293
4411
  },
4294
4412
  {
4295
- "name": "mxePubkeyValidityProof";
4413
+ "name": "mxePubkeyValidityProof";
4414
+ "type": {
4415
+ "array": [
4416
+ "u8",
4417
+ 64
4418
+ ];
4419
+ };
4420
+ }
4421
+ ];
4422
+ },
4423
+ {
4424
+ "name": "submitAggregatedBlsPubkey";
4425
+ "discriminator": [
4426
+ 192,
4427
+ 135,
4428
+ 47,
4429
+ 120,
4430
+ 63,
4431
+ 18,
4432
+ 232,
4433
+ 164
4434
+ ];
4435
+ "accounts": [
4436
+ {
4437
+ "name": "nodeAuthority";
4438
+ "writable": true;
4439
+ "signer": true;
4440
+ },
4441
+ {
4442
+ "name": "clusterAcc";
4443
+ "writable": true;
4444
+ "pda": {
4445
+ "seeds": [
4446
+ {
4447
+ "kind": "const";
4448
+ "value": [
4449
+ 67,
4450
+ 108,
4451
+ 117,
4452
+ 115,
4453
+ 116,
4454
+ 101,
4455
+ 114
4456
+ ];
4457
+ },
4458
+ {
4459
+ "kind": "arg";
4460
+ "path": "clusterOffset";
4461
+ }
4462
+ ];
4463
+ };
4464
+ },
4465
+ {
4466
+ "name": "arxNodeAcc";
4467
+ "pda": {
4468
+ "seeds": [
4469
+ {
4470
+ "kind": "const";
4471
+ "value": [
4472
+ 65,
4473
+ 114,
4474
+ 120,
4475
+ 78,
4476
+ 111,
4477
+ 100,
4478
+ 101
4479
+ ];
4480
+ },
4481
+ {
4482
+ "kind": "arg";
4483
+ "path": "nodeOffset";
4484
+ }
4485
+ ];
4486
+ };
4487
+ },
4488
+ {
4489
+ "name": "systemProgram";
4490
+ "address": "11111111111111111111111111111111";
4491
+ }
4492
+ ];
4493
+ "args": [
4494
+ {
4495
+ "name": "clusterId";
4496
+ "type": "u32";
4497
+ },
4498
+ {
4499
+ "name": "nodeBump";
4500
+ "type": "u32";
4501
+ },
4502
+ {
4503
+ "name": "aggregatedBlsPubkey";
4296
4504
  "type": {
4297
- "array": [
4298
- "u8",
4299
- 64
4300
- ];
4505
+ "defined": {
4506
+ "name": "bn254g2blsPublicKey";
4507
+ };
4301
4508
  };
4302
4509
  }
4303
4510
  ];
@@ -5001,6 +5208,11 @@ type Arcium = {
5001
5208
  "name": "invalidCallbackInstructions";
5002
5209
  "msg": "Callback instructions are invalid";
5003
5210
  },
5211
+ {
5212
+ "code": 6210;
5213
+ "name": "computationNotExpired";
5214
+ "msg": "Computation has not expired from mempool yet";
5215
+ },
5004
5216
  {
5005
5217
  "code": 6300;
5006
5218
  "name": "computationDefinitionNotCompleted";
@@ -5021,6 +5233,11 @@ type Arcium = {
5021
5233
  "name": "computationDefinitionAlreadyCompleted";
5022
5234
  "msg": "Computation definition already completed";
5023
5235
  },
5236
+ {
5237
+ "code": 6304;
5238
+ "name": "invalidCuAmount";
5239
+ "msg": "CU amount exceeds maximum limit";
5240
+ },
5024
5241
  {
5025
5242
  "code": 6400;
5026
5243
  "name": "invalidNode";
@@ -5066,6 +5283,11 @@ type Arcium = {
5066
5283
  "name": "invalidNodeConfig";
5067
5284
  "msg": "Node config is invalid";
5068
5285
  },
5286
+ {
5287
+ "code": 6409;
5288
+ "name": "unauthorizedNodeCreation";
5289
+ "msg": "Unauthorized to create node on mainnet";
5290
+ },
5069
5291
  {
5070
5292
  "code": 6500;
5071
5293
  "name": "clusterFull";
@@ -5140,6 +5362,41 @@ type Arcium = {
5140
5362
  "code": 6607;
5141
5363
  "name": "epochOverflow";
5142
5364
  "msg": "Epoch overflowed";
5365
+ },
5366
+ {
5367
+ "code": 6608;
5368
+ "name": "invalidLighthouseProgramId";
5369
+ "msg": "Lighthouse program ID is invalid";
5370
+ },
5371
+ {
5372
+ "code": 6609;
5373
+ "name": "extraInstructionFound";
5374
+ "msg": "Extra instruction found in transaction";
5375
+ },
5376
+ {
5377
+ "code": 6610;
5378
+ "name": "invalidLighthouseInstructionCount";
5379
+ "msg": "Invalid number of Lighthouse program instructions";
5380
+ },
5381
+ {
5382
+ "code": 6611;
5383
+ "name": "invalidSignature";
5384
+ "msg": "Invalid BLS signature";
5385
+ },
5386
+ {
5387
+ "code": 6612;
5388
+ "name": "valueAlreadySet";
5389
+ "msg": "Value already set";
5390
+ },
5391
+ {
5392
+ "code": 6613;
5393
+ "name": "invalidValueSetterIndex";
5394
+ "msg": "Invalid value setter index";
5395
+ },
5396
+ {
5397
+ "code": 6614;
5398
+ "name": "notAllNodesVotedForBlsPublicKey";
5399
+ "msg": "Not all nodes have voted for the BLS public key";
5143
5400
  }
5144
5401
  ];
5145
5402
  "types": [
@@ -5215,6 +5472,26 @@ type Arcium = {
5215
5472
  ];
5216
5473
  };
5217
5474
  },
5475
+ {
5476
+ "name": "accountArgument";
5477
+ "type": {
5478
+ "kind": "struct";
5479
+ "fields": [
5480
+ {
5481
+ "name": "pubkey";
5482
+ "type": "pubkey";
5483
+ },
5484
+ {
5485
+ "name": "offset";
5486
+ "type": "u32";
5487
+ },
5488
+ {
5489
+ "name": "length";
5490
+ "type": "u32";
5491
+ }
5492
+ ];
5493
+ };
5494
+ },
5218
5495
  {
5219
5496
  "name": "activation";
5220
5497
  "type": {
@@ -5246,10 +5523,64 @@ type Arcium = {
5246
5523
  };
5247
5524
  },
5248
5525
  {
5249
- "name": "argument";
5526
+ "name": "argumentList";
5527
+ "docs": [
5528
+ "Container for arguments that separates small inline values from large indexed data"
5529
+ ];
5530
+ "type": {
5531
+ "kind": "struct";
5532
+ "fields": [
5533
+ {
5534
+ "name": "args";
5535
+ "type": {
5536
+ "vec": {
5537
+ "defined": {
5538
+ "name": "argumentRef";
5539
+ };
5540
+ };
5541
+ };
5542
+ },
5543
+ {
5544
+ "name": "byteArrays";
5545
+ "type": {
5546
+ "vec": {
5547
+ "array": [
5548
+ "u8",
5549
+ 32
5550
+ ];
5551
+ };
5552
+ };
5553
+ },
5554
+ {
5555
+ "name": "plaintextNumbers";
5556
+ "type": {
5557
+ "vec": "u64";
5558
+ };
5559
+ },
5560
+ {
5561
+ "name": "values128Bit";
5562
+ "type": {
5563
+ "vec": "u128";
5564
+ };
5565
+ },
5566
+ {
5567
+ "name": "accounts";
5568
+ "type": {
5569
+ "vec": {
5570
+ "defined": {
5571
+ "name": "accountArgument";
5572
+ };
5573
+ };
5574
+ };
5575
+ }
5576
+ ];
5577
+ };
5578
+ },
5579
+ {
5580
+ "name": "argumentRef";
5250
5581
  "docs": [
5251
- "An argument passed into a [Computation], corresponding to [super::mxe::Parameter] of the",
5252
- "[super::mxe::ComputationSignature]. An argument that corresponds to a Parameter type."
5582
+ "A reference to an argument - stores small values that don't affect alignment inline and large",
5583
+ "values as indices."
5253
5584
  ];
5254
5585
  "type": {
5255
5586
  "kind": "enum";
@@ -5266,153 +5597,160 @@ type Arcium = {
5266
5597
  "u8"
5267
5598
  ];
5268
5599
  },
5600
+ {
5601
+ "name": "plaintextI8";
5602
+ "fields": [
5603
+ "i8"
5604
+ ];
5605
+ },
5269
5606
  {
5270
5607
  "name": "plaintextU16";
5271
5608
  "fields": [
5272
- "u16"
5609
+ "u8"
5273
5610
  ];
5274
5611
  },
5275
5612
  {
5276
5613
  "name": "plaintextU32";
5277
5614
  "fields": [
5278
- "u32"
5615
+ "u8"
5279
5616
  ];
5280
5617
  },
5281
5618
  {
5282
5619
  "name": "plaintextU64";
5283
5620
  "fields": [
5284
- "u64"
5621
+ "u8"
5285
5622
  ];
5286
5623
  },
5287
5624
  {
5288
5625
  "name": "plaintextU128";
5289
5626
  "fields": [
5290
- "u128"
5627
+ "u8"
5291
5628
  ];
5292
5629
  },
5293
5630
  {
5294
5631
  "name": "plaintextFloat";
5295
5632
  "fields": [
5296
- "f64"
5633
+ "u8"
5297
5634
  ];
5298
5635
  },
5299
5636
  {
5300
5637
  "name": "encryptedBool";
5301
5638
  "fields": [
5302
- {
5303
- "array": [
5304
- "u8",
5305
- 32
5306
- ];
5307
- }
5639
+ "u8"
5308
5640
  ];
5309
5641
  },
5310
5642
  {
5311
5643
  "name": "encryptedU8";
5312
5644
  "fields": [
5313
- {
5314
- "array": [
5315
- "u8",
5316
- 32
5317
- ];
5318
- }
5645
+ "u8"
5319
5646
  ];
5320
5647
  },
5321
5648
  {
5322
5649
  "name": "encryptedU16";
5323
5650
  "fields": [
5324
- {
5325
- "array": [
5326
- "u8",
5327
- 32
5328
- ];
5329
- }
5651
+ "u8"
5330
5652
  ];
5331
5653
  },
5332
5654
  {
5333
5655
  "name": "encryptedU32";
5334
5656
  "fields": [
5335
- {
5336
- "array": [
5337
- "u8",
5338
- 32
5339
- ];
5340
- }
5657
+ "u8"
5341
5658
  ];
5342
5659
  },
5343
5660
  {
5344
5661
  "name": "encryptedU64";
5345
5662
  "fields": [
5346
- {
5347
- "array": [
5348
- "u8",
5349
- 32
5350
- ];
5351
- }
5663
+ "u8"
5352
5664
  ];
5353
5665
  },
5354
5666
  {
5355
5667
  "name": "encryptedU128";
5356
5668
  "fields": [
5357
- {
5358
- "array": [
5359
- "u8",
5360
- 32
5361
- ];
5362
- }
5669
+ "u8"
5363
5670
  ];
5364
5671
  },
5365
5672
  {
5366
5673
  "name": "encryptedFloat";
5367
5674
  "fields": [
5368
- {
5369
- "array": [
5370
- "u8",
5371
- 32
5372
- ];
5373
- }
5675
+ "u8"
5374
5676
  ];
5375
5677
  },
5376
5678
  {
5377
- "name": "arcisPubkey";
5679
+ "name": "x25519Pubkey";
5378
5680
  "fields": [
5379
- {
5380
- "array": [
5381
- "u8",
5382
- 32
5383
- ];
5384
- }
5681
+ "u8"
5385
5682
  ];
5386
5683
  },
5387
5684
  {
5388
- "name": "arcisSignature";
5685
+ "name": "arcisEd25519Signature";
5389
5686
  "fields": [
5390
- {
5391
- "array": [
5392
- "u8",
5393
- 64
5394
- ];
5395
- }
5687
+ "u8"
5396
5688
  ];
5397
5689
  },
5398
5690
  {
5399
5691
  "name": "account";
5400
5692
  "fields": [
5401
- "pubkey",
5402
- "u32",
5403
- "u32"
5693
+ "u8"
5694
+ ];
5695
+ },
5696
+ {
5697
+ "name": "plaintextI16";
5698
+ "fields": [
5699
+ "u8"
5700
+ ];
5701
+ },
5702
+ {
5703
+ "name": "plaintextI32";
5704
+ "fields": [
5705
+ "u8"
5706
+ ];
5707
+ },
5708
+ {
5709
+ "name": "plaintextI64";
5710
+ "fields": [
5711
+ "u8"
5712
+ ];
5713
+ },
5714
+ {
5715
+ "name": "plaintextI128";
5716
+ "fields": [
5717
+ "u8"
5718
+ ];
5719
+ },
5720
+ {
5721
+ "name": "encryptedI8";
5722
+ "fields": [
5723
+ "u8"
5724
+ ];
5725
+ },
5726
+ {
5727
+ "name": "encryptedI16";
5728
+ "fields": [
5729
+ "u8"
5730
+ ];
5731
+ },
5732
+ {
5733
+ "name": "encryptedI32";
5734
+ "fields": [
5735
+ "u8"
5736
+ ];
5737
+ },
5738
+ {
5739
+ "name": "encryptedI64";
5740
+ "fields": [
5741
+ "u8"
5404
5742
  ];
5405
5743
  },
5406
5744
  {
5407
- "name": "manticoreAlgo";
5745
+ "name": "encryptedI128";
5408
5746
  "fields": [
5409
- "string"
5747
+ "u8"
5410
5748
  ];
5411
5749
  },
5412
5750
  {
5413
- "name": "inputDataset";
5751
+ "name": "plaintextPoint";
5414
5752
  "fields": [
5415
- "string"
5753
+ "u8"
5416
5754
  ];
5417
5755
  }
5418
5756
  ];
@@ -5444,21 +5782,14 @@ type Arcium = {
5444
5782
  };
5445
5783
  },
5446
5784
  {
5447
- "name": "clusterMemberships";
5785
+ "name": "clusterMembership";
5448
5786
  "docs": [
5449
5787
  "The offsets of the cluster the node is a member of."
5450
5788
  ];
5451
5789
  "type": {
5452
- "vec": "u32";
5453
- };
5454
- },
5455
- {
5456
- "name": "proposedClusterMemberships";
5457
- "docs": [
5458
- "The offsets of the clusters the node has been proposed to be a member of."
5459
- ];
5460
- "type": {
5461
- "vec": "u32";
5790
+ "defined": {
5791
+ "name": "clusterMembership";
5792
+ };
5462
5793
  };
5463
5794
  },
5464
5795
  {
@@ -5470,12 +5801,14 @@ type Arcium = {
5470
5801
  "type": "bool";
5471
5802
  },
5472
5803
  {
5473
- "name": "reserved";
5804
+ "name": "blsPubkey";
5805
+ "docs": [
5806
+ "BLS public key for this node (64 bytes compressed G2 point for alt-bn128)"
5807
+ ];
5474
5808
  "type": {
5475
- "array": [
5476
- "u8",
5477
- 32
5478
- ];
5809
+ "defined": {
5810
+ "name": "bn254g2blsPublicKey";
5811
+ };
5479
5812
  };
5480
5813
  },
5481
5814
  {
@@ -5490,10 +5823,6 @@ type Arcium = {
5490
5823
  "type": {
5491
5824
  "kind": "struct";
5492
5825
  "fields": [
5493
- {
5494
- "name": "maxClusterMemberships";
5495
- "type": "u32";
5496
- },
5497
5826
  {
5498
5827
  "name": "authority";
5499
5828
  "docs": [
@@ -5506,7 +5835,21 @@ type Arcium = {
5506
5835
  "docs": [
5507
5836
  "Key used to sign computation callbacks - separated for operational security"
5508
5837
  ];
5509
- "type": "pubkey";
5838
+ "type": "pubkey";
5839
+ }
5840
+ ];
5841
+ };
5842
+ },
5843
+ {
5844
+ "name": "bn254g2blsPublicKey";
5845
+ "type": {
5846
+ "kind": "struct";
5847
+ "fields": [
5848
+ {
5849
+ "array": [
5850
+ "u8",
5851
+ 64
5852
+ ];
5510
5853
  }
5511
5854
  ];
5512
5855
  };
@@ -5728,15 +6071,6 @@ type Arcium = {
5728
6071
  };
5729
6072
  };
5730
6073
  },
5731
- {
5732
- "name": "mxes";
5733
- "docs": [
5734
- "The MXE's that this cluster is assigned to. Referred to by the MXE's program id."
5735
- ];
5736
- "type": {
5737
- "vec": "pubkey";
5738
- };
5739
- },
5740
6074
  {
5741
6075
  "name": "nodes";
5742
6076
  "type": {
@@ -5757,6 +6091,28 @@ type Arcium = {
5757
6091
  };
5758
6092
  };
5759
6093
  },
6094
+ {
6095
+ "name": "blsPublicKey";
6096
+ "docs": [
6097
+ "BLS public key for the cluster (64 bytes compressed G2 point for alt-bn128)",
6098
+ "Set only when all nodes have submitted and agreed on the aggregated pubkey"
6099
+ ];
6100
+ "type": {
6101
+ "defined": {
6102
+ "name": "setUnset";
6103
+ "generics": [
6104
+ {
6105
+ "kind": "type";
6106
+ "type": {
6107
+ "defined": {
6108
+ "name": "bn254g2blsPublicKey";
6109
+ };
6110
+ };
6111
+ }
6112
+ ];
6113
+ };
6114
+ };
6115
+ },
5760
6116
  {
5761
6117
  "name": "bump";
5762
6118
  "type": "u8";
@@ -5764,6 +6120,29 @@ type Arcium = {
5764
6120
  ];
5765
6121
  };
5766
6122
  },
6123
+ {
6124
+ "name": "clusterMembership";
6125
+ "type": {
6126
+ "kind": "enum";
6127
+ "variants": [
6128
+ {
6129
+ "name": "inactive";
6130
+ },
6131
+ {
6132
+ "name": "active";
6133
+ "fields": [
6134
+ "u32"
6135
+ ];
6136
+ },
6137
+ {
6138
+ "name": "proposed";
6139
+ "fields": [
6140
+ "u32"
6141
+ ];
6142
+ }
6143
+ ];
6144
+ };
6145
+ },
5767
6146
  {
5768
6147
  "name": "computationAccount";
5769
6148
  "docs": [
@@ -5777,18 +6156,11 @@ type Arcium = {
5777
6156
  "type": "pubkey";
5778
6157
  },
5779
6158
  {
5780
- "name": "clusterIndex";
6159
+ "name": "mxeProgramId";
5781
6160
  "docs": [
5782
- "The MXE's cluster to be used for execution.",
5783
- "",
5784
- "# Notes",
5785
- "",
5786
- "- [None] represents the default cluster,",
5787
- "- [Some] specifies the index of the fallback cluster."
6161
+ "The program ID of the MXE that this computation is associated with."
5788
6162
  ];
5789
- "type": {
5790
- "option": "u16";
5791
- };
6163
+ "type": "pubkey";
5792
6164
  },
5793
6165
  {
5794
6166
  "name": "computationDefinitionOffset";
@@ -5825,16 +6197,24 @@ type Arcium = {
5825
6197
  };
5826
6198
  },
5827
6199
  {
5828
- "name": "arguments";
6200
+ "name": "clusterIndex";
5829
6201
  "docs": [
5830
- "The arguments passed to the computation. If it is a manticore computation, we expect the",
5831
- "first element to be of type ManticoreAlgo"
6202
+ "The MXE's cluster to be used for execution.",
6203
+ "",
6204
+ "# Notes",
6205
+ "",
6206
+ "- [None] represents the default cluster,",
6207
+ "- [Some] specifies the index of the fallback cluster."
5832
6208
  ];
5833
6209
  "type": {
5834
- "vec": {
5835
- "defined": {
5836
- "name": "argument";
5837
- };
6210
+ "option": "u16";
6211
+ };
6212
+ },
6213
+ {
6214
+ "name": "arguments";
6215
+ "type": {
6216
+ "defined": {
6217
+ "name": "argumentList";
5838
6218
  };
5839
6219
  };
5840
6220
  },
@@ -5990,10 +6370,6 @@ type Arcium = {
5990
6370
  "name": "priorityFee";
5991
6371
  "type": "u64";
5992
6372
  },
5993
- {
5994
- "name": "computationDefinitionOffset";
5995
- "type": "u32";
5996
- },
5997
6373
  {
5998
6374
  "name": "accs";
5999
6375
  "type": {
@@ -6003,7 +6379,7 @@ type Arcium = {
6003
6379
  "name": "acccountAccessInfo";
6004
6380
  };
6005
6381
  },
6006
- 10
6382
+ 12
6007
6383
  ];
6008
6384
  };
6009
6385
  }
@@ -6524,21 +6900,29 @@ type Arcium = {
6524
6900
  "kind": "struct";
6525
6901
  "fields": [
6526
6902
  {
6527
- "name": "authority";
6903
+ "name": "cluster";
6528
6904
  "docs": [
6529
- "The management authority of the MXE."
6905
+ "The cluster executing the MXE."
6530
6906
  ];
6531
6907
  "type": {
6532
- "option": "pubkey";
6908
+ "option": "u32";
6533
6909
  };
6534
6910
  },
6535
6911
  {
6536
- "name": "cluster";
6912
+ "name": "mxeProgramId";
6537
6913
  "docs": [
6538
- "The cluster executing the MXE."
6914
+ "The program ID of the program that this MXE is associated with. Needed so that when we",
6915
+ "index this account offchain we can find out what program it is associated with."
6916
+ ];
6917
+ "type": "pubkey";
6918
+ },
6919
+ {
6920
+ "name": "authority";
6921
+ "docs": [
6922
+ "The management authority of the MXE."
6539
6923
  ];
6540
6924
  "type": {
6541
- "option": "u32";
6925
+ "option": "pubkey";
6542
6926
  };
6543
6927
  },
6544
6928
  {
@@ -6998,13 +7382,28 @@ type Arcium = {
6998
7382
  "name": "ciphertext";
6999
7383
  },
7000
7384
  {
7001
- "name": "arcisPubkey";
7385
+ "name": "arcisX25519Pubkey";
7002
7386
  },
7003
7387
  {
7004
7388
  "name": "plaintextFloat";
7005
7389
  },
7006
7390
  {
7007
7391
  "name": "plaintextPoint";
7392
+ },
7393
+ {
7394
+ "name": "plaintextI8";
7395
+ },
7396
+ {
7397
+ "name": "plaintextI16";
7398
+ },
7399
+ {
7400
+ "name": "plaintextI32";
7401
+ },
7402
+ {
7403
+ "name": "plaintextI64";
7404
+ },
7405
+ {
7406
+ "name": "plaintextI128";
7008
7407
  }
7009
7408
  ];
7010
7409
  };
@@ -7043,7 +7442,7 @@ type Arcium = {
7043
7442
  "name": "ciphertext";
7044
7443
  },
7045
7444
  {
7046
- "name": "arcisPubkey";
7445
+ "name": "arcisX25519Pubkey";
7047
7446
  },
7048
7447
  {
7049
7448
  "name": "arcisSignature";
@@ -7052,10 +7451,22 @@ type Arcium = {
7052
7451
  "name": "plaintextFloat";
7053
7452
  },
7054
7453
  {
7055
- "name": "manticoreAlgo";
7454
+ "name": "plaintextI8";
7455
+ },
7456
+ {
7457
+ "name": "plaintextI16";
7458
+ },
7459
+ {
7460
+ "name": "plaintextI32";
7461
+ },
7462
+ {
7463
+ "name": "plaintextI64";
7464
+ },
7465
+ {
7466
+ "name": "plaintextI128";
7056
7467
  },
7057
7468
  {
7058
- "name": "inputDataset";
7469
+ "name": "plaintextPoint";
7059
7470
  }
7060
7471
  ];
7061
7472
  };
@@ -7078,6 +7489,11 @@ type Arcium = {
7078
7489
  },
7079
7490
  {
7080
7491
  "name": "setUnset";
7492
+ "docs": [
7493
+ "Utility struct to store a value that needs to be set by a certain number of participants (keys",
7494
+ "in our case). Once all participants have set the value, the value is considered set and we only",
7495
+ "store it once."
7496
+ ];
7081
7497
  "generics": [
7082
7498
  {
7083
7499
  "kind": "type";
@@ -7528,1323 +7944,43 @@ type Arcium = {
7528
7944
  ];
7529
7945
  };
7530
7946
 
7531
- declare let address: string;
7532
- declare namespace metadata {
7533
- let name: string;
7534
- let version: string;
7535
- let spec: string;
7536
- let description: string;
7537
- }
7538
- declare let instructions: ({
7539
- name: string;
7540
- discriminator: number[];
7541
- accounts: ({
7542
- name: string;
7543
- writable: boolean;
7544
- signer: boolean;
7545
- pda?: undefined;
7546
- address?: undefined;
7547
- } | {
7548
- name: string;
7549
- pda: {
7550
- seeds: ({
7551
- kind: string;
7552
- value: number[];
7553
- path?: undefined;
7554
- } | {
7555
- kind: string;
7556
- path: string;
7557
- value?: undefined;
7558
- })[];
7559
- };
7560
- writable?: undefined;
7561
- signer?: undefined;
7562
- address?: undefined;
7563
- } | {
7564
- name: string;
7565
- writable: boolean;
7566
- pda: {
7567
- seeds: ({
7568
- kind: string;
7569
- value: number[];
7570
- path?: undefined;
7571
- account?: undefined;
7572
- } | {
7573
- kind: string;
7574
- path: string;
7575
- account: string;
7576
- value?: undefined;
7577
- })[];
7578
- };
7579
- signer?: undefined;
7580
- address?: undefined;
7581
- } | {
7582
- name: string;
7583
- writable: boolean;
7584
- pda: {
7585
- seeds: ({
7586
- kind: string;
7587
- value: number[];
7588
- path?: undefined;
7589
- } | {
7590
- kind: string;
7591
- path: string;
7592
- value?: undefined;
7593
- })[];
7594
- };
7595
- signer?: undefined;
7596
- address?: undefined;
7597
- } | {
7598
- name: string;
7599
- address: string;
7600
- writable?: undefined;
7601
- signer?: undefined;
7602
- pda?: undefined;
7603
- })[];
7604
- args: ({
7605
- name: string;
7606
- type: string;
7607
- } | {
7608
- name: string;
7609
- type: {
7610
- defined: {
7611
- name: string;
7612
- };
7613
- };
7614
- })[];
7615
- docs?: undefined;
7616
- } | {
7617
- name: string;
7618
- discriminator: number[];
7619
- accounts: ({
7620
- name: string;
7621
- signer: boolean;
7622
- writable?: undefined;
7623
- pda?: undefined;
7624
- } | {
7625
- name: string;
7626
- writable: boolean;
7627
- pda: {
7628
- seeds: ({
7629
- kind: string;
7630
- value: number[];
7631
- path?: undefined;
7632
- } | {
7633
- kind: string;
7634
- path: string;
7635
- value?: undefined;
7636
- })[];
7637
- };
7638
- signer?: undefined;
7639
- } | {
7640
- name: string;
7641
- writable: boolean;
7642
- pda: {
7643
- seeds: ({
7644
- kind: string;
7645
- value: number[];
7646
- path?: undefined;
7647
- account?: undefined;
7648
- } | {
7649
- kind: string;
7650
- path: string;
7651
- account: string;
7652
- value?: undefined;
7653
- })[];
7654
- };
7655
- signer?: undefined;
7656
- } | {
7657
- name: string;
7658
- pda: {
7659
- seeds: ({
7660
- kind: string;
7661
- value: number[];
7662
- path?: undefined;
7663
- } | {
7664
- kind: string;
7665
- path: string;
7666
- value?: undefined;
7667
- })[];
7668
- };
7669
- signer?: undefined;
7670
- writable?: undefined;
7671
- })[];
7672
- args: {
7673
- name: string;
7674
- type: string;
7675
- }[];
7676
- docs?: undefined;
7677
- } | {
7678
- name: string;
7679
- discriminator: number[];
7680
- accounts: ({
7681
- name: string;
7682
- writable: boolean;
7683
- signer: boolean;
7684
- pda?: undefined;
7685
- address?: undefined;
7686
- } | {
7687
- name: string;
7688
- writable: boolean;
7689
- pda: {
7690
- seeds: ({
7691
- kind: string;
7692
- value: number[];
7693
- path?: undefined;
7694
- account?: undefined;
7695
- } | {
7696
- kind: string;
7697
- path: string;
7698
- account: string;
7699
- value?: undefined;
7700
- })[];
7701
- };
7702
- signer?: undefined;
7703
- address?: undefined;
7704
- } | {
7705
- name: string;
7706
- pda: {
7707
- seeds: ({
7708
- kind: string;
7709
- value: number[];
7710
- path?: undefined;
7711
- account?: undefined;
7712
- } | {
7713
- kind: string;
7714
- path: string;
7715
- value?: undefined;
7716
- account?: undefined;
7717
- } | {
7718
- kind: string;
7719
- path: string;
7720
- account: string;
7721
- value?: undefined;
7722
- })[];
7723
- };
7724
- writable?: undefined;
7725
- signer?: undefined;
7726
- address?: undefined;
7727
- } | {
7728
- name: string;
7729
- writable: boolean;
7730
- pda: {
7731
- seeds: ({
7732
- kind: string;
7733
- value: number[];
7734
- path?: undefined;
7735
- } | {
7736
- kind: string;
7737
- path: string;
7738
- value?: undefined;
7739
- })[];
7740
- };
7741
- signer?: undefined;
7742
- address?: undefined;
7743
- } | {
7744
- name: string;
7745
- address: string;
7746
- writable?: undefined;
7747
- signer?: undefined;
7748
- pda?: undefined;
7749
- })[];
7750
- args: {
7751
- name: string;
7752
- type: string;
7753
- }[];
7754
- docs?: undefined;
7755
- } | {
7756
- name: string;
7757
- discriminator: number[];
7758
- accounts: ({
7759
- name: string;
7760
- writable: boolean;
7761
- signer: boolean;
7762
- pda?: undefined;
7763
- optional?: undefined;
7764
- } | {
7765
- name: string;
7766
- writable: boolean;
7767
- pda: {
7768
- seeds: ({
7769
- kind: string;
7770
- value: number[];
7771
- path?: undefined;
7772
- } | {
7773
- kind: string;
7774
- path: string;
7775
- value?: undefined;
7776
- })[];
7777
- };
7778
- signer?: undefined;
7779
- optional?: undefined;
7780
- } | {
7781
- name: string;
7782
- pda: {
7783
- seeds: {
7784
- kind: string;
7785
- value: number[];
7786
- }[];
7787
- };
7788
- writable?: undefined;
7789
- signer?: undefined;
7790
- optional?: undefined;
7791
- } | {
7792
- name: string;
7793
- optional: boolean;
7794
- pda: {
7795
- seeds: ({
7796
- kind: string;
7797
- value: number[];
7798
- path?: undefined;
7799
- account?: undefined;
7800
- } | {
7801
- kind: string;
7802
- path: string;
7803
- account: string;
7804
- value?: undefined;
7805
- })[];
7806
- };
7807
- writable?: undefined;
7808
- signer?: undefined;
7809
- })[];
7810
- args: {
7811
- name: string;
7812
- type: string;
7813
- }[];
7814
- docs?: undefined;
7815
- } | {
7816
- name: string;
7817
- docs: string[];
7818
- discriminator: number[];
7819
- accounts: {
7820
- name: string;
7821
- }[];
7822
- args: never[];
7823
- } | {
7824
- name: string;
7825
- discriminator: number[];
7826
- accounts: ({
7827
- name: string;
7828
- writable: boolean;
7829
- signer: boolean;
7830
- pda?: undefined;
7831
- address?: undefined;
7832
- } | {
7833
- name: string;
7834
- writable: boolean;
7835
- pda: {
7836
- seeds: ({
7837
- kind: string;
7838
- value: number[];
7839
- path?: undefined;
7840
- } | {
7841
- kind: string;
7842
- path: string;
7843
- value?: undefined;
7844
- })[];
7845
- };
7846
- signer?: undefined;
7847
- address?: undefined;
7848
- } | {
7849
- name: string;
7850
- writable?: undefined;
7851
- signer?: undefined;
7852
- pda?: undefined;
7853
- address?: undefined;
7854
- } | {
7855
- name: string;
7856
- pda: {
7857
- seeds: {
7858
- kind: string;
7859
- value: number[];
7860
- }[];
7861
- };
7862
- writable?: undefined;
7863
- signer?: undefined;
7864
- address?: undefined;
7865
- } | {
7866
- name: string;
7867
- address: string;
7868
- writable?: undefined;
7869
- signer?: undefined;
7870
- pda?: undefined;
7871
- })[];
7872
- args: {
7873
- name: string;
7874
- type: string;
7875
- }[];
7876
- docs?: undefined;
7877
- } | {
7878
- name: string;
7879
- docs: string[];
7880
- discriminator: number[];
7881
- accounts: ({
7882
- name: string;
7883
- docs: string[];
7884
- writable: boolean;
7885
- signer: boolean;
7886
- pda?: undefined;
7887
- address?: undefined;
7888
- } | {
7889
- name: string;
7890
- writable: boolean;
7891
- pda: {
7892
- seeds: ({
7893
- kind: string;
7894
- value: number[];
7895
- path?: undefined;
7896
- } | {
7897
- kind: string;
7898
- path: string;
7899
- value?: undefined;
7900
- })[];
7901
- };
7902
- docs?: undefined;
7903
- signer?: undefined;
7904
- address?: undefined;
7905
- } | {
7906
- name: string;
7907
- docs: string[];
7908
- address: string;
7909
- writable?: undefined;
7910
- signer?: undefined;
7911
- pda?: undefined;
7912
- })[];
7913
- args: ({
7914
- name: string;
7915
- type: string;
7916
- } | {
7917
- name: string;
7918
- type: {
7919
- defined: {
7920
- name: string;
7921
- };
7922
- option?: undefined;
7923
- };
7924
- } | {
7925
- name: string;
7926
- type: {
7927
- option: {
7928
- defined: {
7929
- name: string;
7930
- };
7931
- };
7932
- defined?: undefined;
7933
- };
7934
- } | {
7935
- name: string;
7936
- type: {
7937
- option: string;
7938
- defined?: undefined;
7939
- };
7940
- })[];
7941
- } | {
7942
- name: string;
7943
- docs: string[];
7944
- discriminator: number[];
7945
- accounts: ({
7946
- name: string;
7947
- docs: string[];
7948
- writable: boolean;
7949
- signer: boolean;
7950
- pda?: undefined;
7951
- optional?: undefined;
7952
- address?: undefined;
7953
- } | {
7954
- name: string;
7955
- docs: string[];
7956
- writable: boolean;
7957
- pda: {
7958
- seeds: ({
7959
- kind: string;
7960
- value: number[];
7961
- path?: undefined;
7962
- } | {
7963
- kind: string;
7964
- path: string;
7965
- value?: undefined;
7966
- })[];
7967
- };
7968
- signer?: undefined;
7969
- optional?: undefined;
7970
- address?: undefined;
7971
- } | {
7972
- name: string;
7973
- writable: boolean;
7974
- pda: {
7975
- seeds: ({
7976
- kind: string;
7977
- value: number[];
7978
- path?: undefined;
7979
- } | {
7980
- kind: string;
7981
- path: string;
7982
- value?: undefined;
7983
- })[];
7984
- };
7985
- docs?: undefined;
7986
- signer?: undefined;
7987
- optional?: undefined;
7988
- address?: undefined;
7989
- } | {
7990
- name: string;
7991
- optional: boolean;
7992
- docs?: undefined;
7993
- writable?: undefined;
7994
- signer?: undefined;
7995
- pda?: undefined;
7996
- address?: undefined;
7997
- } | {
7998
- name: string;
7999
- docs: string[];
8000
- writable?: undefined;
8001
- signer?: undefined;
8002
- pda?: undefined;
8003
- optional?: undefined;
8004
- address?: undefined;
8005
- } | {
8006
- name: string;
8007
- docs: string[];
8008
- address: string;
8009
- writable?: undefined;
8010
- signer?: undefined;
8011
- pda?: undefined;
8012
- optional?: undefined;
8013
- })[];
8014
- args: ({
8015
- name: string;
8016
- type: string;
8017
- } | {
8018
- name: string;
8019
- type: {
8020
- defined: {
8021
- name: string;
8022
- };
8023
- };
8024
- })[];
8025
- } | {
8026
- name: string;
8027
- docs: string[];
8028
- discriminator: number[];
8029
- accounts: ({
8030
- name: string;
8031
- writable: boolean;
8032
- signer: boolean;
8033
- docs?: undefined;
8034
- pda?: undefined;
8035
- address?: undefined;
8036
- } | {
8037
- name: string;
8038
- docs: string[];
8039
- signer: boolean;
8040
- pda: {
8041
- seeds: {
8042
- kind: string;
8043
- value: number[];
8044
- }[];
8045
- program: {
8046
- kind: string;
8047
- path: string;
8048
- };
8049
- };
8050
- writable?: undefined;
8051
- address?: undefined;
8052
- } | {
8053
- name: string;
8054
- writable: boolean;
8055
- pda: {
8056
- seeds: ({
8057
- kind: string;
8058
- value: number[];
8059
- path?: undefined;
8060
- } | {
8061
- kind: string;
8062
- path: string;
8063
- value?: undefined;
8064
- })[];
8065
- program?: undefined;
8066
- };
8067
- signer?: undefined;
8068
- docs?: undefined;
8069
- address?: undefined;
8070
- } | {
8071
- name: string;
8072
- pda: {
8073
- seeds: ({
8074
- kind: string;
8075
- value: number[];
8076
- path?: undefined;
8077
- } | {
8078
- kind: string;
8079
- path: string;
8080
- value?: undefined;
8081
- })[];
8082
- program?: undefined;
8083
- };
8084
- writable?: undefined;
8085
- signer?: undefined;
8086
- docs?: undefined;
8087
- address?: undefined;
8088
- } | {
8089
- name: string;
8090
- address: string;
8091
- writable?: undefined;
8092
- signer?: undefined;
8093
- docs?: undefined;
8094
- pda?: undefined;
8095
- })[];
8096
- args: ({
8097
- name: string;
8098
- type: string;
8099
- } | {
8100
- name: string;
8101
- type: {
8102
- option: string;
8103
- vec?: undefined;
8104
- };
8105
- } | {
8106
- name: string;
8107
- type: {
8108
- vec: {
8109
- defined: {
8110
- name: string;
8111
- };
8112
- };
8113
- option?: undefined;
8114
- };
8115
- })[];
8116
- } | {
8117
- name: string;
8118
- discriminator: number[];
8119
- accounts: ({
8120
- name: string;
8121
- docs: string[];
8122
- writable: boolean;
8123
- signer: boolean;
8124
- pda?: undefined;
8125
- address?: undefined;
8126
- } | {
8127
- name: string;
8128
- docs: string[];
8129
- writable: boolean;
8130
- pda: {
8131
- seeds: ({
8132
- kind: string;
8133
- value: number[];
8134
- path?: undefined;
8135
- } | {
8136
- kind: string;
8137
- path: string;
8138
- value?: undefined;
8139
- })[];
8140
- };
8141
- signer?: undefined;
8142
- address?: undefined;
8143
- } | {
8144
- name: string;
8145
- docs?: undefined;
8146
- writable?: undefined;
8147
- signer?: undefined;
8148
- pda?: undefined;
8149
- address?: undefined;
8150
- } | {
8151
- name: string;
8152
- docs: string[];
8153
- address: string;
8154
- writable?: undefined;
8155
- signer?: undefined;
8156
- pda?: undefined;
8157
- })[];
8158
- args: {
8159
- name: string;
8160
- type: string;
8161
- }[];
8162
- docs?: undefined;
8163
- } | {
8164
- name: string;
8165
- discriminator: number[];
8166
- accounts: ({
8167
- name: string;
8168
- writable: boolean;
8169
- signer: boolean;
8170
- pda?: undefined;
8171
- address?: undefined;
8172
- } | {
8173
- name: string;
8174
- writable: boolean;
8175
- pda: {
8176
- seeds: ({
8177
- kind: string;
8178
- value: number[];
8179
- path?: undefined;
8180
- } | {
8181
- kind: string;
8182
- path: string;
8183
- value?: undefined;
8184
- })[];
8185
- };
8186
- signer?: undefined;
8187
- address?: undefined;
8188
- } | {
8189
- name: string;
8190
- address: string;
8191
- writable?: undefined;
8192
- signer?: undefined;
8193
- pda?: undefined;
8194
- })[];
8195
- args: ({
8196
- name: string;
8197
- type: string;
8198
- } | {
8199
- name: string;
8200
- type: {
8201
- option: string;
8202
- };
8203
- })[];
8204
- docs?: undefined;
8205
- } | {
8206
- name: string;
8207
- discriminator: number[];
8208
- accounts: ({
8209
- name: string;
8210
- writable: boolean;
8211
- signer: boolean;
8212
- pda?: undefined;
8213
- address?: undefined;
8214
- } | {
8215
- name: string;
8216
- pda: {
8217
- seeds: ({
8218
- kind: string;
8219
- value: number[];
8220
- path?: undefined;
8221
- } | {
8222
- kind: string;
8223
- path: string;
8224
- value?: undefined;
8225
- })[];
8226
- };
8227
- writable?: undefined;
8228
- signer?: undefined;
8229
- address?: undefined;
8230
- } | {
8231
- name: string;
8232
- writable: boolean;
8233
- pda: {
8234
- seeds: ({
8235
- kind: string;
8236
- value: number[];
8237
- path?: undefined;
8238
- } | {
8239
- kind: string;
8240
- path: string;
8241
- value?: undefined;
8242
- })[];
8243
- };
8244
- signer?: undefined;
8245
- address?: undefined;
8246
- } | {
8247
- name: string;
8248
- writable: boolean;
8249
- pda: {
8250
- seeds: ({
8251
- kind: string;
8252
- value: number[];
8253
- path?: undefined;
8254
- account?: undefined;
8255
- } | {
8256
- kind: string;
8257
- path: string;
8258
- account: string;
8259
- value?: undefined;
8260
- })[];
8261
- };
8262
- signer?: undefined;
8263
- address?: undefined;
8264
- } | {
8265
- name: string;
8266
- address: string;
8267
- writable?: undefined;
8268
- signer?: undefined;
8269
- pda?: undefined;
8270
- })[];
8271
- args: ({
8272
- name: string;
8273
- type: string;
8274
- } | {
8275
- name: string;
8276
- type: {
8277
- array: (string | number)[];
8278
- };
8279
- })[];
8280
- docs?: undefined;
8281
- })[];
8282
- declare let accounts: {
8283
- name: string;
8284
- discriminator: number[];
8285
- }[];
8286
- declare let events: {
8287
- name: string;
8288
- discriminator: number[];
8289
- }[];
8290
- declare let errors: {
8291
- code: number;
8292
- name: string;
8293
- msg: string;
8294
- }[];
8295
- declare let types: ({
8296
- name: string;
8297
- docs: string[];
8298
- type: {
8299
- kind: string;
8300
- variants: ({
8301
- name: string;
8302
- fields: string[];
8303
- } | {
8304
- name: string;
8305
- fields: {
8306
- array: (string | number)[];
8307
- }[];
8308
- })[];
8309
- fields?: undefined;
8310
- };
8311
- serialization?: undefined;
8312
- repr?: undefined;
8313
- generics?: undefined;
8314
- } | {
8315
- name: string;
8316
- type: {
8317
- kind: string;
8318
- fields: ({
8319
- name: string;
8320
- type: string;
8321
- docs?: undefined;
8322
- } | {
8323
- name: string;
8324
- type: {
8325
- defined: {
8326
- name: string;
8327
- };
8328
- vec?: undefined;
8329
- array?: undefined;
8330
- };
8331
- docs?: undefined;
8332
- } | {
8333
- name: string;
8334
- docs: string[];
8335
- type: {
8336
- vec: string;
8337
- defined?: undefined;
8338
- array?: undefined;
8339
- };
8340
- } | {
8341
- name: string;
8342
- type: {
8343
- array: (string | number)[];
8344
- defined?: undefined;
8345
- vec?: undefined;
8346
- };
8347
- docs?: undefined;
8348
- })[];
8349
- variants?: undefined;
8350
- };
8351
- docs?: undefined;
8352
- serialization?: undefined;
8353
- repr?: undefined;
8354
- generics?: undefined;
8355
- } | {
8356
- name: string;
8357
- type: {
8358
- kind: string;
8359
- fields: ({
8360
- name: string;
8361
- type: {
8362
- option: string;
8363
- defined?: undefined;
8364
- array?: undefined;
8365
- vec?: undefined;
8366
- };
8367
- docs?: undefined;
8368
- } | {
8369
- name: string;
8370
- type: string;
8371
- docs?: undefined;
8372
- } | {
8373
- name: string;
8374
- type: {
8375
- defined: {
8376
- name: string;
8377
- };
8378
- option?: undefined;
8379
- array?: undefined;
8380
- vec?: undefined;
8381
- };
8382
- docs?: undefined;
8383
- } | {
8384
- name: string;
8385
- docs: string[];
8386
- type: string;
8387
- } | {
8388
- name: string;
8389
- docs: string[];
8390
- type: {
8391
- array: (string | number)[];
8392
- option?: undefined;
8393
- defined?: undefined;
8394
- vec?: undefined;
8395
- };
8396
- } | {
8397
- name: string;
8398
- docs: string[];
8399
- type: {
8400
- defined: {
8401
- name: string;
8402
- };
8403
- option?: undefined;
8404
- array?: undefined;
8405
- vec?: undefined;
8406
- };
8407
- } | {
8408
- name: string;
8409
- docs: string[];
8410
- type: {
8411
- vec: string;
8412
- option?: undefined;
8413
- defined?: undefined;
8414
- array?: undefined;
8415
- };
8416
- } | {
8417
- name: string;
8418
- type: {
8419
- vec: {
8420
- defined: {
8421
- name: string;
8422
- };
8423
- };
8424
- option?: undefined;
8425
- defined?: undefined;
8426
- array?: undefined;
8427
- };
8428
- docs?: undefined;
8429
- })[];
8430
- variants?: undefined;
8431
- };
8432
- docs?: undefined;
8433
- serialization?: undefined;
8434
- repr?: undefined;
8435
- generics?: undefined;
8436
- } | {
8437
- name: string;
8438
- docs: string[];
8439
- type: {
8440
- kind: string;
8441
- fields: ({
8442
- name: string;
8443
- type: string;
8444
- docs?: undefined;
8445
- } | {
8446
- name: string;
8447
- docs: string[];
8448
- type: {
8449
- option: string;
8450
- defined?: undefined;
8451
- vec?: undefined;
8452
- };
8453
- } | {
8454
- name: string;
8455
- docs: string[];
8456
- type: string;
8457
- } | {
8458
- name: string;
8459
- docs: string[];
8460
- type: {
8461
- defined: {
8462
- name: string;
8463
- };
8464
- option?: undefined;
8465
- vec?: undefined;
8466
- };
8467
- } | {
8468
- name: string;
8469
- type: {
8470
- defined: {
8471
- name: string;
8472
- };
8473
- option?: undefined;
8474
- vec?: undefined;
8475
- };
8476
- docs?: undefined;
8477
- } | {
8478
- name: string;
8479
- docs: string[];
8480
- type: {
8481
- vec: {
8482
- defined: {
8483
- name: string;
8484
- };
8485
- };
8486
- option?: undefined;
8487
- defined?: undefined;
8488
- };
8489
- } | {
8490
- name: string;
8491
- type: {
8492
- option: string;
8493
- defined?: undefined;
8494
- vec?: undefined;
8495
- };
8496
- docs?: undefined;
8497
- } | {
8498
- name: string;
8499
- type: {
8500
- vec: {
8501
- defined: {
8502
- name: string;
8503
- };
8504
- };
8505
- option?: undefined;
8506
- defined?: undefined;
8507
- };
8508
- docs?: undefined;
8509
- })[];
8510
- variants?: undefined;
8511
- };
8512
- serialization?: undefined;
8513
- repr?: undefined;
8514
- generics?: undefined;
8515
- } | {
8516
- name: string;
8517
- docs: string[];
8518
- type: {
8519
- kind: string;
8520
- fields: string[];
8521
- variants?: undefined;
8522
- };
8523
- serialization?: undefined;
8524
- repr?: undefined;
8525
- generics?: undefined;
8526
- } | {
8527
- name: string;
8528
- serialization: string;
8529
- repr: {
8530
- kind: string;
8531
- };
8532
- generics: {
8533
- kind: string;
8534
- name: string;
8535
- type: string;
8536
- }[];
8537
- type: {
8538
- kind: string;
8539
- fields: ({
8540
- name: string;
8541
- type: string;
8542
- } | {
8543
- name: string;
8544
- type: {
8545
- array: (string | number)[];
8546
- };
8547
- } | {
8548
- name: string;
8549
- type: {
8550
- array: (string | {
8551
- generic: string;
8552
- })[];
8553
- };
8554
- } | {
8555
- name: string;
8556
- type: {
8557
- array: ({
8558
- defined: {
8559
- name: string;
8560
- };
8561
- generic?: undefined;
8562
- } | {
8563
- generic: string;
8564
- defined?: undefined;
8565
- })[];
8566
- };
8567
- })[];
8568
- variants?: undefined;
8569
- };
8570
- docs?: undefined;
8571
- } | {
8572
- name: string;
8573
- type: {
8574
- kind: string;
8575
- variants: ({
8576
- name: string;
8577
- fields?: undefined;
8578
- } | {
8579
- name: string;
8580
- fields: ({
8581
- defined: {
8582
- name: string;
8583
- };
8584
- array?: undefined;
8585
- } | {
8586
- array: (string | number)[];
8587
- defined?: undefined;
8588
- })[];
8589
- })[];
8590
- fields?: undefined;
8591
- };
8592
- docs?: undefined;
8593
- serialization?: undefined;
8594
- repr?: undefined;
8595
- generics?: undefined;
8596
- } | {
8597
- name: string;
8598
- serialization: string;
8599
- repr: {
8600
- kind: string;
8601
- };
8602
- type: {
8603
- kind: string;
8604
- fields: {
8605
- name: string;
8606
- type: {
8607
- defined: {
8608
- name: string;
8609
- generics: {
8610
- kind: string;
8611
- value: string;
8612
- }[];
8613
- };
8614
- };
8615
- }[];
8616
- variants?: undefined;
8617
- };
8618
- docs?: undefined;
8619
- generics?: undefined;
8620
- } | {
8621
- name: string;
8622
- serialization: string;
8623
- repr: {
8624
- kind: string;
8625
- };
8626
- type: {
8627
- kind: string;
8628
- fields: ({
8629
- name: string;
8630
- type: string;
8631
- } | {
8632
- name: string;
8633
- type: {
8634
- array: (string | number)[];
8635
- defined?: undefined;
8636
- };
8637
- } | {
8638
- name: string;
8639
- type: {
8640
- defined: {
8641
- name: string;
8642
- };
8643
- array?: undefined;
8644
- };
8645
- })[];
8646
- variants?: undefined;
8647
- };
8648
- docs?: undefined;
8649
- generics?: undefined;
8650
- } | {
8651
- name: string;
8652
- serialization: string;
8653
- repr: {
8654
- kind: string;
8655
- };
8656
- type: {
8657
- kind: string;
8658
- fields: ({
8659
- name: string;
8660
- type: {
8661
- array: (number | {
8662
- defined: {
8663
- name: string;
8664
- };
8665
- })[];
8666
- };
8667
- docs?: undefined;
8668
- } | {
8669
- name: string;
8670
- docs: string[];
8671
- type: {
8672
- array: (string | number)[];
8673
- };
8674
- } | {
8675
- name: string;
8676
- type: string;
8677
- docs?: undefined;
8678
- } | {
8679
- name: string;
8680
- type: {
8681
- array: (string | number)[];
8682
- };
8683
- docs?: undefined;
8684
- })[];
8685
- variants?: undefined;
8686
- };
8687
- docs?: undefined;
8688
- generics?: undefined;
8689
- } | {
8690
- name: string;
8691
- docs: string[];
8692
- type: {
8693
- kind: string;
8694
- fields: ({
8695
- name: string;
8696
- docs: string[];
8697
- type: {
8698
- option: string;
8699
- defined?: undefined;
8700
- vec?: undefined;
8701
- };
8702
- } | {
8703
- name: string;
8704
- docs: string[];
8705
- type: {
8706
- defined: {
8707
- name: string;
8708
- generics: {
8709
- kind: string;
8710
- type: {
8711
- defined: {
8712
- name: string;
8713
- };
8714
- };
8715
- }[];
8716
- };
8717
- option?: undefined;
8718
- vec?: undefined;
8719
- };
8720
- } | {
8721
- name: string;
8722
- docs: string[];
8723
- type: {
8724
- vec: string;
8725
- option?: undefined;
8726
- defined?: undefined;
8727
- };
8728
- } | {
8729
- name: string;
8730
- type: string;
8731
- docs?: undefined;
8732
- })[];
8733
- variants?: undefined;
8734
- };
8735
- serialization?: undefined;
8736
- repr?: undefined;
8737
- generics?: undefined;
8738
- } | {
8739
- name: string;
8740
- docs: string[];
8741
- type: {
8742
- kind: string;
8743
- fields: ({
8744
- name: string;
8745
- docs: string[];
8746
- type: {
8747
- array: (string | number)[];
8748
- };
8749
- } | {
8750
- name: string;
8751
- type: string;
8752
- docs?: undefined;
8753
- })[];
8754
- variants?: undefined;
8755
- };
8756
- serialization?: undefined;
8757
- repr?: undefined;
8758
- generics?: undefined;
8759
- } | {
8760
- name: string;
8761
- type: {
8762
- kind: string;
8763
- fields: ({
8764
- name: string;
8765
- type: {
8766
- vec: string;
8767
- defined?: undefined;
8768
- };
8769
- } | {
8770
- name: string;
8771
- type: {
8772
- defined: {
8773
- name: string;
8774
- };
8775
- vec?: undefined;
8776
- };
8777
- } | {
8778
- name: string;
8779
- type: string;
8780
- })[];
8781
- variants?: undefined;
8782
- };
8783
- docs?: undefined;
8784
- serialization?: undefined;
8785
- repr?: undefined;
8786
- generics?: undefined;
8787
- } | {
8788
- name: string;
8789
- docs: string[];
8790
- type: {
8791
- kind: string;
8792
- variants: {
8793
- name: string;
8794
- }[];
8795
- fields?: undefined;
8796
- };
8797
- serialization?: undefined;
8798
- repr?: undefined;
8799
- generics?: undefined;
8800
- } | {
8801
- name: string;
8802
- generics: {
8803
- kind: string;
8804
- name: string;
8805
- }[];
8806
- type: {
8807
- kind: string;
8808
- variants: {
8809
- name: string;
8810
- fields: ({
8811
- generic: string;
8812
- vec?: undefined;
8813
- } | {
8814
- vec: string;
8815
- generic?: undefined;
8816
- })[];
8817
- }[];
8818
- fields?: undefined;
8819
- };
8820
- docs?: undefined;
8821
- serialization?: undefined;
8822
- repr?: undefined;
8823
- })[];
8824
-
8825
- declare const arcium_accounts: typeof accounts;
8826
- declare const arcium_address: typeof address;
8827
- declare const arcium_errors: typeof errors;
8828
- declare const arcium_events: typeof events;
8829
- declare const arcium_instructions: typeof instructions;
8830
- import arcium_metadata = metadata;
8831
- declare const arcium_types: typeof types;
8832
- declare namespace arcium {
8833
- export {
8834
- arcium_accounts as accounts,
8835
- arcium_address as address,
8836
- arcium_errors as errors,
8837
- arcium_events as events,
8838
- arcium_instructions as instructions,
8839
- arcium_metadata as metadata,
8840
- arcium_types as types,
8841
- };
8842
- }
8843
-
7947
+ declare const ARCIUM_IDL: Arcium;
8844
7948
  /**
8845
7949
  * The deployed address of the Arcium program, as specified in the IDL.
8846
7950
  */
8847
- declare const ARCIUM_ADDR: "Bv3Fb9VjzjWGfX18QTUcVycAfeLoQ5zZN6vv2g3cTZxp";
7951
+ declare const ARCIUM_ADDR: "BpaW2ZmCJnDwizWY8eM34JtVqp2kRgnmQcedSVc9USdP";
7952
+
7953
+ /**
7954
+ * Compresses an array of bytes into 128-bit bigints.
7955
+ *
7956
+ * Takes an array of bytes whose length is a multiple of 16 and compresses each consecutive 16 bytes into a single 128-bit bigint.
7957
+ *
7958
+ * @param bytes - The input byte array. Its length must be a multiple of 16.
7959
+ * @returns An array of 128-bit bigints, each representing 16 bytes from the input.
7960
+ * @throws Error if the input length is not a multiple of 16.
7961
+ */
7962
+ declare function compressUint128(bytes: Uint8Array): bigint[];
7963
+ /**
7964
+ * Decompresses an array of 128-bit bigints into a flattened byte array.
7965
+ *
7966
+ * Takes an array of 128-bit bigints and returns a Uint8Array containing the decompressed bytes (16 bytes per bigint).
7967
+ *
7968
+ * @param compressed - The input array of 128-bit bigints. Each bigint must be less than 2^128.
7969
+ * @returns A Uint8Array containing the decompressed bytes.
7970
+ * @throws Error if any bigint in the input is not less than 2^128.
7971
+ */
7972
+ declare function decompressUint128(compressed: bigint[]): Uint8Array;
7973
+ /**
7974
+ * Reference to a computation in a mempool or executing pool.
7975
+ * Contains the computation offset and priority fee information.
7976
+ */
7977
+ type ComputationReference = anchor.IdlTypes<Arcium>['computationReference'];
7978
+ /**
7979
+ * Checks if a computation reference is null (all zeros).
7980
+ * @param ref - The computation reference to check
7981
+ * @returns true if the reference is null, false otherwise
7982
+ */
7983
+ declare function isNullRef(ref: ComputationReference): boolean;
8848
7984
 
8849
7985
  /**
8850
7986
  * Represents a mempool account of any size (tiny, small, medium, or large).
@@ -8855,7 +7991,7 @@ declare const ARCIUM_ADDR: "Bv3Fb9VjzjWGfX18QTUcVycAfeLoQ5zZN6vv2g3cTZxp";
8855
7991
  * - Medium: 10 computations
8856
7992
  * - Large: 100 computations
8857
7993
  */
8858
- type MempoolAcc = anchor.IdlTypes<Arcium>['tinyMempool'] | anchor.IdlTypes<Arcium>['smallMempool'] | anchor.IdlTypes<Arcium>['mediumMempool'] | anchor.IdlTypes<Arcium>['largeMempool'];
7994
+ type MempoolAccount = anchor.IdlTypes<Arcium>['tinyMempool'] | anchor.IdlTypes<Arcium>['smallMempool'] | anchor.IdlTypes<Arcium>['mediumMempool'] | anchor.IdlTypes<Arcium>['largeMempool'];
8859
7995
  /**
8860
7996
  * Represents an executing pool account of any size (tiny, small, medium, or large).
8861
7997
  * Executing pools manage parallel computation execution with account locking.
@@ -8865,61 +8001,86 @@ type MempoolAcc = anchor.IdlTypes<Arcium>['tinyMempool'] | anchor.IdlTypes<Arciu
8865
8001
  * - Medium: 10 parallel computations
8866
8002
  * - Large: 100 parallel computations
8867
8003
  */
8868
- type ExecpoolAcc = anchor.IdlTypes<Arcium>['tinyExecPool'] | anchor.IdlTypes<Arcium>['smallExecPool'] | anchor.IdlTypes<Arcium>['mediumExecPool'] | anchor.IdlTypes<Arcium>['largeExecPool'];
8869
- /**
8870
- * Returns the public key of the deployed Arcium program on Solana.
8871
- * @returns The Arcium program's public key.
8872
- */
8873
- declare function getArciumProgAddress(): anchor.web3.PublicKey;
8004
+ type ExecutingPoolAccount = anchor.IdlTypes<Arcium>['tinyExecPool'] | anchor.IdlTypes<Arcium>['smallExecPool'] | anchor.IdlTypes<Arcium>['mediumExecPool'] | anchor.IdlTypes<Arcium>['largeExecPool'];
8874
8005
  /**
8875
- * Fetches and decodes the mempool account data for any mempool account size.
8006
+ * Fetches and decodes the mempool account info for any mempool account size.
8876
8007
  * @param provider - The Anchor provider to use for fetching accounts.
8877
8008
  * @param mempoolAccPubkey - The public key of the mempool account.
8878
- * @returns The decoded mempool account data.
8009
+ * @returns The decoded mempool account info.
8879
8010
  * @throws Error if the account cannot be fetched or the discriminator is unknown.
8880
8011
  */
8881
- declare function getMempoolAccData(provider: AnchorProvider, mempoolAccPubkey: anchor.web3.PublicKey): Promise<MempoolAcc>;
8012
+ declare function getMempoolAccInfo(provider: AnchorProvider, mempoolAccPubkey: anchor.web3.PublicKey): Promise<MempoolAccount>;
8882
8013
  /**
8883
- * Fetches and decodes the executing pool account data for any pool size.
8014
+ * Fetches and decodes the executing pool account info for any pool size.
8884
8015
  * @param provider - The Anchor provider to use for fetching accounts.
8885
8016
  * @param executingPoolAccPubkey - The public key of the executing pool account.
8886
- * @returns The decoded executing pool account data.
8017
+ * @returns The decoded executing pool account info.
8887
8018
  * @throws Error if the account cannot be fetched or the discriminator is unknown.
8888
8019
  */
8889
- declare function getExecutingPoolAccData(provider: AnchorProvider, executingPoolAccPubkey: anchor.web3.PublicKey): Promise<ExecpoolAcc>;
8020
+ declare function getExecutingPoolAccInfo(provider: AnchorProvider, executingPoolAccPubkey: anchor.web3.PublicKey): Promise<ExecutingPoolAccount>;
8021
+ /**
8022
+ * Returns all computation references in the mempool for a given account.
8023
+ * Only non-stake computations are included.
8024
+ * @param arciumProgram - The Anchor program instance.
8025
+ * @param address - The public key of the mempool account.
8026
+ * @returns Array of ComputationReference objects.
8027
+ */
8028
+ declare function getComputationsInMempool(arciumProgram: anchor.Program<Arcium>, address: PublicKey): Promise<ComputationReference[]>;
8029
+ /**
8030
+ * Statistics about priority fees for computations in a mempool.
8031
+ * @property mean - The average priority fee across all computations.
8032
+ * @property median - The middle value of priority fees when sorted.
8033
+ * @property min - The lowest priority fee in the mempool.
8034
+ * @property max - The highest priority fee in the mempool.
8035
+ * @property count - The total number of computations in the mempool.
8036
+ */
8037
+ interface MempoolPriorityFeeStats {
8038
+ mean: anchor.BN;
8039
+ median: anchor.BN;
8040
+ min: anchor.BN;
8041
+ max: anchor.BN;
8042
+ count: number;
8043
+ }
8044
+ /**
8045
+ * Calculates priority fee statistics for computations in a mempool.
8046
+ * @param arciumProgram - The Anchor program instance.
8047
+ * @param mempoolAddress - The public key of the mempool account.
8048
+ * @returns Priority fee statistics (mean, median, min, max, count).
8049
+ */
8050
+ declare function getMempoolPriorityFeeStats(arciumProgram: anchor.Program<Arcium>, mempoolAddress: PublicKey): Promise<MempoolPriorityFeeStats>;
8890
8051
  /**
8891
- * Fetches and extracts the MXE public key from the MXE account.
8052
+ * Fetches and extracts the MXE x25519 public key from the MXE account.
8892
8053
  * @param provider - The Anchor provider to use for fetching accounts.
8893
- * @param mxeProgramID - The public key of the MXE program.
8054
+ * @param mxeProgramId - The public key of the MXE program.
8894
8055
  * @returns The MXE's x25519 public key as a Uint8Array, or null if not set.
8895
8056
  */
8896
- declare function getMXEPublicKey(provider: AnchorProvider, mxeProgramID: anchor.web3.PublicKey): Promise<Uint8Array | null>;
8057
+ declare function getMXEPublicKey(provider: AnchorProvider, mxeProgramId: anchor.web3.PublicKey): Promise<Uint8Array | null>;
8897
8058
  /**
8898
8059
  * Fetches and extracts the MXE arcis ed25519 verifying key from the MXE account.
8899
8060
  * @param provider - The Anchor provider to use for fetching accounts.
8900
- * @param mxeProgramID - The public key of the MXE program.
8061
+ * @param mxeProgramId - The public key of the MXE program.
8901
8062
  * @returns The MXE's arcis ed25519 verifying key as a Uint8Array, or null if not set.
8902
8063
  */
8903
- declare function getMXEArcisEd25519VerifyingKey(provider: AnchorProvider, mxeProgramID: anchor.web3.PublicKey): Promise<Uint8Array | null>;
8064
+ declare function getMXEArcisEd25519VerifyingKey(provider: AnchorProvider, mxeProgramId: anchor.web3.PublicKey): Promise<Uint8Array | null>;
8904
8065
  /**
8905
8066
  * Uploads a circuit to the blockchain, splitting it into multiple accounts if necessary.
8906
8067
  * @param provider - The Anchor provider to use for transactions.
8907
8068
  * @param circuitName - The name of the circuit.
8908
- * @param mxeProgramID - The public key of the MXE program.
8069
+ * @param mxeProgramId - The public key of the MXE program.
8909
8070
  * @param rawCircuit - The raw circuit data as a Uint8Array.
8910
8071
  * @param logging - Whether to log progress (default: true).
8911
8072
  * @param chunkSize - The number of upload transactions to send in parallel (default: 500).
8912
8073
  * @returns An array of transaction signatures for all upload and finalize transactions.
8913
8074
  */
8914
- declare function uploadCircuit(provider: AnchorProvider, circuitName: string, mxeProgramID: anchor.web3.PublicKey, rawCircuit: Uint8Array, logging?: boolean, chunkSize?: number): Promise<string[]>;
8075
+ declare function uploadCircuit(provider: AnchorProvider, circuitName: string, mxeProgramId: anchor.web3.PublicKey, rawCircuit: Uint8Array, logging?: boolean, chunkSize?: number): Promise<string[]>;
8915
8076
  /**
8916
8077
  * Builds a transaction to finalize a computation definition.
8917
8078
  * @param provider - The Anchor provider to use for transactions.
8918
8079
  * @param compDefOffset - The offset of the computation definition.
8919
- * @param mxeProgramID - The public key of the MXE program.
8080
+ * @param mxeProgramId - The public key of the MXE program.
8920
8081
  * @returns The transaction to finalize the computation definition.
8921
8082
  */
8922
- declare function buildFinalizeCompDefTx(provider: AnchorProvider, compDefOffset: number, mxeProgramID: anchor.web3.PublicKey): Promise<anchor.web3.Transaction>;
8083
+ declare function buildFinalizeCompDefTx(provider: AnchorProvider, compDefOffset: number, mxeProgramId: anchor.web3.PublicKey): Promise<anchor.web3.Transaction>;
8923
8084
  /**
8924
8085
  * Returns the base seed for an Arcium account, given its name.
8925
8086
  * @param accName - The name of the account.
@@ -8938,25 +8099,12 @@ declare function getCompDefAccOffset(circuitName: string): Uint8Array;
8938
8099
  * @returns The Anchor program instance for Arcium.
8939
8100
  */
8940
8101
  declare function getArciumProgram(provider: AnchorProvider): Program<Arcium>;
8941
- /**
8942
- * Returns a read-only Anchor program instance for the Arcium program.
8943
- * @param provider - The Anchor provider to use.
8944
- * @returns The Anchor program instance for Arcium.
8945
- */
8946
- declare function getArciumProgramReadonly(provider: AnchorProvider): Program<Arcium>;
8947
- /**
8948
- * Returns the PDA (program-derived address) for an ArxNode account given the program ID and node offset.
8949
- * @param arciumProgramID - The public key of the Arcium program.
8950
- * @param nodeOffset - The offset of the node.
8951
- * @returns The PDA for the ArxNode account.
8952
- */
8953
- declare function getArxAccPDA(arciumProgramID: anchor.web3.PublicKey, nodeOffset: number): anchor.web3.PublicKey;
8954
8102
 
8955
8103
  /**
8956
8104
  * Structure representing the local Arcium environment variables required for local development or testing.
8957
8105
  */
8958
8106
  type ArciumLocalEnv = {
8959
- arciumClusterPubkey: PublicKey;
8107
+ arciumClusterOffset: number;
8960
8108
  };
8961
8109
  /**
8962
8110
  * Reads local Arcium environment information from environment variables.
@@ -8987,24 +8135,24 @@ declare function awaitComputationFinalization(provider: AnchorProvider, computat
8987
8135
  */
8988
8136
  declare function getArciumProgramId(): PublicKey;
8989
8137
  /**
8990
- * Derives the computation account address for a given MXE program ID and offset.
8991
- * @param mxeProgramId - The public key of the MXE program.
8992
- * @param offset - The computation offset as an anchor.BN.
8138
+ * Derives the computation account address for a given cluster and computation offset.
8139
+ * @param clusterOffset - The offset of the cluster this computation will be executed by.
8140
+ * @param computationOffset - The computation offset as an anchor.BN.
8993
8141
  * @returns The derived computation account public key.
8994
8142
  */
8995
- declare function getComputationAccAddress(mxeProgramId: PublicKey, offset: anchor.BN): PublicKey;
8143
+ declare function getComputationAccAddress(clusterOffset: number, computationOffset: anchor.BN): PublicKey;
8996
8144
  /**
8997
- * Derives the mempool account address for a given MXE program ID.
8998
- * @param mxeProgramId - The public key of the MXE program.
8145
+ * Derives the mempool account address for a given cluster.
8146
+ * @param clusterOffset - The offset of the cluster.
8999
8147
  * @returns The derived mempool account public key.
9000
8148
  */
9001
- declare function getMempoolAccAddress(mxeProgramId: PublicKey): PublicKey;
8149
+ declare function getMempoolAccAddress(clusterOffset: number): PublicKey;
9002
8150
  /**
9003
- * Derives the executing pool account address for a given MXE program ID.
9004
- * @param mxeProgramId - The public key of the MXE program.
8151
+ * Derives the executing pool account address for a given cluster.
8152
+ * @param clusterOffset - The offset of the cluster.
9005
8153
  * @returns The derived executing pool account public key.
9006
8154
  */
9007
- declare function getExecutingPoolAccAddress(mxeProgramId: PublicKey): PublicKey;
8155
+ declare function getExecutingPoolAccAddress(clusterOffset: number): PublicKey;
9008
8156
  /**
9009
8157
  * Derives the fee pool account address.
9010
8158
  * @returns The derived fee pool account public key.
@@ -9017,16 +8165,16 @@ declare function getFeePoolAccAddress(): PublicKey;
9017
8165
  declare function getClockAccAddress(): PublicKey;
9018
8166
  /**
9019
8167
  * Derives the cluster account address for a given offset.
9020
- * @param offset - The cluster offset as a number.
8168
+ * @param clusterOffset - The cluster offset as a number.
9021
8169
  * @returns The derived cluster account public key.
9022
8170
  */
9023
- declare function getClusterAccAddress(offset: number): PublicKey;
8171
+ declare function getClusterAccAddress(clusterOffset: number): PublicKey;
9024
8172
  /**
9025
8173
  * Derives the ArxNode account address for a given offset.
9026
- * @param offset - The ArxNode offset as a number.
8174
+ * @param nodeOffset - The ArxNode offset as a number.
9027
8175
  * @returns The derived ArxNode account public key.
9028
8176
  */
9029
- declare function getArxNodeAccAddress(offset: number): PublicKey;
8177
+ declare function getArxNodeAccAddress(nodeOffset: number): PublicKey;
9030
8178
  /**
9031
8179
  * Derives the MXE account address for a given MXE program ID.
9032
8180
  * @param mxeProgramId - The public key of the MXE program.
@@ -9036,31 +8184,10 @@ declare function getMXEAccAddress(mxeProgramId: PublicKey): PublicKey;
9036
8184
  /**
9037
8185
  * Derives the computation definition account address for a given MXE program ID and offset.
9038
8186
  * @param mxeProgramId - The public key of the MXE program.
9039
- * @param offset - The computation definition offset as a number.
8187
+ * @param compDefOffset - The computation definition offset as a number.
9040
8188
  * @returns The derived computation definition account public key.
9041
8189
  */
9042
- declare function getCompDefAccAddress(mxeProgramId: PublicKey, offset: number): PublicKey;
9043
-
9044
- /**
9045
- * Compresses an array of bytes into 128-bit bigints.
9046
- *
9047
- * Takes an array of bytes whose length is a multiple of 16 and compresses each consecutive 16 bytes into a single 128-bit bigint.
9048
- *
9049
- * @param bytes - The input byte array. Its length must be a multiple of 16.
9050
- * @returns An array of 128-bit bigints, each representing 16 bytes from the input.
9051
- * @throws Error if the input length is not a multiple of 16.
9052
- */
9053
- declare function compressUint128(bytes: Uint8Array): bigint[];
9054
- /**
9055
- * Decompresses an array of 128-bit bigints into a flattened byte array.
9056
- *
9057
- * Takes an array of 128-bit bigints and returns a Uint8Array containing the decompressed bytes (16 bytes per bigint).
9058
- *
9059
- * @param compressed - The input array of 128-bit bigints. Each bigint must be less than 2^128.
9060
- * @returns A Uint8Array containing the decompressed bytes.
9061
- * @throws Error if any bigint in the input is not less than 2^128.
9062
- */
9063
- declare function decompressUint128(compressed: bigint[]): Uint8Array;
8190
+ declare function getCompDefAccAddress(mxeProgramId: PublicKey, compDefOffset: number): PublicKey;
9064
8191
 
9065
- export { ARCIUM_ADDR, arcium as ARCIUM_IDL, Aes128Cipher, Aes192Cipher, Aes256Cipher, CURVE25519_BASE_FIELD, CURVE25519_SCALAR_FIELD_MODULUS, Matrix, RescueCipher, RescueDesc, RescuePrimeHash, arcisEd25519, awaitComputationFinalization, buildFinalizeCompDefTx, compressUint128, decompressUint128, deserializeLE, generateRandomFieldElem, getArciumAccountBaseSeed, getArciumEnv, getArciumProgAddress, getArciumProgram, getArciumProgramId, getArciumProgramReadonly, getArxAccPDA, getArxNodeAccAddress, getClockAccAddress, getClusterAccAddress, getCompDefAccAddress, getCompDefAccOffset, getComputationAccAddress, getExecutingPoolAccAddress, getExecutingPoolAccData, getFeePoolAccAddress, getMXEAccAddress, getMXEArcisEd25519VerifyingKey, getMXEPublicKey, getMempoolAccAddress, getMempoolAccData, positiveModulo, randMatrix, serializeLE, sha256, toVec, uploadCircuit };
9066
- export type { Arcium as ArciumIdlType, ArciumLocalEnv, ComputationErrorType, FpField };
8192
+ export { ARCIUM_ADDR, ARCIUM_IDL, Aes128Cipher, Aes192Cipher, Aes256Cipher, CURVE25519_BASE_FIELD, CURVE25519_SCALAR_FIELD_MODULUS, Matrix, RescueCipher, RescueDesc, RescuePrimeHash, arcisEd25519, awaitComputationFinalization, buildFinalizeCompDefTx, compressUint128, decompressUint128, deserializeLE, generateRandomFieldElem, getArciumAccountBaseSeed, getArciumEnv, getArciumProgram, getArciumProgramId, getArxNodeAccAddress, getClockAccAddress, getClusterAccAddress, getCompDefAccAddress, getCompDefAccOffset, getComputationAccAddress, getComputationsInMempool, getExecutingPoolAccAddress, getExecutingPoolAccInfo, getFeePoolAccAddress, getMXEAccAddress, getMXEArcisEd25519VerifyingKey, getMXEPublicKey, getMempoolAccAddress, getMempoolAccInfo, getMempoolPriorityFeeStats, isNullRef, positiveModulo, randMatrix, serializeLE, sha256, toVec, uploadCircuit };
8193
+ export type { Arcium as ArciumIdlType, ArciumLocalEnv, ComputationErrorType, ComputationReference, ExecutingPoolAccount, FpField, MempoolAccount, MempoolPriorityFeeStats };