@sats-connect/core 0.0.11-a4c2633 → 0.0.11-a6e103e
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 +4 -4
- package/dist/index.mjs +6 -28
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -851,12 +851,12 @@ type GetAccountsResult = {
|
|
|
851
851
|
};
|
|
852
852
|
type StxGetAccounts = MethodParamsAndResult<{}, GetAccountsResult>;
|
|
853
853
|
declare const stxGetAddressesMethodName = "stx_getAddresses";
|
|
854
|
-
declare const stxGetAddressesParamsSchema: v.
|
|
854
|
+
declare const stxGetAddressesParamsSchema: v.ObjectSchema<{
|
|
855
855
|
/**
|
|
856
856
|
* A message to be displayed to the user in the request prompt.
|
|
857
857
|
*/
|
|
858
858
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
859
|
-
}, undefined
|
|
859
|
+
}, undefined>;
|
|
860
860
|
declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
861
861
|
/**
|
|
862
862
|
* The addresses generated for the given purposes.
|
|
@@ -870,12 +870,12 @@ declare const stxGetAddressesResultSchema: v.ObjectSchema<{
|
|
|
870
870
|
}, undefined>;
|
|
871
871
|
declare const stxGetAddressesRequestMessageSchema: v.ObjectSchema<{
|
|
872
872
|
readonly method: v.LiteralSchema<"stx_getAddresses", undefined>;
|
|
873
|
-
readonly params: v.
|
|
873
|
+
readonly params: v.ObjectSchema<{
|
|
874
874
|
/**
|
|
875
875
|
* A message to be displayed to the user in the request prompt.
|
|
876
876
|
*/
|
|
877
877
|
readonly message: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
878
|
-
}, undefined
|
|
878
|
+
}, undefined>;
|
|
879
879
|
readonly id: v.StringSchema<undefined>;
|
|
880
880
|
readonly jsonrpc: v.LiteralSchema<"2.0", undefined>;
|
|
881
881
|
}, undefined>;
|
package/dist/index.mjs
CHANGED
|
@@ -202,16 +202,6 @@ var getRunesApiClient = (network = "Mainnet" /* Mainnet */) => {
|
|
|
202
202
|
var SatsConnectAdapter = class {
|
|
203
203
|
async mintRunes(params) {
|
|
204
204
|
try {
|
|
205
|
-
const walletInfo = await this.requestInternal("getInfo", null).catch(() => null);
|
|
206
|
-
if (walletInfo && walletInfo.status === "success") {
|
|
207
|
-
const isMintSupported = walletInfo.result.methods?.includes("runes_mint");
|
|
208
|
-
if (isMintSupported) {
|
|
209
|
-
const response = await this.requestInternal("runes_mint", params);
|
|
210
|
-
if (response) {
|
|
211
|
-
return response;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
205
|
const mintRequest = {
|
|
216
206
|
destinationAddress: params.destinationAddress,
|
|
217
207
|
feeRate: params.feeRate,
|
|
@@ -281,16 +271,6 @@ var SatsConnectAdapter = class {
|
|
|
281
271
|
appServiceFeeAddress: params.appServiceFeeAddress
|
|
282
272
|
};
|
|
283
273
|
try {
|
|
284
|
-
const walletInfo = await this.requestInternal("getInfo", null).catch(() => null);
|
|
285
|
-
if (walletInfo && walletInfo.status === "success") {
|
|
286
|
-
const isEtchSupported = walletInfo.result.methods?.includes("runes_etch");
|
|
287
|
-
if (isEtchSupported) {
|
|
288
|
-
const response = await this.requestInternal("runes_etch", params);
|
|
289
|
-
if (response) {
|
|
290
|
-
return response;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
274
|
const orderResponse = await new RunesApi(params.network).createEtchOrder(etchRequest);
|
|
295
275
|
if (!orderResponse.data) {
|
|
296
276
|
return {
|
|
@@ -595,14 +575,12 @@ var getAddress = async (options) => {
|
|
|
595
575
|
// src/request/types/stxMethods.ts
|
|
596
576
|
import * as v3 from "valibot";
|
|
597
577
|
var stxGetAddressesMethodName = "stx_getAddresses";
|
|
598
|
-
var stxGetAddressesParamsSchema = v3.
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
})
|
|
605
|
-
);
|
|
578
|
+
var stxGetAddressesParamsSchema = v3.object({
|
|
579
|
+
/**
|
|
580
|
+
* A message to be displayed to the user in the request prompt.
|
|
581
|
+
*/
|
|
582
|
+
message: v3.optional(v3.string())
|
|
583
|
+
});
|
|
606
584
|
var stxGetAddressesResultSchema = v3.object({
|
|
607
585
|
/**
|
|
608
586
|
* The addresses generated for the given purposes.
|