@solana-mobile/mobile-wallet-adapter-protocol 0.9.7 → 0.9.9
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 +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/esm/index.browser.js +1 -1
- package/lib/esm/index.js +1 -1
- package/package.json +2 -2
package/lib/cjs/index.browser.js
CHANGED
|
@@ -113,7 +113,7 @@ function encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {
|
|
|
113
113
|
const sequenceNumberVector = createSequenceNumberVector(jsonRpcMessage.id);
|
|
114
114
|
const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);
|
|
115
115
|
crypto.getRandomValues(initializationVector);
|
|
116
|
-
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret,
|
|
116
|
+
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));
|
|
117
117
|
const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);
|
|
118
118
|
response.set(new Uint8Array(sequenceNumberVector), 0);
|
|
119
119
|
response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);
|
package/lib/cjs/index.js
CHANGED
|
@@ -113,7 +113,7 @@ function encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {
|
|
|
113
113
|
const sequenceNumberVector = createSequenceNumberVector(jsonRpcMessage.id);
|
|
114
114
|
const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);
|
|
115
115
|
crypto.getRandomValues(initializationVector);
|
|
116
|
-
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret,
|
|
116
|
+
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));
|
|
117
117
|
const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);
|
|
118
118
|
response.set(new Uint8Array(sequenceNumberVector), 0);
|
|
119
119
|
response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);
|
package/lib/esm/index.browser.js
CHANGED
|
@@ -109,7 +109,7 @@ function encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {
|
|
|
109
109
|
const sequenceNumberVector = createSequenceNumberVector(jsonRpcMessage.id);
|
|
110
110
|
const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);
|
|
111
111
|
crypto.getRandomValues(initializationVector);
|
|
112
|
-
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret,
|
|
112
|
+
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));
|
|
113
113
|
const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);
|
|
114
114
|
response.set(new Uint8Array(sequenceNumberVector), 0);
|
|
115
115
|
response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);
|
package/lib/esm/index.js
CHANGED
|
@@ -109,7 +109,7 @@ function encryptJsonRpcMessage(jsonRpcMessage, sharedSecret) {
|
|
|
109
109
|
const sequenceNumberVector = createSequenceNumberVector(jsonRpcMessage.id);
|
|
110
110
|
const initializationVector = new Uint8Array(INITIALIZATION_VECTOR_BYTES);
|
|
111
111
|
crypto.getRandomValues(initializationVector);
|
|
112
|
-
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret,
|
|
112
|
+
const ciphertext = yield crypto.subtle.encrypt(getAlgorithmParams(sequenceNumberVector, initializationVector), sharedSecret, new TextEncoder().encode(plaintext));
|
|
113
113
|
const response = new Uint8Array(sequenceNumberVector.byteLength + initializationVector.byteLength + ciphertext.byteLength);
|
|
114
114
|
response.set(new Uint8Array(sequenceNumberVector), 0);
|
|
115
115
|
response.set(new Uint8Array(initializationVector), sequenceNumberVector.byteLength);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solana-mobile/mobile-wallet-adapter-protocol",
|
|
3
3
|
"description": "An implementation of the Solana Mobile Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.9",
|
|
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",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react-native": ">0.69"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "d03adeaa47d752aaac815300572d1157e2362758"
|
|
51
51
|
}
|