@bestinslot/wallet-kit 0.15.0-rc.8 → 0.15.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/dist/balances-vRSi3fDl.js +13479 -0
- package/dist/browser.js +5 -5
- package/dist/core.js +5 -5
- package/dist/{helpers-DPIq8Luz.js → helpers-DhmRTIg0.js} +313 -185
- package/dist/node.js +4 -4
- package/dist/react.js +1 -1
- package/dist/{register-browser-providers-Cgt7ptMx.js → register-browser-providers-tIzKBBB3.js} +1 -1
- package/dist/types/api/brc20.d.ts +61 -7
- package/dist/types/core/brc20-send.d.ts +4 -2
- package/dist/types/core/brc20-transact.d.ts +58 -0
- package/dist/types/core/brc20.d.ts +8 -12
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/balances-CZOB6nhC.js +0 -10466
package/dist/node.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { F as eI, G as RA, H as f, I as tI, J as SI, K as UA, L as d, M as zA, N as mA, O as e, P as qA, Q as nI, R as pI, S as rI, T as sI, U as FI, V as KI, X as BA, f as XA, m as eA, Y as RI, c as UI, Z as qI, W as VI, a as lI, b as dI, d as xI, e as YI, h as JI, i as PI, j as vI, k as OI, s as uI, l as jI, n as bI, o as LI, p as TI, q as ZI, r as zI } from "./helpers-
|
|
2
|
-
import { B as WQ, v as _Q, w as $Q, u as AC, D as IC, t as gC, z as QC, x as CC, y as BC, A as EC, E as iC, C as DC } from "./helpers-
|
|
3
|
-
import { s as mI } from "./balances-
|
|
4
|
-
import { c as oC, b as aC, m as hC, a as GC } from "./balances-
|
|
1
|
+
import { F as eI, G as RA, H as f, I as tI, J as SI, K as UA, L as d, M as zA, N as mA, O as e, P as qA, Q as nI, R as pI, S as rI, T as sI, U as FI, V as KI, X as BA, f as XA, m as eA, Y as RI, c as UI, Z as qI, W as VI, a as lI, b as dI, d as xI, e as YI, h as JI, i as PI, j as vI, k as OI, s as uI, l as jI, n as bI, o as LI, p as TI, q as ZI, r as zI } from "./helpers-DhmRTIg0.js";
|
|
2
|
+
import { B as WQ, v as _Q, w as $Q, u as AC, D as IC, t as gC, z as QC, x as CC, y as BC, A as EC, E as iC, C as DC } from "./helpers-DhmRTIg0.js";
|
|
3
|
+
import { s as mI } from "./balances-vRSi3fDl.js";
|
|
4
|
+
import { c as oC, b as aC, m as hC, a as GC } from "./balances-vRSi3fDl.js";
|
|
5
5
|
var XI = eI();
|
|
6
6
|
const VA = {
|
|
7
7
|
messagePrefix: `Bitcoin Signed Message:
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useSyncExternalStore as u, useCallback as r, useState as f } from "react";
|
|
2
|
-
import { _ as c, f as t, m as l, k as n } from "./helpers-
|
|
2
|
+
import { _ as c, f as t, m as l, k as n } from "./helpers-DhmRTIg0.js";
|
|
3
3
|
function m() {
|
|
4
4
|
const e = u(c, t, t), s = r((o) => l(o), []);
|
|
5
5
|
return [e, s];
|
package/dist/{register-browser-providers-Cgt7ptMx.js → register-browser-providers-tIzKBBB3.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as f, N as K, i as P, P as W, Q as ke, R as ve, S as Me, T as Ie, h as Ae, L as x, M as N, $ as Ce, X as Y, a0 as Be, a1 as Ne, f as y, a2 as _e, K as _, a3 as Z, a4 as v, Z as $ } from "./helpers-
|
|
1
|
+
import { O as f, N as K, i as P, P as W, Q as ke, R as ve, S as Me, T as Ie, h as Ae, L as x, M as N, $ as Ce, X as Y, a0 as Be, a1 as Ne, f as y, a2 as _e, K as _, a3 as Z, a4 as v, Z as $ } from "./helpers-DhmRTIg0.js";
|
|
2
2
|
const J = 4294967295;
|
|
3
3
|
let X = Math.floor(Math.random() * J);
|
|
4
4
|
const ee = () => (X = (X + 1) % J, X), $e = () => typeof chrome < "u" && !!chrome.runtime && typeof chrome.runtime.connect == "function";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Brc20SendQuote, SendAsBrc20Args, SendAsBrc20ProgArgs, SendAsBrc20ProgResult, SendAsBrc20Result } from '../core/brc20-send';
|
|
2
|
+
import { TransactArgs, TransactResult } from '../core/brc20-transact';
|
|
2
3
|
import { FrBtcResult, UnwrapBtcFromBrc20ProgArgs, WrapBtcToBrc20ProgArgs } from '../core/frbtc';
|
|
3
4
|
import { BISWalletPurpose, PaymentOpts } from '../types/common';
|
|
4
5
|
export type { Brc20AmountOptions, Brc20DeployOptions, Brc20PredeployOptions, Brc20PredeployResult, } from '../core/brc20-inscriptions';
|
|
@@ -44,6 +45,28 @@ export declare function sendAsBrc20Prog(args: SendAsBrc20ProgArgs & {
|
|
|
44
45
|
dryRun: false;
|
|
45
46
|
}): Promise<SendAsBrc20ProgResult>;
|
|
46
47
|
export declare function sendAsBrc20Prog(args: SendAsBrc20ProgArgs): Promise<Brc20SendQuote | SendAsBrc20ProgResult>;
|
|
48
|
+
export type { TransactArgs, TransactResult } from '../core/brc20-transact';
|
|
49
|
+
/**
|
|
50
|
+
* Inscribes a pre-signed legacy EVM transaction as a BRC2.0 `transact` op, so a signature made
|
|
51
|
+
* outside the kit (for example with a BRC2.0 EVM wallet) executes on BRC2.0. Only legacy (type 0)
|
|
52
|
+
* transactions carrying the BRC2.0 EIP-155 chain ID of the current network are accepted. The
|
|
53
|
+
* inscription is padded so its content bytes cover the transaction's gas limit, and its send
|
|
54
|
+
* transaction moves it to `OP_RETURN "BRC20PROG"`.
|
|
55
|
+
*
|
|
56
|
+
* With `dryRun: true` nothing is signed or broadcast and the result is a fee quote.
|
|
57
|
+
* `onSignRequest` is called before each wallet prompt with `{ step, total }`; `total` is 2.
|
|
58
|
+
*
|
|
59
|
+
* @param args - `rawTx` (signed legacy transaction hex, with or without `0x`), `feeRate` (sats/vB), `dryRun`, and optional `onSignRequest`.
|
|
60
|
+
* @returns The quote for a dry run; otherwise the inscription's transaction ids, every txid in chain order, and `txHash`, the BRC2.0 transaction hash (`keccak256(rawTx)`).
|
|
61
|
+
* @throws {Error} When `rawTx` is not a canonically encoded, low-s signed legacy transaction for this network's BRC2.0 chain, carries a non-zero value, sends to the zero address, its gas limit needs more inscription content than fits, or its nonce is below the signer's BRC2.0 account nonce or more than 9 above it, before anything is signed.
|
|
62
|
+
*/
|
|
63
|
+
export declare function transact(args: TransactArgs & {
|
|
64
|
+
dryRun: true;
|
|
65
|
+
}): Promise<Brc20SendQuote>;
|
|
66
|
+
export declare function transact(args: TransactArgs & {
|
|
67
|
+
dryRun: false;
|
|
68
|
+
}): Promise<TransactResult>;
|
|
69
|
+
export declare function transact(args: TransactArgs): Promise<Brc20SendQuote | TransactResult>;
|
|
47
70
|
export type { FrBtcResult, UnwrapBtcFromBrc20ProgArgs, WrapBtcToBrc20ProgArgs } from '../core/frbtc';
|
|
48
71
|
export { getFrBtcAddress } from '../core/frbtc';
|
|
49
72
|
/**
|
|
@@ -139,8 +162,7 @@ export interface InscribeAndSendToAddress {
|
|
|
139
162
|
*
|
|
140
163
|
* @param contractAddress The address of the smart contract to call.
|
|
141
164
|
* @param calldataHex The calldata to send to the smart contract, encoded as a hexadecimal string.
|
|
142
|
-
* @param estimatedGas The
|
|
143
|
-
* @param gasPerVbyte The gas cost per vbyte for the transaction.
|
|
165
|
+
* @param estimatedGas The gas the call needs. BRC2.0 grants 12000 gas per inscription content byte, so the kit pads the content with spaces until it grants at least this much.
|
|
144
166
|
* @param feeRate The fee rate to use for the transaction, in satoshis per vbyte.
|
|
145
167
|
* @param postage The amount of postage to include with the transaction, or null if no postage is needed.
|
|
146
168
|
* @param dryRun A boolean indicating whether to perform a dry run of the transaction (i.e., simulate the transaction without actually sending it).
|
|
@@ -149,7 +171,7 @@ export interface InscribeAndSendToAddress {
|
|
|
149
171
|
* @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.
|
|
150
172
|
* @throws An error if an unsupported wallet type is specified or if there is an issue with the smart contract call.
|
|
151
173
|
*/
|
|
152
|
-
export declare function callSmartContract(contractAddress: string, calldataHex: string, estimatedGas: number,
|
|
174
|
+
export declare function callSmartContract(contractAddress: string, calldataHex: string, estimatedGas: number, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts, walletType?: BISWalletPurpose): Promise<InscribeAndSendToOpReturn>;
|
|
153
175
|
/**
|
|
154
176
|
* 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.
|
|
155
177
|
*
|
|
@@ -157,9 +179,8 @@ export declare function callSmartContract(contractAddress: string, calldataHex:
|
|
|
157
179
|
* @param abi The ABI (Application Binary Interface) of the smart contract, which defines the functions and their parameters for encoding the function call.
|
|
158
180
|
* @param funcName The name of the function to call on the smart contract, which should be defined in the provided ABI.
|
|
159
181
|
* @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.
|
|
160
|
-
* @param estimatedGas The
|
|
161
|
-
* @param
|
|
162
|
-
* @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.
|
|
182
|
+
* @param estimatedGas The gas the call needs. BRC2.0 grants 12000 gas per inscription content byte, so the kit pads the content with spaces until it grants at least this much.
|
|
183
|
+
* @param feeRate The fee rate to use for the transaction, in satoshis per vbyte.
|
|
163
184
|
* @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.
|
|
164
185
|
* @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.
|
|
165
186
|
* @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.
|
|
@@ -167,7 +188,40 @@ export declare function callSmartContract(contractAddress: string, calldataHex:
|
|
|
167
188
|
* @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.
|
|
168
189
|
* @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.
|
|
169
190
|
*/
|
|
170
|
-
export declare function callSmartContractAbi(contractAddress: string, abi: any, funcName: string, params: any, estimatedGas: number,
|
|
191
|
+
export declare function callSmartContractAbi(contractAddress: string, abi: any, funcName: string, params: any, estimatedGas: number, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts, walletType?: BISWalletPurpose): Promise<InscribeAndSendToOpReturn>;
|
|
192
|
+
/**
|
|
193
|
+
* Deploys a smart contract on BRC2.0 from the ordinals identity. The deploy is inscribed from the
|
|
194
|
+
* ordinals address, so the contract's deployer is `getEvmAddressFromBitcoinAddress(ordinalsAddress)`.
|
|
195
|
+
*
|
|
196
|
+
* @param bytecodeHex - The contract creation bytecode, as a hexadecimal string.
|
|
197
|
+
* @param estimatedGas - The gas the deployment needs. BRC2.0 grants 12000 gas per inscription content byte, so the kit pads the content with spaces until it grants at least this much.
|
|
198
|
+
* @param feeRate - The fee rate in sats/vbyte, an integer.
|
|
199
|
+
* @param postage - The postage in sats for the inscription, or null for none.
|
|
200
|
+
* @param dryRun - If true, the transactions are signed or built but not broadcast.
|
|
201
|
+
* @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). Omit, or pass a non-positive amount, for no extra payment.
|
|
202
|
+
*
|
|
203
|
+
* @returns The commit, reveal and send transaction ids and signed hexes, the inscription id, the postage and the secret.
|
|
204
|
+
* @throws {Error} When the broadcast request fails.
|
|
205
|
+
*/
|
|
206
|
+
export declare function deploySmartContract(bytecodeHex: string, estimatedGas: number, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeAndSendToOpReturn>;
|
|
207
|
+
/**
|
|
208
|
+
* Deploys a smart contract on BRC2.0 from the ordinals identity, encoding the bytecode with its
|
|
209
|
+
* constructor parameters from the ABI first. The deploy is inscribed from the ordinals address, so the
|
|
210
|
+
* contract's deployer is `getEvmAddressFromBitcoinAddress(ordinalsAddress)`.
|
|
211
|
+
*
|
|
212
|
+
* @param bytecode - The contract creation bytecode, as a hexadecimal string.
|
|
213
|
+
* @param abi - The contract ABI, used to encode the constructor parameters.
|
|
214
|
+
* @param params - The constructor parameters, encoded with the bytecode.
|
|
215
|
+
* @param estimatedGas - The gas the deployment needs. BRC2.0 grants 12000 gas per inscription content byte, so the kit pads the content with spaces until it grants at least this much.
|
|
216
|
+
* @param feeRate - The fee rate in sats/vbyte, an integer.
|
|
217
|
+
* @param postage - The postage in sats for the inscription, or null for none.
|
|
218
|
+
* @param dryRun - If true, the transactions are signed or built but not broadcast.
|
|
219
|
+
* @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). Omit, or pass a non-positive amount, for no extra payment.
|
|
220
|
+
*
|
|
221
|
+
* @returns The commit, reveal and send transaction ids and signed hexes, the inscription id, the postage and the secret.
|
|
222
|
+
* @throws {Error} When the broadcast request fails.
|
|
223
|
+
*/
|
|
224
|
+
export declare function deploySmartContractAbi(bytecode: string, abi: any, params: any[], estimatedGas: number, feeRate: number, postage: number | null, dryRun: boolean, paymentOpts?: PaymentOpts): Promise<InscribeAndSendToOpReturn>;
|
|
171
225
|
/**
|
|
172
226
|
* 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.
|
|
173
227
|
*
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { SignProgressOptions } from './sign-progress';
|
|
2
1
|
import { InscriptionDetails } from '../types/inscription';
|
|
2
|
+
import { SignProgressOptions } from './sign-progress';
|
|
3
3
|
import { WalletInfo } from '../types/wallet';
|
|
4
|
+
import { GAS_PER_BYTE } from './brc20';
|
|
4
5
|
import { assertFeeRate } from './mint';
|
|
6
|
+
export { GAS_PER_BYTE };
|
|
5
7
|
/** The transactions of one inscribe-and-send step. */
|
|
6
8
|
export interface Brc20SendPart {
|
|
7
9
|
commitTxId: string;
|
|
@@ -34,7 +36,7 @@ export interface Brc20SendQuote {
|
|
|
34
36
|
feeRate: number;
|
|
35
37
|
steps: Brc20SendStepQuote[];
|
|
36
38
|
}
|
|
37
|
-
export type Brc20SendStepName = 'brc20Transfer' | 'progWithdraw' | 'progDeposit' | 'progTransfer' | 'frBtcWrap' | 'frBtcUnwrap';
|
|
39
|
+
export type Brc20SendStepName = 'brc20Transfer' | 'progWithdraw' | 'progDeposit' | 'progTransfer' | 'frBtcWrap' | 'frBtcUnwrap' | 'progTransact';
|
|
38
40
|
/** An output the send transaction carries right after the target, at vout 1, 2, …. */
|
|
39
41
|
export interface ChainExtraOutput {
|
|
40
42
|
wallet: WalletInfo;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { InscriptionDetails } from '../types/inscription';
|
|
2
|
+
import { Brc20SendPart, Brc20SendQuote } from './brc20-send';
|
|
3
|
+
import { SignProgressOptions } from './sign-progress';
|
|
4
|
+
/** Largest inscription content, in bytes, a transact inscription may be padded to. */
|
|
5
|
+
export declare const MAX_TRANSACT_CONTENT_BYTES = 350000;
|
|
6
|
+
/** The BRC2.0 EVM chain ID of the current network (signet and testnet share one). */
|
|
7
|
+
export declare function getBrc20ProgChainId(): bigint;
|
|
8
|
+
export interface ParsedLegacyTx {
|
|
9
|
+
/** `keccak256(rawTx)`, lowercase with `0x`. This is the BRC2.0 transaction hash. */
|
|
10
|
+
hash: string;
|
|
11
|
+
/** Recovered signer, lowercase with `0x`. */
|
|
12
|
+
from: string;
|
|
13
|
+
nonce: number;
|
|
14
|
+
/** Recipient, or null for a contract creation. */
|
|
15
|
+
to: string | null;
|
|
16
|
+
gasLimit: bigint;
|
|
17
|
+
chainId: bigint;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Parses a signed legacy (type 0) EVM transaction carrying the EIP-155 chain ID of the current
|
|
21
|
+
* network's BRC2.0 chain.
|
|
22
|
+
*
|
|
23
|
+
* The checks mirror what the BRC2.0 module accepts and executes: a canonical RLP encoding, a
|
|
24
|
+
* low-s signature, a value of 0 (the module runs every transaction with value 0), and no zero
|
|
25
|
+
* address recipient (the module treats it as a contract creation).
|
|
26
|
+
*
|
|
27
|
+
* @param rawTx Hex of the signed transaction, with or without `0x`, any case.
|
|
28
|
+
* @throws If the input is not valid hex, is unsigned, is not legacy, is not canonically encoded,
|
|
29
|
+
* has a high-s signature, targets another chain, carries a non-zero value, or sends to the zero
|
|
30
|
+
* address.
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseLegacyRawTx(rawTx: string): ParsedLegacyTx;
|
|
33
|
+
/**
|
|
34
|
+
* Builds a `brc20-prog` transact inscription for a signed legacy raw transaction. BRC2.0 grants
|
|
35
|
+
* `content bytes × GAS_PER_BYTE` gas, so the content is padded with spaces until it covers the
|
|
36
|
+
* transaction's gas limit.
|
|
37
|
+
*/
|
|
38
|
+
export declare function transactInscription(rawTx: string): Promise<InscriptionDetails>;
|
|
39
|
+
export interface TransactArgs extends SignProgressOptions {
|
|
40
|
+
/** Signed legacy (type 0) EVM transaction, hex with or without 0x. */
|
|
41
|
+
rawTx: string;
|
|
42
|
+
feeRate: number;
|
|
43
|
+
dryRun: boolean;
|
|
44
|
+
}
|
|
45
|
+
export interface TransactResult {
|
|
46
|
+
/** The transact inscription's commit, reveal and send transactions. */
|
|
47
|
+
transact: Brc20SendPart;
|
|
48
|
+
/** BRC2.0 tx hash, keccak256(rawTx). */
|
|
49
|
+
txHash: string;
|
|
50
|
+
/** Every broadcast transaction id, in chain order. */
|
|
51
|
+
txIds: string[];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Inscribes a pre-signed legacy EVM transaction as a BRC2.0 `transact` op. The send transaction
|
|
55
|
+
* moves the inscription to `OP_RETURN "BRC20PROG"`, where the module executes the embedded
|
|
56
|
+
* transaction.
|
|
57
|
+
*/
|
|
58
|
+
export declare function transact(args: TransactArgs): Promise<Brc20SendQuote | TransactResult>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** BRC2.0 grants each inscription `content bytes × GAS_PER_BYTE` gas. */
|
|
2
|
+
export declare const GAS_PER_BYTE = 12000;
|
|
1
3
|
/**
|
|
2
4
|
* Compresses the input hex string using both Zstd and Nada compression algorithms, and returns the shortest result encoded in base64 without padding.
|
|
3
5
|
*
|
|
@@ -22,7 +24,6 @@ export declare function getEvmAddressFromPkScript(pkscript: string): string;
|
|
|
22
24
|
*
|
|
23
25
|
* @param inputHex - The input data for the smart contract deployment, represented as a hexadecimal string. This data will be compressed and included in the inscription.
|
|
24
26
|
* @param estimatedGas - The estimated gas required for the smart contract deployment, used to determine if padding is needed for the inscription content.
|
|
25
|
-
* @param gasPerVbyte - The gas cost per virtual byte, used to calculate the total gas cost of the inscription content and determine if padding is needed.
|
|
26
27
|
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the deployment process.
|
|
27
28
|
* @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.
|
|
28
29
|
* @param paymentAddr - An optional parameter representing the Bitcoin address to which payment should be sent for the minting transaction. If null, no payment will be made.
|
|
@@ -31,7 +32,7 @@ export declare function getEvmAddressFromPkScript(pkscript: string): string;
|
|
|
31
32
|
*
|
|
32
33
|
* @returns An object containing details of the deployment 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.
|
|
33
34
|
*/
|
|
34
|
-
export declare function deploySmartContract(inputHex: string, estimatedGas: number,
|
|
35
|
+
export declare function deploySmartContract(inputHex: string, estimatedGas: number, feeRate: number, postage: number | null, paymentAddr: string | null, payment: number | null, dryRun: boolean): Promise<{
|
|
35
36
|
commitTxId: string;
|
|
36
37
|
signedCommitTxHex: string;
|
|
37
38
|
revealTxId: string;
|
|
@@ -49,7 +50,6 @@ export declare function deploySmartContract(inputHex: string, estimatedGas: numb
|
|
|
49
50
|
* @param abi - The ABI of the smart contract, used to encode the deployment data along with the bytecode.
|
|
50
51
|
* @param params - An array of parameters to be passed to the contract constructor, which will be encoded along with the bytecode using the ABI.
|
|
51
52
|
* @param estimatedGas - The estimated gas required for the smart contract deployment, used to determine if padding is needed for the inscription content.
|
|
52
|
-
* @param gasPerVbyte - The gas cost per virtual byte, used to calculate the total gas cost of the inscription content and determine if padding is needed.
|
|
53
53
|
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the deployment process.
|
|
54
54
|
* @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.
|
|
55
55
|
* @param paymentAddr - An optional parameter representing the Bitcoin address to which payment should be sent for the minting transaction. If null, no payment will be made.
|
|
@@ -58,7 +58,7 @@ export declare function deploySmartContract(inputHex: string, estimatedGas: numb
|
|
|
58
58
|
*
|
|
59
59
|
* @returns An object containing details of the deployment 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.
|
|
60
60
|
*/
|
|
61
|
-
export declare function deploySmartContractAbi(bytecode: string, abi: any, params: any, estimatedGas: number,
|
|
61
|
+
export declare function deploySmartContractAbi(bytecode: string, abi: any, params: any, estimatedGas: number, feeRate: number, postage: number | null, paymentAddr: string | null, payment: number | null, dryRun: boolean): Promise<{
|
|
62
62
|
commitTxId: string;
|
|
63
63
|
signedCommitTxHex: string;
|
|
64
64
|
revealTxId: string;
|
|
@@ -75,7 +75,6 @@ export declare function deploySmartContractAbi(bytecode: string, abi: any, param
|
|
|
75
75
|
* @param smartContractContractAddr - The address of the smart contract to call, represented as a string. This address will be included in the inscription content to indicate which contract function is being called.
|
|
76
76
|
* @param inputHex - The input data for the smart contract function call, represented as a hexadecimal string. This data will be compressed and included in the inscription.
|
|
77
77
|
* @param estimatedGas - The estimated gas required for the smart contract function call, used to determine if padding is needed for the inscription content.
|
|
78
|
-
* @param gasPerVbyte - The gas cost per virtual byte, used to calculate the total gas cost of the inscription content and determine if padding is needed.
|
|
79
78
|
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the function call process.
|
|
80
79
|
* @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.
|
|
81
80
|
* @param paymentAddr - An optional parameter representing the Bitcoin address to which payment should be sent for the minting transaction. If null, no payment will be made.
|
|
@@ -84,7 +83,7 @@ export declare function deploySmartContractAbi(bytecode: string, abi: any, param
|
|
|
84
83
|
*
|
|
85
84
|
* @returns An object containing details of the function call 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.
|
|
86
85
|
*/
|
|
87
|
-
export declare function callSmartContract(smartContractContractAddr: string, inputHex: string, estimatedGas: number,
|
|
86
|
+
export declare function callSmartContract(smartContractContractAddr: string, inputHex: string, estimatedGas: number, feeRate: number, postage: number | null, paymentAddr: string | null, payment: number | null, dryRun: boolean): Promise<{
|
|
88
87
|
commitTxId: string;
|
|
89
88
|
signedCommitTxHex: string;
|
|
90
89
|
revealTxId: string;
|
|
@@ -103,7 +102,6 @@ export declare function callSmartContract(smartContractContractAddr: string, inp
|
|
|
103
102
|
* @param funcName - The name of the function to call on the smart contract, represented as a string. This will be used along with the ABI to encode the function call data.
|
|
104
103
|
* @param params - An array of parameters to be passed to the contract function, which will be encoded using the ABI along with the function name.
|
|
105
104
|
* @param estimatedGas - The estimated gas required for the smart contract function call, used to determine if padding is needed for the inscription content.
|
|
106
|
-
* @param gasPerVbyte - The gas cost per virtual byte, used to calculate the total gas cost of the inscription content and determine if padding is needed.
|
|
107
105
|
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the function call process.
|
|
108
106
|
* @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.
|
|
109
107
|
* @param paymentAddr - An optional parameter representing the Bitcoin address to which payment should be sent for the minting transaction. If null, no payment will be made.
|
|
@@ -112,7 +110,7 @@ export declare function callSmartContract(smartContractContractAddr: string, inp
|
|
|
112
110
|
*
|
|
113
111
|
* @returns An object containing details of the function call 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.
|
|
114
112
|
*/
|
|
115
|
-
export declare function callSmartContractAbi(smartContractContractAddr: string, abi: any, funcName: string, params: any, estimatedGas: number,
|
|
113
|
+
export declare function callSmartContractAbi(smartContractContractAddr: string, abi: any, funcName: string, params: any, estimatedGas: number, feeRate: number, postage: number | null, paymentAddr: string | null, payment: number | null, dryRun: boolean): Promise<{
|
|
116
114
|
commitTxId: string;
|
|
117
115
|
signedCommitTxHex: string;
|
|
118
116
|
revealTxId: string;
|
|
@@ -129,7 +127,6 @@ export declare function callSmartContractAbi(smartContractContractAddr: string,
|
|
|
129
127
|
* @param smartContractContractAddr - The address of the smart contract to call, represented as a string. This address will be included in the inscription content to indicate which contract function is being called.
|
|
130
128
|
* @param inputHex - The input data for the smart contract function call, represented as a hexadecimal string. This data will be compressed and included in the inscription.
|
|
131
129
|
* @param estimatedGas - The estimated gas required for the smart contract function call, used to determine if padding is needed for the inscription content.
|
|
132
|
-
* @param gasPerVbyte - The gas cost per virtual byte, used to calculate the total gas cost of the inscription content and determine if padding is needed.
|
|
133
130
|
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the function call process.
|
|
134
131
|
* @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.
|
|
135
132
|
* @param paymentAddr - An optional parameter representing the Bitcoin address to which payment should be sent for the minting transaction. If null, no payment will be made.
|
|
@@ -139,7 +136,7 @@ export declare function callSmartContractAbi(smartContractContractAddr: string,
|
|
|
139
136
|
* @returns An object containing details of the function call 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.
|
|
140
137
|
* @throws Will throw an error if the wallet is not connected, if the input parameters are of incorrect types, or if there is a failure in creating or sending the inscription.
|
|
141
138
|
*/
|
|
142
|
-
export declare function callSmartContractFromPaymentWallet(smartContractContractAddr: string, inputHex: string, estimatedGas: number,
|
|
139
|
+
export declare function callSmartContractFromPaymentWallet(smartContractContractAddr: string, inputHex: string, estimatedGas: number, feeRate: number, postage: number | null, paymentAddr: string | null, payment: number | null, dryRun: boolean): Promise<{
|
|
143
140
|
commitTxId: string;
|
|
144
141
|
signedCommitTxHex: string;
|
|
145
142
|
revealTxId: string;
|
|
@@ -158,7 +155,6 @@ export declare function callSmartContractFromPaymentWallet(smartContractContract
|
|
|
158
155
|
* @param funcName - The name of the function to call on the smart contract, represented as a string. This will be used along with the ABI to encode the function call data.
|
|
159
156
|
* @param params - An array of parameters to be passed to the contract function, which will be encoded using the ABI along with the function name.
|
|
160
157
|
* @param estimatedGas - The estimated gas required for the smart contract function call, used to determine if padding is needed for the inscription content.
|
|
161
|
-
* @param gasPerVbyte - The gas cost per virtual byte, used to calculate the total gas cost of the inscription content and determine if padding is needed.
|
|
162
158
|
* @param feeRate - The fee rate in sats/vbyte to be used for the transactions involved in the function call process.
|
|
163
159
|
* @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.
|
|
164
160
|
* @param paymentAddr - An optional parameter representing the Bitcoin address to which payment should be sent for the minting transaction. If null, no payment will be made.
|
|
@@ -167,7 +163,7 @@ export declare function callSmartContractFromPaymentWallet(smartContractContract
|
|
|
167
163
|
*
|
|
168
164
|
* @returns An object containing details of the function call 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.
|
|
169
165
|
*/
|
|
170
|
-
export declare function callSmartContractAbiFromPaymentWallet(smartContractContractAddr: string, abi: any, funcName: string, params: any, estimatedGas: number,
|
|
166
|
+
export declare function callSmartContractAbiFromPaymentWallet(smartContractContractAddr: string, abi: any, funcName: string, params: any, estimatedGas: number, feeRate: number, postage: number | null, paymentAddr: string | null, payment: number | null, dryRun: boolean): Promise<{
|
|
171
167
|
commitTxId: string;
|
|
172
168
|
signedCommitTxHex: string;
|
|
173
169
|
revealTxId: string;
|
package/dist/vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as s, onScopeDispose as u, watch as i } from "vue";
|
|
2
|
-
import { f as r, _ as c, m as f } from "./helpers-
|
|
2
|
+
import { f as r, _ as c, m as f } from "./helpers-DhmRTIg0.js";
|
|
3
3
|
function w() {
|
|
4
4
|
const e = s(r()), t = c((o) => {
|
|
5
5
|
e.value !== o && (e.value = o);
|
package/package.json
CHANGED