@onekeyfe/onekey-sui-provider 2.2.25 → 2.2.26
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/OnekeySuiProvider.d.ts +4 -13
- package/dist/OnekeySuiProvider.js +5 -29
- package/dist/OnekeySuiStandardWallet.d.ts +2 -2
- package/dist/OnekeySuiStandardWallet.js +3 -21
- package/dist/ProviderSuiBase.d.ts +1 -2
- package/dist/ProviderSuiBase.js +1 -1
- package/dist/cjs/OnekeySuiProvider.js +7 -31
- package/dist/cjs/OnekeySuiStandardWallet.js +4 -22
- package/dist/cjs/ProviderSuiBase.js +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core';
|
|
2
|
-
import type { IJsonRpcRequest } from '@onekeyfe/cross-inpage-provider-types';
|
|
3
2
|
import { ProviderSuiBase } from './ProviderSuiBase';
|
|
4
|
-
import type {
|
|
5
|
-
import
|
|
3
|
+
import type { IJsonRpcRequest } from '@onekeyfe/cross-inpage-provider-types';
|
|
4
|
+
import { AccountInfo } from './types';
|
|
5
|
+
import type { PermissionType } from './types';
|
|
6
|
+
import { IdentifierString, SuiSignAndExecuteTransactionBlockInput, SuiSignAndExecuteTransactionBlockOutput, SuiSignMessageInput, SuiSignMessageOutput, SuiSignPersonalMessageInput, SuiSignPersonalMessageOutput, SuiSignTransactionBlockInput, SuiSignTransactionBlockOutput } from '@mysten/wallet-standard';
|
|
6
7
|
declare const PROVIDER_EVENTS: {
|
|
7
8
|
readonly connect: "connect";
|
|
8
9
|
readonly disconnect: "disconnect";
|
|
@@ -36,12 +37,6 @@ type SignPersonalMessageInput = SuiSignPersonalMessageInput & {
|
|
|
36
37
|
messageSerialize: string;
|
|
37
38
|
walletSerialize: string;
|
|
38
39
|
};
|
|
39
|
-
type OneKeySuiSignTransactionInput = Omit<SuiSignTransactionInput, 'transaction' | 'signal'> & {
|
|
40
|
-
transaction: string;
|
|
41
|
-
};
|
|
42
|
-
type OneKeySuiSignAndExecuteTransactionInput = Omit<SuiSignAndExecuteTransactionInput, 'transaction' | 'signal'> & {
|
|
43
|
-
transaction: string;
|
|
44
|
-
};
|
|
45
40
|
export type SuiRequest = {
|
|
46
41
|
'hasPermissions': (permissions: readonly PermissionType[]) => Promise<boolean>;
|
|
47
42
|
'requestPermissions': (permissions: readonly PermissionType[]) => Promise<boolean>;
|
|
@@ -52,8 +47,6 @@ export type SuiRequest = {
|
|
|
52
47
|
'signTransactionBlock': (input: SignTransactionBlockInput) => Promise<SuiSignTransactionBlockOutput>;
|
|
53
48
|
'signMessage': (input: SignMessageInput) => Promise<SuiSignMessageOutput>;
|
|
54
49
|
'signPersonalMessage': (input: SignPersonalMessageInput) => Promise<SuiSignPersonalMessageOutput>;
|
|
55
|
-
'signTransaction': (input: OneKeySuiSignTransactionInput) => Promise<SignedTransaction>;
|
|
56
|
-
'signAndExecuteTransaction': (input: OneKeySuiSignAndExecuteTransactionInput) => Promise<SuiSignAndExecuteTransactionOutput>;
|
|
57
50
|
};
|
|
58
51
|
export type PROVIDER_EVENTS_STRINGS = keyof typeof PROVIDER_EVENTS;
|
|
59
52
|
export interface IProviderSui {
|
|
@@ -96,8 +89,6 @@ declare class ProviderSui extends ProviderSuiBase implements IProviderSui {
|
|
|
96
89
|
signTransactionBlock(input: SuiSignTransactionBlockInput): Promise<SuiSignTransactionBlockOutput>;
|
|
97
90
|
signMessage(input: SuiSignMessageInput): Promise<SuiSignMessageOutput>;
|
|
98
91
|
signPersonalMessage(input: SuiSignPersonalMessageInput): Promise<SuiSignPersonalMessageOutput>;
|
|
99
|
-
signTransaction(input: SuiSignTransactionInput): Promise<SignedTransaction>;
|
|
100
|
-
signAndExecuteTransaction(input: SuiSignAndExecuteTransactionInput): Promise<SuiSignAndExecuteTransactionOutput>;
|
|
101
92
|
isConnected(): boolean;
|
|
102
93
|
onNetworkChange(listener: SuiProviderEventsMap['networkChange']): this;
|
|
103
94
|
onAccountChange(listener: SuiProviderEventsMap['accountChanged']): this;
|
|
@@ -7,11 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
11
|
-
import { bytesToHex } from '@onekeyfe/cross-inpage-provider-core';
|
|
12
|
-
import { web3Errors } from '@onekeyfe/cross-inpage-provider-errors';
|
|
10
|
+
import { bytesToHex } from '@noble/hashes/utils';
|
|
13
11
|
import { getOrCreateExtInjectedJsBridge } from '@onekeyfe/extension-bridge-injected';
|
|
14
12
|
import { ProviderSuiBase } from './ProviderSuiBase';
|
|
13
|
+
import { web3Errors } from '@onekeyfe/cross-inpage-provider-errors';
|
|
14
|
+
import { TransactionBlock } from '@mysten/sui.js/transactions';
|
|
15
15
|
import { ALL_PERMISSION_TYPES } from './types';
|
|
16
16
|
const PROVIDER_EVENTS = {
|
|
17
17
|
'connect': 'connect',
|
|
@@ -140,7 +140,7 @@ class ProviderSui extends ProviderSuiBase {
|
|
|
140
140
|
params: Object.assign(Object.assign({}, input), {
|
|
141
141
|
// https://github.com/MystenLabs/sui/blob/ace69fa8404eb704b504082d324ebc355a3d2948/sdk/typescript/src/transactions/object.ts#L6-L17
|
|
142
142
|
// With a few more objects, other wallets have steps for tojson.
|
|
143
|
-
transactionBlock:
|
|
143
|
+
transactionBlock: TransactionBlock.from(input.transactionBlock.serialize()), walletSerialize: JSON.stringify(input.account), blockSerialize: input.transactionBlock.serialize() }),
|
|
144
144
|
});
|
|
145
145
|
});
|
|
146
146
|
}
|
|
@@ -148,7 +148,7 @@ class ProviderSui extends ProviderSuiBase {
|
|
|
148
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
149
|
return this._callBridge({
|
|
150
150
|
method: 'signTransactionBlock',
|
|
151
|
-
params: Object.assign(Object.assign({}, input), { transactionBlock:
|
|
151
|
+
params: Object.assign(Object.assign({}, input), { transactionBlock: TransactionBlock.from(input.transactionBlock.serialize()), walletSerialize: JSON.stringify(input.account), blockSerialize: input.transactionBlock.serialize() }),
|
|
152
152
|
});
|
|
153
153
|
});
|
|
154
154
|
}
|
|
@@ -168,30 +168,6 @@ class ProviderSui extends ProviderSuiBase {
|
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
signTransaction(input) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
return this._callBridge({
|
|
174
|
-
method: 'signTransaction',
|
|
175
|
-
params: {
|
|
176
|
-
transaction: yield input.transaction.toJSON(),
|
|
177
|
-
account: input.account,
|
|
178
|
-
chain: input.chain,
|
|
179
|
-
},
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
signAndExecuteTransaction(input) {
|
|
184
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
-
return this._callBridge({
|
|
186
|
-
method: 'signAndExecuteTransaction',
|
|
187
|
-
params: {
|
|
188
|
-
transaction: yield input.transaction.toJSON(),
|
|
189
|
-
account: input.account,
|
|
190
|
-
chain: input.chain,
|
|
191
|
-
},
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
171
|
isConnected() {
|
|
196
172
|
return this._account !== null;
|
|
197
173
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ProviderSui } from './OnekeySuiProvider';
|
|
2
|
+
import { WalletInfo } from './types';
|
|
3
3
|
export declare function registerSuiWallet(provider: ProviderSui, options?: WalletInfo): void;
|
|
@@ -7,9 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { hexToBytes } from '@noble/hashes/utils';
|
|
11
11
|
import mitt from 'mitt';
|
|
12
|
-
import {
|
|
12
|
+
import { ReadonlyWalletAccount, registerWallet, SUI_DEVNET_CHAIN, SUI_TESTNET_CHAIN, } from '@mysten/wallet-standard';
|
|
13
13
|
import { ALL_PERMISSION_TYPES } from './types';
|
|
14
14
|
var Feature;
|
|
15
15
|
(function (Feature) {
|
|
@@ -20,8 +20,6 @@ var Feature;
|
|
|
20
20
|
Feature["SUI__SIGN_TRANSACTION_BLOCK"] = "sui:signTransactionBlock";
|
|
21
21
|
Feature["SUI__SIGN_MESSAGE"] = "sui:signMessage";
|
|
22
22
|
Feature["SUI__SIGN_PERSONAL_MESSAGE"] = "sui:signPersonalMessage";
|
|
23
|
-
Feature["SUI__SIGN_AND_EXECUTE_TRANSACTION"] = "sui:signAndExecuteTransaction";
|
|
24
|
-
Feature["SUI__SIGN_TRANSACTION"] = "sui:signTransaction";
|
|
25
23
|
})(Feature || (Feature = {}));
|
|
26
24
|
class OnekeySuiStandardWallet {
|
|
27
25
|
get name() {
|
|
@@ -66,17 +64,9 @@ class OnekeySuiStandardWallet {
|
|
|
66
64
|
signMessage: this.$signMessage,
|
|
67
65
|
},
|
|
68
66
|
[Feature.SUI__SIGN_PERSONAL_MESSAGE]: {
|
|
69
|
-
version: '1.
|
|
67
|
+
version: '1.0.0',
|
|
70
68
|
signPersonalMessage: this.$signPersonalMessage,
|
|
71
69
|
},
|
|
72
|
-
[Feature.SUI__SIGN_AND_EXECUTE_TRANSACTION]: {
|
|
73
|
-
version: '2.0.0',
|
|
74
|
-
signAndExecuteTransaction: this.$signAndExecuteTransaction,
|
|
75
|
-
},
|
|
76
|
-
[Feature.SUI__SIGN_TRANSACTION]: {
|
|
77
|
-
version: '2.0.0',
|
|
78
|
-
signTransaction: this.$signTransaction,
|
|
79
|
-
},
|
|
80
70
|
};
|
|
81
71
|
}
|
|
82
72
|
constructor(provider, options) {
|
|
@@ -125,12 +115,6 @@ class OnekeySuiStandardWallet {
|
|
|
125
115
|
this.$signPersonalMessage = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
126
116
|
return this.provider.signPersonalMessage(input);
|
|
127
117
|
});
|
|
128
|
-
this.$signAndExecuteTransaction = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
129
|
-
return this.provider.signAndExecuteTransaction(input);
|
|
130
|
-
});
|
|
131
|
-
this.$signTransaction = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
return this.provider.signTransaction(input);
|
|
133
|
-
});
|
|
134
118
|
this.handleAccountSwitch = (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
135
119
|
const { address, publicKey } = payload;
|
|
136
120
|
const activateChain = yield this.getActiveChain();
|
|
@@ -144,8 +128,6 @@ class OnekeySuiStandardWallet {
|
|
|
144
128
|
Feature.SUI__SIGN_TRANSACTION_BLOCK,
|
|
145
129
|
Feature.SUI__SIGN_MESSAGE,
|
|
146
130
|
Feature.SUI__SIGN_PERSONAL_MESSAGE,
|
|
147
|
-
Feature.SUI__SIGN_AND_EXECUTE_TRANSACTION,
|
|
148
|
-
Feature.SUI__SIGN_TRANSACTION,
|
|
149
131
|
],
|
|
150
132
|
});
|
|
151
133
|
this._events.emit('change', {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core';
|
|
2
|
-
import { ProviderBase } from '@onekeyfe/cross-inpage-provider-core';
|
|
3
1
|
import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types';
|
|
2
|
+
import { ProviderBase, IInpageProviderConfig } from '@onekeyfe/cross-inpage-provider-core';
|
|
4
3
|
declare class ProviderSuiBase extends ProviderBase {
|
|
5
4
|
constructor(props: IInpageProviderConfig);
|
|
6
5
|
protected providerName: IInjectedProviderNames;
|
package/dist/ProviderSuiBase.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ProviderBase } from '@onekeyfe/cross-inpage-provider-core';
|
|
2
1
|
import { IInjectedProviderNames } from '@onekeyfe/cross-inpage-provider-types';
|
|
2
|
+
import { ProviderBase } from '@onekeyfe/cross-inpage-provider-core';
|
|
3
3
|
class ProviderSuiBase extends ProviderBase {
|
|
4
4
|
constructor(props) {
|
|
5
5
|
super(props);
|
|
@@ -10,11 +10,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.ProviderSui = void 0;
|
|
13
|
-
const
|
|
14
|
-
const cross_inpage_provider_core_1 = require("@onekeyfe/cross-inpage-provider-core");
|
|
15
|
-
const cross_inpage_provider_errors_1 = require("@onekeyfe/cross-inpage-provider-errors");
|
|
13
|
+
const utils_1 = require("@noble/hashes/utils");
|
|
16
14
|
const extension_bridge_injected_1 = require("@onekeyfe/extension-bridge-injected");
|
|
17
15
|
const ProviderSuiBase_1 = require("./ProviderSuiBase");
|
|
16
|
+
const cross_inpage_provider_errors_1 = require("@onekeyfe/cross-inpage-provider-errors");
|
|
17
|
+
const transactions_1 = require("@mysten/sui.js/transactions");
|
|
18
18
|
const types_1 = require("./types");
|
|
19
19
|
const PROVIDER_EVENTS = {
|
|
20
20
|
'connect': 'connect',
|
|
@@ -143,7 +143,7 @@ class ProviderSui extends ProviderSuiBase_1.ProviderSuiBase {
|
|
|
143
143
|
params: Object.assign(Object.assign({}, input), {
|
|
144
144
|
// https://github.com/MystenLabs/sui/blob/ace69fa8404eb704b504082d324ebc355a3d2948/sdk/typescript/src/transactions/object.ts#L6-L17
|
|
145
145
|
// With a few more objects, other wallets have steps for tojson.
|
|
146
|
-
transactionBlock: transactions_1.
|
|
146
|
+
transactionBlock: transactions_1.TransactionBlock.from(input.transactionBlock.serialize()), walletSerialize: JSON.stringify(input.account), blockSerialize: input.transactionBlock.serialize() }),
|
|
147
147
|
});
|
|
148
148
|
});
|
|
149
149
|
}
|
|
@@ -151,7 +151,7 @@ class ProviderSui extends ProviderSuiBase_1.ProviderSuiBase {
|
|
|
151
151
|
return __awaiter(this, void 0, void 0, function* () {
|
|
152
152
|
return this._callBridge({
|
|
153
153
|
method: 'signTransactionBlock',
|
|
154
|
-
params: Object.assign(Object.assign({}, input), { transactionBlock: transactions_1.
|
|
154
|
+
params: Object.assign(Object.assign({}, input), { transactionBlock: transactions_1.TransactionBlock.from(input.transactionBlock.serialize()), walletSerialize: JSON.stringify(input.account), blockSerialize: input.transactionBlock.serialize() }),
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
157
|
}
|
|
@@ -159,7 +159,7 @@ class ProviderSui extends ProviderSuiBase_1.ProviderSuiBase {
|
|
|
159
159
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
160
|
return this._callBridge({
|
|
161
161
|
method: 'signMessage',
|
|
162
|
-
params: Object.assign(Object.assign({}, input), { walletSerialize: JSON.stringify(input.account), messageSerialize: (0,
|
|
162
|
+
params: Object.assign(Object.assign({}, input), { walletSerialize: JSON.stringify(input.account), messageSerialize: (0, utils_1.bytesToHex)(input.message) }),
|
|
163
163
|
});
|
|
164
164
|
});
|
|
165
165
|
}
|
|
@@ -167,31 +167,7 @@ class ProviderSui extends ProviderSuiBase_1.ProviderSuiBase {
|
|
|
167
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
return this._callBridge({
|
|
169
169
|
method: 'signPersonalMessage',
|
|
170
|
-
params: Object.assign(Object.assign({}, input), { walletSerialize: JSON.stringify(input.account), messageSerialize: (0,
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
signTransaction(input) {
|
|
175
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
return this._callBridge({
|
|
177
|
-
method: 'signTransaction',
|
|
178
|
-
params: {
|
|
179
|
-
transaction: yield input.transaction.toJSON(),
|
|
180
|
-
account: input.account,
|
|
181
|
-
chain: input.chain,
|
|
182
|
-
},
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
signAndExecuteTransaction(input) {
|
|
187
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
-
return this._callBridge({
|
|
189
|
-
method: 'signAndExecuteTransaction',
|
|
190
|
-
params: {
|
|
191
|
-
transaction: yield input.transaction.toJSON(),
|
|
192
|
-
account: input.account,
|
|
193
|
-
chain: input.chain,
|
|
194
|
-
},
|
|
170
|
+
params: Object.assign(Object.assign({}, input), { walletSerialize: JSON.stringify(input.account), messageSerialize: (0, utils_1.bytesToHex)(input.message) }),
|
|
195
171
|
});
|
|
196
172
|
});
|
|
197
173
|
}
|
|
@@ -13,9 +13,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.registerSuiWallet = registerSuiWallet;
|
|
16
|
-
const
|
|
16
|
+
const utils_1 = require("@noble/hashes/utils");
|
|
17
17
|
const mitt_1 = __importDefault(require("mitt"));
|
|
18
|
-
const
|
|
18
|
+
const wallet_standard_1 = require("@mysten/wallet-standard");
|
|
19
19
|
const types_1 = require("./types");
|
|
20
20
|
var Feature;
|
|
21
21
|
(function (Feature) {
|
|
@@ -26,8 +26,6 @@ var Feature;
|
|
|
26
26
|
Feature["SUI__SIGN_TRANSACTION_BLOCK"] = "sui:signTransactionBlock";
|
|
27
27
|
Feature["SUI__SIGN_MESSAGE"] = "sui:signMessage";
|
|
28
28
|
Feature["SUI__SIGN_PERSONAL_MESSAGE"] = "sui:signPersonalMessage";
|
|
29
|
-
Feature["SUI__SIGN_AND_EXECUTE_TRANSACTION"] = "sui:signAndExecuteTransaction";
|
|
30
|
-
Feature["SUI__SIGN_TRANSACTION"] = "sui:signTransaction";
|
|
31
29
|
})(Feature || (Feature = {}));
|
|
32
30
|
class OnekeySuiStandardWallet {
|
|
33
31
|
get name() {
|
|
@@ -72,17 +70,9 @@ class OnekeySuiStandardWallet {
|
|
|
72
70
|
signMessage: this.$signMessage,
|
|
73
71
|
},
|
|
74
72
|
[Feature.SUI__SIGN_PERSONAL_MESSAGE]: {
|
|
75
|
-
version: '1.
|
|
73
|
+
version: '1.0.0',
|
|
76
74
|
signPersonalMessage: this.$signPersonalMessage,
|
|
77
75
|
},
|
|
78
|
-
[Feature.SUI__SIGN_AND_EXECUTE_TRANSACTION]: {
|
|
79
|
-
version: '2.0.0',
|
|
80
|
-
signAndExecuteTransaction: this.$signAndExecuteTransaction,
|
|
81
|
-
},
|
|
82
|
-
[Feature.SUI__SIGN_TRANSACTION]: {
|
|
83
|
-
version: '2.0.0',
|
|
84
|
-
signTransaction: this.$signTransaction,
|
|
85
|
-
},
|
|
86
76
|
};
|
|
87
77
|
}
|
|
88
78
|
constructor(provider, options) {
|
|
@@ -131,18 +121,12 @@ class OnekeySuiStandardWallet {
|
|
|
131
121
|
this.$signPersonalMessage = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
132
122
|
return this.provider.signPersonalMessage(input);
|
|
133
123
|
});
|
|
134
|
-
this.$signAndExecuteTransaction = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
135
|
-
return this.provider.signAndExecuteTransaction(input);
|
|
136
|
-
});
|
|
137
|
-
this.$signTransaction = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
138
|
-
return this.provider.signTransaction(input);
|
|
139
|
-
});
|
|
140
124
|
this.handleAccountSwitch = (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
141
125
|
const { address, publicKey } = payload;
|
|
142
126
|
const activateChain = yield this.getActiveChain();
|
|
143
127
|
this._account = new wallet_standard_1.ReadonlyWalletAccount({
|
|
144
128
|
address: address,
|
|
145
|
-
publicKey: (0,
|
|
129
|
+
publicKey: (0, utils_1.hexToBytes)(publicKey),
|
|
146
130
|
chains: activateChain ? [activateChain] : [],
|
|
147
131
|
features: [
|
|
148
132
|
Feature.STANDARD__CONNECT,
|
|
@@ -150,8 +134,6 @@ class OnekeySuiStandardWallet {
|
|
|
150
134
|
Feature.SUI__SIGN_TRANSACTION_BLOCK,
|
|
151
135
|
Feature.SUI__SIGN_MESSAGE,
|
|
152
136
|
Feature.SUI__SIGN_PERSONAL_MESSAGE,
|
|
153
|
-
Feature.SUI__SIGN_AND_EXECUTE_TRANSACTION,
|
|
154
|
-
Feature.SUI__SIGN_TRANSACTION,
|
|
155
137
|
],
|
|
156
138
|
});
|
|
157
139
|
this._events.emit('change', {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ProviderSuiBase = void 0;
|
|
4
|
-
const cross_inpage_provider_core_1 = require("@onekeyfe/cross-inpage-provider-core");
|
|
5
4
|
const cross_inpage_provider_types_1 = require("@onekeyfe/cross-inpage-provider-types");
|
|
5
|
+
const cross_inpage_provider_core_1 = require("@onekeyfe/cross-inpage-provider-core");
|
|
6
6
|
class ProviderSuiBase extends cross_inpage_provider_core_1.ProviderBase {
|
|
7
7
|
constructor(props) {
|
|
8
8
|
super(props);
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { SuiChain } from '@mysten/wallet-standard';
|
|
2
2
|
export declare const ALL_PERMISSION_TYPES: readonly ["viewAccount", "suggestTransactions"];
|
|
3
3
|
type AllPermissionsType = typeof ALL_PERMISSION_TYPES;
|
|
4
4
|
export type PermissionType = AllPermissionsType[number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/onekey-sui-provider",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.26",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"start": "tsc --watch"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@mysten/wallet-standard": "^0.
|
|
32
|
-
"@onekeyfe/cross-inpage-provider-core": "2.2.
|
|
33
|
-
"@onekeyfe/cross-inpage-provider-errors": "2.2.
|
|
34
|
-
"@onekeyfe/cross-inpage-provider-types": "2.2.
|
|
35
|
-
"@onekeyfe/extension-bridge-injected": "2.2.
|
|
31
|
+
"@mysten/wallet-standard": "^0.7.2",
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-core": "2.2.26",
|
|
33
|
+
"@onekeyfe/cross-inpage-provider-errors": "2.2.26",
|
|
34
|
+
"@onekeyfe/cross-inpage-provider-types": "2.2.26",
|
|
35
|
+
"@onekeyfe/extension-bridge-injected": "2.2.26",
|
|
36
36
|
"eth-rpc-errors": "^4.0.3",
|
|
37
37
|
"mitt": "^3.0.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "bbf6e9bae844ea2d5aaed884a4ace9cc8051569d"
|
|
40
40
|
}
|