@solana-mobile/mobile-wallet-adapter-protocol-web3js 0.9.1 → 0.9.3
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/lib/cjs/index.browser.js +22 -13
- package/lib/cjs/index.js +22 -13
- package/lib/cjs/index.native.js +22 -13
- package/lib/esm/index.browser.mjs +23 -14
- package/lib/esm/index.mjs +23 -14
- package/lib/types/index.browser.d.mts +7 -6
- package/lib/types/index.browser.d.ts +7 -6
- package/lib/types/index.d.mts +7 -6
- package/lib/types/index.d.ts +7 -6
- package/lib/types/index.native.d.ts +7 -6
- package/package.json +5 -5
package/lib/cjs/index.browser.js
CHANGED
|
@@ -57,6 +57,25 @@ function toUint8Array(base64EncodedByteArray) {
|
|
|
57
57
|
.map((c) => c.charCodeAt(0)));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
function getPayloadFromTransaction(transaction) {
|
|
61
|
+
const serializedTransaction = 'version' in transaction
|
|
62
|
+
? transaction.serialize()
|
|
63
|
+
: transaction.serialize({
|
|
64
|
+
requireAllSignatures: false,
|
|
65
|
+
verifySignatures: false,
|
|
66
|
+
});
|
|
67
|
+
const payload = fromUint8Array(serializedTransaction);
|
|
68
|
+
return payload;
|
|
69
|
+
}
|
|
70
|
+
function getTransactionFromWireMessage(byteArray) {
|
|
71
|
+
const version = web3_js.VersionedMessage.deserializeMessageVersion(byteArray);
|
|
72
|
+
if (version === 'legacy') {
|
|
73
|
+
return web3_js.Transaction.from(byteArray);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return web3_js.VersionedTransaction.deserialize(byteArray);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
60
79
|
function transact(callback, config) {
|
|
61
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
81
|
const augmentedCallback = (wallet) => {
|
|
@@ -68,13 +87,7 @@ function transact(callback, config) {
|
|
|
68
87
|
target[p] = function (_a) {
|
|
69
88
|
var { minContextSlot, transactions } = _a, rest = __rest(_a, ["minContextSlot", "transactions"]);
|
|
70
89
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
const payloads =
|
|
72
|
-
const serializedTransaction = yield transaction.serialize({
|
|
73
|
-
requireAllSignatures: false,
|
|
74
|
-
verifySignatures: false,
|
|
75
|
-
});
|
|
76
|
-
return serializedTransaction.toString('base64');
|
|
77
|
-
})));
|
|
90
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
78
91
|
const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (minContextSlot != null
|
|
79
92
|
? { options: { min_context_slot: minContextSlot } }
|
|
80
93
|
: null)), { payloads }));
|
|
@@ -98,14 +111,10 @@ function transact(callback, config) {
|
|
|
98
111
|
target[p] = function (_a) {
|
|
99
112
|
var { transactions } = _a, rest = __rest(_a, ["transactions"]);
|
|
100
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const
|
|
102
|
-
requireAllSignatures: false,
|
|
103
|
-
verifySignatures: false,
|
|
104
|
-
}));
|
|
105
|
-
const payloads = serializedTransactions.map((serializedTransaction) => serializedTransaction.toString('base64'));
|
|
114
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
106
115
|
const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));
|
|
107
116
|
const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);
|
|
108
|
-
const signedTransactions = compiledTransactions.map(
|
|
117
|
+
const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);
|
|
109
118
|
return signedTransactions;
|
|
110
119
|
});
|
|
111
120
|
};
|
package/lib/cjs/index.js
CHANGED
|
@@ -57,6 +57,25 @@ function toUint8Array(base64EncodedByteArray) {
|
|
|
57
57
|
.map((c) => c.charCodeAt(0)));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
function getPayloadFromTransaction(transaction) {
|
|
61
|
+
const serializedTransaction = 'version' in transaction
|
|
62
|
+
? transaction.serialize()
|
|
63
|
+
: transaction.serialize({
|
|
64
|
+
requireAllSignatures: false,
|
|
65
|
+
verifySignatures: false,
|
|
66
|
+
});
|
|
67
|
+
const payload = fromUint8Array(serializedTransaction);
|
|
68
|
+
return payload;
|
|
69
|
+
}
|
|
70
|
+
function getTransactionFromWireMessage(byteArray) {
|
|
71
|
+
const version = web3_js.VersionedMessage.deserializeMessageVersion(byteArray);
|
|
72
|
+
if (version === 'legacy') {
|
|
73
|
+
return web3_js.Transaction.from(byteArray);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return web3_js.VersionedTransaction.deserialize(byteArray);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
60
79
|
function transact(callback, config) {
|
|
61
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
81
|
const augmentedCallback = (wallet) => {
|
|
@@ -68,13 +87,7 @@ function transact(callback, config) {
|
|
|
68
87
|
target[p] = function (_a) {
|
|
69
88
|
var { minContextSlot, transactions } = _a, rest = __rest(_a, ["minContextSlot", "transactions"]);
|
|
70
89
|
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
const payloads =
|
|
72
|
-
const serializedTransaction = yield transaction.serialize({
|
|
73
|
-
requireAllSignatures: false,
|
|
74
|
-
verifySignatures: false,
|
|
75
|
-
});
|
|
76
|
-
return serializedTransaction.toString('base64');
|
|
77
|
-
})));
|
|
90
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
78
91
|
const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (minContextSlot != null
|
|
79
92
|
? { options: { min_context_slot: minContextSlot } }
|
|
80
93
|
: null)), { payloads }));
|
|
@@ -98,14 +111,10 @@ function transact(callback, config) {
|
|
|
98
111
|
target[p] = function (_a) {
|
|
99
112
|
var { transactions } = _a, rest = __rest(_a, ["transactions"]);
|
|
100
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const
|
|
102
|
-
requireAllSignatures: false,
|
|
103
|
-
verifySignatures: false,
|
|
104
|
-
}));
|
|
105
|
-
const payloads = serializedTransactions.map((serializedTransaction) => serializedTransaction.toString('base64'));
|
|
114
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
106
115
|
const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));
|
|
107
116
|
const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);
|
|
108
|
-
const signedTransactions = compiledTransactions.map(
|
|
117
|
+
const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);
|
|
109
118
|
return signedTransactions;
|
|
110
119
|
});
|
|
111
120
|
};
|
package/lib/cjs/index.native.js
CHANGED
|
@@ -48,6 +48,25 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
function getPayloadFromTransaction(transaction) {
|
|
52
|
+
const serializedTransaction = 'version' in transaction
|
|
53
|
+
? transaction.serialize()
|
|
54
|
+
: transaction.serialize({
|
|
55
|
+
requireAllSignatures: false,
|
|
56
|
+
verifySignatures: false,
|
|
57
|
+
});
|
|
58
|
+
const payload = jsBase64.fromUint8Array(serializedTransaction);
|
|
59
|
+
return payload;
|
|
60
|
+
}
|
|
61
|
+
function getTransactionFromWireMessage(byteArray) {
|
|
62
|
+
const version = web3_js.VersionedMessage.deserializeMessageVersion(byteArray);
|
|
63
|
+
if (version === 'legacy') {
|
|
64
|
+
return web3_js.Transaction.from(byteArray);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
return web3_js.VersionedTransaction.deserialize(byteArray);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
51
70
|
function transact(callback, config) {
|
|
52
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
72
|
const augmentedCallback = (wallet) => {
|
|
@@ -59,13 +78,7 @@ function transact(callback, config) {
|
|
|
59
78
|
target[p] = function (_a) {
|
|
60
79
|
var { minContextSlot, transactions } = _a, rest = __rest(_a, ["minContextSlot", "transactions"]);
|
|
61
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
const payloads =
|
|
63
|
-
const serializedTransaction = yield transaction.serialize({
|
|
64
|
-
requireAllSignatures: false,
|
|
65
|
-
verifySignatures: false,
|
|
66
|
-
});
|
|
67
|
-
return serializedTransaction.toString('base64');
|
|
68
|
-
})));
|
|
81
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
69
82
|
const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (minContextSlot != null
|
|
70
83
|
? { options: { min_context_slot: minContextSlot } }
|
|
71
84
|
: null)), { payloads }));
|
|
@@ -89,14 +102,10 @@ function transact(callback, config) {
|
|
|
89
102
|
target[p] = function (_a) {
|
|
90
103
|
var { transactions } = _a, rest = __rest(_a, ["transactions"]);
|
|
91
104
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
const
|
|
93
|
-
requireAllSignatures: false,
|
|
94
|
-
verifySignatures: false,
|
|
95
|
-
}));
|
|
96
|
-
const payloads = serializedTransactions.map((serializedTransaction) => serializedTransaction.toString('base64'));
|
|
105
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
97
106
|
const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));
|
|
98
107
|
const compiledTransactions = base64EncodedCompiledTransactions.map(jsBase64.toUint8Array);
|
|
99
|
-
const signedTransactions = compiledTransactions.map(
|
|
108
|
+
const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);
|
|
100
109
|
return signedTransactions;
|
|
101
110
|
});
|
|
102
111
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction } from '@solana/web3.js';
|
|
1
|
+
import { VersionedMessage, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
2
|
import { transact as transact$1 } from '@solana-mobile/mobile-wallet-adapter-protocol';
|
|
3
3
|
import bs58 from 'bs58';
|
|
4
4
|
|
|
@@ -49,6 +49,25 @@ function toUint8Array(base64EncodedByteArray) {
|
|
|
49
49
|
.map((c) => c.charCodeAt(0)));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
function getPayloadFromTransaction(transaction) {
|
|
53
|
+
const serializedTransaction = 'version' in transaction
|
|
54
|
+
? transaction.serialize()
|
|
55
|
+
: transaction.serialize({
|
|
56
|
+
requireAllSignatures: false,
|
|
57
|
+
verifySignatures: false,
|
|
58
|
+
});
|
|
59
|
+
const payload = fromUint8Array(serializedTransaction);
|
|
60
|
+
return payload;
|
|
61
|
+
}
|
|
62
|
+
function getTransactionFromWireMessage(byteArray) {
|
|
63
|
+
const version = VersionedMessage.deserializeMessageVersion(byteArray);
|
|
64
|
+
if (version === 'legacy') {
|
|
65
|
+
return Transaction.from(byteArray);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return VersionedTransaction.deserialize(byteArray);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
52
71
|
function transact(callback, config) {
|
|
53
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
73
|
const augmentedCallback = (wallet) => {
|
|
@@ -60,13 +79,7 @@ function transact(callback, config) {
|
|
|
60
79
|
target[p] = function (_a) {
|
|
61
80
|
var { minContextSlot, transactions } = _a, rest = __rest(_a, ["minContextSlot", "transactions"]);
|
|
62
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const payloads =
|
|
64
|
-
const serializedTransaction = yield transaction.serialize({
|
|
65
|
-
requireAllSignatures: false,
|
|
66
|
-
verifySignatures: false,
|
|
67
|
-
});
|
|
68
|
-
return serializedTransaction.toString('base64');
|
|
69
|
-
})));
|
|
82
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
70
83
|
const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (minContextSlot != null
|
|
71
84
|
? { options: { min_context_slot: minContextSlot } }
|
|
72
85
|
: null)), { payloads }));
|
|
@@ -90,14 +103,10 @@ function transact(callback, config) {
|
|
|
90
103
|
target[p] = function (_a) {
|
|
91
104
|
var { transactions } = _a, rest = __rest(_a, ["transactions"]);
|
|
92
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
const
|
|
94
|
-
requireAllSignatures: false,
|
|
95
|
-
verifySignatures: false,
|
|
96
|
-
}));
|
|
97
|
-
const payloads = serializedTransactions.map((serializedTransaction) => serializedTransaction.toString('base64'));
|
|
106
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
98
107
|
const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));
|
|
99
108
|
const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);
|
|
100
|
-
const signedTransactions = compiledTransactions.map(
|
|
109
|
+
const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);
|
|
101
110
|
return signedTransactions;
|
|
102
111
|
});
|
|
103
112
|
};
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction } from '@solana/web3.js';
|
|
1
|
+
import { VersionedMessage, Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
2
|
import { transact as transact$1 } from '@solana-mobile/mobile-wallet-adapter-protocol';
|
|
3
3
|
import bs58 from 'bs58';
|
|
4
4
|
|
|
@@ -49,6 +49,25 @@ function toUint8Array(base64EncodedByteArray) {
|
|
|
49
49
|
.map((c) => c.charCodeAt(0)));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
function getPayloadFromTransaction(transaction) {
|
|
53
|
+
const serializedTransaction = 'version' in transaction
|
|
54
|
+
? transaction.serialize()
|
|
55
|
+
: transaction.serialize({
|
|
56
|
+
requireAllSignatures: false,
|
|
57
|
+
verifySignatures: false,
|
|
58
|
+
});
|
|
59
|
+
const payload = fromUint8Array(serializedTransaction);
|
|
60
|
+
return payload;
|
|
61
|
+
}
|
|
62
|
+
function getTransactionFromWireMessage(byteArray) {
|
|
63
|
+
const version = VersionedMessage.deserializeMessageVersion(byteArray);
|
|
64
|
+
if (version === 'legacy') {
|
|
65
|
+
return Transaction.from(byteArray);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
return VersionedTransaction.deserialize(byteArray);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
52
71
|
function transact(callback, config) {
|
|
53
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
54
73
|
const augmentedCallback = (wallet) => {
|
|
@@ -60,13 +79,7 @@ function transact(callback, config) {
|
|
|
60
79
|
target[p] = function (_a) {
|
|
61
80
|
var { minContextSlot, transactions } = _a, rest = __rest(_a, ["minContextSlot", "transactions"]);
|
|
62
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
const payloads =
|
|
64
|
-
const serializedTransaction = yield transaction.serialize({
|
|
65
|
-
requireAllSignatures: false,
|
|
66
|
-
verifySignatures: false,
|
|
67
|
-
});
|
|
68
|
-
return serializedTransaction.toString('base64');
|
|
69
|
-
})));
|
|
82
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
70
83
|
const { signatures: base64EncodedSignatures } = yield wallet.signAndSendTransactions(Object.assign(Object.assign(Object.assign({}, rest), (minContextSlot != null
|
|
71
84
|
? { options: { min_context_slot: minContextSlot } }
|
|
72
85
|
: null)), { payloads }));
|
|
@@ -90,14 +103,10 @@ function transact(callback, config) {
|
|
|
90
103
|
target[p] = function (_a) {
|
|
91
104
|
var { transactions } = _a, rest = __rest(_a, ["transactions"]);
|
|
92
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
const
|
|
94
|
-
requireAllSignatures: false,
|
|
95
|
-
verifySignatures: false,
|
|
96
|
-
}));
|
|
97
|
-
const payloads = serializedTransactions.map((serializedTransaction) => serializedTransaction.toString('base64'));
|
|
106
|
+
const payloads = transactions.map(getPayloadFromTransaction);
|
|
98
107
|
const { signed_payloads: base64EncodedCompiledTransactions } = yield wallet.signTransactions(Object.assign(Object.assign({}, rest), { payloads }));
|
|
99
108
|
const compiledTransactions = base64EncodedCompiledTransactions.map(toUint8Array);
|
|
100
|
-
const signedTransactions = compiledTransactions.map(
|
|
109
|
+
const signedTransactions = compiledTransactions.map(getTransactionFromWireMessage);
|
|
101
110
|
return signedTransactions;
|
|
102
111
|
});
|
|
103
112
|
};
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionSignature, VersionedTransaction } from "@solana/web3.js";
|
|
2
|
+
import { Transaction as LegacyTransaction } from "@solana/web3.js";
|
|
2
3
|
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, ReauthorizeAPI, WalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
3
4
|
interface Web3SignAndSendTransactionsAPI {
|
|
4
|
-
signAndSendTransactions(params: {
|
|
5
|
+
signAndSendTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
5
6
|
minContextSlot?: number;
|
|
6
|
-
transactions:
|
|
7
|
+
transactions: T[];
|
|
7
8
|
}): Promise<TransactionSignature[]>;
|
|
8
9
|
}
|
|
9
10
|
interface Web3SignTransactionsAPI {
|
|
10
|
-
signTransactions(params: {
|
|
11
|
-
transactions:
|
|
12
|
-
}): Promise<
|
|
11
|
+
signTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
12
|
+
transactions: T[];
|
|
13
|
+
}): Promise<T[]>;
|
|
13
14
|
}
|
|
14
15
|
interface Web3SignMessagesAPI {
|
|
15
16
|
signMessages(params: {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionSignature, VersionedTransaction } from "@solana/web3.js";
|
|
2
|
+
import { Transaction as LegacyTransaction } from "@solana/web3.js";
|
|
2
3
|
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, ReauthorizeAPI, WalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
3
4
|
interface Web3SignAndSendTransactionsAPI {
|
|
4
|
-
signAndSendTransactions(params: {
|
|
5
|
+
signAndSendTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
5
6
|
minContextSlot?: number;
|
|
6
|
-
transactions:
|
|
7
|
+
transactions: T[];
|
|
7
8
|
}): Promise<TransactionSignature[]>;
|
|
8
9
|
}
|
|
9
10
|
interface Web3SignTransactionsAPI {
|
|
10
|
-
signTransactions(params: {
|
|
11
|
-
transactions:
|
|
12
|
-
}): Promise<
|
|
11
|
+
signTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
12
|
+
transactions: T[];
|
|
13
|
+
}): Promise<T[]>;
|
|
13
14
|
}
|
|
14
15
|
interface Web3SignMessagesAPI {
|
|
15
16
|
signMessages(params: {
|
package/lib/types/index.d.mts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionSignature, VersionedTransaction } from "@solana/web3.js";
|
|
2
|
+
import { Transaction as LegacyTransaction } from "@solana/web3.js";
|
|
2
3
|
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, ReauthorizeAPI, WalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
3
4
|
interface Web3SignAndSendTransactionsAPI {
|
|
4
|
-
signAndSendTransactions(params: {
|
|
5
|
+
signAndSendTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
5
6
|
minContextSlot?: number;
|
|
6
|
-
transactions:
|
|
7
|
+
transactions: T[];
|
|
7
8
|
}): Promise<TransactionSignature[]>;
|
|
8
9
|
}
|
|
9
10
|
interface Web3SignTransactionsAPI {
|
|
10
|
-
signTransactions(params: {
|
|
11
|
-
transactions:
|
|
12
|
-
}): Promise<
|
|
11
|
+
signTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
12
|
+
transactions: T[];
|
|
13
|
+
}): Promise<T[]>;
|
|
13
14
|
}
|
|
14
15
|
interface Web3SignMessagesAPI {
|
|
15
16
|
signMessages(params: {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionSignature, VersionedTransaction } from "@solana/web3.js";
|
|
2
|
+
import { Transaction as LegacyTransaction } from "@solana/web3.js";
|
|
2
3
|
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, ReauthorizeAPI, WalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
3
4
|
interface Web3SignAndSendTransactionsAPI {
|
|
4
|
-
signAndSendTransactions(params: {
|
|
5
|
+
signAndSendTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
5
6
|
minContextSlot?: number;
|
|
6
|
-
transactions:
|
|
7
|
+
transactions: T[];
|
|
7
8
|
}): Promise<TransactionSignature[]>;
|
|
8
9
|
}
|
|
9
10
|
interface Web3SignTransactionsAPI {
|
|
10
|
-
signTransactions(params: {
|
|
11
|
-
transactions:
|
|
12
|
-
}): Promise<
|
|
11
|
+
signTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
12
|
+
transactions: T[];
|
|
13
|
+
}): Promise<T[]>;
|
|
13
14
|
}
|
|
14
15
|
interface Web3SignMessagesAPI {
|
|
15
16
|
signMessages(params: {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TransactionSignature, VersionedTransaction } from "@solana/web3.js";
|
|
2
|
+
import { Transaction as LegacyTransaction } from "@solana/web3.js";
|
|
2
3
|
import { AuthorizeAPI, Base64EncodedAddress, CloneAuthorizationAPI, DeauthorizeAPI, ReauthorizeAPI, WalletAssociationConfig } from "@solana-mobile/mobile-wallet-adapter-protocol";
|
|
3
4
|
interface Web3SignAndSendTransactionsAPI {
|
|
4
|
-
signAndSendTransactions(params: {
|
|
5
|
+
signAndSendTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
5
6
|
minContextSlot?: number;
|
|
6
|
-
transactions:
|
|
7
|
+
transactions: T[];
|
|
7
8
|
}): Promise<TransactionSignature[]>;
|
|
8
9
|
}
|
|
9
10
|
interface Web3SignTransactionsAPI {
|
|
10
|
-
signTransactions(params: {
|
|
11
|
-
transactions:
|
|
12
|
-
}): Promise<
|
|
11
|
+
signTransactions<T extends LegacyTransaction | VersionedTransaction>(params: {
|
|
12
|
+
transactions: T[];
|
|
13
|
+
}): Promise<T[]>;
|
|
13
14
|
}
|
|
14
15
|
interface Web3SignMessagesAPI {
|
|
15
16
|
signMessages(params: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/mobile-wallet-adapter-protocol-web3js",
|
|
3
3
|
"description": "A convenience wrapper that enables you to call Solana Mobile Stack protocol methods using objects from @solana/web3.js",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.3",
|
|
5
5
|
"author": "Steven Luscher <steven.luscher@solanamobile.com>",
|
|
6
6
|
"repository": "https://github.com/solana-mobile/mobile-wallet-adapter",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"./package.json": "./package.json",
|
|
20
20
|
".": {
|
|
21
21
|
"import": "./lib/esm/index.mjs",
|
|
22
|
-
"require": "./lib/
|
|
22
|
+
"require": "./lib/cjs/index.js"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"prepublishOnly": "agadoo"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@solana/web3.js": "^1.
|
|
40
|
+
"@solana/web3.js": "^1.58.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@solana-mobile/mobile-wallet-adapter-protocol": "^0.9.
|
|
43
|
+
"@solana-mobile/mobile-wallet-adapter-protocol": "^0.9.3",
|
|
44
44
|
"bs58": "^5.0.0",
|
|
45
45
|
"js-base64": "^3.7.2"
|
|
46
46
|
},
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"agadoo": "^2.0.0",
|
|
49
49
|
"cross-env": "^7.0.3"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "df2b744099118ee7679a98e56e411475f9e8711c"
|
|
52
52
|
}
|