@msafe/sui-app-store 0.0.12 → 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.mjs CHANGED
@@ -2580,8 +2580,34 @@ var MSafeApps = class {
2580
2580
  }
2581
2581
  };
2582
2582
 
2583
+ // src/apps/plain-transaction/helper.ts
2584
+ import { TransactionType as TransactionType6 } from "@msafe/sui3-utils";
2585
+ import { TransactionBlock as TransactionBlock6 } from "@mysten/sui.js/transactions";
2586
+ import { fromHEX, toHEX } from "@mysten/sui.js/utils";
2587
+ import sortKeys2 from "sort-keys-recursive";
2588
+ var PlainTransactionApplication = "msafe-plain-tx";
2589
+ var PlainTransactionType = "PlainTransaction";
2590
+ var PlainTransactionHelper = class {
2591
+ application;
2592
+ constructor() {
2593
+ this.application = PlainTransactionApplication;
2594
+ }
2595
+ async deserialize(input) {
2596
+ const { transactionBlock, suiClient } = input;
2597
+ const content = await transactionBlock.build({ client: suiClient });
2598
+ return {
2599
+ txType: TransactionType6.Other,
2600
+ txSubType: PlainTransactionType,
2601
+ intentionData: { content: toHEX(content) }
2602
+ };
2603
+ }
2604
+ async build(input) {
2605
+ return TransactionBlock6.from(fromHEX(input.intentionData.content));
2606
+ }
2607
+ };
2608
+
2583
2609
  // src/index.ts
2584
- var appHelpers = new MSafeApps([new CoreHelper(), new MPayAppHelper()]);
2610
+ var appHelpers = new MSafeApps([new CoreHelper(), new MPayAppHelper(), new PlainTransactionHelper()]);
2585
2611
  export {
2586
2612
  appHelpers
2587
2613
  };