@argonprotocol/mainchain 1.5.2-dev.aad85636 → 1.5.2-dev.eeea0796

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argonprotocol/mainchain",
3
- "version": "1.5.2-dev.aad85636",
3
+ "version": "1.5.2-dev.eeea0796",
4
4
  "description": "A client for accessing the Argon mainchain apis.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -68,7 +68,7 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@argonprotocol/ethereum-contracts": "workspace:*",
71
- "@argonprotocol/testing": "1.5.2-dev.aad85636",
71
+ "@argonprotocol/testing": "1.5.2-dev.eeea0796",
72
72
  "@polkadot/typegen": "^17.0.1",
73
73
  "@substrate/ss58-registry": "^1.51.0",
74
74
  "@types/node": "^20",
@@ -1,4 +1,5 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
+ /* eslint-disable */
2
3
 
3
4
  // import type lookup before we augment - in some environments
4
5
  // this is required to allow for ambient/previous definitions
@@ -271,6 +272,8 @@ declare module '@polkadot/api-base/types/consts' {
271
272
  * The increment that bids can be on (for instance, one cent increments)
272
273
  **/
273
274
  bidIncrements: u128 & AugmentedConst<ApiType>;
275
+ bidRevealBlocks: u32 & AugmentedConst<ApiType>;
276
+ bidSettlementBuffer: u32 & AugmentedConst<ApiType>;
274
277
  /**
275
278
  * The number of frames a miner operates for
276
279
  **/
@@ -279,6 +282,10 @@ declare module '@polkadot/api-base/types/consts' {
279
282
  * The initial argonots needed per seat before a prior-day median is available.
280
283
  **/
281
284
  initialArgonotsPerSeat: u128 & AugmentedConst<ApiType>;
285
+ /**
286
+ * Maximum commitments, including public bids, admitted per block.
287
+ **/
288
+ maxBidsPerBlock: u32 & AugmentedConst<ApiType>;
282
289
  /**
283
290
  * How many new miners can be in the cohort for each slot. The actual maximum will adjust
284
291
  * dynamically
@@ -902,6 +902,14 @@ declare module '@polkadot/api-base/types/errors' {
902
902
  NotebookIncludesExpiredLocalchainTransfer: AugmentedError<ApiType>;
903
903
  };
904
904
  miningSlot: {
905
+ /**
906
+ * The bid batch cannot settle until its reveal window has ended.
907
+ **/
908
+ BatchNotMature: AugmentedError<ApiType>;
909
+ /**
910
+ * The pending bid's maximum has already been revealed.
911
+ **/
912
+ BidAlreadyRevealed: AugmentedError<ApiType>;
905
913
  /**
906
914
  * The mining bid cannot be reduced
907
915
  **/
@@ -918,6 +926,10 @@ declare module '@polkadot/api-base/types/errors' {
918
926
  * An account can only have one active registration
919
927
  **/
920
928
  CannotRegisterOverlappingSessions: AugmentedError<ApiType>;
929
+ /**
930
+ * The miner already has a pending bid awaiting settlement.
931
+ **/
932
+ DuplicateBidCommitment: AugmentedError<ApiType>;
921
933
  /**
922
934
  * The funding account does not have enough funds to cover the bid
923
935
  **/
@@ -930,14 +942,38 @@ declare module '@polkadot/api-base/types/errors' {
930
942
  * Bids must be in allowed increments
931
943
  **/
932
944
  InvalidBidAmount: AugmentedError<ApiType>;
945
+ /**
946
+ * The revealed maximum and salt do not match the pending bid's hash.
947
+ **/
948
+ InvalidBidCommitment: AugmentedError<ApiType>;
949
+ /**
950
+ * The revealed maximum is lower than the public bid.
951
+ **/
952
+ InvalidBidRange: AugmentedError<ApiType>;
953
+ /**
954
+ * A maximum must be revealed in a block after submission and within the reveal window.
955
+ **/
956
+ InvalidRevealBlock: AugmentedError<ApiType>;
957
+ /**
958
+ * The miner has no pending bid with a committed maximum to reveal.
959
+ **/
960
+ MissingBidCommitment: AugmentedError<ApiType>;
933
961
  /**
934
962
  * Mining slot bidding currently requires a prior operational-account upgrade.
935
963
  **/
936
964
  OperationalAccountRegistrationRequired: AugmentedError<ApiType>;
965
+ /**
966
+ * Bidding with a committed maximum is not enabled for the current auction frame.
967
+ **/
968
+ RangeAuctionNotActive: AugmentedError<ApiType>;
937
969
  /**
938
970
  * Bidding for the next cohort has closed
939
971
  **/
940
972
  SlotNotTakingBids: AugmentedError<ApiType>;
973
+ /**
974
+ * This block has reached the maximum number of pending bid submissions.
975
+ **/
976
+ TooManyBidCommitments: AugmentedError<ApiType>;
941
977
  /**
942
978
  * The cohort registration overflowed
943
979
  **/
@@ -946,6 +982,10 @@ declare module '@polkadot/api-base/types/errors' {
946
982
  * The argonots on hold cannot be released
947
983
  **/
948
984
  UnrecoverableHold: AugmentedError<ApiType>;
985
+ /**
986
+ * The bid targets a different auction frame than the current one.
987
+ **/
988
+ WrongBidFrame: AugmentedError<ApiType>;
949
989
  };
950
990
  mint: {
951
991
  TooManyPendingMints: AugmentedError<ApiType>;
@@ -1114,6 +1114,14 @@ declare module '@polkadot/api-base/types/events' {
1114
1114
  >;
1115
1115
  };
1116
1116
  miningSlot: {
1117
+ BidCommitted: AugmentedEvent<
1118
+ ApiType,
1119
+ [accountId: AccountId32, targetFrameId: u64],
1120
+ { accountId: AccountId32; targetFrameId: u64 }
1121
+ >;
1122
+ BidLost: AugmentedEvent<ApiType, [accountId: AccountId32], { accountId: AccountId32 }>;
1123
+ BidRejected: AugmentedEvent<ApiType, [accountId: AccountId32], { accountId: AccountId32 }>;
1124
+ BidRevealed: AugmentedEvent<ApiType, [accountId: AccountId32], { accountId: AccountId32 }>;
1117
1125
  /**
1118
1126
  * Bids are closed due to the VRF randomized function triggering
1119
1127
  **/
@@ -1164,6 +1172,11 @@ declare module '@polkadot/api-base/types/events' {
1164
1172
  [accountId: AccountId32, preservedArgonotHold: bool],
1165
1173
  { accountId: AccountId32; preservedArgonotHold: bool }
1166
1174
  >;
1175
+ WinningBidPriceChanged: AugmentedEvent<
1176
+ ApiType,
1177
+ [accountId: AccountId32, bidAmount: u128],
1178
+ { accountId: AccountId32; bidAmount: u128 }
1179
+ >;
1167
1180
  };
1168
1181
  mint: {
1169
1182
  /**
@@ -1,4 +1,5 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
+ /* eslint-disable */
2
3
 
3
4
  // import type lookup before we augment - in some environments
4
5
  // this is required to allow for ambient/previous definitions
@@ -95,7 +96,9 @@ import type {
95
96
  PalletGrandpaStoredState,
96
97
  PalletLocalchainTransferQueuedTransferOut,
97
98
  PalletMiningSlotMinerNonceScoring,
99
+ PalletMiningSlotPendingBid,
98
100
  PalletMiningSlotSeatPriceStats,
101
+ PalletMiningSlotStandingBid,
99
102
  PalletMintMintAction,
100
103
  PalletMintMintQueueCursor,
101
104
  PalletMintPendingBitcoinMint,
@@ -1101,6 +1104,11 @@ declare module '@polkadot/api-base/types/storage' {
1101
1104
  * Argonots that must be locked to take a Miner role
1102
1105
  **/
1103
1106
  argonotsPerMiningSeat: AugmentedQuery<ApiType, () => Observable<u128>, []>;
1107
+ auctionAdmissionClosed: AugmentedQuery<ApiType, () => Observable<bool>, []>;
1108
+ /**
1109
+ * Zero on fresh chains. Upgrades finish the deployed fixed-price auction first.
1110
+ **/
1111
+ auctionRulesStartAt: AugmentedQuery<ApiType, () => Observable<u64>, []>;
1104
1112
  /**
1105
1113
  * Winning bid totals and seat counts for averaging prices over the last 10 frames (newest
1106
1114
  * first).
@@ -1110,6 +1118,14 @@ declare module '@polkadot/api-base/types/storage' {
1110
1118
  () => Observable<Vec<PalletMiningSlotSeatPriceStats>>,
1111
1119
  []
1112
1120
  >;
1121
+ /**
1122
+ * Vector position is canonical commitment order, including calls inside utility batches.
1123
+ **/
1124
+ bidBatches: AugmentedQuery<
1125
+ ApiType,
1126
+ (arg: u32 | AnyNumber | Uint8Array) => Observable<Vec<AccountId32>>,
1127
+ [u32]
1128
+ >;
1113
1129
  /**
1114
1130
  * The cohort set to go into effect in the next slot. The Vec has all
1115
1131
  * registrants with their bid amount
@@ -1131,9 +1147,14 @@ declare module '@polkadot/api-base/types/storage' {
1131
1147
  * The previous 10 frame start ticks
1132
1148
  **/
1133
1149
  frameStartTicks: AugmentedQuery<ApiType, () => Observable<BTreeMap<u64, u64>>, []>;
1150
+ /**
1151
+ * Whether the current auction has an accepted price, including a valid zero price.
1152
+ **/
1153
+ hasAcceptedBidPrice: AugmentedQuery<ApiType, () => Observable<bool>, []>;
1134
1154
  hasAddedGrandpaRotation: AugmentedQuery<ApiType, () => Observable<bool>, []>;
1135
1155
  /**
1136
- * The number of bids per slot for the last 10 slots (newest first)
1156
+ * Bid activity and accepted prices for the last 10 auctions (newest first).
1157
+ * Activity counts committed submissions and automatic standing-bid price increases.
1137
1158
  **/
1138
1159
  historicalBidsPerSlot: AugmentedQuery<
1139
1160
  ApiType,
@@ -1144,6 +1165,7 @@ declare module '@polkadot/api-base/types/storage' {
1144
1165
  * Is the next slot still open for bids
1145
1166
  **/
1146
1167
  isNextSlotBiddingOpen: AugmentedQuery<ApiType, () => Observable<bool>, []>;
1168
+ lastBidBlock: AugmentedQuery<ApiType, () => Observable<Option<u32>>, []>;
1147
1169
  /**
1148
1170
  * This is a lookup of each miner's nonce to use when picking a best authority to submit a
1149
1171
  * block. It's a blake2 256 hash of the miner account id and the block hash at time of
@@ -1185,6 +1207,11 @@ declare module '@polkadot/api-base/types/storage' {
1185
1207
  * cohorts.
1186
1208
  **/
1187
1209
  nextFrameId: AugmentedQuery<ApiType, () => Observable<u64>, []>;
1210
+ pendingBids: AugmentedQuery<
1211
+ ApiType,
1212
+ (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletMiningSlotPendingBid>>,
1213
+ [AccountId32]
1214
+ >;
1188
1215
  /**
1189
1216
  * The miners released in the last block (only kept for a single block)
1190
1217
  **/
@@ -1203,6 +1230,11 @@ declare module '@polkadot/api-base/types/storage' {
1203
1230
  () => Observable<BTreeMap<u64, u32>>,
1204
1231
  []
1205
1232
  >;
1233
+ standingBids: AugmentedQuery<
1234
+ ApiType,
1235
+ (arg: AccountId32 | string | Uint8Array) => Observable<Option<PalletMiningSlotStandingBid>>,
1236
+ [AccountId32]
1237
+ >;
1206
1238
  /**
1207
1239
  * Temporary store the frame info digest
1208
1240
  **/
@@ -1,4 +1,5 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
+ /* eslint-disable */
2
3
 
3
4
  // import type lookup before we augment - in some environments
4
5
  // this is required to allow for ambient/previous definitions
@@ -866,28 +866,9 @@ declare module '@polkadot/api-base/types/submittable' {
866
866
  };
867
867
  miningSlot: {
868
868
  /**
869
- * Submit a bid for a mining slot in the next cohort. Once all spots are filled in the next
870
- * cohort, a bidder can be supplanted by supplying a higher bid.
871
- *
872
- * Each slot has `MaxCohortSize` spots available.
873
- *
874
- * To be eligible for a slot, you must have the required ownership tokens (argonots) in
875
- * this account. The required amount is calculated as a percentage of the total ownership
876
- * tokens in the network. This percentage is adjusted before the beginning of each slot.
877
- *
878
- * If your bid is no longer winning, a `SlotBidderDropped` event will be emitted. By
879
- * monitoring for this event, you will be able to ensure your bid is accepted.
880
- *
881
- * NOTE: bidding for each slot will be closed at a random block within
882
- * `mining_config.ticks_before_bid_end_for_vrf_close` blocks of the slot end time.
883
- *
884
- * The slot duration can be calculated as `BlocksBetweenSlots * MaxMiners / MaxCohortSize`.
885
- *
886
- * Parameters:
887
- * - `bid`: The amount of argons to bid
888
- * - `keys`: The session "hot" keys for the slot (BlockSealAuthorityId and GrandpaId).
889
- * - `mining_account_id`: This account_id allows you to operate as this miner account id,
890
- * but use funding (argonots and bid) from the submitting account
869
+ * Submit a funded public bid, optionally committing to a hidden maximum.
870
+ * Every bid competes at its public amount even if no maximum is revealed.
871
+ * An omitted target frame selects the current auction at dispatch time.
891
872
  **/
892
873
  bid: AugmentedSubmittable<
893
874
  (
@@ -898,8 +879,23 @@ declare module '@polkadot/api-base/types/submittable' {
898
879
  | string
899
880
  | Uint8Array,
900
881
  miningAccountId: Option<AccountId32> | null | Uint8Array | AccountId32 | string,
882
+ targetFrameId: Option<u64> | null | Uint8Array | u64 | AnyNumber,
883
+ maxHash: Option<U8aFixed> | null | Uint8Array | U8aFixed | string,
884
+ ) => SubmittableExtrinsic<ApiType>,
885
+ [u128, ArgonRuntimeSessionKeys, Option<AccountId32>, Option<u64>, Option<U8aFixed>]
886
+ >;
887
+ /**
888
+ * Disclose a committed maximum during the five blocks following submission.
889
+ * The target frame must match the original bid and the current auction.
890
+ **/
891
+ bidMax: AugmentedSubmittable<
892
+ (
893
+ max: u128 | AnyNumber | Uint8Array,
894
+ salt: U8aFixed | string | Uint8Array,
895
+ miningAccountId: Option<AccountId32> | null | Uint8Array | AccountId32 | string,
896
+ targetFrameId: u64 | AnyNumber | Uint8Array,
901
897
  ) => SubmittableExtrinsic<ApiType>,
902
- [u128, ArgonRuntimeSessionKeys, Option<AccountId32>]
898
+ [u128, U8aFixed, Option<AccountId32>, u64]
903
899
  >;
904
900
  /**
905
901
  * Admin function to update the mining slot delay.
@@ -1,4 +1,5 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
+ /* eslint-disable */
2
3
 
3
4
  import './augment-api-consts.js';
4
5
  import './augment-api-errors.js';
@@ -1,4 +1,5 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-defs`, do not edit
2
+ /* eslint-disable */
2
3
 
3
4
  // import type lookup before we augment - in some environments
4
5
  // this is required to allow for ambient/previous definitions