@argonprotocol/mainchain 1.4.12-dev.8cae3588 → 1.4.12-dev.a0735a19

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.4.12-dev.8cae3588",
3
+ "version": "1.4.12-dev.a0735a19",
4
4
  "description": "A client for accessing the Argon mainchain apis.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -62,13 +62,12 @@
62
62
  "@polkadot/util": "^14.0.3",
63
63
  "@polkadot/util-crypto": "^14.0.3",
64
64
  "bignumber.js": "^9.3.1",
65
- "bs58check": "^4.0.0",
66
65
  "camelcase-keys": "^9.1.3",
67
66
  "viem": "^2.38.5"
68
67
  },
69
68
  "devDependencies": {
70
69
  "@argonprotocol/ethereum-contracts": "workspace:*",
71
- "@argonprotocol/testing": "1.4.12-dev.8cae3588",
70
+ "@argonprotocol/testing": "1.4.12-dev.a0735a19",
72
71
  "@polkadot/typegen": "^16.5.6",
73
72
  "@substrate/ss58-registry": "^1.51.0",
74
73
  "@types/node": "^20",
@@ -51,6 +51,16 @@ declare module '@polkadot/api-base/types/consts' {
51
51
  **/
52
52
  maxReserves: u32 & AugmentedConst<ApiType>;
53
53
  };
54
+ bitcoinFissions: {
55
+ /**
56
+ * Maximum number of active Fissions that may allocate satoshis from one Lock.
57
+ **/
58
+ maxFissionsPerLock: u32 & AugmentedConst<ApiType>;
59
+ /**
60
+ * Minimum percentage change required to ratchet a Fission.
61
+ **/
62
+ minimumRatchetPercent: Percent & AugmentedConst<ApiType>;
63
+ };
54
64
  bitcoinLocks: {
55
65
  /**
56
66
  * Argon tick per day
@@ -82,11 +92,19 @@ declare module '@polkadot/api-base/types/consts' {
82
92
  * Maximum releasing utxos at a time
83
93
  **/
84
94
  maxConcurrentlyReleasingLocks: u32 & AugmentedConst<ApiType>;
95
+ /**
96
+ * Maximum number of confirmed Bitcoin outputs that may fund one Lock.
97
+ **/
98
+ maxUtxosPerLock: u32 & AugmentedConst<ApiType>;
85
99
  /**
86
100
  * Number of frames orphaned UTXO release entries are retained after a lock lifecycle
87
101
  * transition before being cleaned up.
88
102
  **/
89
103
  orphanedUtxoReleaseExpiryFrames: u64 & AugmentedConst<ApiType>;
104
+ /**
105
+ * Number of Bitcoin blocks to reserve securitization that has not yet been activated.
106
+ **/
107
+ securitizationHoldBlocks: u64 & AugmentedConst<ApiType>;
90
108
  /**
91
109
  * Number of ticks per bitcoin block
92
110
  **/
@@ -94,27 +112,9 @@ declare module '@polkadot/api-base/types/consts' {
94
112
  };
95
113
  bitcoinUtxos: {
96
114
  /**
97
- * Maximum number of candidate UTXOs stored per lock
98
- **/
99
- maxCandidateUtxosPerLock: u32 & AugmentedConst<ApiType>;
100
- /**
101
- * Maximum number of satoshi difference allowed from expected to consider a UTXO as
102
- * "confirmed"
103
- **/
104
- maximumSatoshiThresholdFromExpected: u64 & AugmentedConst<ApiType>;
105
- /**
106
- * Maximum bitcoin blocks to accept a UTXO for confirmation. Expired locks remain watched
107
- * for this many additional blocks so late funding can be detected as orphaned.
108
- **/
109
- maxPendingConfirmationBlocks: u64 & AugmentedConst<ApiType>;
110
- /**
111
- * The maximum number of UTXOs that can be watched in a block and/or expiring at same block
112
- **/
113
- maxPendingConfirmationUtxos: u32 & AugmentedConst<ApiType>;
114
- /**
115
- * The maximum number of expired pending funding entries cleaned up in a block
115
+ * Maximum number of outputs tracked for a single Lock address.
116
116
  **/
117
- maxPendingFundingExpirationsPerBlock: u32 & AugmentedConst<ApiType>;
117
+ maxUtxosPerLock: u32 & AugmentedConst<ApiType>;
118
118
  };
119
119
  blockRewards: {
120
120
  /**
@@ -61,6 +61,88 @@ declare module '@polkadot/api-base/types/errors' {
61
61
  **/
62
62
  VestingBalance: AugmentedError<ApiType>;
63
63
  };
64
+ bitcoinFissions: {
65
+ /**
66
+ * A Fission already exists under this owner and Fission ID.
67
+ **/
68
+ FissionAlreadyExists: AugmentedError<ApiType>;
69
+ /**
70
+ * A Fission must allocate at least one satoshi.
71
+ **/
72
+ FissionHasNoSatoshis: AugmentedError<ApiType>;
73
+ /**
74
+ * The submitted Fission ID is below the owner's current minimum.
75
+ **/
76
+ FissionIdBelowMinimum: AugmentedError<ApiType>;
77
+ /**
78
+ * The owner's Fission ID counter cannot be incremented.
79
+ **/
80
+ FissionIdOverflow: AugmentedError<ApiType>;
81
+ /**
82
+ * No Fission exists under this owner and Fission ID.
83
+ **/
84
+ FissionNotFound: AugmentedError<ApiType>;
85
+ /**
86
+ * The requested target-normalized BTC value is not present in recent price history.
87
+ **/
88
+ IneligibleMicrogonsAtTargetPerBtc: AugmentedError<ApiType>;
89
+ /**
90
+ * A source Lock has fewer active Fission satoshis than the Fission being closed.
91
+ **/
92
+ InsufficientFissionedSatoshis: AugmentedError<ApiType>;
93
+ /**
94
+ * A requested source Lock does not have enough unallocated funded satoshis.
95
+ **/
96
+ InsufficientFundedSatoshis: AugmentedError<ApiType>;
97
+ /**
98
+ * The Fission owner cannot burn the complete redemption amount.
99
+ **/
100
+ InsufficientFunds: AugmentedError<ApiType>;
101
+ /**
102
+ * A source Lock's securitization does not cover the requested allocation and liability.
103
+ **/
104
+ InsufficientSecuritization: AugmentedError<ApiType>;
105
+ /**
106
+ * The requested source Lock does not exist.
107
+ **/
108
+ LockNotFound: AugmentedError<ApiType>;
109
+ /**
110
+ * A requested source Lock has no confirmed funding satoshis.
111
+ **/
112
+ LockNotFunded: AugmentedError<ApiType>;
113
+ /**
114
+ * A requested source Lock is already in the release process.
115
+ **/
116
+ LockReleasePending: AugmentedError<ApiType>;
117
+ /**
118
+ * The requested price-history entry predates the Fission or Lock coverage floor.
119
+ **/
120
+ MicrogonsAtTargetPerBtcTickOlderThanCurrent: AugmentedError<ApiType>;
121
+ /**
122
+ * No current Bitcoin price is available to calculate the redemption amount.
123
+ **/
124
+ NoBitcoinPricesAvailable: AugmentedError<ApiType>;
125
+ /**
126
+ * The caller does not own a requested source Lock.
127
+ **/
128
+ NoPermissions: AugmentedError<ApiType>;
129
+ /**
130
+ * The Fission did not meet both the minimum change and Lock coverage requirements.
131
+ **/
132
+ NoRatchetingAvailable: AugmentedError<ApiType>;
133
+ /**
134
+ * A Fission allocation, liability, or identifier overflowed.
135
+ **/
136
+ Overflow: AugmentedError<ApiType>;
137
+ /**
138
+ * The Fission's ratchet counter cannot be incremented.
139
+ **/
140
+ RatchetNumberOverflow: AugmentedError<ApiType>;
141
+ /**
142
+ * The source Lock already has the maximum number of active Fissions.
143
+ **/
144
+ TooManyFissionsForLock: AugmentedError<ApiType>;
145
+ };
64
146
  bitcoinLocks: {
65
147
  /**
66
148
  * The proposed transaction would take the account below the minimum (existential) balance
@@ -107,9 +189,9 @@ declare module '@polkadot/api-base/types/errors' {
107
189
  **/
108
190
  FeeCouponExpired: AugmentedError<ApiType>;
109
191
  /**
110
- * Fee coupons can only be applied when initializing a lock.
192
+ * The Lock records fissioned satoshis without matching active Fission requirements.
111
193
  **/
112
- FeeCouponOnlyForInitialization: AugmentedError<ApiType>;
194
+ FissionStateMismatch: AugmentedError<ApiType>;
113
195
  /**
114
196
  * Cannot request an orphaned release for the funding UTXO
115
197
  **/
@@ -123,14 +205,18 @@ declare module '@polkadot/api-base/types/errors' {
123
205
  **/
124
206
  HoldUnexpectedlyModified: AugmentedError<ApiType>;
125
207
  /**
126
- * An ineligible microgon rate per btc was requested
208
+ * The requested target-normalized BTC value is not present in recent price history.
127
209
  **/
128
- IneligibleMicrogonRateRequested: AugmentedError<ApiType>;
210
+ IneligibleMicrogonsAtTargetPerBtcRequested: AugmentedError<ApiType>;
129
211
  InsufficientFunds: AugmentedError<ApiType>;
130
212
  /**
131
- * The minimum number of satoshis was not met
213
+ * The requested Lock securitization has fewer satoshis than its active Fissions.
132
214
  **/
133
- InsufficientSatoshisLocked: AugmentedError<ApiType>;
215
+ InsufficientSatoshisForFissions: AugmentedError<ApiType>;
216
+ /**
217
+ * The requested Lock securitization does not cover its active Fission liabilities.
218
+ **/
219
+ InsufficientSecuritizationForFissions: AugmentedError<ApiType>;
134
220
  InsufficientVaultFunds: AugmentedError<ApiType>;
135
221
  /**
136
222
  * The bitcoin script to lock this bitcoin has errors
@@ -145,7 +231,11 @@ declare module '@polkadot/api-base/types/errors' {
145
231
  **/
146
232
  InvalidVaultAmount: AugmentedError<ApiType>;
147
233
  /**
148
- * A lock in process of release cannot be ratcheted
234
+ * The Lock cannot be released while it has active Fissions.
235
+ **/
236
+ LockHasActiveFissions: AugmentedError<ApiType>;
237
+ /**
238
+ * A Lock in the release process cannot be resecuritized.
149
239
  **/
150
240
  LockInProcessOfRelease: AugmentedError<ApiType>;
151
241
  /**
@@ -155,11 +245,19 @@ declare module '@polkadot/api-base/types/errors' {
155
245
  /**
156
246
  * The lock funding has not been confirmed on bitcoin
157
247
  **/
158
- LockPendingFunding: AugmentedError<ApiType>;
248
+ LockNotFunded: AugmentedError<ApiType>;
159
249
  /**
160
250
  * Too many orphaned utxo release requests for a lock
161
251
  **/
162
252
  MaxOrphanedUtxoReleaseRequestsExceeded: AugmentedError<ApiType>;
253
+ /**
254
+ * Too many confirmed Bitcoin outputs were assigned to one Lock.
255
+ **/
256
+ MaxUtxosPerLockExceeded: AugmentedError<ApiType>;
257
+ /**
258
+ * The requested price-history entry predates the Lock's current securitization.
259
+ **/
260
+ MicrogonsAtTargetPerBtcTickOlderThanCurrent: AugmentedError<ApiType>;
163
261
  /**
164
262
  * The price provider has no bitcoin prices available. This is a temporary error
165
263
  **/
@@ -169,9 +267,9 @@ declare module '@polkadot/api-base/types/errors' {
169
267
  **/
170
268
  NoPermissions: AugmentedError<ApiType>;
171
269
  /**
172
- * Nothing to ratchet
270
+ * The requested securitization matches the Lock's current securitization.
173
271
  **/
174
- NoRatchetingAvailable: AugmentedError<ApiType>;
272
+ NoResecuritizationChange: AugmentedError<ApiType>;
175
273
  /**
176
274
  * No Vault public keys are available
177
275
  **/
@@ -219,9 +317,9 @@ declare module '@polkadot/api-base/types/errors' {
219
317
  **/
220
318
  BitcoinHeightNotConfirmed: AugmentedError<ApiType>;
221
319
  /**
222
- * Duplicated UtxoId. Already in use
320
+ * Duplicated BitcoinLockId. Already in use
223
321
  **/
224
- DuplicateUtxoId: AugmentedError<ApiType>;
322
+ DuplicateLockId: AugmentedError<ApiType>;
225
323
  /**
226
324
  * Insufficient bitcoin amount
227
325
  **/
@@ -234,14 +332,6 @@ declare module '@polkadot/api-base/types/errors' {
234
332
  * Invalid bitcoin sync height attempted
235
333
  **/
236
334
  InvalidBitcoinSyncHeight: AugmentedError<ApiType>;
237
- /**
238
- * This Lock already has an attached funding UTXO
239
- **/
240
- LockAlreadyFunded: AugmentedError<ApiType>;
241
- /**
242
- * Too many candidate UTXOs are being stored for this lock
243
- **/
244
- MaxCandidateUtxosExceeded: AugmentedError<ApiType>;
245
335
  /**
246
336
  * Too many UTXOs are being watched
247
337
  **/
@@ -267,11 +357,7 @@ declare module '@polkadot/api-base/types/errors' {
267
357
  **/
268
358
  ScriptPubkeyConflict: AugmentedError<ApiType>;
269
359
  /**
270
- * The UTXO reference does not map to a candidate entry
271
- **/
272
- UtxoNotCandidate: AugmentedError<ApiType>;
273
- /**
274
- * Locked Utxo Not Found
360
+ * Watched Lock or attached UTXO not found.
275
361
  **/
276
362
  UtxoNotLocked: AugmentedError<ApiType>;
277
363
  };