@argonprotocol/mainchain 1.4.12-dev.d1c83d27 → 1.4.12-dev.dd86fab9

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.d1c83d27",
3
+ "version": "1.4.12-dev.dd86fab9",
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.d1c83d27",
70
+ "@argonprotocol/testing": "1.4.12-dev.dd86fab9",
72
71
  "@polkadot/typegen": "^16.5.6",
73
72
  "@substrate/ss58-registry": "^1.51.0",
74
73
  "@types/node": "^20",
@@ -1,5 +1,4 @@
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
@@ -51,6 +50,16 @@ declare module '@polkadot/api-base/types/consts' {
51
50
  **/
52
51
  maxReserves: u32 & AugmentedConst<ApiType>;
53
52
  };
53
+ bitcoinFissions: {
54
+ /**
55
+ * Maximum number of active Fissions that may allocate satoshis from one Lock.
56
+ **/
57
+ maxFissionsPerLock: u32 & AugmentedConst<ApiType>;
58
+ /**
59
+ * Minimum percentage change required to ratchet a Fission.
60
+ **/
61
+ minimumRatchetPercent: Percent & AugmentedConst<ApiType>;
62
+ };
54
63
  bitcoinLocks: {
55
64
  /**
56
65
  * Argon tick per day
@@ -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
  /**
@@ -160,6 +250,10 @@ declare module '@polkadot/api-base/types/errors' {
160
250
  * Too many orphaned utxo release requests for a lock
161
251
  **/
162
252
  MaxOrphanedUtxoReleaseRequestsExceeded: AugmentedError<ApiType>;
253
+ /**
254
+ * The requested price-history entry predates the Lock's current securitization.
255
+ **/
256
+ MicrogonsAtTargetPerBtcTickOlderThanCurrent: AugmentedError<ApiType>;
163
257
  /**
164
258
  * The price provider has no bitcoin prices available. This is a temporary error
165
259
  **/
@@ -169,9 +263,9 @@ declare module '@polkadot/api-base/types/errors' {
169
263
  **/
170
264
  NoPermissions: AugmentedError<ApiType>;
171
265
  /**
172
- * Nothing to ratchet
266
+ * The requested securitization matches the Lock's current securitization.
173
267
  **/
174
- NoRatchetingAvailable: AugmentedError<ApiType>;
268
+ NoResecuritizationChange: AugmentedError<ApiType>;
175
269
  /**
176
270
  * No Vault public keys are available
177
271
  **/
@@ -310,6 +310,54 @@ declare module '@polkadot/api-base/types/events' {
310
310
  { who: AccountId32; amount: u128 }
311
311
  >;
312
312
  };
313
+ bitcoinFissions: {
314
+ /**
315
+ * A Fission was closed and its source Lock allocation was released.
316
+ **/
317
+ FissionClosed: AugmentedEvent<
318
+ ApiType,
319
+ [accountId: AccountId32, fissionId: u64, redemptionAmount: u128],
320
+ { accountId: AccountId32; fissionId: u64; redemptionAmount: u128 }
321
+ >;
322
+ /**
323
+ * An active Fission was closed because its source Lock was spent.
324
+ **/
325
+ FissionClosedByLock: AugmentedEvent<
326
+ ApiType,
327
+ [accountId: AccountId32, fissionId: u64, utxoId: u64],
328
+ { accountId: AccountId32; fissionId: u64; utxoId: u64 }
329
+ >;
330
+ /**
331
+ * A Fission was created and allocated from its source Lock.
332
+ **/
333
+ FissionCreated: AugmentedEvent<
334
+ ApiType,
335
+ [accountId: AccountId32, fissionId: u64, liquidId: u64, liquidityPromised: u128],
336
+ { accountId: AccountId32; fissionId: u64; liquidId: u64; liquidityPromised: u128 }
337
+ >;
338
+ /**
339
+ * A Fission ratchet changed its target-normalized BTC value and liability.
340
+ **/
341
+ FissionRatcheted: AugmentedEvent<
342
+ ApiType,
343
+ [
344
+ accountId: AccountId32,
345
+ fissionId: u64,
346
+ ratchetNumber: u32,
347
+ liquidityPromised: u128,
348
+ amountMinted: u128,
349
+ amountBurned: u128,
350
+ ],
351
+ {
352
+ accountId: AccountId32;
353
+ fissionId: u64;
354
+ ratchetNumber: u32;
355
+ liquidityPromised: u128;
356
+ amountMinted: u128;
357
+ amountBurned: u128;
358
+ }
359
+ >;
360
+ };
313
361
  bitcoinLocks: {
314
362
  BitcoinCosignPastDue: AugmentedEvent<
315
363
  ApiType,
@@ -326,18 +374,18 @@ declare module '@polkadot/api-base/types/events' {
326
374
  [
327
375
  utxoId: u64,
328
376
  vaultId: u32,
329
- liquidityPromised: u128,
330
- securitization: u128,
331
- lockedTargetPrice: u128,
377
+ securitizedSatoshis: u64,
378
+ microgonsAtTargetPerBtc: u128,
379
+ collateralRequired: u128,
332
380
  accountId: AccountId32,
333
381
  securityFee: u128,
334
382
  ],
335
383
  {
336
384
  utxoId: u64;
337
385
  vaultId: u32;
338
- liquidityPromised: u128;
339
- securitization: u128;
340
- lockedTargetPrice: u128;
386
+ securitizedSatoshis: u64;
387
+ microgonsAtTargetPerBtc: u128;
388
+ collateralRequired: u128;
341
389
  accountId: AccountId32;
342
390
  securityFee: u128;
343
391
  }
@@ -347,26 +395,20 @@ declare module '@polkadot/api-base/types/events' {
347
395
  [utxoId: u64, vaultId: u32, isFlexible: bool],
348
396
  { utxoId: u64; vaultId: u32; isFlexible: bool }
349
397
  >;
350
- BitcoinLockRatcheted: AugmentedEvent<
398
+ BitcoinLockResecuritized: AugmentedEvent<
351
399
  ApiType,
352
400
  [
353
401
  utxoId: u64,
354
402
  vaultId: u32,
355
- liquidityPromised: u128,
356
- oldTargetPrice: u128,
357
- securityFee: u128,
358
- newTargetPrice: u128,
359
- amountBurned: u128,
403
+ securitizedSatoshis: u64,
404
+ microgonsAtTargetPerBtc: u128,
360
405
  accountId: AccountId32,
361
406
  ],
362
407
  {
363
408
  utxoId: u64;
364
409
  vaultId: u32;
365
- liquidityPromised: u128;
366
- oldTargetPrice: u128;
367
- securityFee: u128;
368
- newTargetPrice: u128;
369
- amountBurned: u128;
410
+ securitizedSatoshis: u64;
411
+ microgonsAtTargetPerBtc: u128;
370
412
  accountId: AccountId32;
371
413
  }
372
414
  >;
@@ -401,6 +443,14 @@ declare module '@polkadot/api-base/types/events' {
401
443
  [utxoId: u64, error: SpRuntimeDispatchError],
402
444
  { utxoId: u64; error: SpRuntimeDispatchError }
403
445
  >;
446
+ /**
447
+ * Not all orphaned UTXOs for a retired Lock fit in the cleanup schedule.
448
+ **/
449
+ OrphanedUtxoCleanupScheduleOverflow: AugmentedEvent<
450
+ ApiType,
451
+ [accountId: AccountId32, utxoId: u64, expirationFrame: u64],
452
+ { accountId: AccountId32; utxoId: u64; expirationFrame: u64 }
453
+ >;
404
454
  OrphanedUtxoCosigned: AugmentedEvent<
405
455
  ApiType,
406
456
  [
@@ -418,6 +468,22 @@ declare module '@polkadot/api-base/types/events' {
418
468
  signature: Bytes;
419
469
  }
420
470
  >;
471
+ /**
472
+ * An orphaned UTXO expiration could not reconcile its pending Vault cosign state.
473
+ **/
474
+ OrphanedUtxoExpirationError: AugmentedEvent<
475
+ ApiType,
476
+ [
477
+ accountId: AccountId32,
478
+ utxoRef: ArgonPrimitivesBitcoinUtxoRef,
479
+ error: SpRuntimeDispatchError,
480
+ ],
481
+ {
482
+ accountId: AccountId32;
483
+ utxoRef: ArgonPrimitivesBitcoinUtxoRef;
484
+ error: SpRuntimeDispatchError;
485
+ }
486
+ >;
421
487
  OrphanedUtxoReceived: AugmentedEvent<
422
488
  ApiType,
423
489
  [utxoId: u64, utxoRef: ArgonPrimitivesBitcoinUtxoRef, vaultId: u32, satoshis: u64],
@@ -433,11 +499,6 @@ declare module '@polkadot/api-base/types/events' {
433
499
  accountId: AccountId32;
434
500
  }
435
501
  >;
436
- SecuritizationIncreased: AugmentedEvent<
437
- ApiType,
438
- [utxoId: u64, vaultId: u32, newSatoshis: u64, accountId: AccountId32],
439
- { utxoId: u64; vaultId: u32; newSatoshis: u64; accountId: AccountId32 }
440
- >;
441
502
  };
442
503
  bitcoinUtxos: {
443
504
  UtxoDetected: AugmentedEvent<
@@ -2085,30 +2146,6 @@ declare module '@polkadot/api-base/types/events' {
2085
2146
  [vaultId: u32, operatorAccountId: AccountId32, amount: u128],
2086
2147
  { vaultId: u32; operatorAccountId: AccountId32; amount: u128 }
2087
2148
  >;
2088
- FundLockCanceled: AugmentedEvent<
2089
- ApiType,
2090
- [vaultId: u32, amount: u128],
2091
- { vaultId: u32; amount: u128 }
2092
- >;
2093
- FundsLocked: AugmentedEvent<
2094
- ApiType,
2095
- [
2096
- vaultId: u32,
2097
- locker: AccountId32,
2098
- liquidityPromised: u128,
2099
- isRatchet: bool,
2100
- feeRevenue: u128,
2101
- didUseFeeCoupon: bool,
2102
- ],
2103
- {
2104
- vaultId: u32;
2105
- locker: AccountId32;
2106
- liquidityPromised: u128;
2107
- isRatchet: bool;
2108
- feeRevenue: u128;
2109
- didUseFeeCoupon: bool;
2110
- }
2111
- >;
2112
2149
  FundsReleased: AugmentedEvent<
2113
2150
  ApiType,
2114
2151
  [vaultId: u32, securitization: u128],
@@ -2134,6 +2171,28 @@ declare module '@polkadot/api-base/types/events' {
2134
2171
  [vaultId: u32, reservedSecuritizationSpace: u128],
2135
2172
  { vaultId: u32; reservedSecuritizationSpace: u128 }
2136
2173
  >;
2174
+ SecuritizationReserved: AugmentedEvent<
2175
+ ApiType,
2176
+ [
2177
+ vaultId: u32,
2178
+ locker: AccountId32,
2179
+ securitizationCoverageMicrogons: u128,
2180
+ feeRevenue: u128,
2181
+ didUseFeeCoupon: bool,
2182
+ ],
2183
+ {
2184
+ vaultId: u32;
2185
+ locker: AccountId32;
2186
+ securitizationCoverageMicrogons: u128;
2187
+ feeRevenue: u128;
2188
+ didUseFeeCoupon: bool;
2189
+ }
2190
+ >;
2191
+ SecuritizationReturned: AugmentedEvent<
2192
+ ApiType,
2193
+ [vaultId: u32, amount: u128],
2194
+ { vaultId: u32; amount: u128 }
2195
+ >;
2137
2196
  TreasuryRecordingError: AugmentedEvent<
2138
2197
  ApiType,
2139
2198
  [vaultId: u32, frameId: u64, vaultEarnings: u128, error: SpRuntimeDispatchError],
@@ -1,5 +1,4 @@
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
@@ -64,6 +63,7 @@ import type {
64
63
  PalletBalancesAccountData,
65
64
  PalletBalancesBalanceLock,
66
65
  PalletBalancesReserveData,
66
+ PalletBitcoinFissionsFission,
67
67
  PalletBitcoinLocksLockReleaseRequest,
68
68
  PalletBitcoinLocksLockedBitcoin,
69
69
  PalletBitcoinLocksOrphanedUtxo,
@@ -210,6 +210,35 @@ declare module '@polkadot/api-base/types/storage' {
210
210
  **/
211
211
  totalIssuance: AugmentedQuery<ApiType, () => Observable<u128>, []>;
212
212
  };
213
+ bitcoinFissions: {
214
+ /**
215
+ * Active Fission records addressed by their owner and owner-local Fission ID.
216
+ **/
217
+ fissionByOwnerAndId: AugmentedQuery<
218
+ ApiType,
219
+ (
220
+ arg1: AccountId32 | string | Uint8Array,
221
+ arg2: u64 | AnyNumber | Uint8Array,
222
+ ) => Observable<Option<PalletBitcoinFissionsFission>>,
223
+ [AccountId32, u64]
224
+ >;
225
+ /**
226
+ * Active Fission IDs allocating satoshis from each Lock.
227
+ **/
228
+ fissionIdsByLockId: AugmentedQuery<
229
+ ApiType,
230
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<BTreeSet<u64>>,
231
+ [u64]
232
+ >;
233
+ /**
234
+ * Minimum Fission ID accepted from each owner.
235
+ **/
236
+ nextFissionIdByOwner: AugmentedQuery<
237
+ ApiType,
238
+ (arg: AccountId32 | string | Uint8Array) => Observable<u64>,
239
+ [AccountId32]
240
+ >;
241
+ };
213
242
  bitcoinLocks: {
214
243
  lastFeeCouponNonceByVaultAndAccount: AugmentedQuery<
215
244
  ApiType,
@@ -219,6 +248,14 @@ declare module '@polkadot/api-base/types/storage' {
219
248
  ) => Observable<Option<u64>>,
220
249
  [u32, AccountId32]
221
250
  >;
251
+ /**
252
+ * Highest Bitcoin UTXO sync height processed for pending-funding expirations.
253
+ **/
254
+ lastPendingFundingExpirationHeight: AugmentedQuery<
255
+ ApiType,
256
+ () => Observable<Option<u64>>,
257
+ []
258
+ >;
222
259
  /**
223
260
  * Utxos that have been requested to be cosigned for releasing
224
261
  **/
@@ -272,7 +309,7 @@ declare module '@polkadot/api-base/types/storage' {
272
309
  [u64]
273
310
  >;
274
311
  /**
275
- * History of target microgons per btc.
312
+ * Recent target-normalized microgon values per BTC and their observed ticks.
276
313
  **/
277
314
  microgonPerBtcHistory: AugmentedQuery<
278
315
  ApiType,
@@ -280,7 +317,18 @@ declare module '@polkadot/api-base/types/storage' {
280
317
  []
281
318
  >;
282
319
  /**
283
- * The minimum number of satoshis that can be locked
320
+ * Release amounts identified by the version 10 to 11 migration.
321
+ *
322
+ * Current release requests do not create currency holds. Each migrated entry is removed when
323
+ * its in-flight release request terminates.
324
+ **/
325
+ migratedReleaseHoldByUtxoId: AugmentedQuery<
326
+ ApiType,
327
+ (arg: u64 | AnyNumber | Uint8Array) => Observable<Option<u128>>,
328
+ [u64]
329
+ >;
330
+ /**
331
+ * The minimum number of satoshis accepted in one watched funding UTXO.
284
332
  **/
285
333
  minimumSatoshis: AugmentedQuery<ApiType, () => Observable<u64>, []>;
286
334
  nextUtxoId: AugmentedQuery<ApiType, () => Observable<Option<u64>>, []>;
@@ -1,5 +1,4 @@
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
@@ -280,6 +280,38 @@ declare module '@polkadot/api-base/types/submittable' {
280
280
  [Vec<AccountId32>]
281
281
  >;
282
282
  };
283
+ bitcoinFissions: {
284
+ /**
285
+ * Close a Fission without moving Bitcoin and remove its active record.
286
+ **/
287
+ close: AugmentedSubmittable<
288
+ (fissionId: Compact<u64> | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
289
+ [Compact<u64>]
290
+ >;
291
+ /**
292
+ * Create a Fission from one owner-held Lock and associate it with a Liquid ID.
293
+ **/
294
+ create: AugmentedSubmittable<
295
+ (
296
+ fissionId: Compact<u64> | AnyNumber | Uint8Array,
297
+ liquidId: Compact<u64> | AnyNumber | Uint8Array,
298
+ utxoId: Compact<u64> | AnyNumber | Uint8Array,
299
+ satoshis: Compact<u64> | AnyNumber | Uint8Array,
300
+ microgonsAtTargetPerBtc: Compact<u128> | AnyNumber | Uint8Array,
301
+ ) => SubmittableExtrinsic<ApiType>,
302
+ [Compact<u64>, Compact<u64>, Compact<u64>, Compact<u64>, Compact<u128>]
303
+ >;
304
+ /**
305
+ * Ratchet an active Fission to a replacement target-normalized BTC value.
306
+ **/
307
+ ratchet: AugmentedSubmittable<
308
+ (
309
+ fissionId: Compact<u64> | AnyNumber | Uint8Array,
310
+ microgonsAtTargetPerBtc: Compact<u128> | AnyNumber | Uint8Array,
311
+ ) => SubmittableExtrinsic<ApiType>,
312
+ [Compact<u64>, Compact<u128>]
313
+ >;
314
+ };
283
315
  bitcoinLocks: {
284
316
  adminModifyMinimumLockedSats: AugmentedSubmittable<
285
317
  (satoshis: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>,
@@ -307,8 +339,8 @@ declare module '@polkadot/api-base/types/submittable' {
307
339
  [AccountId32, ArgonPrimitivesBitcoinUtxoRef, Bytes]
308
340
  >;
309
341
  /**
310
- * Submitted by a Vault operator to cosign the release of a bitcoin utxo. The Bitcoin owner
311
- * release fee will be burned, and the lock will be allowed to expire without a penalty.
342
+ * Submitted by a Vault operator to cosign the release of a bitcoin UTXO. The Lock's
343
+ * securitization will be scheduled for release without a penalty.
312
344
  *
313
345
  * This is submitted as a no-fee transaction off chain to allow keys to remain in cold
314
346
  * wallets.
@@ -320,24 +352,13 @@ declare module '@polkadot/api-base/types/submittable' {
320
352
  ) => SubmittableExtrinsic<ApiType>,
321
353
  [u64, Bytes]
322
354
  >;
323
- increaseSecuritization: AugmentedSubmittable<
324
- (
325
- utxoId: u64 | AnyNumber | Uint8Array,
326
- newSatoshis: Compact<u64> | AnyNumber | Uint8Array,
327
- ) => SubmittableExtrinsic<ApiType>,
328
- [u64, Compact<u64>]
329
- >;
330
355
  /**
331
- * Initialize a bitcoin lock. This will create a LockedBitcoin for the submitting account
332
- * and log the Bitcoin Script hash to Events.
356
+ * Create a Bitcoin receive address backed by a Lock for the submitting account.
333
357
  *
334
358
  * The pubkey submitted here will be used to create a script pubkey that will be used in a
335
359
  * timelock multisig script to lock the bitcoin.
336
- *
337
- * NOTE: A "lock-er" must send btc to the cosigner UTXO address to "complete" the
338
- * LockedBitcoin and be added to the Bitcoin Mint line.
339
360
  **/
340
- initialize: AugmentedSubmittable<
361
+ createReceiveAddress: AugmentedSubmittable<
341
362
  (
342
363
  vaultId: u32 | AnyNumber | Uint8Array,
343
364
  satoshis: Compact<u64> | AnyNumber | Uint8Array,
@@ -347,8 +368,7 @@ declare module '@polkadot/api-base/types/submittable' {
347
368
  | null
348
369
  | Uint8Array
349
370
  | PalletBitcoinLocksLockOptions
350
- | { V1: any }
351
- | { V2: any }
371
+ | { microgonsAtTargetPerBtc?: any; feeCoupon?: any }
352
372
  | string,
353
373
  ) => SubmittableExtrinsic<ApiType>,
354
374
  [
@@ -358,36 +378,6 @@ declare module '@polkadot/api-base/types/submittable' {
358
378
  Option<PalletBitcoinLocksLockOptions>,
359
379
  ]
360
380
  >;
361
- /**
362
- * Ratcheting allows a user to change the lock price of their bitcoin lock. This is
363
- * functionally the same as releasing and re-initializing, but it allows a user to skip
364
- * sending transactions through bitcoin and any associated fees. It also allows you to stay
365
- * on your original lock expiration without having to pay the full year of fees again.
366
- *
367
- * Ratcheting "down" - when the price of bitcoin is lower than your lock price, you pay the
368
- * full release price and get added back to the mint queue at the current market rate. You
369
- * pocket the difference between the already minted "lock price" and the new market value
370
- * (which you just had burned). Your new lock price is set to the market low, so you can
371
- * take advantage of ratchets "up" in the future.
372
- *
373
- * Ratcheting "up" - when the price of bitcoin is higher than your lock price, you pay a
374
- * prorated fee for the remainder of your existing lock duration. You are added to the mint
375
- * queue for the difference in your new lock price vs the previous lock price.
376
- **/
377
- ratchet: AugmentedSubmittable<
378
- (
379
- utxoId: u64 | AnyNumber | Uint8Array,
380
- options:
381
- | Option<PalletBitcoinLocksLockOptions>
382
- | null
383
- | Uint8Array
384
- | PalletBitcoinLocksLockOptions
385
- | { V1: any }
386
- | { V2: any }
387
- | string,
388
- ) => SubmittableExtrinsic<ApiType>,
389
- [u64, Option<PalletBitcoinLocksLockOptions>]
390
- >;
391
381
  requestOrphanedUtxoRelease: AugmentedSubmittable<
392
382
  (
393
383
  utxoRef:
@@ -416,6 +406,23 @@ declare module '@polkadot/api-base/types/submittable' {
416
406
  ) => SubmittableExtrinsic<ApiType>,
417
407
  [u64, Bytes, u64]
418
408
  >;
409
+ /**
410
+ * Replace this Lock's BTC coverage and target value for its remaining term.
411
+ **/
412
+ resecuritize: AugmentedSubmittable<
413
+ (
414
+ utxoId: u64 | AnyNumber | Uint8Array,
415
+ satoshis: Compact<u64> | AnyNumber | Uint8Array,
416
+ options:
417
+ | Option<PalletBitcoinLocksLockOptions>
418
+ | null
419
+ | Uint8Array
420
+ | PalletBitcoinLocksLockOptions
421
+ | { microgonsAtTargetPerBtc?: any; feeCoupon?: any }
422
+ | string,
423
+ ) => SubmittableExtrinsic<ApiType>,
424
+ [u64, Compact<u64>, Option<PalletBitcoinLocksLockOptions>]
425
+ >;
419
426
  setFlexible: AugmentedSubmittable<
420
427
  (
421
428
  utxoId: u64 | AnyNumber | Uint8Array,
@@ -1,5 +1,4 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
- /* eslint-disable */
3
2
 
4
3
  import './augment-api-consts.js';
5
4
  import './augment-api-errors.js';
@@ -1,5 +1,4 @@
1
1
  // Auto-generated via `yarn polkadot-types-from-defs`, 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