@msafe/sui-app-store 0.0.331 → 0.0.332
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 +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { TransactionType } from '@msafe/sui3-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { Transaction } from '@mysten/sui/transactions';
|
|
3
3
|
import { SuiSignTransactionBlockInput, WalletAccount, IdentifierString } from '@mysten/wallet-standard';
|
|
4
4
|
import { SuiClient } from '@mysten/sui/client';
|
|
5
|
-
import {
|
|
5
|
+
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
6
6
|
import { SuiClient as SuiClient$1 } from '@mysten/sui.js/client';
|
|
7
|
+
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
7
8
|
|
|
8
9
|
type SuiNetworks = 'sui:devnet' | 'sui:testnet' | 'sui:localnet' | 'sui:mainnet';
|
|
9
10
|
|
|
@@ -25,7 +26,7 @@ interface IAppHelper<T> {
|
|
|
25
26
|
intentionData: T;
|
|
26
27
|
clientUrl: string;
|
|
27
28
|
account: WalletAccount;
|
|
28
|
-
}): Promise<
|
|
29
|
+
}): Promise<Transaction>;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
interface IAppHelperInternal<T> {
|
|
@@ -53,6 +54,31 @@ interface IAppHelperInternal<T> {
|
|
|
53
54
|
}): Promise<Transaction>;
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
interface IAppHelperInternalGrpc<T> {
|
|
58
|
+
application: string;
|
|
59
|
+
supportSDK: '@mysten/sui-v2';
|
|
60
|
+
deserialize(input: {
|
|
61
|
+
transaction: Transaction;
|
|
62
|
+
chain: IdentifierString;
|
|
63
|
+
network: SuiNetworks;
|
|
64
|
+
suiGrpcClient: SuiGrpcClient;
|
|
65
|
+
account: WalletAccount;
|
|
66
|
+
appContext?: any;
|
|
67
|
+
}): Promise<{
|
|
68
|
+
txType: TransactionType;
|
|
69
|
+
txSubType: string;
|
|
70
|
+
intentionData: T;
|
|
71
|
+
}>;
|
|
72
|
+
build(input: {
|
|
73
|
+
network: SuiNetworks;
|
|
74
|
+
txType: TransactionType;
|
|
75
|
+
txSubType: string;
|
|
76
|
+
intentionData: T;
|
|
77
|
+
suiGrpcClient: SuiGrpcClient;
|
|
78
|
+
account: WalletAccount;
|
|
79
|
+
}): Promise<Transaction>;
|
|
80
|
+
}
|
|
81
|
+
|
|
56
82
|
interface IAppHelperInternalLegacy<T> {
|
|
57
83
|
application: string;
|
|
58
84
|
supportSDK: '@mysten/sui.js';
|
|
@@ -76,12 +102,14 @@ interface IAppHelperInternalLegacy<T> {
|
|
|
76
102
|
}): Promise<TransactionBlock>;
|
|
77
103
|
}
|
|
78
104
|
|
|
105
|
+
type InternalAppHelper<T> = IAppHelperInternalLegacy<T> | IAppHelperInternal<T> | IAppHelperInternalGrpc<T>;
|
|
79
106
|
declare class MSafeApps {
|
|
80
107
|
apps: Map<string, IAppHelper<any>>;
|
|
81
108
|
private constructor();
|
|
82
|
-
static fromHelpers(apps:
|
|
109
|
+
static fromHelpers(apps: InternalAppHelper<any>[]): MSafeApps;
|
|
83
110
|
addLegacyHelper(app: IAppHelperInternalLegacy<any>): void;
|
|
84
111
|
addHelper(app: IAppHelperInternal<any>): void;
|
|
112
|
+
addGrpcHelper(app: IAppHelperInternalGrpc<any>): void;
|
|
85
113
|
getAppHelper(appName: string): IAppHelper<any>;
|
|
86
114
|
}
|
|
87
115
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { TransactionType } from '@msafe/sui3-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { Transaction } from '@mysten/sui/transactions';
|
|
3
3
|
import { SuiSignTransactionBlockInput, WalletAccount, IdentifierString } from '@mysten/wallet-standard';
|
|
4
4
|
import { SuiClient } from '@mysten/sui/client';
|
|
5
|
-
import {
|
|
5
|
+
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
6
6
|
import { SuiClient as SuiClient$1 } from '@mysten/sui.js/client';
|
|
7
|
+
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
7
8
|
|
|
8
9
|
type SuiNetworks = 'sui:devnet' | 'sui:testnet' | 'sui:localnet' | 'sui:mainnet';
|
|
9
10
|
|
|
@@ -25,7 +26,7 @@ interface IAppHelper<T> {
|
|
|
25
26
|
intentionData: T;
|
|
26
27
|
clientUrl: string;
|
|
27
28
|
account: WalletAccount;
|
|
28
|
-
}): Promise<
|
|
29
|
+
}): Promise<Transaction>;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
interface IAppHelperInternal<T> {
|
|
@@ -53,6 +54,31 @@ interface IAppHelperInternal<T> {
|
|
|
53
54
|
}): Promise<Transaction>;
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
interface IAppHelperInternalGrpc<T> {
|
|
58
|
+
application: string;
|
|
59
|
+
supportSDK: '@mysten/sui-v2';
|
|
60
|
+
deserialize(input: {
|
|
61
|
+
transaction: Transaction;
|
|
62
|
+
chain: IdentifierString;
|
|
63
|
+
network: SuiNetworks;
|
|
64
|
+
suiGrpcClient: SuiGrpcClient;
|
|
65
|
+
account: WalletAccount;
|
|
66
|
+
appContext?: any;
|
|
67
|
+
}): Promise<{
|
|
68
|
+
txType: TransactionType;
|
|
69
|
+
txSubType: string;
|
|
70
|
+
intentionData: T;
|
|
71
|
+
}>;
|
|
72
|
+
build(input: {
|
|
73
|
+
network: SuiNetworks;
|
|
74
|
+
txType: TransactionType;
|
|
75
|
+
txSubType: string;
|
|
76
|
+
intentionData: T;
|
|
77
|
+
suiGrpcClient: SuiGrpcClient;
|
|
78
|
+
account: WalletAccount;
|
|
79
|
+
}): Promise<Transaction>;
|
|
80
|
+
}
|
|
81
|
+
|
|
56
82
|
interface IAppHelperInternalLegacy<T> {
|
|
57
83
|
application: string;
|
|
58
84
|
supportSDK: '@mysten/sui.js';
|
|
@@ -76,12 +102,14 @@ interface IAppHelperInternalLegacy<T> {
|
|
|
76
102
|
}): Promise<TransactionBlock>;
|
|
77
103
|
}
|
|
78
104
|
|
|
105
|
+
type InternalAppHelper<T> = IAppHelperInternalLegacy<T> | IAppHelperInternal<T> | IAppHelperInternalGrpc<T>;
|
|
79
106
|
declare class MSafeApps {
|
|
80
107
|
apps: Map<string, IAppHelper<any>>;
|
|
81
108
|
private constructor();
|
|
82
|
-
static fromHelpers(apps:
|
|
109
|
+
static fromHelpers(apps: InternalAppHelper<any>[]): MSafeApps;
|
|
83
110
|
addLegacyHelper(app: IAppHelperInternalLegacy<any>): void;
|
|
84
111
|
addHelper(app: IAppHelperInternal<any>): void;
|
|
112
|
+
addGrpcHelper(app: IAppHelperInternalGrpc<any>): void;
|
|
85
113
|
getAppHelper(appName: string): IAppHelper<any>;
|
|
86
114
|
}
|
|
87
115
|
|