@sats-connect/core 0.0.9-3247d26 → 0.0.9-624596
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/index.d.mts +3 -13
- package/dist/index.mjs +10 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -495,23 +495,14 @@ type RbfOrder = MethodParamsAndResult<RbfOrderParams, RbfOrderResult>;
|
|
|
495
495
|
type GetRunesBalanceParams = null;
|
|
496
496
|
interface GetRunesBalanceResult {
|
|
497
497
|
balances: {
|
|
498
|
-
|
|
498
|
+
runeName: string;
|
|
499
499
|
amount: string;
|
|
500
500
|
divisibility: number;
|
|
501
|
+
symbol: string;
|
|
502
|
+
inscriptionId: string | null;
|
|
501
503
|
}[];
|
|
502
504
|
}
|
|
503
505
|
type GetRunesBalance = MethodParamsAndResult<GetRunesBalanceParams, GetRunesBalanceResult>;
|
|
504
|
-
type TransferRunesParams = {
|
|
505
|
-
recipients: {
|
|
506
|
-
runeName: string;
|
|
507
|
-
amount: number;
|
|
508
|
-
address: string;
|
|
509
|
-
}[];
|
|
510
|
-
};
|
|
511
|
-
interface TransferRunesResult {
|
|
512
|
-
txid: string;
|
|
513
|
-
}
|
|
514
|
-
type TransferRunes = MethodParamsAndResult<TransferRunesParams, TransferRunesResult>;
|
|
515
506
|
|
|
516
507
|
interface Pubkey {
|
|
517
508
|
/**
|
|
@@ -722,7 +713,6 @@ interface RunesRequests {
|
|
|
722
713
|
runes_estimateRbfOrder: EstimateRbfOrder;
|
|
723
714
|
runes_rbfOrder: RbfOrder;
|
|
724
715
|
runes_getBalance: GetRunesBalance;
|
|
725
|
-
runes_transfer: TransferRunes;
|
|
726
716
|
}
|
|
727
717
|
type RunesRequestMethod = keyof RunesRequests;
|
|
728
718
|
type Requests = BtcRequests & StxRequests & RunesRequests;
|
package/dist/index.mjs
CHANGED
|
@@ -159,6 +159,16 @@ var getRunesApiClient = (network = "Mainnet" /* Mainnet */) => network === "Main
|
|
|
159
159
|
var SatsConnectAdapter = class {
|
|
160
160
|
async mintRunes(params) {
|
|
161
161
|
try {
|
|
162
|
+
const walletInfo = await this.requestInternal("getInfo", null).catch(() => null);
|
|
163
|
+
if (walletInfo && walletInfo.status === "success") {
|
|
164
|
+
const isMintSupported = walletInfo.result.methods?.includes("runes_mint");
|
|
165
|
+
if (isMintSupported) {
|
|
166
|
+
const response = await this.requestInternal("runes_mint", params);
|
|
167
|
+
if (response) {
|
|
168
|
+
return response;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
162
172
|
const mintRequest = {
|
|
163
173
|
destinationAddress: params.destinationAddress,
|
|
164
174
|
feeRate: params.feeRate,
|