@bestinslot/wallet-kit 0.14.0 → 0.14.2
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-CHRCcJyq.js → balances-BCIlZEmP.js} +994 -1004
- package/dist/browser.js +19 -18
- package/dist/core.js +25 -24
- package/dist/{mint-Cyl31b8y.js → mint-CSk_3TfL.js} +107 -73
- package/dist/node.js +18 -17
- package/dist/react.js +1 -1
- package/dist/{register-browser-providers-DOpVXcri.js → register-browser-providers-BdTwEVwB.js} +13 -13
- package/dist/types/api/helpers.d.ts +1 -0
- package/dist/types/core/backend-error.d.ts +31 -0
- package/dist/types/core/brc20-send.d.ts +16 -5
- package/dist/types/core/helpers.d.ts +3 -5
- package/dist/vue.js +1 -1
- package/package.json +1 -1
|
@@ -64,6 +64,8 @@ export declare function callInscription(contractAddress: string, calldata: strin
|
|
|
64
64
|
* @param label - The argument name used in error messages.
|
|
65
65
|
*/
|
|
66
66
|
export declare function parseBrc20Amount(value: string, label: string): bigint;
|
|
67
|
+
/** Formats an 18-decimal bigint as the shortest BRC-20 decimal string, such as `"7.5"`. */
|
|
68
|
+
export declare function formatBrc20Amount(value: bigint): string;
|
|
67
69
|
export declare function assertRecipient(recipient: string): void;
|
|
68
70
|
export declare function assertFeeRate(feeRate: number): void;
|
|
69
71
|
export declare function runChain(steps: ChainStep[], feeRate: number, dryRun: boolean, options: SignProgressOptions): Promise<Brc20SendQuote | ChainResult>;
|
|
@@ -79,18 +81,27 @@ export interface SendAsBrc20Args extends SignProgressOptions {
|
|
|
79
81
|
dryRun: boolean;
|
|
80
82
|
}
|
|
81
83
|
export interface SendAsBrc20Result {
|
|
82
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* The BRC-20 transfer inscription sent to the recipient. It carries both parts when the recipient
|
|
86
|
+
* is another address, and only `fromBrc20Amount` when the recipient is the sender's own ordinals
|
|
87
|
+
* address. Null when it would carry nothing.
|
|
88
|
+
*/
|
|
83
89
|
brc20Transfer: Brc20SendPart | null;
|
|
84
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* The BRC2.0 withdraw inscription, sent to the sender's own ordinals address (the recipient's, when
|
|
92
|
+
* that is the sender), or null when `fromProgAmount` is 0.
|
|
93
|
+
*/
|
|
85
94
|
progWithdraw: Brc20SendPart | null;
|
|
86
95
|
/** Every broadcast transaction id, in chain order. */
|
|
87
96
|
txIds: string[];
|
|
88
97
|
}
|
|
89
98
|
/**
|
|
90
99
|
* Sends a ticker so the recipient receives plain BRC-20, drawing on the sender's base BRC-20 balance
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
100
|
+
* and its BRC2.0 balance. To another address, a `brc20-module` withdraw first moves the BRC2.0 part
|
|
101
|
+
* into the sender's own base balance, then one BRC-20 transfer inscription of both parts goes to the
|
|
102
|
+
* recipient: exchanges and other wallets credit only transfer inscriptions. To the sender's own
|
|
103
|
+
* ordinals address, the withdraw alone credits it. All steps are signed as one chain and broadcast
|
|
104
|
+
* together, and the chain order makes the withdraw index before the transfer is inscribed.
|
|
94
105
|
*/
|
|
95
106
|
export declare function sendAsBrc20(args: SendAsBrc20Args): Promise<Brc20SendQuote | SendAsBrc20Result>;
|
|
96
107
|
export interface SendAsBrc20ProgArgs extends SignProgressOptions {
|
|
@@ -220,15 +220,13 @@ export declare function verifySignature(message: string, signatureHex: string, a
|
|
|
220
220
|
*/
|
|
221
221
|
export declare function verifySignatureLocal(message: string, signatureHex: string, address: string): boolean;
|
|
222
222
|
/**
|
|
223
|
-
*
|
|
224
|
-
* It automatically checks for non-ok HTTP responses and for an 'error' field
|
|
225
|
-
* in the JSON response body, throwing a descriptive error in either case.
|
|
223
|
+
* Fetches a backend JSON route.
|
|
226
224
|
*
|
|
227
225
|
* @param url The URL to fetch.
|
|
228
226
|
* @param options The standard RequestInit options for the fetch call.
|
|
229
227
|
* @returns A promise that resolves with the parsed JSON data of type T.
|
|
230
|
-
* @throws {
|
|
231
|
-
*
|
|
228
|
+
* @throws {BackendError} When the request does not complete, the HTTP status is not ok, the body
|
|
229
|
+
* is not JSON, or the body carries an `error` field. It holds the status and the backend's `code`.
|
|
232
230
|
*/
|
|
233
231
|
export declare function fetchWithErrors<T>(url: string, options: RequestInit): Promise<T>;
|
|
234
232
|
/**
|
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 { e as r,
|
|
2
|
+
import { e as r, U as c, k as a } from "./mint-CSk_3TfL.js";
|
|
3
3
|
function n() {
|
|
4
4
|
const o = s(r()), t = c((e) => {
|
|
5
5
|
o.value !== e && (o.value = e);
|
package/package.json
CHANGED