@sats-connect/core 0.0.9-4995067 → 0.0.9-5544687

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
@@ -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,
@@ -234,6 +244,16 @@ var SatsConnectAdapter = class {
234
244
  appServiceFeeAddress: params.appServiceFeeAddress
235
245
  };
236
246
  try {
247
+ const walletInfo = await this.requestInternal("getInfo", null).catch(() => null);
248
+ if (walletInfo && walletInfo.status === "success") {
249
+ const isMintSupported = walletInfo.result.methods?.includes("rune_etch");
250
+ if (isMintSupported) {
251
+ const response = await this.requestInternal("runes_etch", params);
252
+ if (response) {
253
+ return response;
254
+ }
255
+ }
256
+ }
237
257
  const orderResponse = await new RunesApi(params.network).createEtchOrder(etchRequest);
238
258
  if (!orderResponse.data) {
239
259
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sats-connect/core",
3
- "version": "0.0.9-4995067",
3
+ "version": "0.0.9-5544687",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",