@argonprotocol/mainchain 1.4.3-dev.4408f4ff → 1.4.3-dev.4544e954

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.
Files changed (35) hide show
  1. package/browser/artifacts/contracts/ArgonToken.sol/ArgonToken.json +671 -0
  2. package/browser/artifacts/contracts/ArgonotToken.sol/ArgonotToken.json +671 -0
  3. package/browser/artifacts/contracts/MintingGateway.sol/MintingGateway.json +1688 -0
  4. package/browser/artifacts/contracts/ProxyArtifacts.sol/ProxyAdmin.json +135 -0
  5. package/browser/artifacts/contracts/ProxyArtifacts.sol/TransparentUpgradeableProxy.json +131 -0
  6. package/browser/index.d.ts +1838 -482
  7. package/browser/index.js +6083 -499
  8. package/browser/index.js.map +1 -1
  9. package/lib/artifacts/contracts/ArgonToken.sol/ArgonToken.json +671 -0
  10. package/lib/artifacts/contracts/ArgonotToken.sol/ArgonotToken.json +671 -0
  11. package/lib/artifacts/contracts/MintingGateway.sol/MintingGateway.json +1688 -0
  12. package/lib/artifacts/contracts/ProxyArtifacts.sol/ProxyAdmin.json +135 -0
  13. package/lib/artifacts/contracts/ProxyArtifacts.sol/TransparentUpgradeableProxy.json +131 -0
  14. package/lib/index.cjs +6111 -531
  15. package/lib/index.cjs.map +1 -1
  16. package/lib/index.d.cts +1838 -482
  17. package/lib/index.d.ts +1838 -482
  18. package/lib/index.js +6107 -527
  19. package/lib/index.js.map +1 -1
  20. package/package.json +3 -3
  21. package/src/interfaces/augment-api-consts.ts +59 -7
  22. package/src/interfaces/augment-api-errors.ts +209 -13
  23. package/src/interfaces/augment-api-events.ts +295 -13
  24. package/src/interfaces/augment-api-query.ts +281 -27
  25. package/src/interfaces/augment-api-rpc.ts +1 -1
  26. package/src/interfaces/augment-api-runtime.ts +1 -28
  27. package/src/interfaces/augment-api-tx.ts +138 -24
  28. package/src/interfaces/augment-api.ts +0 -1
  29. package/src/interfaces/augment-types.ts +7 -4
  30. package/src/interfaces/definitions.ts +11 -26
  31. package/src/interfaces/ethereum/index.ts +0 -1
  32. package/src/interfaces/ethereum/types.ts +17 -6
  33. package/src/interfaces/lookup.ts +689 -301
  34. package/src/interfaces/registry.ts +48 -11
  35. package/src/interfaces/types-lookup.ts +833 -321
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@argonprotocol/mainchain",
3
- "version": "1.4.3-dev.4408f4ff",
3
+ "version": "1.4.3-dev.4544e954",
4
4
  "description": "A client for accessing the Argon mainchain apis.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "test": "vitest --run --config vitest.config.ts",
20
20
  "tsc": "yarn workspace @argonprotocol/ethereum-contracts build && tsup",
21
21
  "watch": "tsup --watch",
22
- "typecheck": "tsc --noEmit"
22
+ "typecheck": "tsc --noEmit -p tsconfig.test.json"
23
23
  },
24
24
  "files": [
25
25
  "lib/",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@argonprotocol/ethereum-contracts": "workspace:*",
68
- "@argonprotocol/testing": "1.4.3-dev.4408f4ff",
68
+ "@argonprotocol/testing": "1.4.3-dev.4544e954",
69
69
  "@polkadot/typegen": "^16.5.6",
70
70
  "@substrate/ss58-registry": "^1.51.0",
71
71
  "@types/node": "^20",
@@ -1,12 +1,11 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
- /* eslint-disable */
3
2
 
4
3
  // import type lookup before we augment - in some environments
5
4
  // this is required to allow for ambient/previous definitions
6
- import '@polkadot/api-base/types/consts';
5
+ import type {} from '@polkadot/api-base/types/consts';
7
6
 
8
7
  import type { ApiTypes, AugmentedConst } from '@polkadot/api-base/types';
9
- import type { bool, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
8
+ import type { u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
10
9
  import type { ITuple } from '@polkadot/types-codec/types';
11
10
  import type { AccountId32, Percent } from '@polkadot/types/interfaces/runtime';
12
11
  import type {
@@ -161,25 +160,74 @@ declare module '@polkadot/api-base/types/consts' {
161
160
  targetBlockVotes: u128 & AugmentedConst<ApiType>;
162
161
  };
163
162
  crosschainTransfer: {
163
+ /**
164
+ * Minimum remaining frame commitment required when reading vault committed collateral
165
+ * capacity for council weighting and Minting Authority collateral.
166
+ **/
167
+ councilRotationFrames: u64 & AugmentedConst<ApiType>;
168
+ /**
169
+ * Default minimum normalized microgon value required to register a Minting Authority on
170
+ * one destination chain.
171
+ **/
172
+ defaultMinimumMintingAuthorityMicrogonValue: u128 & AugmentedConst<ApiType>;
164
173
  /**
165
174
  * Canonical Ethereum burn-accounting account representing funds moved to Ethereum.
166
175
  **/
167
176
  ethereumBurnAccount: AccountId32 & AugmentedConst<ApiType>;
177
+ /**
178
+ * Maximum number of ordered gateway activities that may share one receipt proof.
179
+ **/
180
+ maxActivitiesPerReceiptProof: u32 & AugmentedConst<ApiType>;
181
+ /**
182
+ * Maximum number of members the active Global Issuance Council may carry.
183
+ **/
184
+ maxCouncilMembers: u32 & AugmentedConst<ApiType>;
185
+ /**
186
+ * Maximum number of non-terminal transfer-out requests tracked for one destination chain.
187
+ **/
188
+ maxPendingTransferOutsPerDestinationChain: u32 & AugmentedConst<ApiType>;
189
+ /**
190
+ * Maximum execution headers carried in one receipt proof's target-to-anchor chain.
191
+ **/
192
+ maxProofExecutionHeaderDepth: u32 & AugmentedConst<ApiType>;
193
+ /**
194
+ * Maximum number of contiguous queue approvals one council member may submit in one call.
195
+ **/
196
+ maxQueueApprovalsPerCall: u32 & AugmentedConst<ApiType>;
197
+ /**
198
+ * Maximum number of proven receipt proofs that may be supplied in one extrinsic.
199
+ **/
200
+ maxReceiptProofsPerExtrinsic: u32 & AugmentedConst<ApiType>;
201
+ /**
202
+ * Maximum age, in ticks, of the verified Ethereum execution anchor used to open a
203
+ * transfer out.
204
+ **/
205
+ maxVerifiedExecutionBlockAgeTicks: u64 & AugmentedConst<ApiType>;
206
+ /**
207
+ * Minimum normalized collateral increment accepted for one transfer unless the increment
208
+ * completes the remaining uncovered amount.
209
+ **/
210
+ minTransferCollateralIncrement: u128 & AugmentedConst<ApiType>;
168
211
  /**
169
212
  * Retention window, in ticks, for recent Argon transfer evidence used by operational
170
213
  * accounts.
171
214
  **/
172
215
  recentTransferRetentionTicks: u64 & AugmentedConst<ApiType>;
216
+ /**
217
+ * Minting authority tip rate applied to transfer-out requests in basis points.
218
+ **/
219
+ transferOutMintingAuthorityTipBasisPoints: u32 & AugmentedConst<ApiType>;
220
+ /**
221
+ * Ethereum-block window added to the latest verified block when opening a
222
+ * transfer out.
223
+ **/
224
+ transferOutValidityEthereumBlocks: u64 & AugmentedConst<ApiType>;
173
225
  };
174
226
  ethereumVerifier: {
175
227
  /**
176
228
  * Minimum gap between finalized headers for an update to be free.
177
229
  **/
178
230
  freeHeadersInterval: u32 & AugmentedConst<ApiType>;
179
- /**
180
- * Whether the read-only event-log verification API is enabled.
181
- **/
182
- verifyEventLogApiEnabled: bool & AugmentedConst<ApiType>;
183
231
  };
184
232
  grandpa: {
185
233
  /**
@@ -396,6 +444,10 @@ declare module '@polkadot/api-base/types/consts' {
396
444
  * no corresponding constant for time to recovery to target
397
445
  **/
398
446
  maxArgonChangePerTickAwayFromTarget: u128 & AugmentedConst<ApiType>;
447
+ /**
448
+ * Maximum number of per-frame Argonot floor buckets to retain.
449
+ **/
450
+ maxArgonotFloorHistoryFrames: u32 & AugmentedConst<ApiType>;
399
451
  maxArgonTargetChangePerTick: u128 & AugmentedConst<ApiType>;
400
452
  /**
401
453
  * The maximum number of ticks to preserve a price index
@@ -3,7 +3,7 @@
3
3
 
4
4
  // import type lookup before we augment - in some environments
5
5
  // this is required to allow for ambient/previous definitions
6
- import '@polkadot/api-base/types/errors';
6
+ import type {} from '@polkadot/api-base/types/errors';
7
7
 
8
8
  import type { ApiTypes, AugmentedError } from '@polkadot/api-base/types';
9
9
 
@@ -354,39 +354,222 @@ declare module '@polkadot/api-base/types/errors' {
354
354
  };
355
355
  crosschainTransfer: {
356
356
  /**
357
- * The captured reimbursable fee is greater than or equal to the burned Argon amount.
357
+ * The force-set cut would discard a queue entry that already has local quorum.
358
358
  **/
359
- InsufficientBurnAmountForFee: AugmentedError<ApiType>;
359
+ CannotForceSetQuorumApprovedQueueEntry: AugmentedError<ApiType>;
360
+ /**
361
+ * This council member already approved the queued Minting Authority.
362
+ **/
363
+ CouncilApprovalAlreadyRecorded: AugmentedError<ApiType>;
364
+ /**
365
+ * The Minting Authority approval queue entry does not exist.
366
+ **/
367
+ CouncilApprovalQueueEntryNotFound: AugmentedError<ApiType>;
368
+ /**
369
+ * The account has not registered a council signer for this destination chain.
370
+ **/
371
+ CouncilSignerNotRegistered: AugmentedError<ApiType>;
372
+ /**
373
+ * The supplied Global Issuance Council contains the same account more than once.
374
+ **/
375
+ DuplicateGlobalIssuanceCouncilAccount: AugmentedError<ApiType>;
376
+ /**
377
+ * The supplied Global Issuance Council contains the same signer more than once.
378
+ **/
379
+ DuplicateGlobalIssuanceCouncilSigner: AugmentedError<ApiType>;
380
+ /**
381
+ * This source chain is paused due to gateway sync misalignment and needs operator
382
+ * recovery.
383
+ **/
384
+ GatewaySyncPaused: AugmentedError<ApiType>;
385
+ /**
386
+ * The origin is not an active Global Issuance Council member for the destination chain.
387
+ **/
388
+ GlobalIssuanceCouncilMemberNotFound: AugmentedError<ApiType>;
389
+ /**
390
+ * The active Global Issuance Council has not been seeded for this destination chain.
391
+ **/
392
+ GlobalIssuanceCouncilNotFound: AugmentedError<ApiType>;
393
+ /**
394
+ * The operator does not have enough remaining committed Argonot collateral for this
395
+ * Minting Authority.
396
+ **/
397
+ InsufficientCommittedArgonotCollateral: AugmentedError<ApiType>;
398
+ /**
399
+ * The operator does not have enough remaining committed microgon collateral for this
400
+ * Minting Authority.
401
+ **/
402
+ InsufficientCommittedMicrogonCollateral: AugmentedError<ApiType>;
360
403
  /**
361
404
  * The burn account lacks enough balance for the payout.
362
405
  **/
363
406
  InsufficientLiquidity: AugmentedError<ApiType>;
364
407
  /**
365
- * The claimed amount was zero or too large for the local balance type.
408
+ * The authority does not have enough remaining gateway collateral for this transfer row.
366
409
  **/
367
- InvalidAmount: AugmentedError<ApiType>;
410
+ InsufficientMintingAuthorityCollateral: AugmentedError<ApiType>;
368
411
  /**
369
412
  * The configured source-chain shape is incomplete or malformed.
370
413
  **/
371
414
  InvalidChainConfig: AugmentedError<ApiType>;
372
415
  /**
373
- * The Ethereum event topics or payload do not match `BurnForTransfer`.
416
+ * The provided council approval signature did not match the expected Ethereum signer.
417
+ **/
418
+ InvalidCouncilApprovalSignature: AugmentedError<ApiType>;
419
+ /**
420
+ * The provided council signer proof did not match the recovered Ethereum signer.
421
+ **/
422
+ InvalidCouncilSignerProof: AugmentedError<ApiType>;
423
+ /**
424
+ * The force-set cut point was behind already confirmed queue progress.
425
+ **/
426
+ InvalidForceSetAfterNonce: AugmentedError<ApiType>;
427
+ /**
428
+ * The Ethereum event topics or payload do not match a supported gateway activity.
429
+ **/
430
+ InvalidGatewayActivity: AugmentedError<ApiType>;
431
+ /**
432
+ * The supplied Global Issuance Council is empty or internally inconsistent.
433
+ **/
434
+ InvalidGlobalIssuanceCouncil: AugmentedError<ApiType>;
435
+ /**
436
+ * The council-managed Argonot floor could not be determined from current pricing.
437
+ **/
438
+ InvalidMicrogonsPerArgonot: AugmentedError<ApiType>;
439
+ /**
440
+ * The configured activation repayment pricing is internally invalid.
374
441
  **/
375
- InvalidEthereumEvent: AugmentedError<ApiType>;
442
+ InvalidMintingAuthorityActivationRepaymentPricing: AugmentedError<ApiType>;
443
+ /**
444
+ * The supplied Minting Authority collateral is invalid.
445
+ **/
446
+ InvalidMintingAuthorityCollateral: AugmentedError<ApiType>;
447
+ /**
448
+ * The provided signer-authorized deactivation signature did not match the expected
449
+ * Minting Authority signing key.
450
+ **/
451
+ InvalidMintingAuthorityDeactivationSignature: AugmentedError<ApiType>;
452
+ /**
453
+ * The supplied Minting Authority signing key is invalid.
454
+ **/
455
+ InvalidMintingAuthoritySigningKey: AugmentedError<ApiType>;
456
+ /**
457
+ * The provided Minting Authority signer proof did not match the recovered Ethereum
458
+ * signer.
459
+ **/
460
+ InvalidMintingAuthoritySigningKeyProof: AugmentedError<ApiType>;
376
461
  /**
377
462
  * The Ethereum verifier rejected the supplied proof.
378
463
  **/
379
464
  InvalidProof: AugmentedError<ApiType>;
380
465
  /**
381
- * The destination account bytes could not be decoded into a local account id.
466
+ * The provided transfer collateral row is invalid for this transfer asset.
467
+ **/
468
+ InvalidTransferCollateral: AugmentedError<ApiType>;
469
+ /**
470
+ * The transfer collateral signature did not match the authority signing key.
471
+ **/
472
+ InvalidTransferCollateralSignature: AugmentedError<ApiType>;
473
+ /**
474
+ * The provided transfer collateral row did not advance the signer's local reservation.
475
+ **/
476
+ InvalidTransferCollateralUpdate: AugmentedError<ApiType>;
477
+ /**
478
+ * The transfer-out amount must be nonzero.
382
479
  **/
383
- InvalidRecipient: AugmentedError<ApiType>;
480
+ InvalidTransferOutAmount: AugmentedError<ApiType>;
384
481
  /**
385
- * The claim nonce is not exactly the next accepted nonce for the source account.
482
+ * The transfer-out recipient must be nonzero for the destination chain.
386
483
  **/
387
- UnexpectedNonce: AugmentedError<ApiType>;
484
+ InvalidTransferOutRecipient: AugmentedError<ApiType>;
388
485
  /**
389
- * The gateway does not match the active or still-accepted previous release.
486
+ * The Ethereum event topics or payload do not match `TransferToArgonStarted`.
487
+ **/
488
+ InvalidTransferToArgonActivity: AugmentedError<ApiType>;
489
+ /**
490
+ * The supplied Minting Authority signing key already has a live local authority record.
491
+ **/
492
+ MintingAuthorityAlreadyRegistered: AugmentedError<ApiType>;
493
+ /**
494
+ * The supplied Minting Authority collateral is below the configured per-chain minimum
495
+ * normalized microgon value.
496
+ **/
497
+ MintingAuthorityCollateralBelowMinimum: AugmentedError<ApiType>;
498
+ /**
499
+ * The local Minting Authority did not match the proven Ethereum activity.
500
+ **/
501
+ MintingAuthorityMismatch: AugmentedError<ApiType>;
502
+ /**
503
+ * The supplied Minting Authority signing key does not exist locally.
504
+ **/
505
+ MintingAuthorityNotFound: AugmentedError<ApiType>;
506
+ /**
507
+ * The configured activation repayment pricing is missing for this source chain.
508
+ **/
509
+ MissingMintingAuthorityActivationRepaymentPricing: AugmentedError<ApiType>;
510
+ /**
511
+ * No verifier-backed Ethereum execution block is available to anchor a transfer-out
512
+ * expiry window.
513
+ **/
514
+ MissingVerifiedExecutionBlock: AugmentedError<ApiType>;
515
+ /**
516
+ * At least one council approval signature must be supplied.
517
+ **/
518
+ NoCouncilApprovalSignaturesProvided: AugmentedError<ApiType>;
519
+ /**
520
+ * At least one gateway activity log must be supplied with the receipt proof.
521
+ **/
522
+ NoGatewayActivitiesProvided: AugmentedError<ApiType>;
523
+ /**
524
+ * At least one proven gateway-activity block must be supplied.
525
+ **/
526
+ NoGatewayProofBlocksProvided: AugmentedError<ApiType>;
527
+ /**
528
+ * The latest verifier-backed Ethereum execution block is too old to safely open a new
529
+ * transfer out.
530
+ **/
531
+ StaleVerifiedExecutionBlock: AugmentedError<ApiType>;
532
+ /**
533
+ * The destination chain already tracks the maximum number of non-terminal transfer-out
534
+ * requests.
535
+ **/
536
+ TooManyPendingTransferOuts: AugmentedError<ApiType>;
537
+ /**
538
+ * The collateral increment is below the configured minimum and does not complete the
539
+ * transfer.
540
+ **/
541
+ TransferCollateralIncrementTooSmall: AugmentedError<ApiType>;
542
+ /**
543
+ * The outbound transfer cannot accept more collateral because it is already fully
544
+ * covered.
545
+ **/
546
+ TransferOutAlreadyReady: AugmentedError<ApiType>;
547
+ /**
548
+ * The outbound transfer request is already expired on the latest verified Ethereum block.
549
+ **/
550
+ TransferOutExpired: AugmentedError<ApiType>;
551
+ /**
552
+ * The outbound transfer record does not exist.
553
+ **/
554
+ TransferOutNotFound: AugmentedError<ApiType>;
555
+ /**
556
+ * The proven gateway activity nonce is not the next contiguous nonce.
557
+ **/
558
+ UnexpectedGatewayActivityNonce: AugmentedError<ApiType>;
559
+ /**
560
+ * The local Minting Authority was not in the expected lifecycle state.
561
+ **/
562
+ UnexpectedMintingAuthorityState: AugmentedError<ApiType>;
563
+ /**
564
+ * The caller's expected already-proven gateway activity nonce is stale or incorrect.
565
+ **/
566
+ UnexpectedPreviousGatewayActivityNonce: AugmentedError<ApiType>;
567
+ /**
568
+ * The local owner vault could not be resolved.
569
+ **/
570
+ UnknownOwnerVault: AugmentedError<ApiType>;
571
+ /**
572
+ * The gateway does not match the configured gateway address.
390
573
  **/
391
574
  UnsupportedGateway: AugmentedError<ApiType>;
392
575
  /**
@@ -394,7 +577,7 @@ declare module '@polkadot/api-base/types/errors' {
394
577
  **/
395
578
  UnsupportedSource: AugmentedError<ApiType>;
396
579
  /**
397
- * The token is not supported under the matched gateway release.
580
+ * The token is not supported under the configured gateway.
398
581
  **/
399
582
  UnsupportedToken: AugmentedError<ApiType>;
400
583
  };
@@ -1002,6 +1185,11 @@ declare module '@polkadot/api-base/types/errors' {
1002
1185
  };
1003
1186
  ticks: {};
1004
1187
  treasury: {
1188
+ /**
1189
+ * Liquidating this bond lot would take the account below its crosschain-encumbered
1190
+ * treasury backing.
1191
+ **/
1192
+ ActiveBondAmountBelowEncumberedBacking: AugmentedError<ApiType>;
1005
1193
  /**
1006
1194
  * The bond lot is already scheduled for release.
1007
1195
  **/
@@ -1077,6 +1265,10 @@ declare module '@polkadot/api-base/types/errors' {
1077
1265
  * Bitcoin conversion to compressed pubkey failed
1078
1266
  **/
1079
1267
  BitcoinConversionFailed: AugmentedError<ApiType>;
1268
+ /**
1269
+ * Committed Argonots cannot be reduced below the amount already crosschain-encumbered.
1270
+ **/
1271
+ CommittedArgonotsBelowEncumberedBacking: AugmentedError<ApiType>;
1080
1272
  /**
1081
1273
  * A funding change is already scheduled
1082
1274
  **/
@@ -1125,6 +1317,10 @@ declare module '@polkadot/api-base/types/errors' {
1125
1317
  * No Vault public keys are available
1126
1318
  **/
1127
1319
  NoVaultBitcoinPubkeysAvailable: AugmentedError<ApiType>;
1320
+ /**
1321
+ * A vault must clear out all overdue external collect blockers before it can collect.
1322
+ **/
1323
+ OverdueCollectBlockersBeforeCollect: AugmentedError<ApiType>;
1128
1324
  /**
1129
1325
  * A vault must clear out all pending cosigns before it can collect
1130
1326
  **/