@argonprotocol/mainchain 1.3.2 → 1.3.3
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 +11990 -0
- package/browser/index.js +2721 -0
- package/browser/index.js.map +1 -0
- package/lib/{chunk-CGXT6XF7.js → chunk-FCT7GMFN.js} +287 -315
- package/lib/chunk-FCT7GMFN.js.map +1 -0
- package/lib/{chunk-NU36V3JQ.cjs → chunk-IQ3TNLS7.cjs} +55 -53
- package/lib/chunk-IQ3TNLS7.cjs.map +1 -0
- package/lib/{chunk-SHAEHPI5.cjs → chunk-OFYVHBKG.cjs} +323 -351
- package/lib/chunk-OFYVHBKG.cjs.map +1 -0
- package/lib/{chunk-FNSFV3MO.js → chunk-UZCZ347U.js} +7 -5
- package/lib/chunk-UZCZ347U.js.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 +60 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +68 -108
- package/lib/index.d.ts +68 -108
- package/lib/index.js +61 -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,23 @@
|
|
|
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
11
|
import * as _polkadot_types_types from '@polkadot/types/types';
|
|
10
12
|
import { Observable, IExtrinsic } from '@polkadot/types/types';
|
|
11
13
|
import { AugmentedRpc } from '@polkadot/rpc-core/types';
|
|
12
|
-
import { StorageKey, Metadata, Data, GenericEvent
|
|
13
|
-
export * from '@polkadot/types';
|
|
14
|
+
import { StorageKey, Metadata, Data, GenericEvent as GenericEvent$1 } from '@polkadot/types';
|
|
14
15
|
import { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
|
16
|
+
export { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
|
|
15
17
|
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
18
|
import { BeefyVersionedFinalityProof, BeefyAuthoritySet, BeefyCommitment, BeefyCompactSignedCommitment, BeefyEquivocationProof, BeefyId, BeefyNextAuthoritySet, BeefyPayload, BeefyPayloadId, BeefySignedCommitment, BeefyVoteMessage, MmrRootHash, ValidatorSet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
|
|
17
19
|
import { BlockHash } from '@polkadot/types/interfaces/chain';
|
|
20
|
+
export { BlockHash } from '@polkadot/types/interfaces/chain';
|
|
18
21
|
import { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
|
|
19
22
|
import { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus';
|
|
20
23
|
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';
|
|
@@ -90,9 +93,11 @@ export { KeypairType } from '@polkadot/util-crypto/types';
|
|
|
90
93
|
import { ISubmittableResult } from '@polkadot/types/types/extrinsic';
|
|
91
94
|
import { SubmittableExtrinsic as SubmittableExtrinsic$1 } from '@polkadot/api/promise/types';
|
|
92
95
|
import { SignerOptions, ApiDecoration } from '@polkadot/api/types';
|
|
96
|
+
import { GenericEvent } from '@polkadot/types/generic';
|
|
97
|
+
export { GenericAddress, GenericBlock, GenericEvent } from '@polkadot/types/generic';
|
|
93
98
|
import BigNumber from 'bignumber.js';
|
|
94
|
-
import { DispatchError as DispatchError$1, Header as Header$1 } from '@polkadot/types/interfaces';
|
|
95
|
-
export
|
|
99
|
+
import { DispatchError as DispatchError$1, Header as Header$1, ExtrinsicStatus as ExtrinsicStatus$1 } from '@polkadot/types/interfaces';
|
|
100
|
+
export { hexToU8a, u8aEq, u8aToHex } from '@polkadot/util';
|
|
96
101
|
|
|
97
102
|
declare module '@polkadot/api-base/types/consts' {
|
|
98
103
|
interface AugmentedConsts<ApiType extends ApiTypes> {
|
|
@@ -1779,12 +1784,14 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
1779
1784
|
utxoId: u64,
|
|
1780
1785
|
vaultId: u32,
|
|
1781
1786
|
lockPrice: u128,
|
|
1782
|
-
accountId: AccountId32
|
|
1787
|
+
accountId: AccountId32,
|
|
1788
|
+
securityFee: u128
|
|
1783
1789
|
], {
|
|
1784
1790
|
utxoId: u64;
|
|
1785
1791
|
vaultId: u32;
|
|
1786
1792
|
lockPrice: u128;
|
|
1787
1793
|
accountId: AccountId32;
|
|
1794
|
+
securityFee: u128;
|
|
1788
1795
|
}>;
|
|
1789
1796
|
BitcoinLockRatcheted: AugmentedEvent<ApiType, [
|
|
1790
1797
|
utxoId: u64,
|
|
@@ -3179,12 +3186,14 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
3179
3186
|
vaultId: u32,
|
|
3180
3187
|
locker: AccountId32,
|
|
3181
3188
|
amount: u128,
|
|
3182
|
-
isRatchet: bool
|
|
3189
|
+
isRatchet: bool,
|
|
3190
|
+
feeRevenue: u128
|
|
3183
3191
|
], {
|
|
3184
3192
|
vaultId: u32;
|
|
3185
3193
|
locker: AccountId32;
|
|
3186
3194
|
amount: u128;
|
|
3187
3195
|
isRatchet: bool;
|
|
3196
|
+
feeRevenue: u128;
|
|
3188
3197
|
}>;
|
|
3189
3198
|
FundsReleased: AugmentedEvent<ApiType, [
|
|
3190
3199
|
vaultId: u32,
|
|
@@ -8562,6 +8571,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
8562
8571
|
readonly locker: AccountId32;
|
|
8563
8572
|
readonly amount: u128;
|
|
8564
8573
|
readonly isRatchet: bool;
|
|
8574
|
+
readonly feeRevenue: u128;
|
|
8565
8575
|
} & Struct;
|
|
8566
8576
|
readonly isFundLockCanceled: boolean;
|
|
8567
8577
|
readonly asFundLockCanceled: {
|
|
@@ -8601,6 +8611,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
8601
8611
|
readonly vaultId: u32;
|
|
8602
8612
|
readonly lockPrice: u128;
|
|
8603
8613
|
readonly accountId: AccountId32;
|
|
8614
|
+
readonly securityFee: u128;
|
|
8604
8615
|
} & Struct;
|
|
8605
8616
|
readonly isBitcoinLockRatcheted: boolean;
|
|
8606
8617
|
readonly asBitcoinLockRatcheted: {
|
|
@@ -11243,6 +11254,7 @@ declare class TxSubmitter {
|
|
|
11243
11254
|
logResults?: boolean;
|
|
11244
11255
|
waitForBlock?: boolean;
|
|
11245
11256
|
useLatestNonce?: boolean;
|
|
11257
|
+
onResultCallback?: (result: ISubmittableResult) => void;
|
|
11246
11258
|
}): Promise<TxResult>;
|
|
11247
11259
|
}
|
|
11248
11260
|
declare class TxResult {
|
|
@@ -11265,6 +11277,7 @@ declare class TxResult {
|
|
|
11265
11277
|
* The fee tip paid for the transaction.
|
|
11266
11278
|
*/
|
|
11267
11279
|
finalFeeTip?: bigint;
|
|
11280
|
+
onResultCallback?: (result: ISubmittableResult) => void;
|
|
11268
11281
|
private inBlockResolve;
|
|
11269
11282
|
private inBlockReject;
|
|
11270
11283
|
private finalizedResolve;
|
|
@@ -11291,7 +11304,8 @@ type NonNullableProps<T> = {
|
|
|
11291
11304
|
};
|
|
11292
11305
|
declare function filterUndefined<T extends Record<string, any>>(obj: Partial<T>): NonNullableProps<T>;
|
|
11293
11306
|
declare function gettersToObject<T>(obj: T): Promise<T>;
|
|
11294
|
-
declare function toFixedNumber(value: number,
|
|
11307
|
+
declare function toFixedNumber(value: string | number | BigNumber, // accept string to avoid early precision loss
|
|
11308
|
+
decimals: number): bigint;
|
|
11295
11309
|
declare function convertNumberToFixedU128(value: number): bigint;
|
|
11296
11310
|
declare function convertFixedU128ToBigNumber(fixedU128: bigint): BigNumber;
|
|
11297
11311
|
declare function convertPermillToBigNumber(permill: bigint): BigNumber;
|
|
@@ -11389,7 +11403,7 @@ declare class FrameCalculator {
|
|
|
11389
11403
|
private genesisTick;
|
|
11390
11404
|
getForTick(client: ArgonClient, tick: number): Promise<number>;
|
|
11391
11405
|
getTickRangeForFrame(client: ArgonClient, frameId: number): Promise<[number, number]>;
|
|
11392
|
-
getForHeader(client: ArgonClient, header: Header
|
|
11406
|
+
getForHeader(client: ArgonClient, header: Header): Promise<number | undefined>;
|
|
11393
11407
|
private getConfig;
|
|
11394
11408
|
}
|
|
11395
11409
|
|
|
@@ -11413,18 +11427,16 @@ declare class AccountMiners {
|
|
|
11413
11427
|
}>;
|
|
11414
11428
|
frameCalculator: FrameCalculator;
|
|
11415
11429
|
private trackedAccountsByAddress;
|
|
11416
|
-
constructor(accountset: Accountset, registeredMiners: {
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
subaccountIndex: number;
|
|
11420
|
-
}[], options?: {
|
|
11430
|
+
constructor(accountset: Accountset, registeredMiners: (ISubaccountMiner & {
|
|
11431
|
+
seat: IMiningIndex;
|
|
11432
|
+
})[], options?: {
|
|
11421
11433
|
shouldLog: boolean;
|
|
11422
11434
|
});
|
|
11423
11435
|
watch(): Promise<BlockWatch>;
|
|
11424
11436
|
onBlock(header: Header, digests: {
|
|
11425
11437
|
author: string;
|
|
11426
11438
|
tick: number;
|
|
11427
|
-
}, events: GenericEvent[]): Promise<{
|
|
11439
|
+
}, events: GenericEvent$1[]): Promise<{
|
|
11428
11440
|
[cohortStartingFrameId: number]: {
|
|
11429
11441
|
argonsMinted: bigint;
|
|
11430
11442
|
argonsMined: bigint;
|
|
@@ -11444,13 +11456,14 @@ type IAddressNames = Map<string, string>;
|
|
|
11444
11456
|
interface ISubaccountMiner {
|
|
11445
11457
|
address: string;
|
|
11446
11458
|
subaccountIndex: number;
|
|
11447
|
-
seat?:
|
|
11448
|
-
frameId: number;
|
|
11449
|
-
index: number;
|
|
11450
|
-
bidAmount: bigint;
|
|
11451
|
-
};
|
|
11459
|
+
seat?: IMiningIndex;
|
|
11452
11460
|
isLastDay: boolean;
|
|
11453
11461
|
}
|
|
11462
|
+
interface IMiningIndex {
|
|
11463
|
+
startingFrameId: number;
|
|
11464
|
+
index: number;
|
|
11465
|
+
bidAmount: bigint;
|
|
11466
|
+
}
|
|
11454
11467
|
declare class Accountset {
|
|
11455
11468
|
txSubmitterPair: KeyringPair;
|
|
11456
11469
|
isProxy: boolean;
|
|
@@ -11569,10 +11582,7 @@ interface IAccountStatus {
|
|
|
11569
11582
|
address: string;
|
|
11570
11583
|
argons: string;
|
|
11571
11584
|
argonots: string;
|
|
11572
|
-
seat?:
|
|
11573
|
-
frameId: number;
|
|
11574
|
-
index: number;
|
|
11575
|
-
};
|
|
11585
|
+
seat?: IMiningIndex;
|
|
11576
11586
|
bidPlace?: number;
|
|
11577
11587
|
bidAmount?: bigint;
|
|
11578
11588
|
isWorkingOn?: boolean;
|
|
@@ -11617,7 +11627,8 @@ declare class Vault {
|
|
|
11617
11627
|
pendingTermsChangeTick?: number;
|
|
11618
11628
|
openedDate: Date;
|
|
11619
11629
|
openedTick: number;
|
|
11620
|
-
constructor(id: number, vault: ArgonPrimitivesVault
|
|
11630
|
+
constructor(id: number, vault: ArgonPrimitivesVault, tickDuration: number);
|
|
11631
|
+
load(vault: ArgonPrimitivesVault): void;
|
|
11621
11632
|
availableBitcoinSpace(): bigint;
|
|
11622
11633
|
getRelockCapacity(): bigint;
|
|
11623
11634
|
recoverySecuritization(): bigint;
|
|
@@ -11628,7 +11639,7 @@ declare class Vault {
|
|
|
11628
11639
|
*/
|
|
11629
11640
|
activatedSecuritizationPerSlot(): bigint;
|
|
11630
11641
|
calculateBitcoinFee(amount: bigint): bigint;
|
|
11631
|
-
static get(client: ArgonClient, vaultId: number): Promise<Vault>;
|
|
11642
|
+
static get(client: ArgonClient, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
|
|
11632
11643
|
static create(client: ArgonClient, keypair: KeyringPair, args: {
|
|
11633
11644
|
securitization: bigint | number;
|
|
11634
11645
|
securitizationRatio: number;
|
|
@@ -11637,9 +11648,14 @@ declare class Vault {
|
|
|
11637
11648
|
bitcoinXpub: string;
|
|
11638
11649
|
liquidityPoolProfitSharing: number;
|
|
11639
11650
|
tip?: bigint;
|
|
11651
|
+
doNotExceedBalance?: bigint;
|
|
11652
|
+
progressCallback?: (progressPct: number, status: ExtrinsicStatus$1) => void;
|
|
11640
11653
|
}, config?: {
|
|
11641
11654
|
tickDurationMillis?: number;
|
|
11642
|
-
}): Promise<
|
|
11655
|
+
}): Promise<{
|
|
11656
|
+
vault: Vault;
|
|
11657
|
+
txResult: TxResult;
|
|
11658
|
+
}>;
|
|
11643
11659
|
}
|
|
11644
11660
|
interface ITerms {
|
|
11645
11661
|
readonly bitcoinAnnualPercentRate: BigNumber;
|
|
@@ -11697,77 +11713,6 @@ type WatchAlerts = {
|
|
|
11697
11713
|
liquidityPoolSpaceAvailable?: bigint;
|
|
11698
11714
|
};
|
|
11699
11715
|
|
|
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
11716
|
declare class CohortBidder {
|
|
11772
11717
|
accountset: Accountset;
|
|
11773
11718
|
cohortStartingFrameId: number;
|
|
@@ -11785,16 +11730,21 @@ declare class CohortBidder {
|
|
|
11785
11730
|
tipPerTransaction?: bigint;
|
|
11786
11731
|
};
|
|
11787
11732
|
get client(): Promise<ArgonClient>;
|
|
11788
|
-
|
|
11789
|
-
|
|
11733
|
+
txFees: bigint;
|
|
11734
|
+
winningBids: {
|
|
11735
|
+
address: string;
|
|
11736
|
+
bid: bigint;
|
|
11737
|
+
}[];
|
|
11790
11738
|
private unsubscribe?;
|
|
11791
11739
|
private pendingRequest;
|
|
11792
11740
|
private retryTimeout?;
|
|
11793
11741
|
private isStopped;
|
|
11794
11742
|
private needsRebid;
|
|
11795
11743
|
private lastBidTime;
|
|
11796
|
-
private history;
|
|
11797
11744
|
private millisPerTick?;
|
|
11745
|
+
private minIncrement;
|
|
11746
|
+
private nextCohortSize?;
|
|
11747
|
+
private lastBidBlockNumber;
|
|
11798
11748
|
private readonly myAddresses;
|
|
11799
11749
|
constructor(accountset: Accountset, cohortStartingFrameId: number, subaccounts: {
|
|
11800
11750
|
index: number;
|
|
@@ -11808,10 +11758,11 @@ declare class CohortBidder {
|
|
|
11808
11758
|
bidDelay: number;
|
|
11809
11759
|
tipPerTransaction?: bigint;
|
|
11810
11760
|
});
|
|
11811
|
-
stop(): Promise<CohortBidder['stats']>;
|
|
11812
11761
|
start(): Promise<void>;
|
|
11762
|
+
stop(): Promise<CohortBidder['winningBids']>;
|
|
11813
11763
|
private checkWinningBids;
|
|
11814
11764
|
private bid;
|
|
11765
|
+
private updateSeatsWon;
|
|
11815
11766
|
private checkCurrentSeats;
|
|
11816
11767
|
}
|
|
11817
11768
|
|
|
@@ -11865,7 +11816,7 @@ declare const SATS_PER_BTC = 100000000n;
|
|
|
11865
11816
|
declare class BitcoinLocks {
|
|
11866
11817
|
readonly client: Promise<ArgonClient>;
|
|
11867
11818
|
constructor(client: Promise<ArgonClient>);
|
|
11868
|
-
getUtxoIdFromEvents(events: GenericEvent[]): Promise<number | undefined>;
|
|
11819
|
+
getUtxoIdFromEvents(events: GenericEvent$1[]): Promise<number | undefined>;
|
|
11869
11820
|
getMarketRate(satoshis: bigint): Promise<bigint>;
|
|
11870
11821
|
getRedemptionRate(satoshis: bigint): Promise<bigint>;
|
|
11871
11822
|
getConfig(): Promise<IBitcoinLockConfig>;
|
|
@@ -11887,7 +11838,7 @@ declare class BitcoinLocks {
|
|
|
11887
11838
|
getReleaseRequest(utxoId: number, atHeight?: number): Promise<IReleaseRequestDetails | undefined>;
|
|
11888
11839
|
submitVaultSignature(args: {
|
|
11889
11840
|
utxoId: number;
|
|
11890
|
-
vaultSignature:
|
|
11841
|
+
vaultSignature: Uint8Array;
|
|
11891
11842
|
argonKeyring: KeyringPair;
|
|
11892
11843
|
}): Promise<TxResult>;
|
|
11893
11844
|
getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined>;
|
|
@@ -11905,7 +11856,7 @@ declare class BitcoinLocks {
|
|
|
11905
11856
|
findPendingMints(utxoId: number): Promise<bigint[]>;
|
|
11906
11857
|
createInitializeLockTx(args: {
|
|
11907
11858
|
vault: Vault;
|
|
11908
|
-
ownerBitcoinPubkey:
|
|
11859
|
+
ownerBitcoinPubkey: Uint8Array;
|
|
11909
11860
|
satoshis: bigint;
|
|
11910
11861
|
argonKeyring: KeyringPair;
|
|
11911
11862
|
reducedBalanceBy?: bigint;
|
|
@@ -11917,7 +11868,7 @@ declare class BitcoinLocks {
|
|
|
11917
11868
|
}>;
|
|
11918
11869
|
initializeLock(args: {
|
|
11919
11870
|
vault: Vault;
|
|
11920
|
-
ownerBitcoinPubkey:
|
|
11871
|
+
ownerBitcoinPubkey: Uint8Array;
|
|
11921
11872
|
argonKeyring: KeyringPair;
|
|
11922
11873
|
satoshis: bigint;
|
|
11923
11874
|
tip?: bigint;
|
|
@@ -11976,7 +11927,7 @@ declare class BitcoinLocks {
|
|
|
11976
11927
|
interface IBitcoinLockConfig {
|
|
11977
11928
|
releaseExpirationBlocks: number;
|
|
11978
11929
|
tickDurationMillis: number;
|
|
11979
|
-
bitcoinNetwork: ArgonPrimitivesBitcoinBitcoinNetwork
|
|
11930
|
+
bitcoinNetwork: ArgonPrimitivesBitcoinBitcoinNetwork;
|
|
11980
11931
|
}
|
|
11981
11932
|
interface IReleaseRequest {
|
|
11982
11933
|
toScriptPubkey: string;
|
|
@@ -12015,6 +11966,15 @@ declare function createKeyringPair(opts: {
|
|
|
12015
11966
|
cryptoType?: 'sr25519' | 'ed25519';
|
|
12016
11967
|
}): KeyringPair;
|
|
12017
11968
|
|
|
11969
|
+
interface ArgonClientConfig {
|
|
11970
|
+
debug?: boolean;
|
|
11971
|
+
keysVersion?: number;
|
|
11972
|
+
keysMnemonic?: string;
|
|
11973
|
+
subaccountRange?: string;
|
|
11974
|
+
}
|
|
11975
|
+
declare function setConfig(newConfig: ArgonClientConfig): void;
|
|
11976
|
+
declare function getConfig(): ArgonClientConfig;
|
|
11977
|
+
|
|
12018
11978
|
type ArgonClient = ApiPromise;
|
|
12019
11979
|
/**
|
|
12020
11980
|
* Wait for the crypto library to be ready (requires wasm, which needs async loading in commonjs)
|
|
@@ -12027,4 +11987,4 @@ declare function waitForLoad(): Promise<void>;
|
|
|
12027
11987
|
*/
|
|
12028
11988
|
declare function getClient(host: string): Promise<ArgonClient>;
|
|
12029
11989
|
|
|
12030
|
-
export { AccountMiners, AccountRegistry, Accountset, type ArgonClient, BidPool, BitcoinLocks, BlockWatch, CohortBidder,
|
|
11990
|
+
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, JsonExt, MICROGONS_PER_ARGON, MiningBids, SATS_PER_BTC, 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 };
|