@argonprotocol/mainchain 1.4.3-dev.4408f4ff → 1.4.3-dev.5e4d8d6a
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 +39 -29
- package/browser/index.js +115 -87
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +111 -97
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +39 -29
- package/lib/index.d.ts +39 -29
- package/lib/index.js +105 -91
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
- package/src/interfaces/augment-api-consts.ts +1 -1
- package/src/interfaces/augment-api-errors.ts +1 -1
- package/src/interfaces/augment-api-events.ts +7 -7
- package/src/interfaces/augment-api-query.ts +2 -2
- package/src/interfaces/augment-api-rpc.ts +1 -1
- package/src/interfaces/augment-api-runtime.ts +1 -1
- package/src/interfaces/augment-api-tx.ts +1 -1
- package/src/interfaces/augment-types.ts +1 -1
- package/src/interfaces/lookup.ts +6 -6
- package/src/interfaces/types-lookup.ts +6 -6
package/browser/index.d.ts
CHANGED
|
@@ -2180,7 +2180,7 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
2180
2180
|
vaultId: u32,
|
|
2181
2181
|
liquidityPromised: u128,
|
|
2182
2182
|
securitization: u128,
|
|
2183
|
-
|
|
2183
|
+
lockedTargetPrice: u128,
|
|
2184
2184
|
accountId: AccountId32,
|
|
2185
2185
|
securityFee: u128
|
|
2186
2186
|
], {
|
|
@@ -2188,7 +2188,7 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
2188
2188
|
vaultId: u32;
|
|
2189
2189
|
liquidityPromised: u128;
|
|
2190
2190
|
securitization: u128;
|
|
2191
|
-
|
|
2191
|
+
lockedTargetPrice: u128;
|
|
2192
2192
|
accountId: AccountId32;
|
|
2193
2193
|
securityFee: u128;
|
|
2194
2194
|
}>;
|
|
@@ -2196,18 +2196,18 @@ declare module '@polkadot/api-base/types/events' {
|
|
|
2196
2196
|
utxoId: u64,
|
|
2197
2197
|
vaultId: u32,
|
|
2198
2198
|
liquidityPromised: u128,
|
|
2199
|
-
|
|
2199
|
+
oldTargetPrice: u128,
|
|
2200
2200
|
securityFee: u128,
|
|
2201
|
-
|
|
2201
|
+
newTargetPrice: u128,
|
|
2202
2202
|
amountBurned: u128,
|
|
2203
2203
|
accountId: AccountId32
|
|
2204
2204
|
], {
|
|
2205
2205
|
utxoId: u64;
|
|
2206
2206
|
vaultId: u32;
|
|
2207
2207
|
liquidityPromised: u128;
|
|
2208
|
-
|
|
2208
|
+
oldTargetPrice: u128;
|
|
2209
2209
|
securityFee: u128;
|
|
2210
|
-
|
|
2210
|
+
newTargetPrice: u128;
|
|
2211
2211
|
amountBurned: u128;
|
|
2212
2212
|
accountId: AccountId32;
|
|
2213
2213
|
}>;
|
|
@@ -3955,7 +3955,7 @@ declare module '@polkadot/api-base/types/storage' {
|
|
|
3955
3955
|
u64
|
|
3956
3956
|
]>;
|
|
3957
3957
|
/**
|
|
3958
|
-
* History of microgons per btc
|
|
3958
|
+
* History of target microgons per btc.
|
|
3959
3959
|
**/
|
|
3960
3960
|
microgonPerBtcHistory: AugmentedQuery<ApiType, () => Observable<Vec<ITuple<[u64, u128]>>>, [
|
|
3961
3961
|
]>;
|
|
@@ -9393,7 +9393,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
9393
9393
|
readonly vaultId: u32;
|
|
9394
9394
|
readonly liquidityPromised: u128;
|
|
9395
9395
|
readonly securitization: u128;
|
|
9396
|
-
readonly
|
|
9396
|
+
readonly lockedTargetPrice: u128;
|
|
9397
9397
|
readonly accountId: AccountId32;
|
|
9398
9398
|
readonly securityFee: u128;
|
|
9399
9399
|
} & Struct;
|
|
@@ -9402,9 +9402,9 @@ declare module '@polkadot/types/lookup' {
|
|
|
9402
9402
|
readonly utxoId: u64;
|
|
9403
9403
|
readonly vaultId: u32;
|
|
9404
9404
|
readonly liquidityPromised: u128;
|
|
9405
|
-
readonly
|
|
9405
|
+
readonly oldTargetPrice: u128;
|
|
9406
9406
|
readonly securityFee: u128;
|
|
9407
|
-
readonly
|
|
9407
|
+
readonly newTargetPrice: u128;
|
|
9408
9408
|
readonly amountBurned: u128;
|
|
9409
9409
|
readonly accountId: AccountId32;
|
|
9410
9410
|
} & Struct;
|
|
@@ -10869,7 +10869,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
10869
10869
|
interface PalletBitcoinLocksLockOptions extends Enum {
|
|
10870
10870
|
readonly isV1: boolean;
|
|
10871
10871
|
readonly asV1: {
|
|
10872
|
-
readonly
|
|
10872
|
+
readonly microgonsAtTargetPerBtc: Option<u128>;
|
|
10873
10873
|
} & Struct;
|
|
10874
10874
|
readonly type: 'V1';
|
|
10875
10875
|
}
|
|
@@ -11745,7 +11745,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
11745
11745
|
interface PalletBitcoinLocksLockedBitcoin extends Struct {
|
|
11746
11746
|
readonly vaultId: Compact<u32>;
|
|
11747
11747
|
readonly liquidityPromised: Compact<u128>;
|
|
11748
|
-
readonly
|
|
11748
|
+
readonly lockedTargetPrice: Compact<u128>;
|
|
11749
11749
|
readonly ownerAccount: AccountId32;
|
|
11750
11750
|
readonly securitizationRatio: u128;
|
|
11751
11751
|
readonly securityFees: Compact<u128>;
|
|
@@ -11771,7 +11771,7 @@ declare module '@polkadot/types/lookup' {
|
|
|
11771
11771
|
readonly bitcoinNetworkFee: Compact<u64>;
|
|
11772
11772
|
readonly cosignDueFrame: Compact<u64>;
|
|
11773
11773
|
readonly toScriptPubkey: Bytes;
|
|
11774
|
-
readonly
|
|
11774
|
+
readonly redemptionAmount: Compact<u128>;
|
|
11775
11775
|
}
|
|
11776
11776
|
/** @name PalletBitcoinLocksOrphanedUtxo (399) */
|
|
11777
11777
|
interface PalletBitcoinLocksOrphanedUtxo extends Struct {
|
|
@@ -12385,6 +12385,19 @@ declare function dispatchErrorToExtrinsicError(client: ArgonClient, error: IDisp
|
|
|
12385
12385
|
* @returns A promise that resolves if the extrinsic was successful, and rejects if it failed
|
|
12386
12386
|
*/
|
|
12387
12387
|
declare function checkForExtrinsicSuccess(events: EventRecord[], client: ArgonClient): Promise<void>;
|
|
12388
|
+
/**
|
|
12389
|
+
* Return a bigint value using a canonical field first, then named fallback fields on the same source object.
|
|
12390
|
+
* Helpful when reading runtime records that may use older field names across spec versions.
|
|
12391
|
+
* @param value The preferred bigint-like value, usually from the current field name
|
|
12392
|
+
* @param source The object to read fallback fields from
|
|
12393
|
+
* @param fallbackFields The fallback field names to check in order
|
|
12394
|
+
* @param fallback The value to return if no preferred or fallback field is present
|
|
12395
|
+
* @returns The preferred or fallback value converted to bigint
|
|
12396
|
+
*/
|
|
12397
|
+
declare function getBigIntFallback<T extends object>(value: IBigIntLike | undefined, source: T, fallbackFields: readonly string[], fallback?: bigint): bigint;
|
|
12398
|
+
type IBigIntLike = bigint | {
|
|
12399
|
+
toBigInt(): bigint;
|
|
12400
|
+
};
|
|
12388
12401
|
|
|
12389
12402
|
type ITxProgressCallback = (progressToInBlock: number, result?: TxResult) => void;
|
|
12390
12403
|
declare class TxResult {
|
|
@@ -12581,7 +12594,8 @@ declare class PriceIndex {
|
|
|
12581
12594
|
argonTimeWeightedAverageLiquidity?: BigNumber;
|
|
12582
12595
|
lastUpdatedTick?: number;
|
|
12583
12596
|
load(client: ArgonClient | ApiDecoration<'promise'>): Promise<this>;
|
|
12584
|
-
|
|
12597
|
+
getSatoshiPriceInMarketMicrogons(satoshis: bigint | number): bigint;
|
|
12598
|
+
getSatoshiPriceInTargetMicrogons(satoshis: bigint | number): bigint;
|
|
12585
12599
|
get rValue(): BigNumber;
|
|
12586
12600
|
get argonCpi(): BigNumber;
|
|
12587
12601
|
}
|
|
@@ -12596,7 +12610,7 @@ declare class BitcoinLock implements IBitcoinLock {
|
|
|
12596
12610
|
utxoId: number;
|
|
12597
12611
|
p2wshScriptHashHex: string;
|
|
12598
12612
|
vaultId: number;
|
|
12599
|
-
|
|
12613
|
+
lockedTargetPrice: bigint;
|
|
12600
12614
|
liquidityPromised: bigint;
|
|
12601
12615
|
ownerAccount: string;
|
|
12602
12616
|
satoshis: bigint;
|
|
@@ -12631,23 +12645,22 @@ declare class BitcoinLock implements IBitcoinLock {
|
|
|
12631
12645
|
bitcoinTxid: string;
|
|
12632
12646
|
} | undefined>;
|
|
12633
12647
|
findPendingMints(client: IQueryableClient): Promise<bigint[]>;
|
|
12634
|
-
|
|
12648
|
+
calculateRatchetingCosts(client: IQueryableClient, priceIndex: PriceIndex, vault: Vault, microgonsAtTargetPerBtc?: bigint): Promise<{
|
|
12635
12649
|
burnAmount: bigint;
|
|
12636
12650
|
ratchetingFee: bigint;
|
|
12637
|
-
marketRate: bigint;
|
|
12638
12651
|
}>;
|
|
12639
12652
|
ratchet(args: {
|
|
12640
12653
|
client: ArgonClient;
|
|
12641
12654
|
priceIndex: PriceIndex;
|
|
12642
12655
|
txSigner: TxSigningAccount;
|
|
12643
12656
|
vault: Vault;
|
|
12644
|
-
|
|
12657
|
+
microgonsAtTargetPerBtc?: bigint;
|
|
12645
12658
|
} & ISubmittableOptions): Promise<{
|
|
12646
12659
|
txResult: TxResult;
|
|
12647
12660
|
getRatchetResult: () => Promise<{
|
|
12648
12661
|
securityFee: bigint;
|
|
12649
12662
|
txFee: bigint;
|
|
12650
|
-
|
|
12663
|
+
lockedTargetPrice: bigint;
|
|
12651
12664
|
liquidityPromised: bigint;
|
|
12652
12665
|
pendingMint: bigint;
|
|
12653
12666
|
burned: bigint;
|
|
@@ -12655,7 +12668,7 @@ declare class BitcoinLock implements IBitcoinLock {
|
|
|
12655
12668
|
bitcoinBlockHeight: number;
|
|
12656
12669
|
}>;
|
|
12657
12670
|
}>;
|
|
12658
|
-
|
|
12671
|
+
calculateRedemptionAmount(priceIndex: PriceIndex): bigint;
|
|
12659
12672
|
requestRelease(args: {
|
|
12660
12673
|
client: ArgonClient;
|
|
12661
12674
|
priceIndex: PriceIndex;
|
|
@@ -12675,11 +12688,8 @@ declare class BitcoinLock implements IBitcoinLock {
|
|
|
12675
12688
|
} | undefined>;
|
|
12676
12689
|
getVaultCosignSignature(client: ArgonClient, atHeight: number): Promise<Uint8Array | undefined>;
|
|
12677
12690
|
static getUtxoIdFromEvents(client: IQueryableClient, events: GenericEvent$1[]): Promise<number | undefined>;
|
|
12678
|
-
static
|
|
12679
|
-
static
|
|
12680
|
-
satoshis: bigint;
|
|
12681
|
-
lockedMarketRate?: bigint;
|
|
12682
|
-
}): Promise<bigint>;
|
|
12691
|
+
static calculateRedemptionAmountFromSatoshis(priceIndex: PriceIndex, satoshis: bigint, lockedTargetPrice?: bigint): bigint;
|
|
12692
|
+
static calculateRedemptionAmount(priceIndex: PriceIndex, btcMicrogonsAtTarget: bigint, maxMicrogonsAtTarget?: bigint): bigint;
|
|
12683
12693
|
static getConfig(client: IQueryableClient): Promise<IBitcoinLockConfig>;
|
|
12684
12694
|
static getBitcoinConfirmedBlockHeight(client: IQueryableClient): Promise<number>;
|
|
12685
12695
|
static submitVaultSignature(args: {
|
|
@@ -12719,7 +12729,7 @@ declare class BitcoinLock implements IBitcoinLock {
|
|
|
12719
12729
|
satoshis: bigint;
|
|
12720
12730
|
txSigner: TxSigningAccount;
|
|
12721
12731
|
reducedBalanceBy?: bigint;
|
|
12722
|
-
|
|
12732
|
+
microgonsAtTargetPerBtc?: bigint;
|
|
12723
12733
|
tip?: bigint;
|
|
12724
12734
|
initializeForAccountId?: string;
|
|
12725
12735
|
}): Promise<{
|
|
@@ -12766,13 +12776,13 @@ interface IReleaseRequest {
|
|
|
12766
12776
|
interface IReleaseRequestDetails extends IReleaseRequest {
|
|
12767
12777
|
dueFrame: number;
|
|
12768
12778
|
vaultId: number;
|
|
12769
|
-
|
|
12779
|
+
redemptionAmount: bigint;
|
|
12770
12780
|
}
|
|
12771
12781
|
interface IBitcoinLock {
|
|
12772
12782
|
utxoId: number;
|
|
12773
12783
|
p2wshScriptHashHex: string;
|
|
12774
12784
|
vaultId: number;
|
|
12775
|
-
|
|
12785
|
+
lockedTargetPrice: bigint;
|
|
12776
12786
|
liquidityPromised: bigint;
|
|
12777
12787
|
ownerAccount: string;
|
|
12778
12788
|
satoshis: bigint;
|
|
@@ -12880,4 +12890,4 @@ declare function waitForLoad(): Promise<void>;
|
|
|
12880
12890
|
declare function getClient(host: string, options?: ApiOptions): Promise<ArgonClient>;
|
|
12881
12891
|
declare function getOfflineRegistry(): TypeRegistry;
|
|
12882
12892
|
|
|
12883
|
-
export { type ArgonClient, BitcoinLock, type EthereumEventLocator, type EthereumEventProof, type EthereumExecutionClient, type EthereumReceipt, type EthereumVerifyEventLogResult, ExtrinsicError, FIXED_U128_DECIMALS, type IArgonQueryable, type IBitcoinLock, type IBitcoinLockConfig, type IReleaseRequest, type IReleaseRequestDetails, type ISubmittableOptions, type ITerms, type ITxProgressCallback, MICROGONS_PER_ARGON, MINTING_GATEWAY_BURN_FOR_TRANSFER_EVENT_NAME, MINTING_GATEWAY_RUNTIME_DECIMALS, MINTING_GATEWAY_RUNTIME_TO_ERC20_SCALE, MINTING_GATEWAY_TOKEN_DECIMALS, PERMILL_DECIMALS, PriceIndex, type RetainedExecutionAnchor, SATS_PER_BTC, TxResult, type TxSigningAccount, TxSubmitter, Vault, WageProtector, buildEthereumEventProof, checkForExtrinsicSuccess, createKeyringPair, dispatchErrorToExtrinsicError, dispatchErrorToString, findEthereumBurnForTransferLogIndex, formatArgons, fromFixedNumber, getAuthorFromHeader, getClient, getEthereumBeaconSyncBootstrapTx, getEthereumBeaconSyncState, getFrameInfoFromHeader, getLatestRetainedAnchor, getNextEthereumBeaconSyncTxs, getOfflineRegistry, getTickFromHeader, gettersToObject, isOutdatedTransactionError, keyringFromSuri, mintingGatewayArtifact, toFixedNumber, waitForLoad, waitForRetainedExecutionAnchor };
|
|
12893
|
+
export { type ArgonClient, BitcoinLock, type EthereumEventLocator, type EthereumEventProof, type EthereumExecutionClient, type EthereumReceipt, type EthereumVerifyEventLogResult, ExtrinsicError, FIXED_U128_DECIMALS, type IArgonQueryable, type IBitcoinLock, type IBitcoinLockConfig, type IReleaseRequest, type IReleaseRequestDetails, type ISubmittableOptions, type ITerms, type ITxProgressCallback, MICROGONS_PER_ARGON, MINTING_GATEWAY_BURN_FOR_TRANSFER_EVENT_NAME, MINTING_GATEWAY_RUNTIME_DECIMALS, MINTING_GATEWAY_RUNTIME_TO_ERC20_SCALE, MINTING_GATEWAY_TOKEN_DECIMALS, PERMILL_DECIMALS, PriceIndex, type RetainedExecutionAnchor, SATS_PER_BTC, TxResult, type TxSigningAccount, TxSubmitter, Vault, WageProtector, buildEthereumEventProof, checkForExtrinsicSuccess, createKeyringPair, dispatchErrorToExtrinsicError, dispatchErrorToString, findEthereumBurnForTransferLogIndex, formatArgons, fromFixedNumber, getAuthorFromHeader, getBigIntFallback, getClient, getEthereumBeaconSyncBootstrapTx, getEthereumBeaconSyncState, getFrameInfoFromHeader, getLatestRetainedAnchor, getNextEthereumBeaconSyncTxs, getOfflineRegistry, getTickFromHeader, gettersToObject, isOutdatedTransactionError, keyringFromSuri, mintingGatewayArtifact, toFixedNumber, waitForLoad, waitForRetainedExecutionAnchor };
|