@msafe/sui-app-store 0.0.11 → 0.0.13
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 +7 -17
- package/dist/index.d.ts +7 -17
- package/dist/index.global.js +9 -9
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +26 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -2475,7 +2475,7 @@ var DecodeHelper = class {
|
|
|
2475
2475
|
// src/apps/mpay/helper.ts
|
|
2476
2476
|
var MPayAppHelper = class {
|
|
2477
2477
|
application = "mpay";
|
|
2478
|
-
deserialize(input) {
|
|
2478
|
+
async deserialize(input) {
|
|
2479
2479
|
const { chain, transactionBlock } = input;
|
|
2480
2480
|
const globals = Globals.new(chain === "sui:mainnet" ? "prod" /* prod */ : "dev" /* dev */);
|
|
2481
2481
|
const decoder = new DecodeHelper(globals, transactionBlock);
|
|
@@ -2608,16 +2608,36 @@ var MSafeApps = class {
|
|
|
2608
2608
|
}
|
|
2609
2609
|
return app;
|
|
2610
2610
|
}
|
|
2611
|
-
|
|
2612
|
-
|
|
2611
|
+
};
|
|
2612
|
+
|
|
2613
|
+
// src/apps/plain-transaction/helper.ts
|
|
2614
|
+
var import_sui3_utils6 = require("@msafe/sui3-utils");
|
|
2615
|
+
var import_transactions6 = require("@mysten/sui.js/transactions");
|
|
2616
|
+
var import_utils14 = require("@mysten/sui.js/utils");
|
|
2617
|
+
var import_sort_keys_recursive2 = __toESM(require("sort-keys-recursive"));
|
|
2618
|
+
var PlainTransactionApplication = "msafe-plain-tx";
|
|
2619
|
+
var PlainTransactionType = "PlainTransaction";
|
|
2620
|
+
var PlainTransactionHelper = class {
|
|
2621
|
+
application;
|
|
2622
|
+
constructor() {
|
|
2623
|
+
this.application = PlainTransactionApplication;
|
|
2613
2624
|
}
|
|
2614
|
-
|
|
2615
|
-
|
|
2625
|
+
async deserialize(input) {
|
|
2626
|
+
const { transactionBlock, suiClient } = input;
|
|
2627
|
+
const content = await transactionBlock.build({ client: suiClient });
|
|
2628
|
+
return {
|
|
2629
|
+
txType: import_sui3_utils6.TransactionType.Other,
|
|
2630
|
+
txSubType: PlainTransactionType,
|
|
2631
|
+
intentionData: { content: (0, import_utils14.toHEX)(content) }
|
|
2632
|
+
};
|
|
2633
|
+
}
|
|
2634
|
+
async build(input) {
|
|
2635
|
+
return import_transactions6.TransactionBlock.from((0, import_utils14.fromHEX)(input.intentionData.content));
|
|
2616
2636
|
}
|
|
2617
2637
|
};
|
|
2618
2638
|
|
|
2619
2639
|
// src/index.ts
|
|
2620
|
-
var appHelpers = new MSafeApps([new CoreHelper(), new MPayAppHelper()]);
|
|
2640
|
+
var appHelpers = new MSafeApps([new CoreHelper(), new MPayAppHelper(), new PlainTransactionHelper()]);
|
|
2621
2641
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2622
2642
|
0 && (module.exports = {
|
|
2623
2643
|
appHelpers
|