@onekeyfe/onekey-solana-provider 0.0.16 → 0.0.19
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/ProviderSolana.d.ts +1 -0
- package/dist/ProviderSolana.js +4 -0
- package/dist/cjs/ProviderSolana.js +4 -0
- package/dist/cjs/utils.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +6 -6
package/dist/ProviderSolana.d.ts
CHANGED
|
@@ -106,6 +106,7 @@ declare class ProviderSolana extends ProviderSolanaBase implements IProviderSola
|
|
|
106
106
|
constructor(props: OneKeySolanaProviderProps);
|
|
107
107
|
private _registerEvents;
|
|
108
108
|
private _callBridge;
|
|
109
|
+
private postMessage;
|
|
109
110
|
connect(options?: ConnectOptions): Promise<{
|
|
110
111
|
publicKey: PublicKey;
|
|
111
112
|
}>;
|
package/dist/ProviderSolana.js
CHANGED
|
@@ -45,6 +45,10 @@ class ProviderSolana extends ProviderSolanaBase {
|
|
|
45
45
|
_callBridge(params) {
|
|
46
46
|
return this.bridgeRequest(params);
|
|
47
47
|
}
|
|
48
|
+
postMessage(param) {
|
|
49
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
50
|
+
return this._callBridge(param);
|
|
51
|
+
}
|
|
48
52
|
connect(options) {
|
|
49
53
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
54
|
if (this.publicKey) {
|
|
@@ -51,6 +51,10 @@ class ProviderSolana extends ProviderSolanaBase_1.ProviderSolanaBase {
|
|
|
51
51
|
_callBridge(params) {
|
|
52
52
|
return this.bridgeRequest(params);
|
|
53
53
|
}
|
|
54
|
+
postMessage(param) {
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
56
|
+
return this._callBridge(param);
|
|
57
|
+
}
|
|
54
58
|
connect(options) {
|
|
55
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
60
|
if (this.publicKey) {
|
package/dist/cjs/utils.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.isWalletEventMethodMatch = exports.decodeSignedTransaction = exports.enc
|
|
|
7
7
|
const web3_js_1 = require("@solana/web3.js");
|
|
8
8
|
const bs58_1 = __importDefault(require("bs58"));
|
|
9
9
|
const encodeTransaction = (transaction) => {
|
|
10
|
-
return bs58_1.default.encode(transaction.
|
|
10
|
+
return bs58_1.default.encode(transaction.serialize({ requireAllSignatures: false }));
|
|
11
11
|
};
|
|
12
12
|
exports.encodeTransaction = encodeTransaction;
|
|
13
13
|
const decodeSignedTransaction = (message) => {
|
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Transaction } from '@solana/web3.js';
|
|
2
2
|
import base58 from 'bs58';
|
|
3
3
|
export const encodeTransaction = (transaction) => {
|
|
4
|
-
return base58.encode(transaction.
|
|
4
|
+
return base58.encode(transaction.serialize({ requireAllSignatures: false }));
|
|
5
5
|
};
|
|
6
6
|
export const decodeSignedTransaction = (message) => {
|
|
7
7
|
return Transaction.from(base58.decode(message));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/onekey-solana-provider",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider",
|
|
6
6
|
"solona"
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"start": "tsc --watch"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@onekeyfe/cross-inpage-provider-core": "
|
|
33
|
-
"@onekeyfe/cross-inpage-provider-errors": "
|
|
34
|
-
"@onekeyfe/cross-inpage-provider-types": "
|
|
35
|
-
"@onekeyfe/extension-bridge-injected": "
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-core": "0.0.19",
|
|
33
|
+
"@onekeyfe/cross-inpage-provider-errors": "0.0.19",
|
|
34
|
+
"@onekeyfe/cross-inpage-provider-types": "0.0.19",
|
|
35
|
+
"@onekeyfe/extension-bridge-injected": "0.0.19",
|
|
36
36
|
"@solana/web3.js": "^1.41.3",
|
|
37
37
|
"bs58": "^5.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/bs58": "^4.0.1"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ce8a3b77737e551797999624911c49fede667316"
|
|
43
43
|
}
|