@msafe/sui-app-store 0.0.10 → 0.0.11

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 CHANGED
@@ -4,31 +4,36 @@ import { SuiClient } from '@mysten/sui.js/client';
4
4
  import { SuiSignTransactionBlockInput, WalletAccount } from '@mysten/wallet-standard';
5
5
  import { TransactionBlock } from '@mysten/sui.js/transactions';
6
6
 
7
- interface MSafeAppHelper<T extends TransactionIntention<D>, D> {
7
+ type SuiNetworks = 'sui:devnet' | 'sui:testnet' | 'sui:localnet' | 'sui:mainnet';
8
+
9
+ interface MSafeAppHelper<T> {
8
10
  application: string;
9
- deserialize(input: SuiSignTransactionBlockInput): T;
11
+ deserialize(input: SuiSignTransactionBlockInput): {
12
+ txType: TransactionType;
13
+ txSubType: string;
14
+ intentionData: T;
15
+ };
10
16
  build(input: {
17
+ network: SuiNetworks;
11
18
  txType: TransactionType;
12
19
  txSubType: string;
13
- intentionData: D;
20
+ intentionData: T;
14
21
  suiClient: SuiClient;
15
22
  account: WalletAccount;
16
23
  }): Promise<TransactionBlock>;
17
24
  }
18
- interface TransactionIntention<D> {
19
- application: string;
20
- txType: TransactionType;
21
- txSubType: string;
22
- data: D;
23
- serialize(): string;
24
- }
25
25
 
26
26
  declare class MSafeApps {
27
- apps: Map<string, MSafeAppHelper<any, any>>;
28
- constructor(apps: MSafeAppHelper<any, any>[]);
29
- getAppHelper(appName: string): MSafeAppHelper<any, any>;
30
- deserialize(appName: string, input: SuiSignTransactionBlockInput): any;
27
+ apps: Map<string, MSafeAppHelper<any>>;
28
+ constructor(apps: MSafeAppHelper<any>[]);
29
+ getAppHelper(appName: string): MSafeAppHelper<any>;
30
+ deserialize(appName: string, input: SuiSignTransactionBlockInput): {
31
+ txType: TransactionType;
32
+ txSubType: string;
33
+ intentionData: any;
34
+ };
31
35
  build(appName: string, input: {
36
+ network: SuiNetworks;
32
37
  intentionData: any;
33
38
  txType: TransactionType;
34
39
  txSubType: string;
package/dist/index.d.ts CHANGED
@@ -4,31 +4,36 @@ import { SuiClient } from '@mysten/sui.js/client';
4
4
  import { SuiSignTransactionBlockInput, WalletAccount } from '@mysten/wallet-standard';
5
5
  import { TransactionBlock } from '@mysten/sui.js/transactions';
6
6
 
7
- interface MSafeAppHelper<T extends TransactionIntention<D>, D> {
7
+ type SuiNetworks = 'sui:devnet' | 'sui:testnet' | 'sui:localnet' | 'sui:mainnet';
8
+
9
+ interface MSafeAppHelper<T> {
8
10
  application: string;
9
- deserialize(input: SuiSignTransactionBlockInput): T;
11
+ deserialize(input: SuiSignTransactionBlockInput): {
12
+ txType: TransactionType;
13
+ txSubType: string;
14
+ intentionData: T;
15
+ };
10
16
  build(input: {
17
+ network: SuiNetworks;
11
18
  txType: TransactionType;
12
19
  txSubType: string;
13
- intentionData: D;
20
+ intentionData: T;
14
21
  suiClient: SuiClient;
15
22
  account: WalletAccount;
16
23
  }): Promise<TransactionBlock>;
17
24
  }
18
- interface TransactionIntention<D> {
19
- application: string;
20
- txType: TransactionType;
21
- txSubType: string;
22
- data: D;
23
- serialize(): string;
24
- }
25
25
 
26
26
  declare class MSafeApps {
27
- apps: Map<string, MSafeAppHelper<any, any>>;
28
- constructor(apps: MSafeAppHelper<any, any>[]);
29
- getAppHelper(appName: string): MSafeAppHelper<any, any>;
30
- deserialize(appName: string, input: SuiSignTransactionBlockInput): any;
27
+ apps: Map<string, MSafeAppHelper<any>>;
28
+ constructor(apps: MSafeAppHelper<any>[]);
29
+ getAppHelper(appName: string): MSafeAppHelper<any>;
30
+ deserialize(appName: string, input: SuiSignTransactionBlockInput): {
31
+ txType: TransactionType;
32
+ txSubType: string;
33
+ intentionData: any;
34
+ };
31
35
  build(appName: string, input: {
36
+ network: SuiNetworks;
32
37
  intentionData: any;
33
38
  txType: TransactionType;
34
39
  txSubType: string;