@mysten/enoki
Advanced tools
Comparing version 0.0.0-experimental-20240924193256 to 0.0.0-experimental-20240926213518
# @mysten/enoki | ||
## 0.0.0-experimental-20240924193256 | ||
## 0.0.0-experimental-20240926213518 | ||
### Patch Changes | ||
- Updated dependencies [489f421] | ||
- Updated dependencies [489f421] | ||
- @mysten/sui@0.0.0-experimental-20240926213518 | ||
- @mysten/zklogin@0.0.0-experimental-20240926213518 | ||
## 0.4.3 | ||
### Patch Changes | ||
- Updated dependencies [830b8d8] | ||
- @mysten/sui@0.0.0-experimental-20240924193256 | ||
- @mysten/zklogin@0.0.0-experimental-20240924193256 | ||
- @mysten/sui@1.10.0 | ||
- @mysten/zklogin@0.7.20 | ||
@@ -11,0 +20,0 @@ ## 0.4.2 |
@@ -63,5 +63,5 @@ "use strict"; | ||
return JSON.stringify({ | ||
payload: (0, import_utils.toB64)(new Uint8Array(payload)), | ||
iv: (0, import_utils.toB64)(iv), | ||
salt: (0, import_utils.toB64)(salt) | ||
payload: (0, import_utils.toBase64)(new Uint8Array(payload)), | ||
iv: (0, import_utils.toBase64)(iv), | ||
salt: (0, import_utils.toBase64)(salt) | ||
}); | ||
@@ -74,10 +74,10 @@ }, | ||
} | ||
const { derivedKey } = await keyFromPassword(password, (0, import_utils.fromB64)(parsed.salt)); | ||
const { derivedKey } = await keyFromPassword(password, (0, import_utils.fromBase64)(parsed.salt)); | ||
const decryptedContent = await crypto.subtle.decrypt( | ||
{ | ||
name: "AES-GCM", | ||
iv: (0, import_utils.fromB64)(parsed.iv) | ||
iv: (0, import_utils.fromBase64)(parsed.iv) | ||
}, | ||
derivedKey, | ||
(0, import_utils.fromB64)(parsed.payload) | ||
(0, import_utils.fromBase64)(parsed.payload) | ||
); | ||
@@ -84,0 +84,0 @@ return new TextDecoder().decode(decryptedContent); |
@@ -124,3 +124,3 @@ "use strict"; | ||
randomness, | ||
ephemeralKeyPair: (0, import_utils.toB64)((0, import_cryptography.decodeSuiPrivateKey)(ephemeralKeyPair.getSecretKey()).secretKey) | ||
ephemeralKeyPair: (0, import_utils.toBase64)((0, import_cryptography.decodeSuiPrivateKey)(ephemeralKeyPair.getSecretKey()).secretKey) | ||
}); | ||
@@ -196,3 +196,3 @@ return oauthUrl; | ||
} | ||
const ephemeralKeyPair = import_ed25519.Ed25519Keypair.fromSecretKey((0, import_utils.fromB64)(zkp.ephemeralKeyPair)); | ||
const ephemeralKeyPair = import_ed25519.Ed25519Keypair.fromSecretKey((0, import_utils.fromBase64)(zkp.ephemeralKeyPair)); | ||
const proof = await __privateGet(this, _enokiClient).createZkLoginZkp({ | ||
@@ -225,3 +225,3 @@ network, | ||
proof: zkp.proof, | ||
ephemeralKeypair: import_ed25519.Ed25519Keypair.fromSecretKey((0, import_utils.fromB64)(zkp.ephemeralKeyPair)) | ||
ephemeralKeypair: import_ed25519.Ed25519Keypair.fromSecretKey((0, import_utils.fromBase64)(zkp.ephemeralKeyPair)) | ||
}); | ||
@@ -245,3 +245,3 @@ } | ||
network, | ||
transactionKindBytes: (0, import_utils.toB64)(transactionKindBytes) | ||
transactionKindBytes: (0, import_utils.toBase64)(transactionKindBytes) | ||
}); | ||
@@ -256,3 +256,3 @@ } | ||
const keypair = await this.getKeypair({ network }); | ||
const userSignature = await keypair.signTransaction((0, import_utils.fromB64)(bytes)); | ||
const userSignature = await keypair.signTransaction((0, import_utils.fromBase64)(bytes)); | ||
await __privateGet(this, _enokiClient).executeSponsoredTransaction({ | ||
@@ -259,0 +259,0 @@ digest, |
@@ -1,2 +0,2 @@ | ||
import { fromB64, toB64 } from "@mysten/sui/utils"; | ||
import { fromBase64, toBase64 } from "@mysten/sui/utils"; | ||
function createDefaultEncryption() { | ||
@@ -39,5 +39,5 @@ async function keyFromPassword(password, salt) { | ||
return JSON.stringify({ | ||
payload: toB64(new Uint8Array(payload)), | ||
iv: toB64(iv), | ||
salt: toB64(salt) | ||
payload: toBase64(new Uint8Array(payload)), | ||
iv: toBase64(iv), | ||
salt: toBase64(salt) | ||
}); | ||
@@ -50,10 +50,10 @@ }, | ||
} | ||
const { derivedKey } = await keyFromPassword(password, fromB64(parsed.salt)); | ||
const { derivedKey } = await keyFromPassword(password, fromBase64(parsed.salt)); | ||
const decryptedContent = await crypto.subtle.decrypt( | ||
{ | ||
name: "AES-GCM", | ||
iv: fromB64(parsed.iv) | ||
iv: fromBase64(parsed.iv) | ||
}, | ||
derivedKey, | ||
fromB64(parsed.payload) | ||
fromBase64(parsed.payload) | ||
); | ||
@@ -60,0 +60,0 @@ return new TextDecoder().decode(decryptedContent); |
@@ -12,3 +12,3 @@ var __typeError = (msg) => { | ||
import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; | ||
import { fromB64, toB64 } from "@mysten/sui/utils"; | ||
import { fromBase64, toBase64 } from "@mysten/sui/utils"; | ||
import { decodeJwt } from "jose"; | ||
@@ -102,3 +102,3 @@ import { atom, onMount, onSet } from "nanostores"; | ||
randomness, | ||
ephemeralKeyPair: toB64(decodeSuiPrivateKey(ephemeralKeyPair.getSecretKey()).secretKey) | ||
ephemeralKeyPair: toBase64(decodeSuiPrivateKey(ephemeralKeyPair.getSecretKey()).secretKey) | ||
}); | ||
@@ -174,3 +174,3 @@ return oauthUrl; | ||
} | ||
const ephemeralKeyPair = Ed25519Keypair.fromSecretKey(fromB64(zkp.ephemeralKeyPair)); | ||
const ephemeralKeyPair = Ed25519Keypair.fromSecretKey(fromBase64(zkp.ephemeralKeyPair)); | ||
const proof = await __privateGet(this, _enokiClient).createZkLoginZkp({ | ||
@@ -203,3 +203,3 @@ network, | ||
proof: zkp.proof, | ||
ephemeralKeypair: Ed25519Keypair.fromSecretKey(fromB64(zkp.ephemeralKeyPair)) | ||
ephemeralKeypair: Ed25519Keypair.fromSecretKey(fromBase64(zkp.ephemeralKeyPair)) | ||
}); | ||
@@ -223,3 +223,3 @@ } | ||
network, | ||
transactionKindBytes: toB64(transactionKindBytes) | ||
transactionKindBytes: toBase64(transactionKindBytes) | ||
}); | ||
@@ -234,3 +234,3 @@ } | ||
const keypair = await this.getKeypair({ network }); | ||
const userSignature = await keypair.signTransaction(fromB64(bytes)); | ||
const userSignature = await keypair.signTransaction(fromBase64(bytes)); | ||
await __privateGet(this, _enokiClient).executeSponsoredTransaction({ | ||
@@ -237,0 +237,0 @@ digest, |
{ | ||
"name": "@mysten/enoki", | ||
"version": "0.0.0-experimental-20240924193256", | ||
"version": "0.0.0-experimental-20240926213518", | ||
"description": "TODO: Description", | ||
@@ -49,4 +49,4 @@ "license": "Apache-2.0", | ||
"nanostores": "^0.10.3", | ||
"@mysten/sui": "0.0.0-experimental-20240924193256", | ||
"@mysten/zklogin": "0.0.0-experimental-20240924193256" | ||
"@mysten/sui": "0.0.0-experimental-20240926213518", | ||
"@mysten/zklogin": "0.0.0-experimental-20240926213518" | ||
}, | ||
@@ -53,0 +53,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
329370
+ Added@mysten/bcs@0.0.0-experimental-20240926213518(transitive)
+ Added@mysten/sui@0.0.0-experimental-20240926213518(transitive)
+ Added@mysten/zklogin@0.0.0-experimental-20240926213518(transitive)
- Removed@mysten/bcs@1.0.4(transitive)
- Removed@mysten/sui@0.0.0-experimental-20240924193256(transitive)
- Removed@mysten/zklogin@0.0.0-experimental-20240924193256(transitive)