@argonprotocol/mainchain 1.3.18 → 1.3.19

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
@@ -11575,7 +11575,7 @@ declare class Vault {
11575
11575
  */
11576
11576
  activatedSecuritizationPerSlot(): bigint;
11577
11577
  calculateBitcoinFee(amount: bigint): bigint;
11578
- static get(client: ArgonClient, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11578
+ static get(client: ArgonClient | ApiDecoration<'promise'>, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11579
11579
  static create(client: ArgonClient, keypair: KeyringPair, args: {
11580
11580
  securitization: bigint | number;
11581
11581
  securitizationRatio: number;
@@ -11610,60 +11610,112 @@ declare class PriceIndex {
11610
11610
  argonUsdTargetPrice?: BigNumber;
11611
11611
  argonTimeWeightedAverageLiquidity?: BigNumber;
11612
11612
  lastUpdatedTick?: number;
11613
- load(client: ArgonClient): Promise<this>;
11613
+ load(client: ArgonClient | ApiDecoration<'promise'>): Promise<this>;
11614
11614
  getBtcMicrogonPrice(satoshis: bigint | number): bigint;
11615
11615
  get rValue(): BigNumber;
11616
11616
  get argonCpi(): BigNumber;
11617
11617
  }
11618
11618
 
11619
11619
  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>;
11620
+ type IQueryableClient = ArgonClient | ApiDecoration<'promise'>;
11621
+ declare class BitcoinLock implements IBitcoinLock {
11622
+ utxoId: number;
11623
+ p2wshScriptHashHex: string;
11624
+ vaultId: number;
11625
+ peggedPrice: bigint;
11626
+ liquidityPromised: bigint;
11627
+ ownerAccount: string;
11628
+ satoshis: bigint;
11629
+ vaultPubkey: string;
11630
+ securityFees: bigint;
11631
+ vaultClaimPubkey: string;
11632
+ ownerPubkey: string;
11633
+ vaultXpubSources: {
11634
+ parentFingerprint: Uint8Array;
11635
+ cosignHdIndex: number;
11636
+ claimHdIndex: number;
11637
+ };
11638
+ vaultClaimHeight: number;
11639
+ openClaimHeight: number;
11640
+ createdAtHeight: number;
11641
+ isVerified: boolean;
11642
+ isRejectedNeedsRelease: boolean;
11643
+ fundHoldExtensionsByBitcoinExpirationHeight: Record<number, bigint>;
11644
+ constructor(data: IBitcoinLock);
11633
11645
  /**
11634
11646
  * 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.
11647
+ * @param client - client at the block height to query the UTXO reference at a specific point in time.
11637
11648
  * @return An object containing the transaction ID and output index, or undefined if not found.
11638
11649
  * @return.txid - The Bitcoin transaction ID of the UTXO.
11639
11650
  * @return.vout - The output index of the UTXO in the transaction.
11640
11651
  * @return.bitcoinTxid - The Bitcoin transaction ID of the UTXO formatted in little endian
11641
11652
  */
11642
- getUtxoRef(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<{
11653
+ getUtxoRef(client: IQueryableClient): Promise<{
11643
11654
  txid: string;
11644
11655
  vout: number;
11645
11656
  bitcoinTxid: string;
11646
11657
  } | undefined>;
11647
- getReleaseRequest(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<IReleaseRequestDetails | undefined>;
11648
- submitVaultSignature(args: {
11649
- utxoId: number;
11650
- vaultSignature: Uint8Array;
11658
+ findPendingMints(client: IQueryableClient): Promise<bigint[]>;
11659
+ getRatchetPrice(client: IQueryableClient, priceIndex: PriceIndex, vault: Vault): Promise<{
11660
+ burnAmount: bigint;
11661
+ ratchetingFee: bigint;
11662
+ marketRate: bigint;
11663
+ }>;
11664
+ ratchet(args: {
11665
+ client: ArgonClient;
11666
+ priceIndex: PriceIndex;
11667
+ argonKeyring: KeyringPair;
11668
+ vault: Vault;
11669
+ } & ISubmittableOptions): Promise<{
11670
+ txResult: TxResult;
11671
+ getRatchetResult: () => Promise<{
11672
+ securityFee: bigint;
11673
+ txFee: bigint;
11674
+ newPeggedPrice: bigint;
11675
+ liquidityPromised: bigint;
11676
+ pendingMint: bigint;
11677
+ burned: bigint;
11678
+ blockHeight: number;
11679
+ bitcoinBlockHeight: number;
11680
+ }>;
11681
+ }>;
11682
+ releasePrice(priceIndex: PriceIndex): Promise<bigint>;
11683
+ requestRelease(args: {
11684
+ client: ArgonClient;
11685
+ priceIndex: PriceIndex;
11686
+ releaseRequest: IReleaseRequest;
11651
11687
  argonKeyring: KeyringPair;
11652
11688
  } & ISubmittableOptions): Promise<TxResult>;
11653
- getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined>;
11689
+ getReleaseRequest(client: IQueryableClient): Promise<IReleaseRequestDetails | undefined>;
11654
11690
  /**
11655
11691
  * 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
11692
+ * @param client - The Argon client with rpc access
11693
+ * @param finalizedStateOnly - If true, only checks finalized state
11657
11694
  * @param waitForSignatureMillis - Optional timeout in milliseconds to wait for the signature. If -1, waits indefinitely.
11658
11695
  */
11659
- findVaultCosignSignature(utxoId: number, waitForSignatureMillis?: number): Promise<{
11696
+ findVaultCosignSignature(client: ArgonClient, finalizedStateOnly?: boolean, waitForSignatureMillis?: number): Promise<{
11660
11697
  blockHeight: number;
11661
11698
  signature: Uint8Array;
11662
11699
  } | 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: {
11700
+ getVaultCosignSignature(client: ArgonClient, atHeight: number): Promise<Uint8Array | undefined>;
11701
+ static getUtxoIdFromEvents(client: IQueryableClient, events: GenericEvent$1[]): Promise<number | undefined>;
11702
+ static getMarketRate(priceIndex: PriceIndex, satoshis: number | bigint): Promise<bigint>;
11703
+ static getRedemptionRate(priceIndex: PriceIndex, details: {
11704
+ satoshis: bigint;
11705
+ peggedPrice?: bigint;
11706
+ }): Promise<bigint>;
11707
+ static getConfig(client: IQueryableClient): Promise<IBitcoinLockConfig>;
11708
+ static getBitcoinConfirmedBlockHeight(client: IQueryableClient): Promise<number>;
11709
+ static submitVaultSignature(args: {
11710
+ client: ArgonClient;
11711
+ utxoId: number;
11712
+ vaultSignature: Uint8Array;
11713
+ argonKeyring: KeyringPair;
11714
+ } & ISubmittableOptions): Promise<TxResult>;
11715
+ static get(client: IQueryableClient, utxoId: number): Promise<BitcoinLock | undefined>;
11716
+ static blockHashAtHeight(client: ArgonClient, atHeight: number): Promise<string | undefined>;
11717
+ static createInitializeTx(args: {
11718
+ client: ArgonClient;
11667
11719
  vault: Vault;
11668
11720
  priceIndex: PriceIndex;
11669
11721
  ownerBitcoinPubkey: Uint8Array;
@@ -11679,12 +11731,8 @@ declare class BitcoinLocks {
11679
11731
  availableBalance: bigint;
11680
11732
  txFeePlusTip: bigint;
11681
11733
  }>;
11682
- getBitcoinLockFromTxResult(txResult: TxResult): Promise<{
11683
- lock: IBitcoinLock;
11684
- createdAtHeight: number;
11685
- txResult: TxResult;
11686
- }>;
11687
- initializeLock(args: {
11734
+ static initialize(args: {
11735
+ client: ArgonClient;
11688
11736
  vault: Vault;
11689
11737
  priceIndex: PriceIndex;
11690
11738
  ownerBitcoinPubkey: Uint8Array;
@@ -11692,46 +11740,18 @@ declare class BitcoinLocks {
11692
11740
  satoshis: bigint;
11693
11741
  } & ISubmittableOptions): Promise<{
11694
11742
  getLock(): Promise<{
11695
- lock: IBitcoinLock;
11743
+ lock: BitcoinLock;
11696
11744
  createdAtHeight: number;
11697
11745
  }>;
11698
11746
  txResult: TxResult;
11699
11747
  securityFee: bigint;
11700
11748
  }>;
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<{
11749
+ static getBitcoinLockFromTxResult(client: IQueryableClient, txResult: TxResult): Promise<{
11750
+ lock: BitcoinLock;
11751
+ createdAtHeight: number;
11723
11752
  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
11753
  }>;
11754
+ static requiredSatoshisForArgonLiquidity(priceIndex: PriceIndex, argonAmount: bigint): Promise<bigint>;
11735
11755
  }
11736
11756
  interface IBitcoinLockConfig {
11737
11757
  lockReleaseCosignDeadlineFrames: number;
@@ -11786,4 +11806,4 @@ declare function waitForLoad(): Promise<void>;
11786
11806
  */
11787
11807
  declare function getClient(host: string, options?: ApiOptions): Promise<ArgonClient>;
11788
11808
 
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 };
11809
+ 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
@@ -11575,7 +11575,7 @@ declare class Vault {
11575
11575
  */
11576
11576
  activatedSecuritizationPerSlot(): bigint;
11577
11577
  calculateBitcoinFee(amount: bigint): bigint;
11578
- static get(client: ArgonClient, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11578
+ static get(client: ArgonClient | ApiDecoration<'promise'>, vaultId: number, tickDurationMillis?: number): Promise<Vault>;
11579
11579
  static create(client: ArgonClient, keypair: KeyringPair, args: {
11580
11580
  securitization: bigint | number;
11581
11581
  securitizationRatio: number;
@@ -11610,60 +11610,112 @@ declare class PriceIndex {
11610
11610
  argonUsdTargetPrice?: BigNumber;
11611
11611
  argonTimeWeightedAverageLiquidity?: BigNumber;
11612
11612
  lastUpdatedTick?: number;
11613
- load(client: ArgonClient): Promise<this>;
11613
+ load(client: ArgonClient | ApiDecoration<'promise'>): Promise<this>;
11614
11614
  getBtcMicrogonPrice(satoshis: bigint | number): bigint;
11615
11615
  get rValue(): BigNumber;
11616
11616
  get argonCpi(): BigNumber;
11617
11617
  }
11618
11618
 
11619
11619
  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>;
11620
+ type IQueryableClient = ArgonClient | ApiDecoration<'promise'>;
11621
+ declare class BitcoinLock implements IBitcoinLock {
11622
+ utxoId: number;
11623
+ p2wshScriptHashHex: string;
11624
+ vaultId: number;
11625
+ peggedPrice: bigint;
11626
+ liquidityPromised: bigint;
11627
+ ownerAccount: string;
11628
+ satoshis: bigint;
11629
+ vaultPubkey: string;
11630
+ securityFees: bigint;
11631
+ vaultClaimPubkey: string;
11632
+ ownerPubkey: string;
11633
+ vaultXpubSources: {
11634
+ parentFingerprint: Uint8Array;
11635
+ cosignHdIndex: number;
11636
+ claimHdIndex: number;
11637
+ };
11638
+ vaultClaimHeight: number;
11639
+ openClaimHeight: number;
11640
+ createdAtHeight: number;
11641
+ isVerified: boolean;
11642
+ isRejectedNeedsRelease: boolean;
11643
+ fundHoldExtensionsByBitcoinExpirationHeight: Record<number, bigint>;
11644
+ constructor(data: IBitcoinLock);
11633
11645
  /**
11634
11646
  * 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.
11647
+ * @param client - client at the block height to query the UTXO reference at a specific point in time.
11637
11648
  * @return An object containing the transaction ID and output index, or undefined if not found.
11638
11649
  * @return.txid - The Bitcoin transaction ID of the UTXO.
11639
11650
  * @return.vout - The output index of the UTXO in the transaction.
11640
11651
  * @return.bitcoinTxid - The Bitcoin transaction ID of the UTXO formatted in little endian
11641
11652
  */
11642
- getUtxoRef(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<{
11653
+ getUtxoRef(client: IQueryableClient): Promise<{
11643
11654
  txid: string;
11644
11655
  vout: number;
11645
11656
  bitcoinTxid: string;
11646
11657
  } | undefined>;
11647
- getReleaseRequest(utxoId: number, clientAtHeight?: ApiDecoration<'promise'>): Promise<IReleaseRequestDetails | undefined>;
11648
- submitVaultSignature(args: {
11649
- utxoId: number;
11650
- vaultSignature: Uint8Array;
11658
+ findPendingMints(client: IQueryableClient): Promise<bigint[]>;
11659
+ getRatchetPrice(client: IQueryableClient, priceIndex: PriceIndex, vault: Vault): Promise<{
11660
+ burnAmount: bigint;
11661
+ ratchetingFee: bigint;
11662
+ marketRate: bigint;
11663
+ }>;
11664
+ ratchet(args: {
11665
+ client: ArgonClient;
11666
+ priceIndex: PriceIndex;
11667
+ argonKeyring: KeyringPair;
11668
+ vault: Vault;
11669
+ } & ISubmittableOptions): Promise<{
11670
+ txResult: TxResult;
11671
+ getRatchetResult: () => Promise<{
11672
+ securityFee: bigint;
11673
+ txFee: bigint;
11674
+ newPeggedPrice: bigint;
11675
+ liquidityPromised: bigint;
11676
+ pendingMint: bigint;
11677
+ burned: bigint;
11678
+ blockHeight: number;
11679
+ bitcoinBlockHeight: number;
11680
+ }>;
11681
+ }>;
11682
+ releasePrice(priceIndex: PriceIndex): Promise<bigint>;
11683
+ requestRelease(args: {
11684
+ client: ArgonClient;
11685
+ priceIndex: PriceIndex;
11686
+ releaseRequest: IReleaseRequest;
11651
11687
  argonKeyring: KeyringPair;
11652
11688
  } & ISubmittableOptions): Promise<TxResult>;
11653
- getBitcoinLock(utxoId: number): Promise<IBitcoinLock | undefined>;
11689
+ getReleaseRequest(client: IQueryableClient): Promise<IReleaseRequestDetails | undefined>;
11654
11690
  /**
11655
11691
  * 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
11692
+ * @param client - The Argon client with rpc access
11693
+ * @param finalizedStateOnly - If true, only checks finalized state
11657
11694
  * @param waitForSignatureMillis - Optional timeout in milliseconds to wait for the signature. If -1, waits indefinitely.
11658
11695
  */
11659
- findVaultCosignSignature(utxoId: number, waitForSignatureMillis?: number): Promise<{
11696
+ findVaultCosignSignature(client: ArgonClient, finalizedStateOnly?: boolean, waitForSignatureMillis?: number): Promise<{
11660
11697
  blockHeight: number;
11661
11698
  signature: Uint8Array;
11662
11699
  } | 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: {
11700
+ getVaultCosignSignature(client: ArgonClient, atHeight: number): Promise<Uint8Array | undefined>;
11701
+ static getUtxoIdFromEvents(client: IQueryableClient, events: GenericEvent$1[]): Promise<number | undefined>;
11702
+ static getMarketRate(priceIndex: PriceIndex, satoshis: number | bigint): Promise<bigint>;
11703
+ static getRedemptionRate(priceIndex: PriceIndex, details: {
11704
+ satoshis: bigint;
11705
+ peggedPrice?: bigint;
11706
+ }): Promise<bigint>;
11707
+ static getConfig(client: IQueryableClient): Promise<IBitcoinLockConfig>;
11708
+ static getBitcoinConfirmedBlockHeight(client: IQueryableClient): Promise<number>;
11709
+ static submitVaultSignature(args: {
11710
+ client: ArgonClient;
11711
+ utxoId: number;
11712
+ vaultSignature: Uint8Array;
11713
+ argonKeyring: KeyringPair;
11714
+ } & ISubmittableOptions): Promise<TxResult>;
11715
+ static get(client: IQueryableClient, utxoId: number): Promise<BitcoinLock | undefined>;
11716
+ static blockHashAtHeight(client: ArgonClient, atHeight: number): Promise<string | undefined>;
11717
+ static createInitializeTx(args: {
11718
+ client: ArgonClient;
11667
11719
  vault: Vault;
11668
11720
  priceIndex: PriceIndex;
11669
11721
  ownerBitcoinPubkey: Uint8Array;
@@ -11679,12 +11731,8 @@ declare class BitcoinLocks {
11679
11731
  availableBalance: bigint;
11680
11732
  txFeePlusTip: bigint;
11681
11733
  }>;
11682
- getBitcoinLockFromTxResult(txResult: TxResult): Promise<{
11683
- lock: IBitcoinLock;
11684
- createdAtHeight: number;
11685
- txResult: TxResult;
11686
- }>;
11687
- initializeLock(args: {
11734
+ static initialize(args: {
11735
+ client: ArgonClient;
11688
11736
  vault: Vault;
11689
11737
  priceIndex: PriceIndex;
11690
11738
  ownerBitcoinPubkey: Uint8Array;
@@ -11692,46 +11740,18 @@ declare class BitcoinLocks {
11692
11740
  satoshis: bigint;
11693
11741
  } & ISubmittableOptions): Promise<{
11694
11742
  getLock(): Promise<{
11695
- lock: IBitcoinLock;
11743
+ lock: BitcoinLock;
11696
11744
  createdAtHeight: number;
11697
11745
  }>;
11698
11746
  txResult: TxResult;
11699
11747
  securityFee: bigint;
11700
11748
  }>;
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<{
11749
+ static getBitcoinLockFromTxResult(client: IQueryableClient, txResult: TxResult): Promise<{
11750
+ lock: BitcoinLock;
11751
+ createdAtHeight: number;
11723
11752
  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
11753
  }>;
11754
+ static requiredSatoshisForArgonLiquidity(priceIndex: PriceIndex, argonAmount: bigint): Promise<bigint>;
11735
11755
  }
11736
11756
  interface IBitcoinLockConfig {
11737
11757
  lockReleaseCosignDeadlineFrames: number;
@@ -11786,4 +11806,4 @@ declare function waitForLoad(): Promise<void>;
11786
11806
  */
11787
11807
  declare function getClient(host: string, options?: ApiOptions): Promise<ArgonClient>;
11788
11808
 
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 };
11809
+ 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 };