@sats-connect/core 0.0.11 → 0.0.12-c65d843

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.
Files changed (2) hide show
  1. package/dist/index.mjs +20 -0
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -169,6 +169,16 @@ var getRunesApiClient = (network = "Mainnet" /* Mainnet */) => {
169
169
  var SatsConnectAdapter = class {
170
170
  async mintRunes(params) {
171
171
  try {
172
+ const walletInfo = await this.requestInternal("getInfo", null).catch(() => null);
173
+ if (walletInfo && walletInfo.status === "success") {
174
+ const isMintSupported = walletInfo.result.methods?.includes("runes_mint");
175
+ if (isMintSupported) {
176
+ const response = await this.requestInternal("runes_mint", params);
177
+ if (response) {
178
+ return response;
179
+ }
180
+ }
181
+ }
172
182
  const mintRequest = {
173
183
  destinationAddress: params.destinationAddress,
174
184
  feeRate: params.feeRate,
@@ -238,6 +248,16 @@ var SatsConnectAdapter = class {
238
248
  appServiceFeeAddress: params.appServiceFeeAddress
239
249
  };
240
250
  try {
251
+ const walletInfo = await this.requestInternal("getInfo", null).catch(() => null);
252
+ if (walletInfo && walletInfo.status === "success") {
253
+ const isEtchSupported = walletInfo.result.methods?.includes("runes_etch");
254
+ if (isEtchSupported) {
255
+ const response = await this.requestInternal("runes_etch", params);
256
+ if (response) {
257
+ return response;
258
+ }
259
+ }
260
+ }
241
261
  const orderResponse = await new RunesApi(params.network).createEtchOrder(etchRequest);
242
262
  if (!orderResponse.data) {
243
263
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.0.11",
3
+ "version": "0.0.12-c65d843",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",