@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.mjs
CHANGED
|
@@ -2445,7 +2445,7 @@ var DecodeHelper = class {
|
|
|
2445
2445
|
// src/apps/mpay/helper.ts
|
|
2446
2446
|
var MPayAppHelper = class {
|
|
2447
2447
|
application = "mpay";
|
|
2448
|
-
deserialize(input) {
|
|
2448
|
+
async deserialize(input) {
|
|
2449
2449
|
const { chain, transactionBlock } = input;
|
|
2450
2450
|
const globals = Globals.new(chain === "sui:mainnet" ? "prod" /* prod */ : "dev" /* dev */);
|
|
2451
2451
|
const decoder = new DecodeHelper(globals, transactionBlock);
|
|
@@ -2578,16 +2578,36 @@ var MSafeApps = class {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
return app;
|
|
2580
2580
|
}
|
|
2581
|
-
|
|
2582
|
-
|
|
2581
|
+
};
|
|
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;
|
|
2583
2594
|
}
|
|
2584
|
-
|
|
2585
|
-
|
|
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));
|
|
2586
2606
|
}
|
|
2587
2607
|
};
|
|
2588
2608
|
|
|
2589
2609
|
// src/index.ts
|
|
2590
|
-
var appHelpers = new MSafeApps([new CoreHelper(), new MPayAppHelper()]);
|
|
2610
|
+
var appHelpers = new MSafeApps([new CoreHelper(), new MPayAppHelper(), new PlainTransactionHelper()]);
|
|
2591
2611
|
export {
|
|
2592
2612
|
appHelpers
|
|
2593
2613
|
};
|