@bestinslot/wallet-kit 0.10.0 → 0.12.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 +4 -6
- package/dist/{balances-BWhpck6N.js → balances-Ci1sYbGa.js} +1625 -1569
- package/dist/browser.js +7 -9
- package/dist/core.js +5 -5
- package/dist/{mint-CA_-62SJ.js → mint-Dm67SjcM.js} +103 -171
- package/dist/node.js +10 -14
- package/dist/react.js +1 -1
- package/dist/{register-browser-providers-_EU6DoLd.js → register-browser-providers-BTO9Kyf2.js} +38 -73
- package/dist/types/api/swap.d.ts +17 -4
- package/dist/types/api/wallet.node.d.ts +1 -1
- package/dist/types/core/bis_swap.d.ts +64 -17
- package/dist/types/lib/fee-policy.d.ts +41 -0
- package/dist/types/lib/swap-reporting.d.ts +22 -0
- package/dist/vue.js +1 -1
- package/package.json +10 -3
|
@@ -78,3 +78,25 @@ export interface SwapFees {
|
|
|
78
78
|
* @returns The fee breakdown for the quote.
|
|
79
79
|
*/
|
|
80
80
|
export declare function buildSwapFees(amountIn: bigint, amountOut: bigint, token1FeeBps: bigint, token2FeeBps: bigint, btcFee: bigint): SwapFees;
|
|
81
|
+
/**
|
|
82
|
+
* The `quoted_price` that the swap quote functions report. The price is floored
|
|
83
|
+
* to hundredths in bigint arithmetic, then converted to a `number`; above
|
|
84
|
+
* `Number.MAX_SAFE_INTEGER` hundredths (common for token/token quotes) that
|
|
85
|
+
* conversion rounds to the nearest representable value. Its unit depends on the
|
|
86
|
+
* direction:
|
|
87
|
+
*
|
|
88
|
+
* - WBTC in: sats per whole output token.
|
|
89
|
+
* - Any other input, WBTC out included: output-token base units per whole input
|
|
90
|
+
* token. With WBTC out that is sats per whole input token. For a token/token swap
|
|
91
|
+
* the output is **not** scaled by its decimals, so 1 XYZ in for 2 ABC out (18
|
|
92
|
+
* decimals) quotes `2e18`.
|
|
93
|
+
*
|
|
94
|
+
* @param tokenInAddress The input token address.
|
|
95
|
+
* @param wbtcAddress The WBTC token address.
|
|
96
|
+
* @param amountIn The input amount, in input-token base units.
|
|
97
|
+
* @param amountOut The output amount, in output-token base units.
|
|
98
|
+
* @param decimalsIn The input token's decimals.
|
|
99
|
+
* @param decimalsOut The output token's decimals.
|
|
100
|
+
* @returns The quoted price.
|
|
101
|
+
*/
|
|
102
|
+
export declare function quotedPrice(tokenInAddress: string, wbtcAddress: string, amountIn: bigint, amountOut: bigint, decimalsIn: number, decimalsOut: number): number;
|
package/dist/vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref as s, onScopeDispose as i, watch as u } from "vue";
|
|
2
|
-
import { d as r, R as c, i as a } from "./mint-
|
|
2
|
+
import { d as r, R as c, i as a } from "./mint-Dm67SjcM.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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bestinslot/wallet-kit",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "A lightweight JavaScript library for connecting Bitcoin wallets with a unified API.",
|
|
7
7
|
"license": "MIT",
|
|
@@ -92,8 +92,10 @@
|
|
|
92
92
|
"dotenv": "^17.3.1",
|
|
93
93
|
"eslint": "^9.39.2",
|
|
94
94
|
"eslint-plugin-jsdoc": "^62.6.1",
|
|
95
|
+
"husky": "9.1.7",
|
|
95
96
|
"jsdom": "^29.1.1",
|
|
96
|
-
"
|
|
97
|
+
"lint-staged": "16.4.0",
|
|
98
|
+
"prettier": "3.9.9",
|
|
97
99
|
"react": "^19.2.7",
|
|
98
100
|
"react-dom": "^19.2.7",
|
|
99
101
|
"solc": "^0.8.33",
|
|
@@ -113,13 +115,18 @@
|
|
|
113
115
|
"publishConfig": {
|
|
114
116
|
"access": "public"
|
|
115
117
|
},
|
|
118
|
+
"lint-staged": {
|
|
119
|
+
"*": "prettier --write --ignore-unknown"
|
|
120
|
+
},
|
|
116
121
|
"scripts": {
|
|
117
122
|
"dev": "vite",
|
|
118
123
|
"build": "vue-tsc -b && vite build",
|
|
119
124
|
"build:debug": "vue-tsc -b && vite build --minify=false",
|
|
120
125
|
"preview": "vite preview",
|
|
121
126
|
"lint": "eslint",
|
|
122
|
-
"lint:fix": "
|
|
127
|
+
"lint:fix": "eslint --fix && prettier --write .",
|
|
128
|
+
"format": "prettier --write .",
|
|
129
|
+
"format:check": "prettier --check .",
|
|
123
130
|
"test": "vitest run",
|
|
124
131
|
"release": "node scripts/release.mjs",
|
|
125
132
|
"release:tag": "node scripts/release.mjs --tag",
|