@bestinslot/wallet-kit 0.7.0
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/README.md +108 -0
- package/dist/balances-BQiaAIaq.js +9627 -0
- package/dist/browser.js +205 -0
- package/dist/core.js +39 -0
- package/dist/mint-BXVHw4CQ.js +70722 -0
- package/dist/node.js +1787 -0
- package/dist/react.js +14 -0
- package/dist/register-browser-providers-CLLT6W6P.js +499 -0
- package/dist/types/adapters/react/use-network.d.ts +8 -0
- package/dist/types/adapters/react/use-wallet.d.ts +15 -0
- package/dist/types/adapters/vue/use-network.d.ts +12 -0
- package/dist/types/api/balances.d.ts +52 -0
- package/dist/types/api/brc20.d.ts +110 -0
- package/dist/types/api/helpers.d.ts +3 -0
- package/dist/types/api/mint.d.ts +57 -0
- package/dist/types/api/modal.d.ts +3 -0
- package/dist/types/api/swap.d.ts +122 -0
- package/dist/types/api/wallet.browser.d.ts +2 -0
- package/dist/types/api/wallet.d.ts +6 -0
- package/dist/types/api/wallet.node.d.ts +4 -0
- package/dist/types/browser.d.ts +10 -0
- package/dist/types/components/Dev.vue.d.ts +11 -0
- package/dist/types/components/connect-modal-view.d.ts +28 -0
- package/dist/types/components/dev/BRC20.vue.d.ts +2 -0
- package/dist/types/components/dev/Button.vue.d.ts +17 -0
- package/dist/types/components/dev/Input.vue.d.ts +12 -0
- package/dist/types/components/dev/Label.vue.d.ts +17 -0
- package/dist/types/components/dev/Select.vue.d.ts +17 -0
- package/dist/types/components/dev/SessionInfo.vue.d.ts +6 -0
- package/dist/types/core/bis.d.ts +21 -0
- package/dist/types/core/bis_swap.d.ts +622 -0
- package/dist/types/core/brc20.d.ts +229 -0
- package/dist/types/core/connect-modal.d.ts +15 -0
- package/dist/types/core/helpers.d.ts +212 -0
- package/dist/types/core/mint.d.ts +364 -0
- package/dist/types/core/modal.d.ts +21 -0
- package/dist/types/core/providers.d.ts +90 -0
- package/dist/types/core/register-browser-providers.d.ts +1 -0
- package/dist/types/core/register-local-provider.d.ts +1 -0
- package/dist/types/core/storage.d.ts +19 -0
- package/dist/types/core/store-network.d.ts +20 -0
- package/dist/types/core/store.d.ts +39 -0
- package/dist/types/core.d.ts +10 -0
- package/dist/types/lib/bitcoin.d.ts +8 -0
- package/dist/types/lib/dev-worker.d.ts +1 -0
- package/dist/types/lib/dev.d.ts +9 -0
- package/dist/types/lib/swap-constants.d.ts +7 -0
- package/dist/types/lib/swap-reporting.d.ts +80 -0
- package/dist/types/lib/uniswap_ops.d.ts +238 -0
- package/dist/types/lib/web3.d.ts +7 -0
- package/dist/types/node.d.ts +9 -0
- package/dist/types/provider/api.d.ts +97 -0
- package/dist/types/provider/leather.d.ts +2 -0
- package/dist/types/provider/local.d.ts +39 -0
- package/dist/types/provider/okx.d.ts +2 -0
- package/dist/types/provider/unisat.d.ts +2 -0
- package/dist/types/provider/xverse.d.ts +2 -0
- package/dist/types/react.d.ts +3 -0
- package/dist/types/types/common.d.ts +33 -0
- package/dist/types/types/global.d.ts +26 -0
- package/dist/types/types/inscription.d.ts +147 -0
- package/dist/types/types/vite-env.d.ts +7 -0
- package/dist/types/types/wallet.d.ts +50 -0
- package/dist/types/vue.d.ts +2 -0
- package/dist/vue.js +13 -0
- package/package.json +133 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { BISWalletPurpose, PaymentOpts } from '../types/common';
|
|
2
|
+
/**
|
|
3
|
+
* Interface representing the result of an inscription and send to OP_RETURN operation, including transaction IDs, signed transaction hexes, inscription ID, postage, and secret used in the minting process. This interface is used to encapsulate the details of the deploy, call and deposit operations in the BRC2.0 programmable module.
|
|
4
|
+
*
|
|
5
|
+
* @property {string} commitTxId - The transaction ID of the commit transaction created during the inscription process.
|
|
6
|
+
* @property {string} revealTxId - The transaction ID of the reveal transaction created during the inscription process.
|
|
7
|
+
* @property {string} signedCommitTxHex - The hexadecimal representation of the signed commit transaction, which can be broadcasted to the network to initiate the inscription process.
|
|
8
|
+
* @property {string} signedRevealTxHex - The hexadecimal representation of the signed reveal transaction, which can be broadcasted to the network to complete the inscription process and transfer the BRC-20 tokens.
|
|
9
|
+
* @property {string} inscriptionId - The unique identifier of the inscription created during the minting process, which can be used to track and reference the specific inscription associated with the deposit or withdrawal operation.
|
|
10
|
+
* @property {number | null} postage - The amount of postage included in the minting transaction, specified in sats. This value may be null if no postage was included.
|
|
11
|
+
* @property {string} secret - A secret value used in the minting process, which may be required for certain operations or for tracking the transaction. This value is typically generated during the minting process and can be used for verification or reference purposes.
|
|
12
|
+
* @property {string} sendToOpReturnTxId - The transaction ID of the transaction created to send the BRC-20 tokens to the OP_RETURN output after the reveal transaction.
|
|
13
|
+
* @property {string} signedSendToOpReturnTxHex - The hexadecimal representation of the signed transaction created to send the BRC-20 tokens to the OP_RETURN output, which can be broadcasted to the network after the reveal transaction.
|
|
14
|
+
*/
|
|
15
|
+
export interface InscribeAndSendToOpReturn {
|
|
16
|
+
commitTxId: string;
|
|
17
|
+
revealTxId: string;
|
|
18
|
+
sendToOpReturnTxId: string;
|
|
19
|
+
signedCommitTxHex: string;
|
|
20
|
+
signedRevealTxHex: string;
|
|
21
|
+
signedSendToOpReturnTxHex: string;
|
|
22
|
+
inscriptionId: string;
|
|
23
|
+
postage: number | null;
|
|
24
|
+
secret: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Interface representing the result of an inscription and send to OP_RETURN operation, including transaction IDs, signed transaction hexes, inscription ID, postage, and secret used in the minting process. This interface is used to encapsulate the details of the withdrawal operations for BRC-20 tokens in the BRC2.0 programmable module.
|
|
28
|
+
*
|
|
29
|
+
* @property {string} commitTxId - The transaction ID of the commit transaction created during the inscription process.
|
|
30
|
+
* @property {string} revealTxId - The transaction ID of the reveal transaction created during the inscription process.
|
|
31
|
+
* @property {string} signedCommitTxHex - The hexadecimal representation of the signed commit transaction, which can be broadcasted to the network to initiate the inscription process.
|
|
32
|
+
* @property {string} signedRevealTxHex - The hexadecimal representation of the signed reveal transaction, which can be broadcasted to the network to complete the inscription process and transfer the BRC-20 tokens.
|
|
33
|
+
* @property {string} inscriptionId - The unique identifier of the inscription created during the minting process, which can be used to track and reference the specific inscription associated with the deposit or withdrawal operation.
|
|
34
|
+
* @property {number | null} postage - The amount of postage included in the minting transaction, specified in sats. This value may be null if no postage was included.
|
|
35
|
+
* @property {string} secret - A secret value used in the minting process, which may be required for certain operations or for tracking the transaction. This value is typically generated during the minting process and can be used for verification or reference purposes.
|
|
36
|
+
* @property {string} transferTxId - The transaction ID of the transfer transaction created to send the BRC-20 tokens to the target address after the reveal transaction.
|
|
37
|
+
* @property {string} signedTransferTxHex - The hexadecimal representation of the signed transfer transaction, which can be broadcasted to the network to transfer the BRC-20 tokens to the target address after the reveal transaction.
|
|
38
|
+
*/
|
|
39
|
+
export interface InscribeAndSendToAddress {
|
|
40
|
+
commitTxId: string;
|
|
41
|
+
signedCommitTxHex: string;
|
|
42
|
+
revealTxId: string;
|
|
43
|
+
signedRevealTxHex: string;
|
|
44
|
+
inscriptionId: string;
|
|
45
|
+
postage: number | null;
|
|
46
|
+
secret: string;
|
|
47
|
+
transferTxId: string;
|
|
48
|
+
signedTransferTxHex: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Calls a smart contract on BRC2.0 using either an Ordinals wallet or a Payment wallet, depending on the specified wallet type. This function abstracts the logic for calling a smart contract and allows for flexibility in choosing the wallet type for the transaction.
|
|
52
|
+
*
|
|
53
|
+
* @param contractAddress The address of the smart contract to call.
|
|
54
|
+
* @param calldataHex The calldata to send to the smart contract, encoded as a hexadecimal string.
|
|
55
|
+
* @param estimatedGas The estimated amount of gas required for the transaction.
|
|
56
|
+
* @param gasPerVbyte The gas cost per vbyte for the transaction.
|
|
57
|
+
* @param feeRate The fee rate to use for the transaction, in satoshis per vbyte.
|
|
58
|
+
* @param postage The amount of postage to include with the transaction, or null if no postage is needed.
|
|
59
|
+
* @param dryRun A boolean indicating whether to perform a dry run of the transaction (i.e., simulate the transaction without actually sending it).
|
|
60
|
+
* @param paymentOpts Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
61
|
+
* @param walletType The type of wallet to use for the transaction, either 'payment' or 'ordinals'. If not specified, defaults to 'payment'.
|
|
62
|
+
* @returns The result of the smart contract call, which may vary depending on the wallet type and the specifics of the transaction. The exact structure of the result will depend on the implementation of the callSmartContractFromOrdinalsWallet and callSmartContractFromPaymentWallet functions.
|
|
63
|
+
* @throws An error if an unsupported wallet type is specified or if there is an issue with the smart contract call.
|
|
64
|
+
*/
|
|
65
|
+
export declare function callSmartContract(contractAddress: string, calldataHex: string, estimatedGas: number, gasPerVbyte: number, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts, walletType?: BISWalletPurpose): Promise<InscribeAndSendToOpReturn>;
|
|
66
|
+
/**
|
|
67
|
+
* Calls a smart contract function by encoding the function call with the provided ABI, function name, and parameters, and then invoking the callSmartContract function to execute the transaction. This function serves as a higher-level abstraction for calling smart contract functions, allowing developers to specify the function and parameters in a more intuitive way without needing to manually encode the calldata.
|
|
68
|
+
*
|
|
69
|
+
* @param contractAddress The address of the smart contract to call.
|
|
70
|
+
* @param abi The ABI (Application Binary Interface) of the smart contract, which defines the functions and their parameters for encoding the function call.
|
|
71
|
+
* @param funcName The name of the function to call on the smart contract, which should be defined in the provided ABI.
|
|
72
|
+
* @param params The parameters to pass to the smart contract function, which should be provided as an array and will be encoded according to the ABI specifications.
|
|
73
|
+
* @param estimatedGas The estimated amount of gas required for the transaction, which is used to calculate the transaction fee and ensure that sufficient funds are available for the transaction to be processed.
|
|
74
|
+
* @param gasPerVbyte The gas cost per vbyte for the transaction, which is used in conjunction with the estimated gas to calculate the total transaction fee.
|
|
75
|
+
* @param feeRate The fee rate to use for the transaction, in satoshis per vbyte, which is used to calculate the total transaction fee based on the estimated gas and gas cost per vbyte.
|
|
76
|
+
* @param postage The amount of postage to include with the transaction, or null if no postage is needed. Postage may be required for certain transactions to ensure that they are processed in a timely manner, especially during periods of high network congestion.
|
|
77
|
+
* @param dryRun A boolean indicating whether to perform a dry run of the transaction (i.e., simulate the transaction without actually sending it). This can be useful for testing and debugging purposes to ensure that the function call is correctly encoded and that the transaction would succeed before actually sending it to the network.
|
|
78
|
+
* @param paymentOpts Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
79
|
+
* @param walletType The type of wallet to use for the transaction, either 'payment' or 'ordinals'. This parameter allows the caller to specify which wallet implementation to use when executing the smart contract call, providing flexibility in how the transaction is processed based on the capabilities and requirements of the chosen wallet type.
|
|
80
|
+
* @returns The result of the smart contract call, which may vary depending on the wallet type and the specifics of the transaction. The exact structure of the result will depend on the implementation of the callSmartContractFromOrdinalsWallet and callSmartContractFromPaymentWallet functions, as well as the nature of the smart contract being called and the function being invoked.
|
|
81
|
+
* @throws An error if the ABI is not an object, if the function name is not a string, if the parameters are not an array, if an unsupported wallet type is specified, or if there is an issue with the smart contract call.
|
|
82
|
+
*/
|
|
83
|
+
export declare function callSmartContractAbi(contractAddress: string, abi: any, funcName: string, params: any, estimatedGas: number, gasPerVbyte: number, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts, walletType?: BISWalletPurpose): Promise<InscribeAndSendToOpReturn>;
|
|
84
|
+
/**
|
|
85
|
+
* Deposits a BRC-20 token into the BRC2.0 programmable module by creating an inscription with the transfer operation and sending it to the OP_RETURN output. The function takes the token tick, amount, fee rate, and optional payment parameters, creates an inscription with the transfer operation, mints it, and then sends it to an OP_RETURN output with a specific format. It also allows for a dry run mode where the transaction hexes are returned without broadcasting.
|
|
86
|
+
*
|
|
87
|
+
* @param tick - The tick of the BRC-20 token to be deposited, represented as a string. This will be included in the inscription content to indicate which token is being transferred.
|
|
88
|
+
* @param amount - The amount of the BRC-20 token to be deposited, represented as a string. This will be included in the inscription content to indicate how many tokens are being transferred.
|
|
89
|
+
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the deposit process.
|
|
90
|
+
* @param postage - An optional parameter representing the postage to be included in the minting transaction, specified in sats. If null, no postage will be included.
|
|
91
|
+
* @param dryRun - A boolean flag indicating whether to perform a dry run. If true, the function will return the transaction hexes without broadcasting them to the network. If false, the transactions will be broadcasted after creation.
|
|
92
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
93
|
+
*
|
|
94
|
+
* @returns An object containing details of the deposit process, including transaction IDs, signed transaction hexes, inscription ID, postage, and secret used in the minting process. If dryRun is true, the transactions will not be broadcasted and the hexes will be returned for inspection.
|
|
95
|
+
*/
|
|
96
|
+
export declare function depositToBrc20Prog(tick: string, amount: string, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeAndSendToOpReturn>;
|
|
97
|
+
/**
|
|
98
|
+
* Withdraws a BRC-20 token from the BRC2.0 programmable module by creating an inscription with the transfer operation and sending it to the OP_RETURN output. The function takes the token tick, amount, target address, fee rate, and optional payment parameters, creates an inscription with the transfer operation, mints it, and then sends it to an OP_RETURN output with a specific format. It also allows for a dry run mode where the transaction hexes are returned without broadcasting.
|
|
99
|
+
*
|
|
100
|
+
* @param tick - The tick of the BRC-20 token to be withdrawn, represented as a string. This will be included in the inscription content to indicate which token is being transferred.
|
|
101
|
+
* @param amount - The amount of the BRC-20 token to be withdrawn, represented as a string. This will be included in the inscription content to indicate how many tokens are being transferred.
|
|
102
|
+
* @param targetAddress - The Bitcoin address to which the withdrawn tokens should be sent. This will be included in the inscription content to indicate the recipient of the tokens.
|
|
103
|
+
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the withdrawal process.
|
|
104
|
+
* @param postage - An optional parameter representing the postage to be included in the minting transaction, specified in sats. If null, no postage will be included.
|
|
105
|
+
* @param dryRun - A boolean flag indicating whether to perform a dry run. If true, the function will return the transaction hexes without broadcasting them to the network. If false, the transactions will be broadcasted after creation.
|
|
106
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
107
|
+
*
|
|
108
|
+
* @returns An object containing details of the withdrawal process, including transaction IDs, signed transaction hexes, inscription ID, postage, and secret used in the minting process. If dryRun is true, the transactions will not be broadcasted and the hexes will be returned for inspection.
|
|
109
|
+
*/
|
|
110
|
+
export declare function withdrawFromBrc20Prog(tick: string, amount: string, targetAddress: string, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeAndSendToAddress>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PaymentOpts } from '../types/common';
|
|
2
|
+
import { InscribeFees, InscribeMultipleResult, InscribeResult, InscriptionDetails } from '../types/inscription';
|
|
3
|
+
export type { InscribeFees, InscribeMultipleResult, InscribeResult, InscriptionDetails };
|
|
4
|
+
/**
|
|
5
|
+
* Inscribe an inscription with the given details, fee rate, postage, and payment options. This function performs the inscription process for a single inscription. The function returns the transaction IDs and signed transaction hex for both the commit and reveal transactions, as well as the inscription ID, postage, and secret used for the inscription.
|
|
6
|
+
*
|
|
7
|
+
* @param inscriptionDetails - An InscriptionDetails instance containing the details of the inscription to be minted.
|
|
8
|
+
* @param feeRate - The fee rate in satoshis per virtual byte to be used for the inscription transactions.
|
|
9
|
+
* @param postage - The postage amount in satoshis to be included in the inscription transactions, or null to use the default dust value.
|
|
10
|
+
* @param dryRun - A boolean indicating whether to perform a dry run of the inscription, which will return the transaction details without broadcasting them to the network.
|
|
11
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
12
|
+
* @returns A promise that resolves to an object containing the transaction IDs and signed transaction hex for both the commit and reveal transactions, as well as the inscription IDs, postage, and secret used for the inscriptions.
|
|
13
|
+
*/
|
|
14
|
+
export declare function inscribe(inscriptionDetails: InscriptionDetails, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeResult>;
|
|
15
|
+
/**
|
|
16
|
+
* Inscribe multiple inscriptions with the given details, fee rate, postage, and payment options. This function performs the inscription process for multiple inscriptions in a single batch, which can be more efficient than inscribing them individually. The function returns the transaction IDs and signed transaction hex for both the commit and reveal transactions, as well as the inscription IDs, postage, and secret used for the inscriptions.
|
|
17
|
+
*
|
|
18
|
+
* @param inscriptionDetailsArray - An array of InscriptionDetails instances containing the details of each inscription to be minted.
|
|
19
|
+
* @param feeRate - The fee rate in satoshis per virtual byte to be used for the inscription transactions.
|
|
20
|
+
* @param postage - The postage amount in satoshis to be included in the inscription transactions, or null to use the default dust value.
|
|
21
|
+
* @param dryRun - A boolean indicating whether to perform a dry run of the inscription, which will return the transaction details without broadcasting them to the network.
|
|
22
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
23
|
+
* @returns A promise that resolves to an object containing the transaction IDs and signed transaction hex for both the commit and reveal transactions, as well as the inscription IDs, postage, and secret used for the inscriptions.
|
|
24
|
+
*/
|
|
25
|
+
export declare function inscribeMultiple(inscriptionDetailsArray: InscriptionDetails[], feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeMultipleResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Inscribe an inscription with a parent inscription by providing the details of the inscription, the parent inscription ID, fee rate, postage, and payment options. This function allows for creating a new inscription that is linked to an existing parent inscription, which can be useful for creating a series of related inscriptions or for building more complex inscription structures. The function returns the transaction IDs and signed transaction hex for both the commit and reveal transactions, as well as the inscription ID, postage, and secret used for the inscription.
|
|
28
|
+
*
|
|
29
|
+
* @param inscriptionDetails - An InscriptionDetails instance containing the details of the inscription to be minted.
|
|
30
|
+
* @param parentInscriptionId - The ID of the parent inscription to which the new inscription will be linked.
|
|
31
|
+
* @param feeRate - The fee rate in satoshis per virtual byte to be used for the inscription transactions.
|
|
32
|
+
* @param postage - The postage amount in satoshis to be included in the inscription transactions, or null to use the default dust value.
|
|
33
|
+
* @param dryRun - A boolean indicating whether to perform a dry run of the inscription, which will return the transaction details without broadcasting them to the network.
|
|
34
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
35
|
+
* @returns A promise that resolves to an object containing the transaction IDs and signed transaction hex for both the commit and reveal transactions, as well as the inscription ID, postage, and secret used for the inscription.
|
|
36
|
+
* @throws Will throw an error if the inscription process fails for any reason, such as invalid input parameters, insufficient funds for fees, or issues with the parent inscription. The error message will provide details about the reason for the failure.
|
|
37
|
+
*/
|
|
38
|
+
export declare function inscribeWithParent(inscriptionDetails: InscriptionDetails, parentInscriptionId: string, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Get the fee estimates for inscribing an inscription with the given details, fee rate, postage, and payment options. This function returns the estimated fees for both the commit and reveal transactions, as well as the total fee for the inscription process.
|
|
41
|
+
* @param inscriptionDetails - An InscriptionDetails instance containing the details of the inscription to be minted.
|
|
42
|
+
* @param feeRate - The fee rate in satoshis per virtual byte to be used for the inscription transactions.
|
|
43
|
+
* @param postage - The postage amount in satoshis to be included in the inscription transactions, or null to use the default dust value.
|
|
44
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
45
|
+
* @returns A promise that resolves to an object containing the estimated fees for both the commit and reveal transactions, as well as the total fee for the inscription process.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getInscribeFee(inscriptionDetails: InscriptionDetails, feeRate: number, postage: number | null, paymentOpts?: PaymentOpts): Promise<InscribeFees>;
|
|
48
|
+
/**
|
|
49
|
+
* Get the fee estimates for inscribing multiple inscriptions with the given details, fee rate, postage, and payment options. This function returns the estimated fees for both the commit and reveal transactions, as well as the total fee for the inscription process for multiple inscriptions in a single batch.
|
|
50
|
+
*
|
|
51
|
+
* @param inscriptionDetailsArray - An array of InscriptionDetails instances containing the details of each inscription to be minted.
|
|
52
|
+
* @param feeRate - The fee rate in satoshis per virtual byte to be used for the inscription transactions.
|
|
53
|
+
* @param postage - The postage amount in satoshis to be included in the inscription transactions, or null to use the default dust value.
|
|
54
|
+
* @param paymentOpts - Optional extra payment output: when `paymentOpts.paymentAmount` is greater than 0, the transaction sends that many sats to `paymentOpts.paymentAddress` (funded by the connected wallet — e.g. a service fee). Omit, or pass a non-positive amount, for no extra payment.
|
|
55
|
+
* @returns A promise that resolves to an object containing the estimated fees for both the commit and reveal transactions, as well as the total fee for the inscription process for multiple inscriptions in a single batch.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getInscribeMultipleFee(inscriptionDetailsArray: InscriptionDetails[], feeRate: number, postage: number | null, paymentOpts?: PaymentOpts): Promise<InscribeFees>;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
export { generateAndStoreSwapWallet as createSwapWallet, ensureSwapWallet, getAddLiquidityResult, getKlines, requestMinerFee as getMinerFee, getMinerFeesOfDepositOrder, getMinerFeesOfWrapOrder, getPairReserves, getPairVolumeOverDays, getRemoveLiquidityResult, getSwapBalance, getSwapBalances, getSwapResult as getSwapExactInputResult, getSwap2Result as getSwapExactOutputResult, getSwapInfo, getSwapStatus, getSwapWalletSecurityCode, getTokenDecimals, getUnwrapResult as getUnwrapBtcResult, importSwapWallet, listPairs, listTokens, tryGetSwapReferrerInfo, } from '../core/bis_swap';
|
|
2
|
+
export type { EnsureSwapWalletResult, GetActivityOfPairResponse, GetKlinesRequest, GetKlinesResponse, GetPairVolumeRequest, GetPairVolumeResponse, GetSwapStatusResponse, GetWalletActivitiesResponse, ImportSwapWalletOptions, Kline, ListPairsOrderBy, ListPairsRequest, ListPairsResponse, PairActivityEntry, PairInfo, PairReserves, SwapBalance, SwapInfo, TokenInfo, WalletActivityEntry, } from '../core/bis_swap';
|
|
3
|
+
export type { AllBalanceDetails } from '../core/helpers';
|
|
4
|
+
export type { BISSwapWalletInfo } from '../core/store';
|
|
5
|
+
export type { SwapFees } from '../lib/swap-reporting';
|
|
6
|
+
export { satsToBtc, satsToUsd, swapSide } from '../lib/swap-reporting';
|
|
7
|
+
export { calculatePairAddress as getPairAddress } from '../lib/uniswap_ops';
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves the wallet activities for a given public key and pair address.
|
|
10
|
+
*
|
|
11
|
+
* @param pubkey - The public key of the wallet for which to retrieve activities.
|
|
12
|
+
* @param pairAddress - The address of the pair for which to retrieve activities.
|
|
13
|
+
* @returns A promise that resolves to an array of wallet activities.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getWalletActivities(pubkey: string, pairAddress: string): Promise<import('./swap').GetWalletActivitiesResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves activities for a pair.
|
|
18
|
+
*
|
|
19
|
+
* @param pairAddress - The address of the pair for which to retrieve activities.
|
|
20
|
+
* @param limit - (Optional) The maximum number of activities to retrieve. Defaults to 20.
|
|
21
|
+
* @param offset - (Optional) The number of activities to skip before starting to collect the result set. Defaults to 0.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getActivityOfPair(pairAddress: string, limit?: number, offset?: number): Promise<import('./swap').GetActivityOfPairResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Adds liquidity to a specified token pair with the desired amounts and slippage tolerance.
|
|
26
|
+
*
|
|
27
|
+
* One of the two tokens must be WBTC; the order is rejected otherwise.
|
|
28
|
+
*
|
|
29
|
+
* @param token1Address - The address of the first token in the pair.
|
|
30
|
+
* @param token2Address - The address of the second token in the pair.
|
|
31
|
+
* @param amount1Desired - The desired amount of the first token to add. The enforced minimum is derived from this by applying `slippageBPS`.
|
|
32
|
+
* @param amount2Desired - The desired amount of the second token to add. The enforced minimum is derived from this by applying `slippageBPS`.
|
|
33
|
+
* @param slippageBPS - The slippage tolerance in basis points.
|
|
34
|
+
* @returns A promise that resolves to a boolean indicating the success of the operation.
|
|
35
|
+
*/
|
|
36
|
+
export declare function addLiquidity(token1Address: string, token2Address: string, amount1Desired: bigint, amount2Desired: bigint, slippageBPS: bigint): Promise<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Removes liquidity from a specified token pair, burning `liquidity` LP tokens and
|
|
39
|
+
* returning both underlying tokens.
|
|
40
|
+
*
|
|
41
|
+
* One of the two tokens must be WBTC; the order is rejected otherwise.
|
|
42
|
+
*
|
|
43
|
+
* @param token1Address - The address of the first token in the pair.
|
|
44
|
+
* @param token2Address - The address of the second token in the pair.
|
|
45
|
+
* @param liquidity - The amount of liquidity to remove.
|
|
46
|
+
* @param amount1 - The expected (quoted) amount of the first token to receive, as returned by `getRemoveLiquidityResult`. The enforced minimum is derived from this by applying `slippageBPS` — pass the quote, not an already slippage-adjusted value, to avoid double-applying slippage.
|
|
47
|
+
* @param amount2 - The expected (quoted) amount of the second token to receive, as returned by `getRemoveLiquidityResult`. The enforced minimum is derived from this by applying `slippageBPS` — pass the quote, not an already slippage-adjusted value, to avoid double-applying slippage.
|
|
48
|
+
* @param slippageBPS - The slippage tolerance in basis points.
|
|
49
|
+
* @returns A promise that resolves to a boolean indicating the success of the operation.
|
|
50
|
+
*/
|
|
51
|
+
export declare function removeLiquidity(token1Address: string, token2Address: string, liquidity: bigint, amount1: bigint, amount2: bigint, slippageBPS: bigint): Promise<boolean>;
|
|
52
|
+
/**
|
|
53
|
+
* Executes an exact-input token swap: spends an exact `amountIn` of the input
|
|
54
|
+
* token and receives at least `amountOutMin` of the output token (Uniswap-style
|
|
55
|
+
* `swapExactTokensForTokens`).
|
|
56
|
+
*
|
|
57
|
+
* @param tokenInAddress - The address of the token to swap from.
|
|
58
|
+
* @param tokenOutAddress - The address of the token to swap to.
|
|
59
|
+
* @param amountIn - The exact amount of the input token to spend.
|
|
60
|
+
* @param amountOutMin - The expected (quoted) output amount. The enforced minimum is derived from this by applying `slippageBPS` — pass the quote, not an already slippage-adjusted value, to avoid double-applying slippage.
|
|
61
|
+
* @param slippageBPS - The slippage tolerance in basis points.
|
|
62
|
+
* @param referrerId - An optional referral ID. When valid, a share of the swap fee is credited to the referrer; an invalid referral is ignored and the swap proceeds normally.
|
|
63
|
+
* @returns A promise that resolves to a boolean indicating the success of the swap operation.
|
|
64
|
+
*/
|
|
65
|
+
export declare function swapExactInput(tokenInAddress: string, tokenOutAddress: string, amountIn: bigint, amountOutMin: bigint, slippageBPS: bigint, referrerId?: string): Promise<boolean>;
|
|
66
|
+
/**
|
|
67
|
+
* Executes an exact-output token swap: receives an exact `amountOut` of the
|
|
68
|
+
* output token and spends at most the input amount (the `amountIn` reference
|
|
69
|
+
* expanded by `slippageBPS`) — Uniswap-style `swapTokensForExactTokens`.
|
|
70
|
+
*
|
|
71
|
+
* @param tokenInAddress - The address of the token to swap from.
|
|
72
|
+
* @param tokenOutAddress - The address of the token to swap to.
|
|
73
|
+
* @param amountIn - The expected (quoted) input amount; slippage is applied to this to derive the maximum input spent.
|
|
74
|
+
* @param amountOut - The exact amount of the output token to receive.
|
|
75
|
+
* @param slippageBPS - The slippage tolerance in basis points.
|
|
76
|
+
* @param referrerId - An optional referral ID. When valid, a share of the swap fee is credited to the referrer; an invalid referral is ignored and the swap proceeds normally.
|
|
77
|
+
* @returns A promise that resolves to a boolean indicating the success of the swap operation.
|
|
78
|
+
*/
|
|
79
|
+
export declare function swapExactOutput(tokenInAddress: string, tokenOutAddress: string, amountIn: bigint, amountOut: bigint, slippageBPS: bigint, referrerId?: string): Promise<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Redeems WBTC from the smart wallet back into BTC on Bitcoin L1, the reverse of
|
|
82
|
+
* `wrapBtc`. The BTC is paid out on L1 to `pkscript`, so that value must be an
|
|
83
|
+
* output script rather than a token or wallet address. Quote first with
|
|
84
|
+
* `getUnwrapBtcResult`, which takes the same destination.
|
|
85
|
+
*
|
|
86
|
+
* @param pkscript - The output script (hex) of the destination Bitcoin address the unwrapped BTC is paid to.
|
|
87
|
+
* @param amount - The amount of WBTC to unwrap, in sats.
|
|
88
|
+
* @returns A promise that resolves to a boolean indicating the success of the unwrap operation.
|
|
89
|
+
*/
|
|
90
|
+
export declare function unwrapBtc(pkscript: string, amount: bigint): Promise<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Deposits a specified amount of a token into the swap contract for a given pair.
|
|
93
|
+
*
|
|
94
|
+
* @param tokenAddress - The address of the token to deposit.
|
|
95
|
+
* @param amount - The amount of the token to deposit, specified as a bigint.
|
|
96
|
+
* @param feeRate - The fee rate for the deposit operation.
|
|
97
|
+
* @param createAllowanceIfNeeded - Whether to create an allowance if needed.
|
|
98
|
+
* @param reclaimInscriptions - Optional transfer inscriptions to reclaim toward the deposit, each with `inscriptionId` and `amount` (bigint, 18 decimals).
|
|
99
|
+
* @returns A promise that resolves to an array of transaction IDs related to the deposit operation.
|
|
100
|
+
*/
|
|
101
|
+
export declare function deposit(tokenAddress: string, amount: bigint, feeRate: number, createAllowanceIfNeeded?: boolean, reclaimInscriptions?: {
|
|
102
|
+
inscriptionId: string;
|
|
103
|
+
amount: bigint;
|
|
104
|
+
}[]): Promise<string[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Wraps BTC into the smart wallet as WBTC (the swap layer's BTC representation),
|
|
107
|
+
* the BTC equivalent of `deposit`.
|
|
108
|
+
*
|
|
109
|
+
* @param btcAmount - The amount of BTC to wrap, in sats, specified as a bigint.
|
|
110
|
+
* @param feeRate - The fee rate (sats/vByte) for the wrap transaction.
|
|
111
|
+
* @returns A promise that resolves to an array of transaction IDs related to the wrap operation.
|
|
112
|
+
*/
|
|
113
|
+
export declare function wrapBtc(btcAmount: bigint, feeRate: number): Promise<string[]>;
|
|
114
|
+
/**
|
|
115
|
+
* Withdraws a specified amount of a token to a target address.
|
|
116
|
+
*
|
|
117
|
+
* @param tokenAddress - The address of the token to withdraw.
|
|
118
|
+
* @param amount - The amount of the token to withdraw, specified as a bigint.
|
|
119
|
+
* @param targetAddress - (Optional) The target address to which the tokens should be withdrawn. If not provided, the tokens will be withdrawn to the user's own Ordinals wallet.
|
|
120
|
+
* @returns A promise that resolves when the withdrawal process is complete.
|
|
121
|
+
*/
|
|
122
|
+
export declare function withdraw(tokenAddress: string, amount: bigint, targetAddress?: string): Promise<boolean>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { WalletInfo } from '../types/wallet';
|
|
2
|
+
export { getAllBalanceDetails, getCardinalBalance, getOrdinalsWallet, getPaymentWallet, getSession, sendBTC, sendInscription, setNetwork, signMessage, signMessageLocalVerify, signMessageLocalVerifyDeterministic, } from '../core/bis';
|
|
3
|
+
export { getNetwork } from '../core/store-network';
|
|
4
|
+
export type { WalletInfo };
|
|
5
|
+
export type { BISNetwork, BISSession, BISWallet, BISWalletProvider, BISWalletPurpose, } from '../types/common';
|
|
6
|
+
export type { SendInscriptionResult } from '../types/inscription';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * as wallet from './api/wallet.browser';
|
|
2
|
+
export * as modal from './api/modal';
|
|
3
|
+
export * as swap from './api/swap';
|
|
4
|
+
export * as brc20 from './api/brc20';
|
|
5
|
+
export * as mint from './api/mint';
|
|
6
|
+
export * as balances from './api/balances';
|
|
7
|
+
export * from './api/helpers';
|
|
8
|
+
export type { PaymentOpts } from './types/common';
|
|
9
|
+
export * as bitcoinjs from 'bitcoinjs-lib';
|
|
10
|
+
export * as Buff from '@cmdcode/buff-utils';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BISSession, BISWallet } from '../types/common';
|
|
2
|
+
export interface DevUserSession {
|
|
3
|
+
data: BISSession;
|
|
4
|
+
wallet: {
|
|
5
|
+
ordinals: BISWallet;
|
|
6
|
+
payment: BISWallet;
|
|
7
|
+
};
|
|
8
|
+
balance: number;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BISWalletProvider, ConnectCallbacks, ModalTheme } from '../types/common';
|
|
2
|
+
/**
|
|
3
|
+
* Framework-free connect modal. Renders into the shadow-DOM root created by
|
|
4
|
+
* `core/modal.ts`. Replaces the former Vue `Modal.vue` so the published browser
|
|
5
|
+
* bundle no longer depends on Vue. The public method surface mirrors the old
|
|
6
|
+
* component's `defineExpose`, so `core/modal.ts` is a drop-in caller.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BisModalView {
|
|
9
|
+
private root;
|
|
10
|
+
private theme;
|
|
11
|
+
private visible;
|
|
12
|
+
private state;
|
|
13
|
+
private errorMessage;
|
|
14
|
+
private provider;
|
|
15
|
+
private callbacks;
|
|
16
|
+
constructor(root: HTMLElement);
|
|
17
|
+
showConnect(callbacks: ConnectCallbacks): void;
|
|
18
|
+
showConnectConfirmation(provider: BISWalletProvider): void;
|
|
19
|
+
showError(message: string): void;
|
|
20
|
+
hide(): void;
|
|
21
|
+
setTheme(theme: ModalTheme): void;
|
|
22
|
+
private onClose;
|
|
23
|
+
private onRetry;
|
|
24
|
+
private onProviderSelect;
|
|
25
|
+
private themeClass;
|
|
26
|
+
private screenMarkup;
|
|
27
|
+
private render;
|
|
28
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLButtonElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
defaultValue?: string | number;
|
|
4
|
+
modelValue?: string | number;
|
|
5
|
+
class?: HTMLAttributes['class'];
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
+
"update:modelValue": (payload: string | number) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: HTMLLabelElement;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLLabelElement>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
options: Option[];
|
|
3
|
+
class?: string;
|
|
4
|
+
};
|
|
5
|
+
interface Option {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_PublicProps = {
|
|
10
|
+
modelValue?: string;
|
|
11
|
+
} & __VLS_Props;
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSelectElement>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DevUserSession } from '../Dev.vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
session: DevUserSession | undefined;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BISWalletPurpose } from '../types/common';
|
|
2
|
+
import { SendInscriptionResult } from '../types/inscription';
|
|
3
|
+
import { WalletInfo } from '../types/wallet';
|
|
4
|
+
export { getAllBalanceDetails, getCardinalBalance } from './helpers';
|
|
5
|
+
export { getOrdinalsWallet, getPaymentWallet, sendBTC, signMessage, signMessageLocalVerify, signMessageLocalVerifyDeterministic, } from './providers';
|
|
6
|
+
export { getWalletInfo as getSession } from './store';
|
|
7
|
+
export { getNetwork, setNetwork } from './store-network';
|
|
8
|
+
/**
|
|
9
|
+
* Sends an inscription to a target wallet with the specified postage, fee rate, and dry run option. The function determines the appropriate method for sending the inscription based on the target wallet's properties and the specified wallet type. It uses the provided signing function to sign the necessary transactions for sending the inscription.
|
|
10
|
+
*
|
|
11
|
+
* @param inscriptionId - The ID of the inscription to be sent.
|
|
12
|
+
* @param targetWallet - An object containing information about the target wallet, including its address and whether it is an OP_RETURN wallet.
|
|
13
|
+
* @param feeRate - The fee rate in satoshis per virtual byte to be used for the transaction.
|
|
14
|
+
* @param postage - The amount of postage in satoshis to be included in the transaction for sending the inscription.
|
|
15
|
+
* @param dryRun - A boolean indicating whether to perform a dry run of the transaction, which will return the transaction details without broadcasting it to the network.
|
|
16
|
+
* @param walletType - An optional parameter specifying the type of wallet to use for sending the inscription, which can affect the method used for sending. If not provided, the function will determine the method based on the target wallet's properties.
|
|
17
|
+
* @returns A promise that resolves with the result of the send operation, which may include transaction details or an error if the operation fails.
|
|
18
|
+
* @throws Will throw an error if there is no wallet currently connected, if the target wallet type is unsupported, or if there is an issue with the signing function.
|
|
19
|
+
* @remarks The function uses different methods for sending the inscription based on whether the target wallet is an OP_RETURN wallet and the specified wallet type. It also ensures that a wallet is currently connected before attempting to send the inscription.
|
|
20
|
+
*/
|
|
21
|
+
export declare function sendInscription(inscriptionId: string, targetWallet: WalletInfo, feeRate: number, postage: number | null, dryRun: boolean, walletType?: BISWalletPurpose): Promise<SendInscriptionResult>;
|