@argonprotocol/mainchain 1.3.2 → 1.3.4
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/browser/index.d.ts +11998 -0
- package/browser/index.js +2732 -0
- package/browser/index.js.map +1 -0
- package/lib/{chunk-NU36V3JQ.cjs → chunk-LB6BAURC.cjs} +56 -54
- package/lib/chunk-LB6BAURC.cjs.map +1 -0
- package/lib/{chunk-CGXT6XF7.js → chunk-P3OMJABP.js} +315 -332
- package/lib/chunk-P3OMJABP.js.map +1 -0
- package/lib/{chunk-FNSFV3MO.js → chunk-QVXW4O7X.js} +8 -6
- package/lib/chunk-QVXW4O7X.js.map +1 -0
- package/lib/{chunk-SHAEHPI5.cjs → chunk-W5SOPU7I.cjs} +349 -366
- package/lib/chunk-W5SOPU7I.cjs.map +1 -0
- package/lib/cli.cjs +11 -6
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.js +8 -3
- package/lib/cli.js.map +1 -1
- package/lib/clis/index.cjs +3 -3
- package/lib/clis/index.d.cts +2 -0
- package/lib/clis/index.d.ts +2 -0
- package/lib/clis/index.js +2 -2
- package/lib/index.cjs +62 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +79 -111
- package/lib/index.d.ts +79 -111
- package/lib/index.js +63 -3
- package/package.json +8 -3
- package/lib/chunk-CGXT6XF7.js.map +0 -1
- package/lib/chunk-FNSFV3MO.js.map +0 -1
- package/lib/chunk-NU36V3JQ.cjs.map +0 -1
- package/lib/chunk-SHAEHPI5.cjs.map +0 -1
package/lib/index.d.cts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import * as _polkadot_api_base_types from '@polkadot/api-base/types';
|
|
2
2
|
import { ApiTypes, AugmentedConst, AugmentedError, AugmentedEvent, AugmentedQuery, AugmentedSubmittable, SubmittableExtrinsic, AugmentedCall } from '@polkadot/api-base/types';
|
|
3
3
|
import { u128, u32, u64, u16, u8, bool, Bytes, Vec, Option, U8aFixed, U256, i128, Result, Null, BTreeSet, BTreeMap, Compact, Text, HashMap, U64, f64, Json, BitVec, Bool, f32, F32, F64, I128, i16, I16, i256, I256, i32, I32, i64, I64, i8, I8, isize, ISize, OptionBool, Raw, Type, U128, U16, u256, U32, U8, usize, USize, Struct, Enum } from '@polkadot/types-codec';
|
|
4
|
+
export { BTreeMap, Bool, Bytes, Compact, Enum, Null, Option, Range, Result, Struct, Text, Tuple, U256, U8aFixed, Vec, bool, i128, u128, u16, u32, u64, u8 } from '@polkadot/types-codec';
|
|
4
5
|
import { ITuple, AnyNumber, IMethod, Codec } from '@polkadot/types-codec/types';
|
|
5
|
-
export
|
|
6
|
+
export { Codec, ITuple } from '@polkadot/types-codec/types';
|
|
6
7
|
import { Percent, AccountId32, H256, MultiAddress, Call, Hash, SignedBlock, BlockNumber, Header, StorageData, AccountId, Justification, H160, H64, KeyValue, Index, Block, ExtrinsicInclusionMode, KeyTypeId, Balance, Weight, AccountId20, AccountId33, AccountIdOf, AccountIndex, Address, AssetId, BalanceOf, BlockNumberFor, BlockNumberOf, CallHash, CallHashOf, ChangesTrieConfiguration, ChangesTrieSignal, CodecHash, Consensus, ConsensusEngineId, CrateVersion, Digest, DigestItem, EncodedJustification, ExtrinsicsWeight, Fixed128, Fixed64, FixedI128, FixedI64, FixedU128, FixedU64, H1024, H128, H2048, H32, H512, HeaderPartial, I32F32, IndicesLookupSource, Justifications, LockIdentifier, LookupSource, LookupTarget, ModuleId, Moment, MultiSigner, OpaqueCall, Origin, OriginCaller, PalletId, PalletsOrigin, PalletVersion, Pays, Perbill, Permill, Perquintill, PerU16, Phantom, PhantomData, PreRuntime, Releases, RuntimeCall, RuntimeDbWeight, RuntimeEvent, Seal, SealV0, SignedBlockWithJustification, SignedBlockWithJustifications, Slot, SlotDuration, StorageInfo, StorageProof, TransactionInfo, TransactionLongevity, TransactionPriority, TransactionStorageProof, TransactionTag, U32F32, ValidatorId, ValidatorIdOf, WeightMultiplier, WeightV0, WeightV1, WeightV2 } from '@polkadot/types/interfaces/runtime';
|
|
8
|
+
export { AccountId, AccountId32, Block, Call, H160, H256, Header, MultiAddress, Permill } from '@polkadot/types/interfaces/runtime';
|
|
7
9
|
import { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, SpWeightsRuntimeDbWeight, SpVersionRuntimeVersion, FrameSupportTokensMiscBalanceStatus, SpRuntimeDispatchError, ArgonPrimitivesBitcoinUtxoRef, ArgonPrimitivesBitcoinBitcoinRejectedReason, ArgonPrimitivesBlockSealBlockPayout, PalletDomainsDomainRegistration, ArgonPrimitivesDomainZoneRecord, ArgonRuntimeOriginCaller, SpConsensusGrandpaAppPublic, PalletHyperbridgeVersionedHostParams, PalletIsmpErrorsHandlingError, IsmpEventsRequestResponseHandled, IsmpEventsTimeoutHandled, IsmpHostStateMachine, IsmpConsensusStateMachineHeight, IsmpConsensusStateMachineId, ArgonPrimitivesBlockSealMiningRegistration, PalletMintMintType, PalletMultisigTimepoint, ArgonPrimitivesNotaryNotaryRecord, ArgonPrimitivesNotaryNotaryMeta, ArgonNotaryAuditErrorVerifyError, PalletProxyDepositKind, ArgonRuntimeProxyType, FrameSystemDispatchEventInfo, PalletBalancesAccountData, FrameSupportTokensMiscIdAmountRuntimeFreezeReason, FrameSupportTokensMiscIdAmountRuntimeHoldReason, PalletBalancesBalanceLock, PalletBalancesReserveData, PalletBitcoinLocksLockedBitcoin, PalletBitcoinLocksLockReleaseRequest, ArgonPrimitivesBitcoinBitcoinNetwork, ArgonPrimitivesBitcoinBitcoinBlock, ArgonPrimitivesBitcoinUtxoValue, ArgonPrimitivesForkPower, ArgonPrimitivesProvidersBlockSealerInfo, ArgonPrimitivesInherentsBlockSealInherent, ArgonPrimitivesDigestsBlockVoteDigest, ArgonPrimitivesNotaryNotaryNotebookVoteDigestDetails, PalletChainTransferQueuedTransferOut, ArgonPrimitivesDigestsDigestset, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, IsmpConsensusStateCommitment, PalletLiquidityPoolsLiquidityPoolCapital, PalletLiquidityPoolsPrebondedArgons, PalletLiquidityPoolsLiquidityPool, ArgonPrimitivesBlockSealMiningBidStats, ArgonPrimitivesBlockSealMiningSlotConfig, PalletMintMintAction, PalletMultisigMultisig, ArgonPrimitivesBalanceChangeAccountOrigin, ArgonPrimitivesDigestsNotebookDigest, ArgonPrimitivesNotaryNotaryNotebookKeyDetails, PalletPriceIndexPriceIndex, PalletProxyAnnouncement, PalletProxyProxyDefinition, FrameSystemAccountInfo, FrameSystemCodeUpgradeAuthorization, FrameSupportDispatchPerDispatchClassWeight, SpRuntimeDigest, FrameSystemEventRecord, FrameSystemPhase, SpWeightsWeightV2Weight, FrameSystemLastRuntimeUpgradeInfo, ArgonPrimitivesTickTicker, PalletTransactionPaymentReleases, PalletVaultsVaultFrameFeeRevenue, ArgonPrimitivesVault, ArgonPrimitivesBitcoinBitcoinXPub, PalletBalancesAdjustmentDirection, ArgonPrimitivesBitcoinCompressedBitcoinPubkey, ArgonPrimitivesBitcoinH256Le, ArgonPrimitivesInherentsBitcoinUtxoSync, SpConsensusGrandpaEquivocationProof, SpCoreVoid, IsmpMessagingCreateConsensusState, PalletIsmpUtilsFundMessageParams, IsmpMessagingMessage, PalletIsmpUtilsUpdateConsensusState, IsmpGrandpaAddStateMachine, ArgonRuntimeSessionKeys, ArgonPrimitivesNotebookSignedNotebookHeader, PalletTokenGatewayAssetRegistration, PalletTokenGatewayTeleportParams, PalletTokenGatewayPrecisionUpdate, TokenGatewayPrimitivesGatewayAssetUpdate, PalletVaultsVaultConfig, ArgonPrimitivesVaultVaultTerms, ArgonPrimitivesBitcoinOpaqueBitcoinXpub } from '@polkadot/types/lookup';
|
|
8
10
|
export * from '@polkadot/types/lookup';
|
|
9
|
-
import * as _polkadot_types_types from '@polkadot/types/types';
|
|
10
11
|
import { Observable, IExtrinsic } from '@polkadot/types/types';
|
|
11
12
|
import { AugmentedRpc } from '@polkadot/rpc-core/types';
|
|
12
|
-
import { StorageKey, Metadata, Data, GenericEvent
|
|
13
|
-
export * from '@polkadot/types';
|
|
13
|
+
import { StorageKey, Metadata, Data, GenericEvent as GenericEvent$1 } from '@polkadot/types';
|
|
14
14
|
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
|
15
|
+
export { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
|
15
16
|
import { EpochAuthorship, OpaqueKeyOwnershipProof, AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeGenesisConfiguration, BabeGenesisConfigurationV1, BabeWeight, Epoch, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
|
|
16
17
|
import { BeefyVersionedFinalityProof, BeefyAuthoritySet, BeefyCommitment, BeefyCompactSignedCommitment, BeefyEquivocationProof, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, BeefyVoteMessage, MmrRootHash, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
|
17
18
|
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
|
19
|
+
export { BlockHash } from '@polkadot/types/interfaces/chain';
|
|
18
20
|
import { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
|
19
21
|
import { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
|
20
22
|
import { ContractCallRequest, ContractExecResult, InstantiateRequestV1, ContractInstantiateResult, CodeUploadRequest, CodeUploadResult, AliveContractInfo, CodeHash, CodeSource, CodeUploadResultValue, ContractCallFlags, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractExecResultU64, ContractInfo, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractInstantiateResultU64, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts';
|
|
@@ -87,12 +89,16 @@ export { Keyring } from '@polkadot/api';
|
|
|
87
89
|
export { decodeAddress, mnemonicGenerate } from '@polkadot/util-crypto';
|
|
88
90
|
export { InterfaceTypes as interfaces } from '@polkadot/types/types/registry';
|
|
89
91
|
export { KeypairType } from '@polkadot/util-crypto/types';
|
|
92
|
+
import * as _polkadot_types_types_extrinsic from '@polkadot/types/types/extrinsic';
|
|
90
93
|
import { ISubmittableResult } from '@polkadot/types/types/extrinsic';
|
|
94
|
+
export { IExtrinsic, ISignerPayload, ISubmittableResult, Signer, SignerResult } from '@polkadot/types/types/extrinsic';
|
|
91
95
|
import { SubmittableExtrinsic as SubmittableExtrinsic$1 } from '@polkadot/api/promise/types';
|
|
92
96
|
import { SignerOptions, ApiDecoration } from '@polkadot/api/types';
|
|
97
|
+
import { GenericEvent } from '@polkadot/types/generic';
|
|
98
|
+
export { GenericAddress, GenericBlock, GenericEvent } from '@polkadot/types/generic';
|
|
93
99
|
import BigNumber from 'bignumber.js';
|
|
94
100
|
import { DispatchError as DispatchError$1, Header as Header$1 } from '@polkadot/types/interfaces';
|
|
95
|
-
export
|
|
101
|
+
export { hexToU8a, u8aEq, u8aToHex } from '@polkadot/util';
|
|
96
102
|
|
|
97
103
|
declare module '@polkadot/api-base/types/consts' {
|
|
98
104
|
interface AugmentedConsts<ApiType extends ApiTypes> {
|
|
@@ -1779,12 +1785,14 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1779
1785
|
utxoId: u64,
|
|
1780
1786
|
vaultId: u32,
|
|
1781
1787
|
lockPrice: u128,
|
|
1782
|
-
accountId: AccountId32
|
|
1788
|
+
accountId: AccountId32,
|
|
1789
|
+
securityFee: u128
|
|
1783
1790
|
], {
|
|
1784
1791
|
utxoId: u64;
|
|
1785
1792
|
vaultId: u32;
|
|
1786
1793
|
lockPrice: u128;
|
|
1787
1794
|
accountId: AccountId32;
|
|
1795
|
+
securityFee: u128;
|
|
1788
1796
|
}>;
|
|
1789
1797
|
BitcoinLockRatcheted: AugmentedEvent<ApiType, [
|
|
1790
1798
|
utxoId: u64,
|
|
@@ -3179,12 +3187,14 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
3179
3187
|
vaultId: u32,
|
|
3180
3188
|
locker: AccountId32,
|
|
3181
3189
|
amount: u128,
|
|
3182
|
-
isRatchet: bool
|
|
3190
|
+
isRatchet: bool,
|
|
3191
|
+
feeRevenue: u128
|
|
3183
3192
|
], {
|
|
3184
3193
|
vaultId: u32;
|
|
3185
3194
|
locker: AccountId32;
|
|
3186
3195
|
amount: u128;
|
|
3187
3196
|
isRatchet: bool;
|
|
3197
|
+
feeRevenue: u128;
|
|
3188
3198
|
}>;
|
|
3189
3199
|
FundsReleased: AugmentedEvent<ApiType, [
|
|
3190
3200
|
vaultId: u32,
|
|
@@ -8562,6 +8572,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
8562
8572
|
readonly locker: AccountId32;
|
|
8563
8573
|
readonly amount: u128;
|
|
8564
8574
|
readonly isRatchet: bool;
|
|
8575
|
+
readonly feeRevenue: u128;
|
|
8565
8576
|
} & Struct;
|
|
8566
8577
|
readonly isFundLockCanceled: boolean;
|
|
8567
8578
|
readonly asFundLockCanceled: {
|
|
@@ -8601,6 +8612,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
8601
8612
|
readonly vaultId: u32;
|
|
8602
8613
|
readonly lockPrice: u128;
|
|
8603
8614
|
readonly accountId: AccountId32;
|
|
8615
|
+
readonly securityFee: u128;
|
|
8604
8616
|
} & Struct;
|
|
8605
8617
|
readonly isBitcoinLockRatcheted: boolean;
|
|
8606
8618
|
readonly asBitcoinLockRatcheted: {
|
|
@@ -11243,8 +11255,10 @@ declare class TxSubmitter {
|
|
|
11243
11255
|
logResults?: boolean;
|
|
11244
11256
|
waitForBlock?: boolean;
|
|
11245
11257
|
useLatestNonce?: boolean;
|
|
11258
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11246
11259
|
}): Promise<TxResult>;
|
|
11247
11260
|
}
|
|
11261
|
+
type ITxProgressCallback = (progressToInBlock: number, result: TxResult) => void;
|
|
11248
11262
|
declare class TxResult {
|
|
11249
11263
|
private readonly client;
|
|
11250
11264
|
private shouldLog;
|
|
@@ -11265,6 +11279,7 @@ declare class TxResult {
|
|
|
11265
11279
|
* The fee tip paid for the transaction.
|
|
11266
11280
|
*/
|
|
11267
11281
|
finalFeeTip?: bigint;
|
|
11282
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11268
11283
|
private inBlockResolve;
|
|
11269
11284
|
private inBlockReject;
|
|
11270
11285
|
private finalizedResolve;
|
|
@@ -11291,7 +11306,8 @@ type NonNullableProps<T> = {
|
|
|
11291
11306
|
};
|
|
11292
11307
|
declare function filterUndefined<T extends Record<string, any>>(obj: Partial<T>): NonNullableProps<T>;
|
|
11293
11308
|
declare function gettersToObject<T>(obj: T): Promise<T>;
|
|
11294
|
-
declare function toFixedNumber(value: number,
|
|
11309
|
+
declare function toFixedNumber(value: string | number | BigNumber, // accept string to avoid early precision loss
|
|
11310
|
+
decimals: number): bigint;
|
|
11295
11311
|
declare function convertNumberToFixedU128(value: number): bigint;
|
|
11296
11312
|
declare function convertFixedU128ToBigNumber(fixedU128: bigint): BigNumber;
|
|
11297
11313
|
declare function convertPermillToBigNumber(permill: bigint): BigNumber;
|
|
@@ -11389,7 +11405,7 @@ declare class FrameCalculator {
|
|
|
11389
11405
|
private genesisTick;
|
|
11390
11406
|
getForTick(client: ArgonClient, tick: number): Promise<number>;
|
|
11391
11407
|
getTickRangeForFrame(client: ArgonClient, frameId: number): Promise<[number, number]>;
|
|
11392
|
-
getForHeader(client: ArgonClient, header: Header
|
|
11408
|
+
getForHeader(client: ArgonClient, header: Header): Promise<number | undefined>;
|
|
11393
11409
|
private getConfig;
|
|
11394
11410
|
}
|
|
11395
11411
|
|
|
@@ -11413,18 +11429,16 @@ declare class AccountMiners {
|
|
|
11413
11429
|
}>;
|
|
11414
11430
|
frameCalculator: FrameCalculator;
|
|
11415
11431
|
private trackedAccountsByAddress;
|
|
11416
|
-
constructor(accountset: Accountset, registeredMiners: {
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
subaccountIndex: number;
|
|
11420
|
-
}[], options?: {
|
|
11432
|
+
constructor(accountset: Accountset, registeredMiners: (ISubaccountMiner & {
|
|
11433
|
+
seat: IMiningIndex;
|
|
11434
|
+
})[], options?: {
|
|
11421
11435
|
shouldLog: boolean;
|
|
11422
11436
|
});
|
|
11423
11437
|
watch(): Promise<BlockWatch>;
|
|
11424
11438
|
onBlock(header: Header, digests: {
|
|
11425
11439
|
author: string;
|
|
11426
11440
|
tick: number;
|
|
11427
|
-
}, events: GenericEvent[]): Promise<{
|
|
11441
|
+
}, events: GenericEvent$1[]): Promise<{
|
|
11428
11442
|
[cohortStartingFrameId: number]: {
|
|
11429
11443
|
argonsMinted: bigint;
|
|
11430
11444
|
argonsMined: bigint;
|
|
@@ -11444,13 +11458,14 @@ type IAddressNames = Map<string, string>;
|
|
|
11444
11458
|
interface ISubaccountMiner {
|
|
11445
11459
|
address: string;
|
|
11446
11460
|
subaccountIndex: number;
|
|
11447
|
-
seat?:
|
|
11448
|
-
frameId: number;
|
|
11449
|
-
index: number;
|
|
11450
|
-
bidAmount: bigint;
|
|
11451
|
-
};
|
|
11461
|
+
seat?: IMiningIndex;
|
|
11452
11462
|
isLastDay: boolean;
|
|
11453
11463
|
}
|
|
11464
|
+
interface IMiningIndex {
|
|
11465
|
+
startingFrameId: number;
|
|
11466
|
+
index: number;
|
|
11467
|
+
bidAmount: bigint;
|
|
11468
|
+
}
|
|
11454
11469
|
declare class Accountset {
|
|
11455
11470
|
txSubmitterPair: KeyringPair;
|
|
11456
11471
|
isProxy: boolean;
|
|
@@ -11569,10 +11584,7 @@ interface IAccountStatus {
|
|
|
11569
11584
|
address: string;
|
|
11570
11585
|
argons: string;
|
|
11571
11586
|
argonots: string;
|
|
11572
|
-
seat?:
|
|
11573
|
-
frameId: number;
|
|
11574
|
-
index: number;
|
|
11575
|
-
};
|
|
11587
|
+
seat?: IMiningIndex;
|
|
11576
11588
|
bidPlace?: number;
|
|
11577
11589
|
bidAmount?: bigint;
|
|
11578
11590
|
isWorkingOn?: boolean;
|
|
@@ -11603,9 +11615,8 @@ declare class MiningBids {
|
|
|
11603
11615
|
}
|
|
11604
11616
|
|
|
11605
11617
|
declare class Vault {
|
|
11606
|
-
|
|
11618
|
+
tickDuration: number;
|
|
11607
11619
|
securitization: bigint;
|
|
11608
|
-
securitizationRatio: BigNumber;
|
|
11609
11620
|
argonsLocked: bigint;
|
|
11610
11621
|
argonsPendingActivation: bigint;
|
|
11611
11622
|
argonsScheduledForRelease: Map<number, bigint>;
|
|
@@ -11617,9 +11628,12 @@ declare class Vault {
|
|
|
11617
11628
|
pendingTermsChangeTick?: number;
|
|
11618
11629
|
openedDate: Date;
|
|
11619
11630
|
openedTick: number;
|
|
11620
|
-
|
|
11631
|
+
securitizationRatio: number;
|
|
11632
|
+
constructor(id: number, vault: ArgonPrimitivesVault, tickDuration: number);
|
|
11633
|
+
load(vault: ArgonPrimitivesVault): void;
|
|
11621
11634
|
availableBitcoinSpace(): bigint;
|
|
11622
11635
|
getRelockCapacity(): bigint;
|
|
11636
|
+
securitizationRatioBN(): BigNumber;
|
|
11623
11637
|
recoverySecuritization(): bigint;
|
|
11624
11638
|
minimumSecuritization(): bigint;
|
|
11625
11639
|
activatedSecuritization(): bigint;
|
|
@@ -11628,7 +11642,7 @@ declare class Vault {
|
|
|
11628
11642
|
*/
|
|
11629
11643
|
activatedSecuritizationPerSlot(): bigint;
|
|
11630
11644
|
calculateBitcoinFee(amount: bigint): bigint;
|
|
11631
|
-
static get(client: ArgonClient, vaultId: number): Promise<Vault>;
|
|
11645
|
+
static get(client: ArgonClient, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
|
|
11632
11646
|
static create(client: ArgonClient, keypair: KeyringPair, args: {
|
|
11633
11647
|
securitization: bigint | number;
|
|
11634
11648
|
securitizationRatio: number;
|
|
@@ -11637,9 +11651,14 @@ declare class Vault {
|
|
|
11637
11651
|
bitcoinXpub: string;
|
|
11638
11652
|
liquidityPoolProfitSharing: number;
|
|
11639
11653
|
tip?: bigint;
|
|
11654
|
+
doNotExceedBalance?: bigint;
|
|
11655
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11640
11656
|
}, config?: {
|
|
11641
11657
|
tickDurationMillis?: number;
|
|
11642
|
-
}): Promise<
|
|
11658
|
+
}): Promise<{
|
|
11659
|
+
vault: Vault;
|
|
11660
|
+
txResult: TxResult;
|
|
11661
|
+
}>;
|
|
11643
11662
|
}
|
|
11644
11663
|
interface ITerms {
|
|
11645
11664
|
readonly bitcoinAnnualPercentRate: BigNumber;
|
|
@@ -11697,77 +11716,6 @@ type WatchAlerts = {
|
|
|
11697
11716
|
liquidityPoolSpaceAvailable?: bigint;
|
|
11698
11717
|
};
|
|
11699
11718
|
|
|
11700
|
-
declare enum SeatReductionReason {
|
|
11701
|
-
InsufficientFunds = "InsufficientFunds",
|
|
11702
|
-
MaxBidTooLow = "MaxBidTooLow",
|
|
11703
|
-
MaxBudgetTooLow = "MaxBudgetTooLow"
|
|
11704
|
-
}
|
|
11705
|
-
interface IBidHistoryEntry {
|
|
11706
|
-
cohortStartingFrameId: number;
|
|
11707
|
-
blockNumber: number;
|
|
11708
|
-
tick: number;
|
|
11709
|
-
bidChanges: {
|
|
11710
|
-
address: string;
|
|
11711
|
-
bidAmount: bigint;
|
|
11712
|
-
bidPosition: number | null;
|
|
11713
|
-
prevPosition: number | null;
|
|
11714
|
-
prevBidAmount?: bigint;
|
|
11715
|
-
}[];
|
|
11716
|
-
myBidsPlaced?: {
|
|
11717
|
-
bids: number;
|
|
11718
|
-
bidPerSeat: bigint;
|
|
11719
|
-
txFeePlusTip: bigint;
|
|
11720
|
-
successfulBids: number;
|
|
11721
|
-
failureReason?: ExtrinsicError;
|
|
11722
|
-
};
|
|
11723
|
-
winningSeats: number;
|
|
11724
|
-
maxSeatsInPlay: number;
|
|
11725
|
-
maxSeatsReductionReason?: SeatReductionReason;
|
|
11726
|
-
}
|
|
11727
|
-
declare class CohortBidderHistory {
|
|
11728
|
-
readonly cohortStartingFrameId: number;
|
|
11729
|
-
readonly subaccounts: {
|
|
11730
|
-
index: number;
|
|
11731
|
-
isRebid: boolean;
|
|
11732
|
-
address: string;
|
|
11733
|
-
}[];
|
|
11734
|
-
bidHistory: IBidHistoryEntry[];
|
|
11735
|
-
stats: {
|
|
11736
|
-
seatsWon: number;
|
|
11737
|
-
totalArgonsBid: bigint;
|
|
11738
|
-
bidsAttempted: number;
|
|
11739
|
-
fees: bigint;
|
|
11740
|
-
maxBidPerSeat: bigint;
|
|
11741
|
-
argonotsPerSeat: bigint;
|
|
11742
|
-
argonotUsdPrice: number;
|
|
11743
|
-
cohortArgonsPerBlock: bigint;
|
|
11744
|
-
lastBlockNumber: number;
|
|
11745
|
-
};
|
|
11746
|
-
private lastBids;
|
|
11747
|
-
private readonly myAddresses;
|
|
11748
|
-
private maxSeatsInPlay;
|
|
11749
|
-
constructor(cohortStartingFrameId: number, subaccounts: {
|
|
11750
|
-
index: number;
|
|
11751
|
-
isRebid: boolean;
|
|
11752
|
-
address: string;
|
|
11753
|
-
}[]);
|
|
11754
|
-
init(client: ArgonClient): Promise<void>;
|
|
11755
|
-
maybeReducingSeats(maxSeats: number, reason: SeatReductionReason, historyEntry: IBidHistoryEntry): void;
|
|
11756
|
-
trackChange(next: {
|
|
11757
|
-
accountId: AccountId;
|
|
11758
|
-
bid: u128 | Compact<u128>;
|
|
11759
|
-
}[], blockNumber: number, tick: number, isLastEntry?: boolean): IBidHistoryEntry;
|
|
11760
|
-
onBidResult(historyEntry: IBidHistoryEntry, param: {
|
|
11761
|
-
txFeePlusTip: bigint;
|
|
11762
|
-
bidPerSeat: bigint;
|
|
11763
|
-
blockNumber: number | undefined;
|
|
11764
|
-
bidsAttempted: number;
|
|
11765
|
-
successfulBids: number;
|
|
11766
|
-
bidError?: ExtrinsicError;
|
|
11767
|
-
}): void;
|
|
11768
|
-
static getStartingData(api: ApiDecoration<'promise'>): Promise<Pick<CohortBidderHistory['stats'], 'argonotUsdPrice' | 'argonotsPerSeat' | 'cohortArgonsPerBlock'>>;
|
|
11769
|
-
}
|
|
11770
|
-
|
|
11771
11719
|
declare class CohortBidder {
|
|
11772
11720
|
accountset: Accountset;
|
|
11773
11721
|
cohortStartingFrameId: number;
|
|
@@ -11785,16 +11733,21 @@ declare class CohortBidder {
|
|
|
11785
11733
|
tipPerTransaction?: bigint;
|
|
11786
11734
|
};
|
|
11787
11735
|
get client(): Promise<ArgonClient>;
|
|
11788
|
-
|
|
11789
|
-
|
|
11736
|
+
txFees: bigint;
|
|
11737
|
+
winningBids: {
|
|
11738
|
+
address: string;
|
|
11739
|
+
bid: bigint;
|
|
11740
|
+
}[];
|
|
11790
11741
|
private unsubscribe?;
|
|
11791
11742
|
private pendingRequest;
|
|
11792
11743
|
private retryTimeout?;
|
|
11793
11744
|
private isStopped;
|
|
11794
11745
|
private needsRebid;
|
|
11795
11746
|
private lastBidTime;
|
|
11796
|
-
private history;
|
|
11797
11747
|
private millisPerTick?;
|
|
11748
|
+
private minIncrement;
|
|
11749
|
+
private nextCohortSize?;
|
|
11750
|
+
private lastBidBlockNumber;
|
|
11798
11751
|
private readonly myAddresses;
|
|
11799
11752
|
constructor(accountset: Accountset, cohortStartingFrameId: number, subaccounts: {
|
|
11800
11753
|
index: number;
|
|
@@ -11808,10 +11761,11 @@ declare class CohortBidder {
|
|
|
11808
11761
|
bidDelay: number;
|
|
11809
11762
|
tipPerTransaction?: bigint;
|
|
11810
11763
|
});
|
|
11811
|
-
stop(): Promise<CohortBidder['stats']>;
|
|
11812
11764
|
start(): Promise<void>;
|
|
11765
|
+
stop(): Promise<CohortBidder['winningBids']>;
|
|
11813
11766
|
private checkWinningBids;
|
|
11814
11767
|
private bid;
|
|
11768
|
+
private updateSeatsWon;
|
|
11815
11769
|
private checkCurrentSeats;
|
|
11816
11770
|
}
|
|
11817
11771
|
|
|
@@ -11865,7 +11819,7 @@ declare const SATS_PER_BTC = 100000000n;
|
|
|
11865
11819
|
declare class BitcoinLocks {
|
|
11866
11820
|
readonly client: Promise<ArgonClient>;
|
|
11867
11821
|
constructor(client: Promise<ArgonClient>);
|
|
11868
|
-
getUtxoIdFromEvents(events: GenericEvent[]): Promise<number | undefined>;
|
|
11822
|
+
getUtxoIdFromEvents(events: GenericEvent$1[]): Promise<number | undefined>;
|
|
11869
11823
|
getMarketRate(satoshis: bigint): Promise<bigint>;
|
|
11870
11824
|
getRedemptionRate(satoshis: bigint): Promise<bigint>;
|
|
11871
11825
|
getConfig(): Promise<IBitcoinLockConfig>;
|
|
@@ -11887,8 +11841,9 @@ declare class BitcoinLocks {
|
|
|
11887
11841
|
getReleaseRequest(utxoId: number, atHeight?: number): Promise<IReleaseRequestDetails | undefined>;
|
|
11888
11842
|
submitVaultSignature(args: {
|
|
11889
11843
|
utxoId: number;
|
|
11890
|
-
vaultSignature:
|
|
11844
|
+
vaultSignature: Uint8Array;
|
|
11891
11845
|
argonKeyring: KeyringPair;
|
|
11846
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11892
11847
|
}): Promise<TxResult>;
|
|
11893
11848
|
getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined>;
|
|
11894
11849
|
/**
|
|
@@ -11905,22 +11860,23 @@ declare class BitcoinLocks {
|
|
|
11905
11860
|
findPendingMints(utxoId: number): Promise<bigint[]>;
|
|
11906
11861
|
createInitializeLockTx(args: {
|
|
11907
11862
|
vault: Vault;
|
|
11908
|
-
ownerBitcoinPubkey:
|
|
11863
|
+
ownerBitcoinPubkey: Uint8Array;
|
|
11909
11864
|
satoshis: bigint;
|
|
11910
11865
|
argonKeyring: KeyringPair;
|
|
11911
11866
|
reducedBalanceBy?: bigint;
|
|
11912
11867
|
tip?: bigint;
|
|
11913
11868
|
}): Promise<{
|
|
11914
|
-
tx: _polkadot_api_base_types.SubmittableExtrinsic<"promise",
|
|
11869
|
+
tx: _polkadot_api_base_types.SubmittableExtrinsic<"promise", _polkadot_types_types_extrinsic.ISubmittableResult>;
|
|
11915
11870
|
securityFee: bigint;
|
|
11916
11871
|
txFee: bigint;
|
|
11917
11872
|
}>;
|
|
11918
11873
|
initializeLock(args: {
|
|
11919
11874
|
vault: Vault;
|
|
11920
|
-
ownerBitcoinPubkey:
|
|
11875
|
+
ownerBitcoinPubkey: Uint8Array;
|
|
11921
11876
|
argonKeyring: KeyringPair;
|
|
11922
11877
|
satoshis: bigint;
|
|
11923
11878
|
tip?: bigint;
|
|
11879
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11924
11880
|
}): Promise<{
|
|
11925
11881
|
lock: IBitcoinLock;
|
|
11926
11882
|
createdAtHeight: number;
|
|
@@ -11933,6 +11889,7 @@ declare class BitcoinLocks {
|
|
|
11933
11889
|
releaseRequest: IReleaseRequest;
|
|
11934
11890
|
argonKeyring: KeyringPair;
|
|
11935
11891
|
tip?: bigint;
|
|
11892
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11936
11893
|
}): Promise<{
|
|
11937
11894
|
blockHash: Uint8Array;
|
|
11938
11895
|
blockHeight: number;
|
|
@@ -11948,6 +11905,7 @@ declare class BitcoinLocks {
|
|
|
11948
11905
|
argonKeyring: KeyringPair;
|
|
11949
11906
|
tip?: bigint;
|
|
11950
11907
|
vault: Vault;
|
|
11908
|
+
txProgressCallback?: ITxProgressCallback;
|
|
11951
11909
|
}): Promise<{
|
|
11952
11910
|
securityFee: bigint;
|
|
11953
11911
|
txFee: bigint;
|
|
@@ -11975,8 +11933,9 @@ declare class BitcoinLocks {
|
|
|
11975
11933
|
}
|
|
11976
11934
|
interface IBitcoinLockConfig {
|
|
11977
11935
|
releaseExpirationBlocks: number;
|
|
11936
|
+
pendingConfirmationExpirationBlocks: number;
|
|
11978
11937
|
tickDurationMillis: number;
|
|
11979
|
-
bitcoinNetwork: ArgonPrimitivesBitcoinBitcoinNetwork
|
|
11938
|
+
bitcoinNetwork: ArgonPrimitivesBitcoinBitcoinNetwork;
|
|
11980
11939
|
}
|
|
11981
11940
|
interface IReleaseRequest {
|
|
11982
11941
|
toScriptPubkey: string;
|
|
@@ -12015,6 +11974,15 @@ declare function createKeyringPair(opts: {
|
|
|
12015
11974
|
cryptoType?: 'sr25519' | 'ed25519';
|
|
12016
11975
|
}): KeyringPair;
|
|
12017
11976
|
|
|
11977
|
+
interface ArgonClientConfig {
|
|
11978
|
+
debug?: boolean;
|
|
11979
|
+
keysVersion?: number;
|
|
11980
|
+
keysMnemonic?: string;
|
|
11981
|
+
subaccountRange?: string;
|
|
11982
|
+
}
|
|
11983
|
+
declare function setConfig(newConfig: ArgonClientConfig): void;
|
|
11984
|
+
declare function getConfig(): ArgonClientConfig;
|
|
11985
|
+
|
|
12018
11986
|
type ArgonClient = ApiPromise;
|
|
12019
11987
|
/**
|
|
12020
11988
|
* Wait for the crypto library to be ready (requires wasm, which needs async loading in commonjs)
|
|
@@ -12027,4 +11995,4 @@ declare function waitForLoad(): Promise<void>;
|
|
|
12027
11995
|
*/
|
|
12028
11996
|
declare function getClient(host: string): Promise<ArgonClient>;
|
|
12029
11997
|
|
|
12030
|
-
export { AccountMiners, AccountRegistry, Accountset, type ArgonClient, BidPool, BitcoinLocks, BlockWatch, CohortBidder,
|
|
11998
|
+
export { AccountMiners, AccountRegistry, Accountset, type ArgonClient, type ArgonClientConfig, BidPool, BitcoinLocks, BlockWatch, CohortBidder, ExtrinsicError, FrameCalculator, type IBitcoinLock, type IBitcoinLockConfig, type IMiningIndex, type IReleaseRequest, type IReleaseRequestDetails, type ISubaccountMiner, type ITxProgressCallback, JsonExt, MICROGONS_PER_ARGON, MiningBids, SATS_PER_BTC, TxResult, TxSubmitter, TypedEmitter, Vault, VaultMonitor, WageProtector, checkForExtrinsicSuccess, convertFixedU128ToBigNumber, convertNumberToFixedU128, convertNumberToPermill, convertPermillToBigNumber, createKeyringPair, createNanoEvents, dispatchErrorToExtrinsicError, dispatchErrorToString, eventDataToJson, filterUndefined, formatArgons, formatPercent, getAuthorFromHeader, getClient, getConfig, getTickFromHeader, gettersToObject, keyringFromSuri, setConfig, toFixedNumber, waitForLoad };
|