@helium/idls 0.2.4 → 0.2.14-next.112
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/lib/cjs/circuit_breaker.js +1 -1
- package/lib/cjs/data_credits.js +1 -1
- package/lib/cjs/fanout.js +1 -6
- package/lib/cjs/fanout.js.map +1 -1
- package/lib/cjs/helium_entity_manager.js +1301 -223
- package/lib/cjs/helium_entity_manager.js.map +1 -1
- package/lib/cjs/helium_sub_daos.js +171 -363
- package/lib/cjs/helium_sub_daos.js.map +1 -1
- package/lib/cjs/lazy_distributor.js +1 -1
- package/lib/cjs/lazy_transactions.js +38 -7
- package/lib/cjs/lazy_transactions.js.map +1 -1
- package/lib/cjs/mobile_entity_manager.js +30 -3
- package/lib/cjs/mobile_entity_manager.js.map +1 -1
- package/lib/cjs/price_oracle.js +1 -1
- package/lib/cjs/rewards_oracle.js +77 -1
- package/lib/cjs/rewards_oracle.js.map +1 -1
- package/lib/cjs/treasury_management.js +1 -1
- package/lib/cjs/voter_stake_registry.js +303 -172
- package/lib/cjs/voter_stake_registry.js.map +1 -1
- package/lib/esm/circuit_breaker.js +1 -1
- package/lib/esm/data_credits.js +1 -1
- package/lib/esm/fanout.js +1 -6
- package/lib/esm/fanout.js.map +1 -1
- package/lib/esm/helium_entity_manager.js +1301 -223
- package/lib/esm/helium_entity_manager.js.map +1 -1
- package/lib/esm/helium_sub_daos.js +171 -363
- package/lib/esm/helium_sub_daos.js.map +1 -1
- package/lib/esm/lazy_distributor.js +1 -1
- package/lib/esm/lazy_transactions.js +38 -7
- package/lib/esm/lazy_transactions.js.map +1 -1
- package/lib/esm/mobile_entity_manager.js +30 -3
- package/lib/esm/mobile_entity_manager.js.map +1 -1
- package/lib/esm/price_oracle.js +1 -1
- package/lib/esm/rewards_oracle.js +77 -1
- package/lib/esm/rewards_oracle.js.map +1 -1
- package/lib/esm/treasury_management.js +1 -1
- package/lib/esm/voter_stake_registry.js +303 -172
- package/lib/esm/voter_stake_registry.js.map +1 -1
- package/lib/types/circuit_breaker.d.ts +1 -1
- package/lib/types/data_credits.d.ts +1 -1
- package/lib/types/fanout.d.ts +1 -6
- package/lib/types/fanout.d.ts.map +1 -1
- package/lib/types/helium_entity_manager.d.ts +1301 -223
- package/lib/types/helium_entity_manager.d.ts.map +1 -1
- package/lib/types/helium_sub_daos.d.ts +163 -355
- package/lib/types/helium_sub_daos.d.ts.map +1 -1
- package/lib/types/lazy_distributor.d.ts +1 -1
- package/lib/types/lazy_transactions.d.ts +38 -7
- package/lib/types/lazy_transactions.d.ts.map +1 -1
- package/lib/types/mobile_entity_manager.d.ts +30 -3
- package/lib/types/mobile_entity_manager.d.ts.map +1 -1
- package/lib/types/price_oracle.d.ts +1 -1
- package/lib/types/rewards_oracle.d.ts +77 -1
- package/lib/types/rewards_oracle.d.ts.map +1 -1
- package/lib/types/treasury_management.d.ts +1 -1
- package/lib/types/voter_stake_registry.d.ts +303 -172
- package/lib/types/voter_stake_registry.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type VoterStakeRegistry = {
|
|
2
|
-
"version": "0.0
|
|
2
|
+
"version": "0.2.0";
|
|
3
3
|
"name": "voter_stake_registry";
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -182,11 +182,6 @@ export type VoterStakeRegistry = {
|
|
|
182
182
|
"name": "tokenProgram";
|
|
183
183
|
"isMut": false;
|
|
184
184
|
"isSigner": false;
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"name": "rent";
|
|
188
|
-
"isMut": false;
|
|
189
|
-
"isSigner": false;
|
|
190
185
|
}
|
|
191
186
|
];
|
|
192
187
|
"args": [
|
|
@@ -302,7 +297,7 @@ export type VoterStakeRegistry = {
|
|
|
302
297
|
"accounts": [
|
|
303
298
|
{
|
|
304
299
|
"name": "registrar";
|
|
305
|
-
"isMut":
|
|
300
|
+
"isMut": true;
|
|
306
301
|
"isSigner": false;
|
|
307
302
|
"relations": [
|
|
308
303
|
"collection"
|
|
@@ -512,11 +507,6 @@ export type VoterStakeRegistry = {
|
|
|
512
507
|
"name": "tokenMetadataProgram";
|
|
513
508
|
"isMut": false;
|
|
514
509
|
"isSigner": false;
|
|
515
|
-
},
|
|
516
|
-
{
|
|
517
|
-
"name": "rent";
|
|
518
|
-
"isMut": false;
|
|
519
|
-
"isSigner": false;
|
|
520
510
|
}
|
|
521
511
|
];
|
|
522
512
|
"args": [
|
|
@@ -1235,61 +1225,299 @@ export type VoterStakeRegistry = {
|
|
|
1235
1225
|
}
|
|
1236
1226
|
];
|
|
1237
1227
|
"args": [];
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
"name": "voteV0";
|
|
1231
|
+
"accounts": [
|
|
1232
|
+
{
|
|
1233
|
+
"name": "payer";
|
|
1234
|
+
"isMut": true;
|
|
1235
|
+
"isSigner": true;
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "marker";
|
|
1239
|
+
"isMut": true;
|
|
1240
|
+
"isSigner": false;
|
|
1241
|
+
"pda": {
|
|
1242
|
+
"seeds": [
|
|
1243
|
+
{
|
|
1244
|
+
"kind": "const";
|
|
1245
|
+
"type": "string";
|
|
1246
|
+
"value": "marker";
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
"kind": "account";
|
|
1250
|
+
"type": "publicKey";
|
|
1251
|
+
"account": "Mint";
|
|
1252
|
+
"path": "mint";
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"kind": "account";
|
|
1256
|
+
"type": "publicKey";
|
|
1257
|
+
"account": "ProposalV0";
|
|
1258
|
+
"path": "proposal";
|
|
1259
|
+
}
|
|
1260
|
+
];
|
|
1261
|
+
};
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"name": "registrar";
|
|
1265
|
+
"isMut": false;
|
|
1266
|
+
"isSigner": false;
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"name": "voter";
|
|
1270
|
+
"isMut": false;
|
|
1271
|
+
"isSigner": true;
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"name": "position";
|
|
1275
|
+
"isMut": true;
|
|
1276
|
+
"isSigner": false;
|
|
1277
|
+
"relations": [
|
|
1278
|
+
"mint",
|
|
1279
|
+
"registrar"
|
|
1280
|
+
];
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"name": "mint";
|
|
1284
|
+
"isMut": false;
|
|
1285
|
+
"isSigner": false;
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
"name": "tokenAccount";
|
|
1289
|
+
"isMut": false;
|
|
1290
|
+
"isSigner": false;
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"name": "proposal";
|
|
1294
|
+
"isMut": true;
|
|
1295
|
+
"isSigner": false;
|
|
1296
|
+
"relations": [
|
|
1297
|
+
"proposal_config"
|
|
1298
|
+
];
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "proposalConfig";
|
|
1302
|
+
"isMut": false;
|
|
1303
|
+
"isSigner": false;
|
|
1304
|
+
"relations": [
|
|
1305
|
+
"on_vote_hook",
|
|
1306
|
+
"state_controller"
|
|
1307
|
+
];
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"name": "stateController";
|
|
1311
|
+
"isMut": true;
|
|
1312
|
+
"isSigner": false;
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"name": "onVoteHook";
|
|
1316
|
+
"isMut": false;
|
|
1317
|
+
"isSigner": false;
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
"name": "proposalProgram";
|
|
1321
|
+
"isMut": false;
|
|
1322
|
+
"isSigner": false;
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"name": "systemProgram";
|
|
1326
|
+
"isMut": false;
|
|
1327
|
+
"isSigner": false;
|
|
1328
|
+
}
|
|
1329
|
+
];
|
|
1330
|
+
"args": [
|
|
1331
|
+
{
|
|
1332
|
+
"name": "args";
|
|
1333
|
+
"type": {
|
|
1334
|
+
"defined": "VoteArgsV0";
|
|
1335
|
+
};
|
|
1336
|
+
}
|
|
1337
|
+
];
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
"name": "relinquishVoteV1";
|
|
1341
|
+
"accounts": [
|
|
1342
|
+
{
|
|
1343
|
+
"name": "refund";
|
|
1344
|
+
"isMut": true;
|
|
1345
|
+
"isSigner": false;
|
|
1346
|
+
"docs": [
|
|
1347
|
+
"Account to receive sol refund if marker is closed"
|
|
1348
|
+
];
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"name": "marker";
|
|
1352
|
+
"isMut": true;
|
|
1353
|
+
"isSigner": false;
|
|
1354
|
+
"pda": {
|
|
1355
|
+
"seeds": [
|
|
1356
|
+
{
|
|
1357
|
+
"kind": "const";
|
|
1358
|
+
"type": "string";
|
|
1359
|
+
"value": "marker";
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"kind": "account";
|
|
1363
|
+
"type": "publicKey";
|
|
1364
|
+
"account": "Mint";
|
|
1365
|
+
"path": "mint";
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
"kind": "account";
|
|
1369
|
+
"type": "publicKey";
|
|
1370
|
+
"account": "ProposalV0";
|
|
1371
|
+
"path": "proposal";
|
|
1372
|
+
}
|
|
1373
|
+
];
|
|
1374
|
+
};
|
|
1375
|
+
"relations": [
|
|
1376
|
+
"registrar",
|
|
1377
|
+
"mint"
|
|
1378
|
+
];
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"name": "registrar";
|
|
1382
|
+
"isMut": false;
|
|
1383
|
+
"isSigner": false;
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
"name": "voter";
|
|
1387
|
+
"isMut": false;
|
|
1388
|
+
"isSigner": true;
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
"name": "position";
|
|
1392
|
+
"isMut": true;
|
|
1393
|
+
"isSigner": false;
|
|
1394
|
+
"relations": [
|
|
1395
|
+
"mint",
|
|
1396
|
+
"registrar"
|
|
1397
|
+
];
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"name": "mint";
|
|
1401
|
+
"isMut": false;
|
|
1402
|
+
"isSigner": false;
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
"name": "tokenAccount";
|
|
1406
|
+
"isMut": false;
|
|
1407
|
+
"isSigner": false;
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"name": "proposal";
|
|
1411
|
+
"isMut": true;
|
|
1412
|
+
"isSigner": false;
|
|
1413
|
+
"relations": [
|
|
1414
|
+
"proposal_config"
|
|
1415
|
+
];
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"name": "proposalConfig";
|
|
1419
|
+
"isMut": false;
|
|
1420
|
+
"isSigner": false;
|
|
1421
|
+
"relations": [
|
|
1422
|
+
"on_vote_hook",
|
|
1423
|
+
"state_controller"
|
|
1424
|
+
];
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"name": "stateController";
|
|
1428
|
+
"isMut": true;
|
|
1429
|
+
"isSigner": false;
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"name": "onVoteHook";
|
|
1433
|
+
"isMut": false;
|
|
1434
|
+
"isSigner": false;
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"name": "proposalProgram";
|
|
1438
|
+
"isMut": false;
|
|
1439
|
+
"isSigner": false;
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
"name": "systemProgram";
|
|
1443
|
+
"isMut": false;
|
|
1444
|
+
"isSigner": false;
|
|
1445
|
+
}
|
|
1446
|
+
];
|
|
1447
|
+
"args": [
|
|
1448
|
+
{
|
|
1449
|
+
"name": "args";
|
|
1450
|
+
"type": {
|
|
1451
|
+
"defined": "RelinquishVoteArgsV1";
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
];
|
|
1238
1455
|
}
|
|
1239
1456
|
];
|
|
1240
1457
|
"accounts": [
|
|
1458
|
+
{
|
|
1459
|
+
"name": "voteMarkerV0";
|
|
1460
|
+
"type": {
|
|
1461
|
+
"kind": "struct";
|
|
1462
|
+
"fields": [
|
|
1463
|
+
{
|
|
1464
|
+
"name": "voter";
|
|
1465
|
+
"type": "publicKey";
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
"name": "registrar";
|
|
1469
|
+
"type": "publicKey";
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
"name": "proposal";
|
|
1473
|
+
"type": "publicKey";
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
"name": "mint";
|
|
1477
|
+
"type": "publicKey";
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"name": "choices";
|
|
1481
|
+
"type": {
|
|
1482
|
+
"vec": "u16";
|
|
1483
|
+
};
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
"name": "weight";
|
|
1487
|
+
"type": "u128";
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"name": "bumpSeed";
|
|
1491
|
+
"type": "u8";
|
|
1492
|
+
}
|
|
1493
|
+
];
|
|
1494
|
+
};
|
|
1495
|
+
},
|
|
1241
1496
|
{
|
|
1242
1497
|
"name": "maxVoterWeightRecord";
|
|
1243
|
-
"docs": [
|
|
1244
|
-
"MaxVoterWeightRecord account as defined in spl-governance-addin-api",
|
|
1245
|
-
"It's redefined here without account_discriminator for Anchor to treat it as native account",
|
|
1246
|
-
"",
|
|
1247
|
-
"The account is used as an api interface to provide max voting power to the governance program from external addin contracts"
|
|
1248
|
-
];
|
|
1249
1498
|
"type": {
|
|
1250
1499
|
"kind": "struct";
|
|
1251
1500
|
"fields": [
|
|
1252
1501
|
{
|
|
1253
1502
|
"name": "realm";
|
|
1254
|
-
"docs": [
|
|
1255
|
-
"The Realm the MaxVoterWeightRecord belongs to"
|
|
1256
|
-
];
|
|
1257
1503
|
"type": "publicKey";
|
|
1258
1504
|
},
|
|
1259
1505
|
{
|
|
1260
1506
|
"name": "governingTokenMint";
|
|
1261
|
-
"docs": [
|
|
1262
|
-
"Governing Token Mint the MaxVoterWeightRecord is associated with",
|
|
1263
|
-
"Note: The addin can take deposits of any tokens and is not restricted to the community or council tokens only"
|
|
1264
|
-
];
|
|
1265
1507
|
"type": "publicKey";
|
|
1266
1508
|
},
|
|
1267
1509
|
{
|
|
1268
1510
|
"name": "maxVoterWeight";
|
|
1269
|
-
"docs": [
|
|
1270
|
-
"Max voter weight",
|
|
1271
|
-
"The max voter weight provided by the addin for the given realm and governing_token_mint"
|
|
1272
|
-
];
|
|
1273
1511
|
"type": "u64";
|
|
1274
1512
|
},
|
|
1275
1513
|
{
|
|
1276
1514
|
"name": "maxVoterWeightExpiry";
|
|
1277
|
-
"docs": [
|
|
1278
|
-
"The slot when the max voting weight expires",
|
|
1279
|
-
"It should be set to None if the weight never expires",
|
|
1280
|
-
"If the max vote weight decays with time, for example for time locked based weights, then the expiry must be set",
|
|
1281
|
-
"As a pattern Revise instruction to update the max weight should be invoked before governance instruction within the same transaction",
|
|
1282
|
-
"and the expiry set to the current slot to provide up to date weight"
|
|
1283
|
-
];
|
|
1284
1515
|
"type": {
|
|
1285
1516
|
"option": "u64";
|
|
1286
1517
|
};
|
|
1287
1518
|
},
|
|
1288
1519
|
{
|
|
1289
1520
|
"name": "reserved";
|
|
1290
|
-
"docs": [
|
|
1291
|
-
"Reserved space for future versions"
|
|
1292
|
-
];
|
|
1293
1521
|
"type": {
|
|
1294
1522
|
"array": [
|
|
1295
1523
|
"u8",
|
|
@@ -1302,34 +1530,19 @@ export type VoterStakeRegistry = {
|
|
|
1302
1530
|
},
|
|
1303
1531
|
{
|
|
1304
1532
|
"name": "nftVoteRecord";
|
|
1305
|
-
"docs": [
|
|
1306
|
-
"Vote record indicating the given NFT voted on the Proposal",
|
|
1307
|
-
"The PDA of the record is [\"nft-vote-record\",proposal,nft_mint]",
|
|
1308
|
-
"It guarantees uniques and ensures the same NFT can't vote twice"
|
|
1309
|
-
];
|
|
1310
1533
|
"type": {
|
|
1311
1534
|
"kind": "struct";
|
|
1312
1535
|
"fields": [
|
|
1313
1536
|
{
|
|
1314
1537
|
"name": "proposal";
|
|
1315
|
-
"docs": [
|
|
1316
|
-
"Proposal which was voted on"
|
|
1317
|
-
];
|
|
1318
1538
|
"type": "publicKey";
|
|
1319
1539
|
},
|
|
1320
1540
|
{
|
|
1321
1541
|
"name": "nftMint";
|
|
1322
|
-
"docs": [
|
|
1323
|
-
"The mint of the NFT which was used for the vote"
|
|
1324
|
-
];
|
|
1325
1542
|
"type": "publicKey";
|
|
1326
1543
|
},
|
|
1327
1544
|
{
|
|
1328
1545
|
"name": "governingTokenOwner";
|
|
1329
|
-
"docs": [
|
|
1330
|
-
"The voter who casted this vote",
|
|
1331
|
-
"It's a Realm member pubkey corresponding to TokenOwnerRecord.governing_token_owner"
|
|
1332
|
-
];
|
|
1333
1546
|
"type": "publicKey";
|
|
1334
1547
|
}
|
|
1335
1548
|
];
|
|
@@ -1356,13 +1569,6 @@ export type VoterStakeRegistry = {
|
|
|
1356
1569
|
},
|
|
1357
1570
|
{
|
|
1358
1571
|
"name": "amountDepositedNative";
|
|
1359
|
-
"docs": [
|
|
1360
|
-
"Amount in deposited, in native currency. Withdraws of vested tokens",
|
|
1361
|
-
"directly reduce this amount.",
|
|
1362
|
-
"",
|
|
1363
|
-
"This directly tracks the total amount added by the user. They may",
|
|
1364
|
-
"never withdraw more than this amount."
|
|
1365
|
-
];
|
|
1366
1572
|
"type": "u64";
|
|
1367
1573
|
},
|
|
1368
1574
|
{
|
|
@@ -1380,15 +1586,16 @@ export type VoterStakeRegistry = {
|
|
|
1380
1586
|
{
|
|
1381
1587
|
"name": "bumpSeed";
|
|
1382
1588
|
"type": "u8";
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"name": "voteController";
|
|
1592
|
+
"type": "publicKey";
|
|
1383
1593
|
}
|
|
1384
1594
|
];
|
|
1385
1595
|
};
|
|
1386
1596
|
},
|
|
1387
1597
|
{
|
|
1388
1598
|
"name": "registrar";
|
|
1389
|
-
"docs": [
|
|
1390
|
-
"Instance of a voting rights distributor."
|
|
1391
|
-
];
|
|
1392
1599
|
"type": {
|
|
1393
1600
|
"kind": "struct";
|
|
1394
1601
|
"fields": [
|
|
@@ -1410,25 +1617,16 @@ export type VoterStakeRegistry = {
|
|
|
1410
1617
|
},
|
|
1411
1618
|
{
|
|
1412
1619
|
"name": "timeOffset";
|
|
1413
|
-
"docs": [
|
|
1414
|
-
"Debug only: time offset, to allow tests to move forward in time."
|
|
1415
|
-
];
|
|
1416
1620
|
"type": "i64";
|
|
1417
1621
|
},
|
|
1418
1622
|
{
|
|
1419
1623
|
"name": "positionUpdateAuthority";
|
|
1420
|
-
"docs": [
|
|
1421
|
-
"Allows a program to wrap updates to the position (transfer or reset lockup)"
|
|
1422
|
-
];
|
|
1423
1624
|
"type": {
|
|
1424
1625
|
"option": "publicKey";
|
|
1425
1626
|
};
|
|
1426
1627
|
},
|
|
1427
1628
|
{
|
|
1428
1629
|
"name": "collection";
|
|
1429
|
-
"docs": [
|
|
1430
|
-
"Storage for voting mints and their configuration."
|
|
1431
|
-
];
|
|
1432
1630
|
"type": "publicKey";
|
|
1433
1631
|
},
|
|
1434
1632
|
{
|
|
@@ -1470,66 +1668,33 @@ export type VoterStakeRegistry = {
|
|
|
1470
1668
|
},
|
|
1471
1669
|
{
|
|
1472
1670
|
"name": "voterWeightRecord";
|
|
1473
|
-
"docs": [
|
|
1474
|
-
"VoterWeightRecord account as defined in spl-governance-addin-api",
|
|
1475
|
-
"It's redefined here without account_discriminator for Anchor to treat it as native account",
|
|
1476
|
-
"",
|
|
1477
|
-
"The account is used as an api interface to provide voting power to the governance program from external addin contracts"
|
|
1478
|
-
];
|
|
1479
1671
|
"type": {
|
|
1480
1672
|
"kind": "struct";
|
|
1481
1673
|
"fields": [
|
|
1482
1674
|
{
|
|
1483
1675
|
"name": "realm";
|
|
1484
|
-
"docs": [
|
|
1485
|
-
"The Realm the VoterWeightRecord belongs to"
|
|
1486
|
-
];
|
|
1487
1676
|
"type": "publicKey";
|
|
1488
1677
|
},
|
|
1489
1678
|
{
|
|
1490
1679
|
"name": "governingTokenMint";
|
|
1491
|
-
"docs": [
|
|
1492
|
-
"Governing Token Mint the VoterWeightRecord is associated with",
|
|
1493
|
-
"Note: The addin can take deposits of any tokens and is not restricted to the community or council tokens only"
|
|
1494
|
-
];
|
|
1495
1680
|
"type": "publicKey";
|
|
1496
1681
|
},
|
|
1497
1682
|
{
|
|
1498
1683
|
"name": "governingTokenOwner";
|
|
1499
|
-
"docs": [
|
|
1500
|
-
"The owner of the governing token and voter",
|
|
1501
|
-
"This is the actual owner (voter) and corresponds to TokenOwnerRecord.governing_token_owner"
|
|
1502
|
-
];
|
|
1503
1684
|
"type": "publicKey";
|
|
1504
1685
|
},
|
|
1505
1686
|
{
|
|
1506
1687
|
"name": "voterWeight";
|
|
1507
|
-
"docs": [
|
|
1508
|
-
"Voter's weight",
|
|
1509
|
-
"The weight of the voter provided by the addin for the given realm, governing_token_mint and governing_token_owner (voter)"
|
|
1510
|
-
];
|
|
1511
1688
|
"type": "u64";
|
|
1512
1689
|
},
|
|
1513
1690
|
{
|
|
1514
1691
|
"name": "voterWeightExpiry";
|
|
1515
|
-
"docs": [
|
|
1516
|
-
"The slot when the voting weight expires",
|
|
1517
|
-
"It should be set to None if the weight never expires",
|
|
1518
|
-
"If the voter weight decays with time, for example for time locked based weights, then the expiry must be set",
|
|
1519
|
-
"As a common pattern Revise instruction to update the weight should be invoked before governance instruction within the same transaction",
|
|
1520
|
-
"and the expiry set to the current slot to provide up to date weight"
|
|
1521
|
-
];
|
|
1522
1692
|
"type": {
|
|
1523
1693
|
"option": "u64";
|
|
1524
1694
|
};
|
|
1525
1695
|
},
|
|
1526
1696
|
{
|
|
1527
1697
|
"name": "weightAction";
|
|
1528
|
-
"docs": [
|
|
1529
|
-
"The governance action the voter's weight pertains to",
|
|
1530
|
-
"It allows to provided voter's weight specific to the particular action the weight is evaluated for",
|
|
1531
|
-
"When the action is provided then the governance program asserts the executing action is the same as specified by the addin"
|
|
1532
|
-
];
|
|
1533
1698
|
"type": {
|
|
1534
1699
|
"option": {
|
|
1535
1700
|
"defined": "VoterWeightAction";
|
|
@@ -1538,21 +1703,12 @@ export type VoterStakeRegistry = {
|
|
|
1538
1703
|
},
|
|
1539
1704
|
{
|
|
1540
1705
|
"name": "weightActionTarget";
|
|
1541
|
-
"docs": [
|
|
1542
|
-
"The target the voter's weight action pertains to",
|
|
1543
|
-
"It allows to provided voter's weight specific to the target the weight is evaluated for",
|
|
1544
|
-
"For example when addin supplies weight to vote on a particular proposal then it must specify the proposal as the action target",
|
|
1545
|
-
"When the target is provided then the governance program asserts the target is the same as specified by the addin"
|
|
1546
|
-
];
|
|
1547
1706
|
"type": {
|
|
1548
1707
|
"option": "publicKey";
|
|
1549
1708
|
};
|
|
1550
1709
|
},
|
|
1551
1710
|
{
|
|
1552
1711
|
"name": "reserved";
|
|
1553
|
-
"docs": [
|
|
1554
|
-
"Reserved space for future versions"
|
|
1555
|
-
];
|
|
1556
1712
|
"type": {
|
|
1557
1713
|
"array": [
|
|
1558
1714
|
"u8",
|
|
@@ -1661,6 +1817,18 @@ export type VoterStakeRegistry = {
|
|
|
1661
1817
|
];
|
|
1662
1818
|
};
|
|
1663
1819
|
},
|
|
1820
|
+
{
|
|
1821
|
+
"name": "RelinquishVoteArgsV1";
|
|
1822
|
+
"type": {
|
|
1823
|
+
"kind": "struct";
|
|
1824
|
+
"fields": [
|
|
1825
|
+
{
|
|
1826
|
+
"name": "choice";
|
|
1827
|
+
"type": "u16";
|
|
1828
|
+
}
|
|
1829
|
+
];
|
|
1830
|
+
};
|
|
1831
|
+
},
|
|
1664
1832
|
{
|
|
1665
1833
|
"name": "ResetLockupArgsV0";
|
|
1666
1834
|
"type": {
|
|
@@ -1709,6 +1877,18 @@ export type VoterStakeRegistry = {
|
|
|
1709
1877
|
];
|
|
1710
1878
|
};
|
|
1711
1879
|
},
|
|
1880
|
+
{
|
|
1881
|
+
"name": "VoteArgsV0";
|
|
1882
|
+
"type": {
|
|
1883
|
+
"kind": "struct";
|
|
1884
|
+
"fields": [
|
|
1885
|
+
{
|
|
1886
|
+
"name": "choice";
|
|
1887
|
+
"type": "u16";
|
|
1888
|
+
}
|
|
1889
|
+
];
|
|
1890
|
+
};
|
|
1891
|
+
},
|
|
1712
1892
|
{
|
|
1713
1893
|
"name": "WithdrawArgsV0";
|
|
1714
1894
|
"type": {
|
|
@@ -1728,29 +1908,14 @@ export type VoterStakeRegistry = {
|
|
|
1728
1908
|
"fields": [
|
|
1729
1909
|
{
|
|
1730
1910
|
"name": "startTs";
|
|
1731
|
-
"docs": [
|
|
1732
|
-
"Start of the lockup.",
|
|
1733
|
-
"",
|
|
1734
|
-
"Note, that if start_ts is in the future, the funds are nevertheless",
|
|
1735
|
-
"locked up!",
|
|
1736
|
-
"",
|
|
1737
|
-
"Similarly vote power computations don't care about start_ts and always",
|
|
1738
|
-
"assume the full interval from now to end_ts."
|
|
1739
|
-
];
|
|
1740
1911
|
"type": "i64";
|
|
1741
1912
|
},
|
|
1742
1913
|
{
|
|
1743
1914
|
"name": "endTs";
|
|
1744
|
-
"docs": [
|
|
1745
|
-
"End of the lockup."
|
|
1746
|
-
];
|
|
1747
1915
|
"type": "i64";
|
|
1748
1916
|
},
|
|
1749
1917
|
{
|
|
1750
1918
|
"name": "kind";
|
|
1751
|
-
"docs": [
|
|
1752
|
-
"Type of lockup."
|
|
1753
|
-
];
|
|
1754
1919
|
"type": {
|
|
1755
1920
|
"defined": "LockupKind";
|
|
1756
1921
|
};
|
|
@@ -1760,73 +1925,35 @@ export type VoterStakeRegistry = {
|
|
|
1760
1925
|
},
|
|
1761
1926
|
{
|
|
1762
1927
|
"name": "VotingMintConfigV0";
|
|
1763
|
-
"docs": [
|
|
1764
|
-
"Exchange rate for an asset that can be used to mint voting rights.",
|
|
1765
|
-
"",
|
|
1766
|
-
"See documentation of configure_voting_mint for details on how",
|
|
1767
|
-
"native token amounts convert to vote weight."
|
|
1768
|
-
];
|
|
1769
1928
|
"type": {
|
|
1770
1929
|
"kind": "struct";
|
|
1771
1930
|
"fields": [
|
|
1772
1931
|
{
|
|
1773
1932
|
"name": "mint";
|
|
1774
|
-
"docs": [
|
|
1775
|
-
"Mint for this entry."
|
|
1776
|
-
];
|
|
1777
1933
|
"type": "publicKey";
|
|
1778
1934
|
},
|
|
1779
1935
|
{
|
|
1780
1936
|
"name": "baselineVoteWeightScaledFactor";
|
|
1781
|
-
"docs": [
|
|
1782
|
-
"Vote weight factor for all funds in the account, no matter if locked or not.",
|
|
1783
|
-
"",
|
|
1784
|
-
"In 1/SCALED_FACTOR_BASE units."
|
|
1785
|
-
];
|
|
1786
1937
|
"type": "u64";
|
|
1787
1938
|
},
|
|
1788
1939
|
{
|
|
1789
1940
|
"name": "maxExtraLockupVoteWeightScaledFactor";
|
|
1790
|
-
"docs": [
|
|
1791
|
-
"Maximum extra vote weight factor for lockups.",
|
|
1792
|
-
"",
|
|
1793
|
-
"This is the extra votes gained for lockups lasting lockup_saturation_secs or",
|
|
1794
|
-
"longer. Shorter lockups receive only a fraction of the maximum extra vote weight,",
|
|
1795
|
-
"based on lockup_time divided by lockup_saturation_secs.",
|
|
1796
|
-
"",
|
|
1797
|
-
"In 1/SCALED_FACTOR_BASE units."
|
|
1798
|
-
];
|
|
1799
1941
|
"type": "u64";
|
|
1800
1942
|
},
|
|
1801
1943
|
{
|
|
1802
1944
|
"name": "genesisVotePowerMultiplier";
|
|
1803
|
-
"docs": [
|
|
1804
|
-
"Genesis vote power multipliers for lockups.",
|
|
1805
|
-
"",
|
|
1806
|
-
"This is a multiplier applied to voting power for lockups created before",
|
|
1807
|
-
"genesis_extra_lockup_expiration"
|
|
1808
|
-
];
|
|
1809
1945
|
"type": "u8";
|
|
1810
1946
|
},
|
|
1811
1947
|
{
|
|
1812
1948
|
"name": "genesisVotePowerMultiplierExpirationTs";
|
|
1813
|
-
"docs": [
|
|
1814
|
-
"Timestamp of when to stop applying the genesis_extra_lockup_vote_weight_scaled_factor"
|
|
1815
|
-
];
|
|
1816
1949
|
"type": "i64";
|
|
1817
1950
|
},
|
|
1818
1951
|
{
|
|
1819
1952
|
"name": "lockupSaturationSecs";
|
|
1820
|
-
"docs": [
|
|
1821
|
-
"Number of seconds of lockup needed to reach the maximum lockup bonus."
|
|
1822
|
-
];
|
|
1823
1953
|
"type": "u64";
|
|
1824
1954
|
},
|
|
1825
1955
|
{
|
|
1826
1956
|
"name": "digitShift";
|
|
1827
|
-
"docs": [
|
|
1828
|
-
"Number of digits to shift native amounts, applying a 10^digit_shift factor."
|
|
1829
|
-
];
|
|
1830
1957
|
"type": "i8";
|
|
1831
1958
|
}
|
|
1832
1959
|
];
|
|
@@ -1851,10 +1978,6 @@ export type VoterStakeRegistry = {
|
|
|
1851
1978
|
},
|
|
1852
1979
|
{
|
|
1853
1980
|
"name": "VoterWeightAction";
|
|
1854
|
-
"docs": [
|
|
1855
|
-
"VoterWeightAction enum as defined in spl-governance-addin-api",
|
|
1856
|
-
"It's redefined here for Anchor to export it to IDL"
|
|
1857
|
-
];
|
|
1858
1981
|
"type": {
|
|
1859
1982
|
"kind": "enum";
|
|
1860
1983
|
"variants": [
|
|
@@ -2167,6 +2290,14 @@ export type VoterStakeRegistry = {
|
|
|
2167
2290
|
"code": 6057;
|
|
2168
2291
|
"name": "SamePosition";
|
|
2169
2292
|
"msg": "Cannot transfer to the same position";
|
|
2293
|
+
},
|
|
2294
|
+
{
|
|
2295
|
+
"code": 6058;
|
|
2296
|
+
"name": "MaxChoicesExceeded";
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
"code": 6059;
|
|
2300
|
+
"name": "NoVoteForThisChoice";
|
|
2170
2301
|
}
|
|
2171
2302
|
];
|
|
2172
2303
|
};
|