@argonprotocol/mainchain 1.3.18 → 1.3.20

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/lib/index.d.cts CHANGED
@@ -4063,6 +4063,10 @@ declare module '@polkadot/api-base/types/storage' {
4063
4063
  * Stores the active price index
4064
4064
  **/
4065
4065
  current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
4066
+ /**
4067
+ * Stores the last valid price index
4068
+ **/
4069
+ lastValid: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
4066
4070
  /**
4067
4071
  * The price index operator account
4068
4072
  **/
@@ -11575,7 +11579,7 @@ declare class Vault {
11575
11579
  */
11576
11580
  activatedSecuritizationPerSlot(): bigint;
11577
11581
  calculateBitcoinFee(amount: bigint): bigint;
11578
- static get(client: ArgonClient, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11582
+ static get(client: ArgonClient | ApiDecoration<'promise'>, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11579
11583
  static create(client: ArgonClient, keypair: KeyringPair, args: {
11580
11584
  securitization: bigint | number;
11581
11585
  securitizationRatio: number;
@@ -11610,60 +11614,112 @@ declare class PriceIndex {
11610
11614
  argonUsdTargetPrice?: BigNumber;
11611
11615
  argonTimeWeightedAverageLiquidity?: BigNumber;
11612
11616
  lastUpdatedTick?: number;
11613
- load(client: ArgonClient): Promise<this>;
11617
+ load(client: ArgonClient | ApiDecoration<'promise'>): Promise<this>;
11614
11618
  getBtcMicrogonPrice(satoshis: bigint | number): bigint;
11615
11619
  get rValue(): BigNumber;
11616
11620
  get argonCpi(): BigNumber;
11617
11621
  }
11618
11622
 
11619
11623
  declare const SATS_PER_BTC = 100000000n;
11620
- declare class BitcoinLocks {
11621
- readonly client: ArgonClient;
11622
- constructor(client: ArgonClient);
11623
- getUtxoIdFromEvents(events: GenericEvent$1[]): Promise<number | undefined>;
11624
- getMarketRate(priceIndex: PriceIndex, satoshis: number | bigint): Promise<bigint>;
11625
- getRedemptionRate(priceIndex: PriceIndex, details: {
11626
- satoshis: bigint;
11627
- peggedPrice?: bigint;
11628
- }): Promise<bigint>;
11629
- getMarketRateApi(satoshis: bigint): Promise<bigint>;
11630
- getRedemptionRateApi(satoshis: bigint): Promise<bigint>;
11631
- getConfig(): Promise<IBitcoinLockConfig>;
11632
- getBitcoinConfirmedBlockHeight(): Promise<number>;
11624
+ type IQueryableClient = ArgonClient | ApiDecoration<'promise'>;
11625
+ declare class BitcoinLock implements IBitcoinLock {
11626
+ utxoId: number;
11627
+ p2wshScriptHashHex: string;
11628
+ vaultId: number;
11629
+ peggedPrice: bigint;
11630
+ liquidityPromised: bigint;
11631
+ ownerAccount: string;
11632
+ satoshis: bigint;
11633
+ vaultPubkey: string;
11634
+ securityFees: bigint;
11635
+ vaultClaimPubkey: string;
11636
+ ownerPubkey: string;
11637
+ vaultXpubSources: {
11638
+ parentFingerprint: Uint8Array;
11639
+ cosignHdIndex: number;
11640
+ claimHdIndex: number;
11641
+ };
11642
+ vaultClaimHeight: number;
11643
+ openClaimHeight: number;
11644
+ createdAtHeight: number;
11645
+ isVerified: boolean;
11646
+ isRejectedNeedsRelease: boolean;
11647
+ fundHoldExtensionsByBitcoinExpirationHeight: Record<number, bigint>;
11648
+ constructor(data: IBitcoinLock);
11633
11649
  /**
11634
11650
  * Gets the UTXO reference by ID.
11635
- * @param utxoId - The UTXO ID to look up.
11636
- * @param clientAtHeight - Optional client at the block height to query the UTXO reference at a specific point in time.
11651
+ * @param client - client at the block height to query the UTXO reference at a specific point in time.
11637
11652
  * @return An object containing the transaction ID and output index, or undefined if not found.
11638
11653
  * @return.txid - The Bitcoin transaction ID of the UTXO.
11639
11654
  * @return.vout - The output index of the UTXO in the transaction.
11640
11655
  * @return.bitcoinTxid - The Bitcoin transaction ID of the UTXO formatted in little endian
11641
11656
  */
11642
- getUtxoRef(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<{
11657
+ getUtxoRef(client: IQueryableClient): Promise<{
11643
11658
  txid: string;
11644
11659
  vout: number;
11645
11660
  bitcoinTxid: string;
11646
11661
  } | undefined>;
11647
- getReleaseRequest(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<IReleaseRequestDetails | undefined>;
11648
- submitVaultSignature(args: {
11649
- utxoId: number;
11650
- vaultSignature: Uint8Array;
11662
+ findPendingMints(client: IQueryableClient): Promise<bigint[]>;
11663
+ getRatchetPrice(client: IQueryableClient, priceIndex: PriceIndex, vault: Vault): Promise<{
11664
+ burnAmount: bigint;
11665
+ ratchetingFee: bigint;
11666
+ marketRate: bigint;
11667
+ }>;
11668
+ ratchet(args: {
11669
+ client: ArgonClient;
11670
+ priceIndex: PriceIndex;
11671
+ argonKeyring: KeyringPair;
11672
+ vault: Vault;
11673
+ } & ISubmittableOptions): Promise<{
11674
+ txResult: TxResult;
11675
+ getRatchetResult: () => Promise<{
11676
+ securityFee: bigint;
11677
+ txFee: bigint;
11678
+ newPeggedPrice: bigint;
11679
+ liquidityPromised: bigint;
11680
+ pendingMint: bigint;
11681
+ burned: bigint;
11682
+ blockHeight: number;
11683
+ bitcoinBlockHeight: number;
11684
+ }>;
11685
+ }>;
11686
+ releasePrice(priceIndex: PriceIndex): Promise<bigint>;
11687
+ requestRelease(args: {
11688
+ client: ArgonClient;
11689
+ priceIndex: PriceIndex;
11690
+ releaseRequest: IReleaseRequest;
11651
11691
  argonKeyring: KeyringPair;
11652
11692
  } & ISubmittableOptions): Promise<TxResult>;
11653
- getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined>;
11693
+ getReleaseRequest(client: IQueryableClient): Promise<IReleaseRequestDetails | undefined>;
11654
11694
  /**
11655
11695
  * Finds the cosign signature for a vault lock by UTXO ID. Optionally waits for the signature
11656
- * @param utxoId - The UTXO ID of the bitcoin lock
11696
+ * @param client - The Argon client with rpc access
11697
+ * @param finalizedStateOnly - If true, only checks finalized state
11657
11698
  * @param waitForSignatureMillis - Optional timeout in milliseconds to wait for the signature. If -1, waits indefinitely.
11658
11699
  */
11659
- findVaultCosignSignature(utxoId: number, waitForSignatureMillis?: number): Promise<{
11700
+ findVaultCosignSignature(client: ArgonClient, finalizedStateOnly?: boolean, waitForSignatureMillis?: number): Promise<{
11660
11701
  blockHeight: number;
11661
11702
  signature: Uint8Array;
11662
11703
  } | undefined>;
11663
- blockHashAtHeight(atHeight: number): Promise<string | undefined>;
11664
- getVaultCosignSignature(utxoId: number, atHeight: number): Promise<Uint8Array | undefined>;
11665
- findPendingMints(utxoId: number): Promise<bigint[]>;
11666
- createInitializeLockTx(args: {
11704
+ getVaultCosignSignature(client: ArgonClient, atHeight: number): Promise<Uint8Array | undefined>;
11705
+ static getUtxoIdFromEvents(client: IQueryableClient, events: GenericEvent$1[]): Promise<number | undefined>;
11706
+ static getMarketRate(priceIndex: PriceIndex, satoshis: number | bigint): Promise<bigint>;
11707
+ static getRedemptionRate(priceIndex: PriceIndex, details: {
11708
+ satoshis: bigint;
11709
+ peggedPrice?: bigint;
11710
+ }): Promise<bigint>;
11711
+ static getConfig(client: IQueryableClient): Promise<IBitcoinLockConfig>;
11712
+ static getBitcoinConfirmedBlockHeight(client: IQueryableClient): Promise<number>;
11713
+ static submitVaultSignature(args: {
11714
+ client: ArgonClient;
11715
+ utxoId: number;
11716
+ vaultSignature: Uint8Array;
11717
+ argonKeyring: KeyringPair;
11718
+ } & ISubmittableOptions): Promise<TxResult>;
11719
+ static get(client: IQueryableClient, utxoId: number): Promise<BitcoinLock | undefined>;
11720
+ static blockHashAtHeight(client: ArgonClient, atHeight: number): Promise<string | undefined>;
11721
+ static createInitializeTx(args: {
11722
+ client: ArgonClient;
11667
11723
  vault: Vault;
11668
11724
  priceIndex: PriceIndex;
11669
11725
  ownerBitcoinPubkey: Uint8Array;
@@ -11679,12 +11735,8 @@ declare class BitcoinLocks {
11679
11735
  availableBalance: bigint;
11680
11736
  txFeePlusTip: bigint;
11681
11737
  }>;
11682
- getBitcoinLockFromTxResult(txResult: TxResult): Promise<{
11683
- lock: IBitcoinLock;
11684
- createdAtHeight: number;
11685
- txResult: TxResult;
11686
- }>;
11687
- initializeLock(args: {
11738
+ static initialize(args: {
11739
+ client: ArgonClient;
11688
11740
  vault: Vault;
11689
11741
  priceIndex: PriceIndex;
11690
11742
  ownerBitcoinPubkey: Uint8Array;
@@ -11692,46 +11744,18 @@ declare class BitcoinLocks {
11692
11744
  satoshis: bigint;
11693
11745
  } & ISubmittableOptions): Promise<{
11694
11746
  getLock(): Promise<{
11695
- lock: IBitcoinLock;
11747
+ lock: BitcoinLock;
11696
11748
  createdAtHeight: number;
11697
11749
  }>;
11698
11750
  txResult: TxResult;
11699
11751
  securityFee: bigint;
11700
11752
  }>;
11701
- requiredSatoshisForArgonLiquidity(priceIndex: PriceIndex, argonAmount: bigint): Promise<bigint>;
11702
- requestRelease(args: {
11703
- lock: IBitcoinLock;
11704
- priceIndex: PriceIndex;
11705
- releaseRequest: IReleaseRequest;
11706
- argonKeyring: KeyringPair;
11707
- } & ISubmittableOptions): Promise<TxResult>;
11708
- releasePrice(priceIndex: PriceIndex, lock: {
11709
- satoshis: bigint;
11710
- peggedPrice: bigint;
11711
- }): Promise<bigint>;
11712
- getRatchetPrice(lock: IBitcoinLock, priceIndex: PriceIndex, vault: Vault): Promise<{
11713
- burnAmount: bigint;
11714
- ratchetingFee: bigint;
11715
- marketRate: bigint;
11716
- }>;
11717
- ratchet(args: {
11718
- lock: IBitcoinLock;
11719
- priceIndex: PriceIndex;
11720
- argonKeyring: KeyringPair;
11721
- vault: Vault;
11722
- } & ISubmittableOptions): Promise<{
11753
+ static getBitcoinLockFromTxResult(client: IQueryableClient, txResult: TxResult): Promise<{
11754
+ lock: BitcoinLock;
11755
+ createdAtHeight: number;
11723
11756
  txResult: TxResult;
11724
- getRatchetResult: () => Promise<{
11725
- securityFee: bigint;
11726
- txFee: bigint;
11727
- newPeggedPrice: bigint;
11728
- liquidityPromised: bigint;
11729
- pendingMint: bigint;
11730
- burned: bigint;
11731
- blockHeight: number;
11732
- bitcoinBlockHeight: number;
11733
- }>;
11734
11757
  }>;
11758
+ static requiredSatoshisForArgonLiquidity(priceIndex: PriceIndex, argonAmount: bigint): Promise<bigint>;
11735
11759
  }
11736
11760
  interface IBitcoinLockConfig {
11737
11761
  lockReleaseCosignDeadlineFrames: number;
@@ -11786,4 +11810,4 @@ declare function waitForLoad(): Promise<void>;
11786
11810
  */
11787
11811
  declare function getClient(host: string, options?: ApiOptions): Promise<ArgonClient>;
11788
11812
 
11789
- export { type ArgonClient, BitcoinLocks, ExtrinsicError, FIXED_U128_DECIMALS, type IBitcoinLock, type IBitcoinLockConfig, type IReleaseRequest, type IReleaseRequestDetails, type ISubmittableOptions, type ITerms, type ITxProgressCallback, MICROGONS_PER_ARGON, PERMILL_DECIMALS, PriceIndex, SATS_PER_BTC, TxResult, TxSubmitter, Vault, WageProtector, checkForExtrinsicSuccess, createKeyringPair, dispatchErrorToExtrinsicError, dispatchErrorToString, formatArgons, fromFixedNumber, getAuthorFromHeader, getClient, getTickFromHeader, gettersToObject, keyringFromSuri, toFixedNumber, waitForLoad };
11813
+ export { type ArgonClient, BitcoinLock, ExtrinsicError, FIXED_U128_DECIMALS, type IBitcoinLock, type IBitcoinLockConfig, type IReleaseRequest, type IReleaseRequestDetails, type ISubmittableOptions, type ITerms, type ITxProgressCallback, MICROGONS_PER_ARGON, PERMILL_DECIMALS, PriceIndex, SATS_PER_BTC, TxResult, TxSubmitter, Vault, WageProtector, checkForExtrinsicSuccess, createKeyringPair, dispatchErrorToExtrinsicError, dispatchErrorToString, formatArgons, fromFixedNumber, getAuthorFromHeader, getClient, getTickFromHeader, gettersToObject, keyringFromSuri, toFixedNumber, waitForLoad };
package/lib/index.d.ts CHANGED
@@ -4063,6 +4063,10 @@ declare module '@polkadot/api-base/types/storage' {
4063
4063
  * Stores the active price index
4064
4064
  **/
4065
4065
  current: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
4066
+ /**
4067
+ * Stores the last valid price index
4068
+ **/
4069
+ lastValid: AugmentedQuery<ApiType, () => Observable<Option<PalletPriceIndexPriceIndex>>, []>;
4066
4070
  /**
4067
4071
  * The price index operator account
4068
4072
  **/
@@ -11575,7 +11579,7 @@ declare class Vault {
11575
11579
  */
11576
11580
  activatedSecuritizationPerSlot(): bigint;
11577
11581
  calculateBitcoinFee(amount: bigint): bigint;
11578
- static get(client: ArgonClient, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11582
+ static get(client: ArgonClient | ApiDecoration<'promise'>, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11579
11583
  static create(client: ArgonClient, keypair: KeyringPair, args: {
11580
11584
  securitization: bigint | number;
11581
11585
  securitizationRatio: number;
@@ -11610,60 +11614,112 @@ declare class PriceIndex {
11610
11614
  argonUsdTargetPrice?: BigNumber;
11611
11615
  argonTimeWeightedAverageLiquidity?: BigNumber;
11612
11616
  lastUpdatedTick?: number;
11613
- load(client: ArgonClient): Promise<this>;
11617
+ load(client: ArgonClient | ApiDecoration<'promise'>): Promise<this>;
11614
11618
  getBtcMicrogonPrice(satoshis: bigint | number): bigint;
11615
11619
  get rValue(): BigNumber;
11616
11620
  get argonCpi(): BigNumber;
11617
11621
  }
11618
11622
 
11619
11623
  declare const SATS_PER_BTC = 100000000n;
11620
- declare class BitcoinLocks {
11621
- readonly client: ArgonClient;
11622
- constructor(client: ArgonClient);
11623
- getUtxoIdFromEvents(events: GenericEvent$1[]): Promise<number | undefined>;
11624
- getMarketRate(priceIndex: PriceIndex, satoshis: number | bigint): Promise<bigint>;
11625
- getRedemptionRate(priceIndex: PriceIndex, details: {
11626
- satoshis: bigint;
11627
- peggedPrice?: bigint;
11628
- }): Promise<bigint>;
11629
- getMarketRateApi(satoshis: bigint): Promise<bigint>;
11630
- getRedemptionRateApi(satoshis: bigint): Promise<bigint>;
11631
- getConfig(): Promise<IBitcoinLockConfig>;
11632
- getBitcoinConfirmedBlockHeight(): Promise<number>;
11624
+ type IQueryableClient = ArgonClient | ApiDecoration<'promise'>;
11625
+ declare class BitcoinLock implements IBitcoinLock {
11626
+ utxoId: number;
11627
+ p2wshScriptHashHex: string;
11628
+ vaultId: number;
11629
+ peggedPrice: bigint;
11630
+ liquidityPromised: bigint;
11631
+ ownerAccount: string;
11632
+ satoshis: bigint;
11633
+ vaultPubkey: string;
11634
+ securityFees: bigint;
11635
+ vaultClaimPubkey: string;
11636
+ ownerPubkey: string;
11637
+ vaultXpubSources: {
11638
+ parentFingerprint: Uint8Array;
11639
+ cosignHdIndex: number;
11640
+ claimHdIndex: number;
11641
+ };
11642
+ vaultClaimHeight: number;
11643
+ openClaimHeight: number;
11644
+ createdAtHeight: number;
11645
+ isVerified: boolean;
11646
+ isRejectedNeedsRelease: boolean;
11647
+ fundHoldExtensionsByBitcoinExpirationHeight: Record<number, bigint>;
11648
+ constructor(data: IBitcoinLock);
11633
11649
  /**
11634
11650
  * Gets the UTXO reference by ID.
11635
- * @param utxoId - The UTXO ID to look up.
11636
- * @param clientAtHeight - Optional client at the block height to query the UTXO reference at a specific point in time.
11651
+ * @param client - client at the block height to query the UTXO reference at a specific point in time.
11637
11652
  * @return An object containing the transaction ID and output index, or undefined if not found.
11638
11653
  * @return.txid - The Bitcoin transaction ID of the UTXO.
11639
11654
  * @return.vout - The output index of the UTXO in the transaction.
11640
11655
  * @return.bitcoinTxid - The Bitcoin transaction ID of the UTXO formatted in little endian
11641
11656
  */
11642
- getUtxoRef(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<{
11657
+ getUtxoRef(client: IQueryableClient): Promise<{
11643
11658
  txid: string;
11644
11659
  vout: number;
11645
11660
  bitcoinTxid: string;
11646
11661
  } | undefined>;
11647
- getReleaseRequest(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<IReleaseRequestDetails | undefined>;
11648
- submitVaultSignature(args: {
11649
- utxoId: number;
11650
- vaultSignature: Uint8Array;
11662
+ findPendingMints(client: IQueryableClient): Promise<bigint[]>;
11663
+ getRatchetPrice(client: IQueryableClient, priceIndex: PriceIndex, vault: Vault): Promise<{
11664
+ burnAmount: bigint;
11665
+ ratchetingFee: bigint;
11666
+ marketRate: bigint;
11667
+ }>;
11668
+ ratchet(args: {
11669
+ client: ArgonClient;
11670
+ priceIndex: PriceIndex;
11671
+ argonKeyring: KeyringPair;
11672
+ vault: Vault;
11673
+ } & ISubmittableOptions): Promise<{
11674
+ txResult: TxResult;
11675
+ getRatchetResult: () => Promise<{
11676
+ securityFee: bigint;
11677
+ txFee: bigint;
11678
+ newPeggedPrice: bigint;
11679
+ liquidityPromised: bigint;
11680
+ pendingMint: bigint;
11681
+ burned: bigint;
11682
+ blockHeight: number;
11683
+ bitcoinBlockHeight: number;
11684
+ }>;
11685
+ }>;
11686
+ releasePrice(priceIndex: PriceIndex): Promise<bigint>;
11687
+ requestRelease(args: {
11688
+ client: ArgonClient;
11689
+ priceIndex: PriceIndex;
11690
+ releaseRequest: IReleaseRequest;
11651
11691
  argonKeyring: KeyringPair;
11652
11692
  } & ISubmittableOptions): Promise<TxResult>;
11653
- getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined>;
11693
+ getReleaseRequest(client: IQueryableClient): Promise<IReleaseRequestDetails | undefined>;
11654
11694
  /**
11655
11695
  * Finds the cosign signature for a vault lock by UTXO ID. Optionally waits for the signature
11656
- * @param utxoId - The UTXO ID of the bitcoin lock
11696
+ * @param client - The Argon client with rpc access
11697
+ * @param finalizedStateOnly - If true, only checks finalized state
11657
11698
  * @param waitForSignatureMillis - Optional timeout in milliseconds to wait for the signature. If -1, waits indefinitely.
11658
11699
  */
11659
- findVaultCosignSignature(utxoId: number, waitForSignatureMillis?: number): Promise<{
11700
+ findVaultCosignSignature(client: ArgonClient, finalizedStateOnly?: boolean, waitForSignatureMillis?: number): Promise<{
11660
11701
  blockHeight: number;
11661
11702
  signature: Uint8Array;
11662
11703
  } | undefined>;
11663
- blockHashAtHeight(atHeight: number): Promise<string | undefined>;
11664
- getVaultCosignSignature(utxoId: number, atHeight: number): Promise<Uint8Array | undefined>;
11665
- findPendingMints(utxoId: number): Promise<bigint[]>;
11666
- createInitializeLockTx(args: {
11704
+ getVaultCosignSignature(client: ArgonClient, atHeight: number): Promise<Uint8Array | undefined>;
11705
+ static getUtxoIdFromEvents(client: IQueryableClient, events: GenericEvent$1[]): Promise<number | undefined>;
11706
+ static getMarketRate(priceIndex: PriceIndex, satoshis: number | bigint): Promise<bigint>;
11707
+ static getRedemptionRate(priceIndex: PriceIndex, details: {
11708
+ satoshis: bigint;
11709
+ peggedPrice?: bigint;
11710
+ }): Promise<bigint>;
11711
+ static getConfig(client: IQueryableClient): Promise<IBitcoinLockConfig>;
11712
+ static getBitcoinConfirmedBlockHeight(client: IQueryableClient): Promise<number>;
11713
+ static submitVaultSignature(args: {
11714
+ client: ArgonClient;
11715
+ utxoId: number;
11716
+ vaultSignature: Uint8Array;
11717
+ argonKeyring: KeyringPair;
11718
+ } & ISubmittableOptions): Promise<TxResult>;
11719
+ static get(client: IQueryableClient, utxoId: number): Promise<BitcoinLock | undefined>;
11720
+ static blockHashAtHeight(client: ArgonClient, atHeight: number): Promise<string | undefined>;
11721
+ static createInitializeTx(args: {
11722
+ client: ArgonClient;
11667
11723
  vault: Vault;
11668
11724
  priceIndex: PriceIndex;
11669
11725
  ownerBitcoinPubkey: Uint8Array;
@@ -11679,12 +11735,8 @@ declare class BitcoinLocks {
11679
11735
  availableBalance: bigint;
11680
11736
  txFeePlusTip: bigint;
11681
11737
  }>;
11682
- getBitcoinLockFromTxResult(txResult: TxResult): Promise<{
11683
- lock: IBitcoinLock;
11684
- createdAtHeight: number;
11685
- txResult: TxResult;
11686
- }>;
11687
- initializeLock(args: {
11738
+ static initialize(args: {
11739
+ client: ArgonClient;
11688
11740
  vault: Vault;
11689
11741
  priceIndex: PriceIndex;
11690
11742
  ownerBitcoinPubkey: Uint8Array;
@@ -11692,46 +11744,18 @@ declare class BitcoinLocks {
11692
11744
  satoshis: bigint;
11693
11745
  } & ISubmittableOptions): Promise<{
11694
11746
  getLock(): Promise<{
11695
- lock: IBitcoinLock;
11747
+ lock: BitcoinLock;
11696
11748
  createdAtHeight: number;
11697
11749
  }>;
11698
11750
  txResult: TxResult;
11699
11751
  securityFee: bigint;
11700
11752
  }>;
11701
- requiredSatoshisForArgonLiquidity(priceIndex: PriceIndex, argonAmount: bigint): Promise<bigint>;
11702
- requestRelease(args: {
11703
- lock: IBitcoinLock;
11704
- priceIndex: PriceIndex;
11705
- releaseRequest: IReleaseRequest;
11706
- argonKeyring: KeyringPair;
11707
- } & ISubmittableOptions): Promise<TxResult>;
11708
- releasePrice(priceIndex: PriceIndex, lock: {
11709
- satoshis: bigint;
11710
- peggedPrice: bigint;
11711
- }): Promise<bigint>;
11712
- getRatchetPrice(lock: IBitcoinLock, priceIndex: PriceIndex, vault: Vault): Promise<{
11713
- burnAmount: bigint;
11714
- ratchetingFee: bigint;
11715
- marketRate: bigint;
11716
- }>;
11717
- ratchet(args: {
11718
- lock: IBitcoinLock;
11719
- priceIndex: PriceIndex;
11720
- argonKeyring: KeyringPair;
11721
- vault: Vault;
11722
- } & ISubmittableOptions): Promise<{
11753
+ static getBitcoinLockFromTxResult(client: IQueryableClient, txResult: TxResult): Promise<{
11754
+ lock: BitcoinLock;
11755
+ createdAtHeight: number;
11723
11756
  txResult: TxResult;
11724
- getRatchetResult: () => Promise<{
11725
- securityFee: bigint;
11726
- txFee: bigint;
11727
- newPeggedPrice: bigint;
11728
- liquidityPromised: bigint;
11729
- pendingMint: bigint;
11730
- burned: bigint;
11731
- blockHeight: number;
11732
- bitcoinBlockHeight: number;
11733
- }>;
11734
11757
  }>;
11758
+ static requiredSatoshisForArgonLiquidity(priceIndex: PriceIndex, argonAmount: bigint): Promise<bigint>;
11735
11759
  }
11736
11760
  interface IBitcoinLockConfig {
11737
11761
  lockReleaseCosignDeadlineFrames: number;
@@ -11786,4 +11810,4 @@ declare function waitForLoad(): Promise<void>;
11786
11810
  */
11787
11811
  declare function getClient(host: string, options?: ApiOptions): Promise<ArgonClient>;
11788
11812
 
11789
- export { type ArgonClient, BitcoinLocks, ExtrinsicError, FIXED_U128_DECIMALS, type IBitcoinLock, type IBitcoinLockConfig, type IReleaseRequest, type IReleaseRequestDetails, type ISubmittableOptions, type ITerms, type ITxProgressCallback, MICROGONS_PER_ARGON, PERMILL_DECIMALS, PriceIndex, SATS_PER_BTC, TxResult, TxSubmitter, Vault, WageProtector, checkForExtrinsicSuccess, createKeyringPair, dispatchErrorToExtrinsicError, dispatchErrorToString, formatArgons, fromFixedNumber, getAuthorFromHeader, getClient, getTickFromHeader, gettersToObject, keyringFromSuri, toFixedNumber, waitForLoad };
11813
+ export { type ArgonClient, BitcoinLock, ExtrinsicError, FIXED_U128_DECIMALS, type IBitcoinLock, type IBitcoinLockConfig, type IReleaseRequest, type IReleaseRequestDetails, type ISubmittableOptions, type ITerms, type ITxProgressCallback, MICROGONS_PER_ARGON, PERMILL_DECIMALS, PriceIndex, SATS_PER_BTC, TxResult, TxSubmitter, Vault, WageProtector, checkForExtrinsicSuccess, createKeyringPair, dispatchErrorToExtrinsicError, dispatchErrorToString, formatArgons, fromFixedNumber, getAuthorFromHeader, getClient, getTickFromHeader, gettersToObject, keyringFromSuri, toFixedNumber, waitForLoad };