@triadxyz/triad-protocol 4.2.8 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -436,123 +436,6 @@ export type TriadProtocol = {
436
436
  ];
437
437
  };
438
438
  },
439
- {
440
- name: 'mint';
441
- },
442
- {
443
- name: 'marketToAta';
444
- writable: true;
445
- pda: {
446
- seeds: [
447
- {
448
- kind: 'account';
449
- path: 'market';
450
- },
451
- {
452
- kind: 'account';
453
- path: 'tokenProgram';
454
- },
455
- {
456
- kind: 'account';
457
- path: 'mint';
458
- }
459
- ];
460
- program: {
461
- kind: 'const';
462
- value: [
463
- 140,
464
- 151,
465
- 37,
466
- 143,
467
- 78,
468
- 36,
469
- 137,
470
- 241,
471
- 187,
472
- 61,
473
- 16,
474
- 41,
475
- 20,
476
- 142,
477
- 13,
478
- 131,
479
- 11,
480
- 90,
481
- 19,
482
- 153,
483
- 218,
484
- 255,
485
- 16,
486
- 132,
487
- 4,
488
- 142,
489
- 123,
490
- 216,
491
- 219,
492
- 233,
493
- 248,
494
- 89
495
- ];
496
- };
497
- };
498
- },
499
- {
500
- name: 'squadsAta';
501
- writable: true;
502
- pda: {
503
- seeds: [
504
- {
505
- kind: 'account';
506
- path: 'squads';
507
- },
508
- {
509
- kind: 'account';
510
- path: 'tokenProgram';
511
- },
512
- {
513
- kind: 'account';
514
- path: 'mint';
515
- }
516
- ];
517
- program: {
518
- kind: 'const';
519
- value: [
520
- 140,
521
- 151,
522
- 37,
523
- 143,
524
- 78,
525
- 36,
526
- 137,
527
- 241,
528
- 187,
529
- 61,
530
- 16,
531
- 41,
532
- 20,
533
- 142,
534
- 13,
535
- 131,
536
- 11,
537
- 90,
538
- 19,
539
- 153,
540
- 218,
541
- 255,
542
- 16,
543
- 132,
544
- 4,
545
- 142,
546
- 123,
547
- 216,
548
- 219,
549
- 233,
550
- 248,
551
- 89
552
- ];
553
- };
554
- };
555
- },
556
439
  {
557
440
  name: 'orderBook';
558
441
  pda: {
@@ -568,13 +451,6 @@ export type TriadProtocol = {
568
451
  ];
569
452
  };
570
453
  },
571
- {
572
- name: 'tokenProgram';
573
- },
574
- {
575
- name: 'associatedTokenProgram';
576
- address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
577
- },
578
454
  {
579
455
  name: 'systemProgram';
580
456
  address: '11111111111111111111111111111111';
@@ -1228,6 +1104,23 @@ export type TriadProtocol = {
1228
1104
  ];
1229
1105
  };
1230
1106
  },
1107
+ {
1108
+ name: 'customer';
1109
+ writable: true;
1110
+ pda: {
1111
+ seeds: [
1112
+ {
1113
+ kind: 'const';
1114
+ value: [99, 117, 115, 116, 111, 109, 101, 114];
1115
+ },
1116
+ {
1117
+ kind: 'account';
1118
+ path: 'predictor.customer_id';
1119
+ account: 'predictor';
1120
+ }
1121
+ ];
1122
+ };
1123
+ },
1231
1124
  {
1232
1125
  name: 'predictor';
1233
1126
  writable: true;
@@ -1372,8 +1265,8 @@ export type TriadProtocol = {
1372
1265
  ];
1373
1266
  },
1374
1267
  {
1375
- name: 'marketAskOrder';
1376
- discriminator: [189, 66, 162, 254, 3, 85, 152, 54];
1268
+ name: 'depositExt';
1269
+ discriminator: [80, 29, 27, 89, 96, 75, 249, 174];
1377
1270
  accounts: [
1378
1271
  {
1379
1272
  name: 'signer';
@@ -1381,36 +1274,185 @@ export type TriadProtocol = {
1381
1274
  signer: true;
1382
1275
  },
1383
1276
  {
1384
- name: 'predictor';
1277
+ name: 'central';
1385
1278
  writable: true;
1279
+ pda: {
1280
+ seeds: [
1281
+ {
1282
+ kind: 'const';
1283
+ value: [99, 101, 110, 116, 114, 97, 108];
1284
+ },
1285
+ {
1286
+ kind: 'const';
1287
+ value: [
1288
+ 116,
1289
+ 114,
1290
+ 105,
1291
+ 97,
1292
+ 100,
1293
+ 109,
1294
+ 97,
1295
+ 114,
1296
+ 107,
1297
+ 101,
1298
+ 116,
1299
+ 115
1300
+ ];
1301
+ }
1302
+ ];
1303
+ };
1386
1304
  },
1387
1305
  {
1388
- name: 'oppositePredictor';
1306
+ name: 'customer';
1389
1307
  writable: true;
1308
+ pda: {
1309
+ seeds: [
1310
+ {
1311
+ kind: 'const';
1312
+ value: [99, 117, 115, 116, 111, 109, 101, 114];
1313
+ },
1314
+ {
1315
+ kind: 'account';
1316
+ path: 'predictor.customer_id';
1317
+ account: 'predictor';
1318
+ }
1319
+ ];
1320
+ };
1390
1321
  },
1391
1322
  {
1392
- name: 'central';
1323
+ name: 'predictor';
1393
1324
  writable: true;
1394
1325
  },
1395
1326
  {
1396
- name: 'market';
1327
+ name: 'predictorDeposit';
1397
1328
  writable: true;
1398
1329
  },
1399
1330
  {
1400
- name: 'orderBook';
1331
+ name: 'mint';
1401
1332
  writable: true;
1333
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
1402
1334
  },
1403
1335
  {
1404
- name: 'customer';
1336
+ name: 'userAta';
1405
1337
  writable: true;
1338
+ pda: {
1339
+ seeds: [
1340
+ {
1341
+ kind: 'account';
1342
+ path: 'signer';
1343
+ },
1344
+ {
1345
+ kind: 'account';
1346
+ path: 'tokenProgram';
1347
+ },
1348
+ {
1349
+ kind: 'account';
1350
+ path: 'mint';
1351
+ }
1352
+ ];
1353
+ program: {
1354
+ kind: 'const';
1355
+ value: [
1356
+ 140,
1357
+ 151,
1358
+ 37,
1359
+ 143,
1360
+ 78,
1361
+ 36,
1362
+ 137,
1363
+ 241,
1364
+ 187,
1365
+ 61,
1366
+ 16,
1367
+ 41,
1368
+ 20,
1369
+ 142,
1370
+ 13,
1371
+ 131,
1372
+ 11,
1373
+ 90,
1374
+ 19,
1375
+ 153,
1376
+ 218,
1377
+ 255,
1378
+ 16,
1379
+ 132,
1380
+ 4,
1381
+ 142,
1382
+ 123,
1383
+ 216,
1384
+ 219,
1385
+ 233,
1386
+ 248,
1387
+ 89
1388
+ ];
1389
+ };
1390
+ };
1406
1391
  },
1407
1392
  {
1408
- name: 'predictorOrder';
1393
+ name: 'centralAta';
1409
1394
  writable: true;
1395
+ pda: {
1396
+ seeds: [
1397
+ {
1398
+ kind: 'account';
1399
+ path: 'central';
1400
+ },
1401
+ {
1402
+ kind: 'account';
1403
+ path: 'tokenProgram';
1404
+ },
1405
+ {
1406
+ kind: 'account';
1407
+ path: 'mint';
1408
+ }
1409
+ ];
1410
+ program: {
1411
+ kind: 'const';
1412
+ value: [
1413
+ 140,
1414
+ 151,
1415
+ 37,
1416
+ 143,
1417
+ 78,
1418
+ 36,
1419
+ 137,
1420
+ 241,
1421
+ 187,
1422
+ 61,
1423
+ 16,
1424
+ 41,
1425
+ 20,
1426
+ 142,
1427
+ 13,
1428
+ 131,
1429
+ 11,
1430
+ 90,
1431
+ 19,
1432
+ 153,
1433
+ 218,
1434
+ 255,
1435
+ 16,
1436
+ 132,
1437
+ 4,
1438
+ 142,
1439
+ 123,
1440
+ 216,
1441
+ 219,
1442
+ 233,
1443
+ 248,
1444
+ 89
1445
+ ];
1446
+ };
1447
+ };
1410
1448
  },
1411
1449
  {
1412
- name: 'oppositePredictorOrder';
1413
- writable: true;
1450
+ name: 'tokenProgram';
1451
+ address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
1452
+ },
1453
+ {
1454
+ name: 'associatedTokenProgram';
1455
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
1414
1456
  },
1415
1457
  {
1416
1458
  name: 'systemProgram';
@@ -1422,26 +1464,21 @@ export type TriadProtocol = {
1422
1464
  name: 'args';
1423
1465
  type: {
1424
1466
  defined: {
1425
- name: 'marketAskOrderArgs';
1467
+ name: 'depositExtArgs';
1426
1468
  };
1427
1469
  };
1428
1470
  }
1429
1471
  ];
1430
1472
  },
1431
1473
  {
1432
- name: 'marketBidOrder';
1433
- discriminator: [145, 89, 7, 166, 85, 59, 48, 149];
1474
+ name: 'marketAskOrder';
1475
+ discriminator: [189, 66, 162, 254, 3, 85, 152, 54];
1434
1476
  accounts: [
1435
1477
  {
1436
1478
  name: 'signer';
1437
1479
  writable: true;
1438
1480
  signer: true;
1439
1481
  },
1440
- {
1441
- name: 'payer';
1442
- writable: true;
1443
- signer: true;
1444
- },
1445
1482
  {
1446
1483
  name: 'predictor';
1447
1484
  writable: true;
@@ -1484,19 +1521,20 @@ export type TriadProtocol = {
1484
1521
  name: 'args';
1485
1522
  type: {
1486
1523
  defined: {
1487
- name: 'marketBidOrderArgs';
1524
+ name: 'marketAskOrderArgs';
1488
1525
  };
1489
1526
  };
1490
1527
  }
1491
1528
  ];
1492
1529
  },
1493
1530
  {
1494
- name: 'migrateOrder';
1495
- discriminator: [177, 81, 189, 119, 98, 91, 63, 189];
1531
+ name: 'marketBidOrder';
1532
+ discriminator: [145, 89, 7, 166, 85, 59, 48, 149];
1496
1533
  accounts: [
1497
1534
  {
1498
1535
  name: 'signer';
1499
1536
  writable: true;
1537
+ signer: true;
1500
1538
  },
1501
1539
  {
1502
1540
  name: 'payer';
@@ -1504,23 +1542,52 @@ export type TriadProtocol = {
1504
1542
  signer: true;
1505
1543
  },
1506
1544
  {
1507
- name: 'order';
1545
+ name: 'predictor';
1508
1546
  writable: true;
1509
1547
  },
1510
1548
  {
1511
- name: 'predictor';
1549
+ name: 'oppositePredictor';
1550
+ writable: true;
1551
+ },
1552
+ {
1553
+ name: 'central';
1554
+ writable: true;
1555
+ },
1556
+ {
1557
+ name: 'market';
1558
+ writable: true;
1559
+ },
1560
+ {
1561
+ name: 'orderBook';
1562
+ writable: true;
1563
+ },
1564
+ {
1565
+ name: 'customer';
1512
1566
  writable: true;
1513
1567
  },
1514
1568
  {
1515
1569
  name: 'predictorOrder';
1516
1570
  writable: true;
1517
1571
  },
1572
+ {
1573
+ name: 'oppositePredictorOrder';
1574
+ writable: true;
1575
+ },
1518
1576
  {
1519
1577
  name: 'systemProgram';
1520
1578
  address: '11111111111111111111111111111111';
1521
1579
  }
1522
1580
  ];
1523
- args: [];
1581
+ args: [
1582
+ {
1583
+ name: 'args';
1584
+ type: {
1585
+ defined: {
1586
+ name: 'marketBidOrderArgs';
1587
+ };
1588
+ };
1589
+ }
1590
+ ];
1524
1591
  },
1525
1592
  {
1526
1593
  name: 'migrateStake';
@@ -2332,6 +2399,23 @@ export type TriadProtocol = {
2332
2399
  ];
2333
2400
  };
2334
2401
  },
2402
+ {
2403
+ name: 'customer';
2404
+ writable: true;
2405
+ pda: {
2406
+ seeds: [
2407
+ {
2408
+ kind: 'const';
2409
+ value: [99, 117, 115, 116, 111, 109, 101, 114];
2410
+ },
2411
+ {
2412
+ kind: 'account';
2413
+ path: 'predictor.customer_id';
2414
+ account: 'predictor';
2415
+ }
2416
+ ];
2417
+ };
2418
+ },
2335
2419
  {
2336
2420
  name: 'predictor';
2337
2421
  writable: true;
@@ -2475,6 +2559,155 @@ export type TriadProtocol = {
2475
2559
  }
2476
2560
  ];
2477
2561
  },
2562
+ {
2563
+ name: 'withdrawExt';
2564
+ discriminator: [244, 65, 141, 53, 29, 13, 232, 64];
2565
+ accounts: [
2566
+ {
2567
+ name: 'signer';
2568
+ writable: true;
2569
+ signer: true;
2570
+ },
2571
+ {
2572
+ name: 'central';
2573
+ writable: true;
2574
+ pda: {
2575
+ seeds: [
2576
+ {
2577
+ kind: 'const';
2578
+ value: [99, 101, 110, 116, 114, 97, 108];
2579
+ },
2580
+ {
2581
+ kind: 'const';
2582
+ value: [
2583
+ 116,
2584
+ 114,
2585
+ 105,
2586
+ 97,
2587
+ 100,
2588
+ 109,
2589
+ 97,
2590
+ 114,
2591
+ 107,
2592
+ 101,
2593
+ 116,
2594
+ 115
2595
+ ];
2596
+ }
2597
+ ];
2598
+ };
2599
+ },
2600
+ {
2601
+ name: 'customer';
2602
+ writable: true;
2603
+ pda: {
2604
+ seeds: [
2605
+ {
2606
+ kind: 'const';
2607
+ value: [99, 117, 115, 116, 111, 109, 101, 114];
2608
+ },
2609
+ {
2610
+ kind: 'account';
2611
+ path: 'predictor.customer_id';
2612
+ account: 'predictor';
2613
+ }
2614
+ ];
2615
+ };
2616
+ },
2617
+ {
2618
+ name: 'predictor';
2619
+ writable: true;
2620
+ },
2621
+ {
2622
+ name: 'mint';
2623
+ writable: true;
2624
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
2625
+ },
2626
+ {
2627
+ name: 'extAta';
2628
+ writable: true;
2629
+ },
2630
+ {
2631
+ name: 'centralAta';
2632
+ writable: true;
2633
+ pda: {
2634
+ seeds: [
2635
+ {
2636
+ kind: 'account';
2637
+ path: 'central';
2638
+ },
2639
+ {
2640
+ kind: 'account';
2641
+ path: 'tokenProgram';
2642
+ },
2643
+ {
2644
+ kind: 'account';
2645
+ path: 'mint';
2646
+ }
2647
+ ];
2648
+ program: {
2649
+ kind: 'const';
2650
+ value: [
2651
+ 140,
2652
+ 151,
2653
+ 37,
2654
+ 143,
2655
+ 78,
2656
+ 36,
2657
+ 137,
2658
+ 241,
2659
+ 187,
2660
+ 61,
2661
+ 16,
2662
+ 41,
2663
+ 20,
2664
+ 142,
2665
+ 13,
2666
+ 131,
2667
+ 11,
2668
+ 90,
2669
+ 19,
2670
+ 153,
2671
+ 218,
2672
+ 255,
2673
+ 16,
2674
+ 132,
2675
+ 4,
2676
+ 142,
2677
+ 123,
2678
+ 216,
2679
+ 219,
2680
+ 233,
2681
+ 248,
2682
+ 89
2683
+ ];
2684
+ };
2685
+ };
2686
+ },
2687
+ {
2688
+ name: 'tokenProgram';
2689
+ address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
2690
+ },
2691
+ {
2692
+ name: 'associatedTokenProgram';
2693
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
2694
+ },
2695
+ {
2696
+ name: 'systemProgram';
2697
+ address: '11111111111111111111111111111111';
2698
+ }
2699
+ ];
2700
+ args: [
2701
+ {
2702
+ name: 'args';
2703
+ type: {
2704
+ defined: {
2705
+ name: 'withdrawExtArgs';
2706
+ };
2707
+ };
2708
+ }
2709
+ ];
2710
+ },
2478
2711
  {
2479
2712
  name: 'withdrawPoseidon';
2480
2713
  discriminator: [63, 55, 48, 174, 44, 202, 11, 227];
@@ -2549,10 +2782,6 @@ export type TriadProtocol = {
2549
2782
  name: 'orderBook';
2550
2783
  discriminator: [55, 230, 125, 218, 149, 39, 65, 248];
2551
2784
  },
2552
- {
2553
- name: 'orderV2';
2554
- discriminator: [150, 42, 80, 18, 62, 128, 236, 76];
2555
- },
2556
2785
  {
2557
2786
  name: 'pool';
2558
2787
  discriminator: [241, 154, 109, 4, 17, 177, 109, 188];
@@ -2561,6 +2790,10 @@ export type TriadProtocol = {
2561
2790
  name: 'predictor';
2562
2791
  discriminator: [220, 240, 153, 14, 72, 188, 37, 21];
2563
2792
  },
2793
+ {
2794
+ name: 'predictorDeposit';
2795
+ discriminator: [181, 63, 111, 19, 93, 19, 107, 21];
2796
+ },
2564
2797
  {
2565
2798
  name: 'predictorOrder';
2566
2799
  discriminator: [46, 230, 139, 116, 204, 124, 164, 127];
@@ -3393,10 +3626,14 @@ export type TriadProtocol = {
3393
3626
  name: 'feeClaimed';
3394
3627
  type: 'u64';
3395
3628
  },
3629
+ {
3630
+ name: 'netCash';
3631
+ type: 'i64';
3632
+ },
3396
3633
  {
3397
3634
  name: 'padding';
3398
3635
  type: {
3399
- array: ['u8', 9];
3636
+ array: ['u8', 1];
3400
3637
  };
3401
3638
  }
3402
3639
  ];
@@ -3419,6 +3656,14 @@ export type TriadProtocol = {
3419
3656
  name: 'customerId';
3420
3657
  type: 'u16';
3421
3658
  },
3659
+ {
3660
+ name: 'depositId';
3661
+ type: {
3662
+ option: {
3663
+ array: ['u8', 12];
3664
+ };
3665
+ };
3666
+ },
3422
3667
  {
3423
3668
  name: 'amount';
3424
3669
  type: 'u64';
@@ -3434,6 +3679,24 @@ export type TriadProtocol = {
3434
3679
  ];
3435
3680
  };
3436
3681
  },
3682
+ {
3683
+ name: 'depositExtArgs';
3684
+ type: {
3685
+ kind: 'struct';
3686
+ fields: [
3687
+ {
3688
+ name: 'amount';
3689
+ type: 'u64';
3690
+ },
3691
+ {
3692
+ name: 'depositId';
3693
+ type: {
3694
+ array: ['u8', 12];
3695
+ };
3696
+ }
3697
+ ];
3698
+ };
3699
+ },
3437
3700
  {
3438
3701
  name: 'key';
3439
3702
  type: {
@@ -4017,62 +4280,6 @@ export type TriadProtocol = {
4017
4280
  ];
4018
4281
  };
4019
4282
  },
4020
- {
4021
- name: 'orderV2';
4022
- type: {
4023
- kind: 'struct';
4024
- fields: [
4025
- {
4026
- name: 'authority';
4027
- type: 'pubkey';
4028
- },
4029
- {
4030
- name: 'marketId';
4031
- type: 'u64';
4032
- },
4033
- {
4034
- name: 'shares';
4035
- type: 'u64';
4036
- },
4037
- {
4038
- name: 'price';
4039
- type: 'u64';
4040
- },
4041
- {
4042
- name: 'orderStatus';
4043
- type: {
4044
- defined: {
4045
- name: 'orderStatus';
4046
- };
4047
- };
4048
- },
4049
- {
4050
- name: 'orderType';
4051
- type: {
4052
- defined: {
4053
- name: 'orderType';
4054
- };
4055
- };
4056
- },
4057
- {
4058
- name: 'orderDirection';
4059
- type: {
4060
- defined: {
4061
- name: 'orderDirection';
4062
- };
4063
- };
4064
- },
4065
- {
4066
- name: 'orderSide';
4067
- type: {
4068
- defined: {
4069
- name: 'orderSide';
4070
- };
4071
- };
4072
- }
4073
- ];
4074
- };
4075
- },
4076
4283
  {
4077
4284
  name: 'placeAskOrderArgs';
4078
4285
  type: {
@@ -4245,6 +4452,13 @@ export type TriadProtocol = {
4245
4452
  ];
4246
4453
  };
4247
4454
  },
4455
+ {
4456
+ name: 'predictorDeposit';
4457
+ type: {
4458
+ kind: 'struct';
4459
+ fields: [];
4460
+ };
4461
+ },
4248
4462
  {
4249
4463
  name: 'predictorOrder';
4250
4464
  type: {
@@ -4681,6 +4895,12 @@ export type TriadProtocol = {
4681
4895
  name: 'customerId';
4682
4896
  type: 'u16';
4683
4897
  },
4898
+ {
4899
+ name: 'key';
4900
+ type: {
4901
+ option: 'string';
4902
+ };
4903
+ },
4684
4904
  {
4685
4905
  name: 'amount';
4686
4906
  type: 'u64';
@@ -4695,6 +4915,22 @@ export type TriadProtocol = {
4695
4915
  }
4696
4916
  ];
4697
4917
  };
4918
+ },
4919
+ {
4920
+ name: 'withdrawExtArgs';
4921
+ type: {
4922
+ kind: 'struct';
4923
+ fields: [
4924
+ {
4925
+ name: 'amount';
4926
+ type: 'u64';
4927
+ },
4928
+ {
4929
+ name: 'key';
4930
+ type: 'string';
4931
+ }
4932
+ ];
4933
+ };
4698
4934
  }
4699
4935
  ];
4700
4936
  };