@argonprotocol/mainchain 1.4.12 → 1.4.13-dev.b31b2822
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/README.md +0 -10
- package/browser/index.d.ts +987 -1158
- package/browser/index.js +15 -1344
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +17 -1347
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +987 -1158
- package/lib/index.d.ts +987 -1158
- package/lib/index.js +19 -1349
- package/lib/index.js.map +1 -1
- package/package.json +3 -4
- package/src/interfaces/augment-api-consts.ts +20 -21
- package/src/interfaces/augment-api-errors.ts +127 -25
- package/src/interfaces/augment-api-events.ts +191 -112
- package/src/interfaces/augment-api-query.ts +116 -74
- package/src/interfaces/augment-api-runtime.ts +0 -1
- package/src/interfaces/augment-api-tx.ts +69 -91
- package/src/interfaces/augment-api.ts +0 -1
- package/src/interfaces/augment-types.ts +0 -1
- package/src/interfaces/lookup.ts +499 -399
- package/src/interfaces/registry.ts +22 -11
- package/src/interfaces/types-lookup.ts +551 -448
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@argonprotocol/mainchain",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.13-dev.b31b2822",
|
|
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.
|
|
70
|
+
"@argonprotocol/testing": "1.4.13-dev.b31b2822",
|
|
72
71
|
"@polkadot/typegen": "^16.5.6",
|
|
73
72
|
"@substrate/ss58-registry": "^1.51.0",
|
|
74
73
|
"@types/node": "^20",
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
"tsup": "^8.5.0",
|
|
77
76
|
"tsx": "^4.20.4",
|
|
78
77
|
"typescript": "^5.9.2",
|
|
79
|
-
"vitest": "^
|
|
78
|
+
"vitest": "^5.0.0"
|
|
80
79
|
},
|
|
81
80
|
"packageManager": "yarn@4.1.0"
|
|
82
81
|
}
|
|
@@ -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
|
|
@@ -82,11 +91,19 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
82
91
|
* Maximum releasing utxos at a time
|
|
83
92
|
**/
|
|
84
93
|
maxConcurrentlyReleasingLocks: u32 & AugmentedConst<ApiType>;
|
|
94
|
+
/**
|
|
95
|
+
* Maximum number of confirmed Bitcoin outputs that may fund one Lock.
|
|
96
|
+
**/
|
|
97
|
+
maxUtxosPerLock: u32 & AugmentedConst<ApiType>;
|
|
85
98
|
/**
|
|
86
99
|
* Number of frames orphaned UTXO release entries are retained after a lock lifecycle
|
|
87
100
|
* transition before being cleaned up.
|
|
88
101
|
**/
|
|
89
102
|
orphanedUtxoReleaseExpiryFrames: u64 & AugmentedConst<ApiType>;
|
|
103
|
+
/**
|
|
104
|
+
* Number of Bitcoin blocks to reserve securitization that has not yet been activated.
|
|
105
|
+
**/
|
|
106
|
+
securitizationHoldBlocks: u64 & AugmentedConst<ApiType>;
|
|
90
107
|
/**
|
|
91
108
|
* Number of ticks per bitcoin block
|
|
92
109
|
**/
|
|
@@ -94,27 +111,9 @@ declare module '@polkadot/api-base/types/consts' {
|
|
|
94
111
|
};
|
|
95
112
|
bitcoinUtxos: {
|
|
96
113
|
/**
|
|
97
|
-
* Maximum number of
|
|
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
|
|
114
|
+
* Maximum number of outputs tracked for a single Lock address.
|
|
116
115
|
**/
|
|
117
|
-
|
|
116
|
+
maxUtxosPerLock: u32 & AugmentedConst<ApiType>;
|
|
118
117
|
};
|
|
119
118
|
blockRewards: {
|
|
120
119
|
/**
|
|
@@ -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
|
|
@@ -78,6 +160,14 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
78
160
|
* This bitcoin pubkey couldn't be decoded for release
|
|
79
161
|
**/
|
|
80
162
|
BitcoinPubkeyUnableToBeDecoded: AugmentedError<ApiType>;
|
|
163
|
+
/**
|
|
164
|
+
* A configured or requested Lock amount is below the required minimum.
|
|
165
|
+
**/
|
|
166
|
+
BitcoinReleaseChangeBelowMinimum: AugmentedError<ApiType>;
|
|
167
|
+
/**
|
|
168
|
+
* The release destination cannot be the Lock's own script.
|
|
169
|
+
**/
|
|
170
|
+
BitcoinReleaseDestinationIsLockScript: AugmentedError<ApiType>;
|
|
81
171
|
/**
|
|
82
172
|
* The bitcoin has passed the deadline to release it
|
|
83
173
|
**/
|
|
@@ -107,9 +197,9 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
107
197
|
**/
|
|
108
198
|
FeeCouponExpired: AugmentedError<ApiType>;
|
|
109
199
|
/**
|
|
110
|
-
*
|
|
200
|
+
* The Lock records fissioned satoshis without matching active Fission requirements.
|
|
111
201
|
**/
|
|
112
|
-
|
|
202
|
+
FissionStateMismatch: AugmentedError<ApiType>;
|
|
113
203
|
/**
|
|
114
204
|
* Cannot request an orphaned release for the funding UTXO
|
|
115
205
|
**/
|
|
@@ -123,15 +213,23 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
123
213
|
**/
|
|
124
214
|
HoldUnexpectedlyModified: AugmentedError<ApiType>;
|
|
125
215
|
/**
|
|
126
|
-
*
|
|
216
|
+
* The requested target-normalized BTC value is not present in recent price history.
|
|
127
217
|
**/
|
|
128
|
-
|
|
218
|
+
IneligibleMicrogonsAtTargetPerBtcRequested: AugmentedError<ApiType>;
|
|
129
219
|
InsufficientFunds: AugmentedError<ApiType>;
|
|
130
220
|
/**
|
|
131
|
-
* The
|
|
221
|
+
* The requested Lock securitization has fewer satoshis than its active Fissions.
|
|
222
|
+
**/
|
|
223
|
+
InsufficientSatoshisForFissions: AugmentedError<ApiType>;
|
|
224
|
+
/**
|
|
225
|
+
* The requested Lock securitization does not cover its active Fission liabilities.
|
|
132
226
|
**/
|
|
133
|
-
|
|
227
|
+
InsufficientSecuritizationForFissions: AugmentedError<ApiType>;
|
|
134
228
|
InsufficientVaultFunds: AugmentedError<ApiType>;
|
|
229
|
+
/**
|
|
230
|
+
* The external destination amount must be nonzero and fit with the network fee.
|
|
231
|
+
**/
|
|
232
|
+
InvalidBitcoinReleaseAmount: AugmentedError<ApiType>;
|
|
135
233
|
/**
|
|
136
234
|
* The bitcoin script to lock this bitcoin has errors
|
|
137
235
|
**/
|
|
@@ -145,7 +243,11 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
145
243
|
**/
|
|
146
244
|
InvalidVaultAmount: AugmentedError<ApiType>;
|
|
147
245
|
/**
|
|
148
|
-
*
|
|
246
|
+
* The Lock cannot be released while it has active Fissions.
|
|
247
|
+
**/
|
|
248
|
+
LockHasActiveFissions: AugmentedError<ApiType>;
|
|
249
|
+
/**
|
|
250
|
+
* A Lock in the release process cannot be resecuritized.
|
|
149
251
|
**/
|
|
150
252
|
LockInProcessOfRelease: AugmentedError<ApiType>;
|
|
151
253
|
/**
|
|
@@ -155,11 +257,23 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
155
257
|
/**
|
|
156
258
|
* The lock funding has not been confirmed on bitcoin
|
|
157
259
|
**/
|
|
158
|
-
|
|
260
|
+
LockNotFunded: AugmentedError<ApiType>;
|
|
159
261
|
/**
|
|
160
262
|
* Too many orphaned utxo release requests for a lock
|
|
161
263
|
**/
|
|
162
264
|
MaxOrphanedUtxoReleaseRequestsExceeded: AugmentedError<ApiType>;
|
|
265
|
+
/**
|
|
266
|
+
* Too many confirmed Bitcoin outputs were assigned to one Lock.
|
|
267
|
+
**/
|
|
268
|
+
MaxUtxosPerLockExceeded: AugmentedError<ApiType>;
|
|
269
|
+
/**
|
|
270
|
+
* The requested price-history entry predates the Lock's current securitization.
|
|
271
|
+
**/
|
|
272
|
+
MicrogonsAtTargetPerBtcTickOlderThanCurrent: AugmentedError<ApiType>;
|
|
273
|
+
/**
|
|
274
|
+
* The minimum cannot increase while a release is pending.
|
|
275
|
+
**/
|
|
276
|
+
MinimumSatoshisIncreaseBlockedByPendingRelease: AugmentedError<ApiType>;
|
|
163
277
|
/**
|
|
164
278
|
* The price provider has no bitcoin prices available. This is a temporary error
|
|
165
279
|
**/
|
|
@@ -169,9 +283,9 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
169
283
|
**/
|
|
170
284
|
NoPermissions: AugmentedError<ApiType>;
|
|
171
285
|
/**
|
|
172
|
-
*
|
|
286
|
+
* The requested securitization matches the Lock's current securitization.
|
|
173
287
|
**/
|
|
174
|
-
|
|
288
|
+
NoResecuritizationChange: AugmentedError<ApiType>;
|
|
175
289
|
/**
|
|
176
290
|
* No Vault public keys are available
|
|
177
291
|
**/
|
|
@@ -219,9 +333,9 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
219
333
|
**/
|
|
220
334
|
BitcoinHeightNotConfirmed: AugmentedError<ApiType>;
|
|
221
335
|
/**
|
|
222
|
-
* Duplicated
|
|
336
|
+
* Duplicated BitcoinLockId. Already in use
|
|
223
337
|
**/
|
|
224
|
-
|
|
338
|
+
DuplicateLockId: AugmentedError<ApiType>;
|
|
225
339
|
/**
|
|
226
340
|
* Insufficient bitcoin amount
|
|
227
341
|
**/
|
|
@@ -234,14 +348,6 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
234
348
|
* Invalid bitcoin sync height attempted
|
|
235
349
|
**/
|
|
236
350
|
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
351
|
/**
|
|
246
352
|
* Too many UTXOs are being watched
|
|
247
353
|
**/
|
|
@@ -267,11 +373,7 @@ declare module '@polkadot/api-base/types/errors' {
|
|
|
267
373
|
**/
|
|
268
374
|
ScriptPubkeyConflict: AugmentedError<ApiType>;
|
|
269
375
|
/**
|
|
270
|
-
*
|
|
271
|
-
**/
|
|
272
|
-
UtxoNotCandidate: AugmentedError<ApiType>;
|
|
273
|
-
/**
|
|
274
|
-
* Locked Utxo Not Found
|
|
376
|
+
* Watched Lock or attached UTXO not found.
|
|
275
377
|
**/
|
|
276
378
|
UtxoNotLocked: AugmentedError<ApiType>;
|
|
277
379
|
};
|