@bounded-sh/client 0.0.37 → 0.0.38
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/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -9
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +12 -9
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +12 -9
- package/dist/index.native.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.native.js
CHANGED
|
@@ -3445,7 +3445,7 @@ const IDB_STORE = 'keys';
|
|
|
3445
3445
|
const IDB_KEY = 'ed25519';
|
|
3446
3446
|
const GUEST_KEY_REQUIREMENT = 'Guest auth requires non-extractable WebCrypto Ed25519 keys persisted in IndexedDB; ' +
|
|
3447
3447
|
'stored-secret guest credentials are disabled.';
|
|
3448
|
-
function toBase64
|
|
3448
|
+
function toBase64(bytes) {
|
|
3449
3449
|
let bin = '';
|
|
3450
3450
|
for (let i = 0; i < bytes.length; i++)
|
|
3451
3451
|
bin += String.fromCharCode(bytes[i]);
|
|
@@ -3509,7 +3509,7 @@ async function webCryptoKey() {
|
|
|
3509
3509
|
async sign(message) {
|
|
3510
3510
|
const data = new TextEncoder().encode(message);
|
|
3511
3511
|
const sig = new Uint8Array(await s.sign({ name: 'Ed25519' }, pair.privateKey, data));
|
|
3512
|
-
return toBase64
|
|
3512
|
+
return toBase64(sig);
|
|
3513
3513
|
},
|
|
3514
3514
|
};
|
|
3515
3515
|
}
|
|
@@ -3785,19 +3785,22 @@ async function signViaSignerPopup(action) {
|
|
|
3785
3785
|
} }, 5 * 60 * 1000);
|
|
3786
3786
|
});
|
|
3787
3787
|
}
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
//
|
|
3792
|
-
//
|
|
3793
|
-
//
|
|
3788
|
+
// Serialize a legacy or versioned Solana transaction to BASE58 for the signer
|
|
3789
|
+
// page. Crossmint's smart-wallet createTransaction endpoint requires the
|
|
3790
|
+
// `serializedTransaction` string to be base58 — it rejects base64 with
|
|
3791
|
+
// "Invalid base58 string" (verified against Crossmint staging 2026-07-07). The
|
|
3792
|
+
// `wallets-sdk` object path bs58-encodes internally, so base58 is the contract.
|
|
3793
|
+
//
|
|
3794
|
+
// We do NOT require existing signatures (the smart wallet signs on the page);
|
|
3795
|
+
// Crossmint extracts the instructions, overrides the fee payer to its sponsor,
|
|
3796
|
+
// and re-wraps them for the smart wallet.
|
|
3794
3797
|
function serializeTransaction(transaction) {
|
|
3795
3798
|
const isLegacy = 'recentBlockhash' in transaction &&
|
|
3796
3799
|
!('message' in transaction && 'staticAccountKeys' in transaction.message);
|
|
3797
3800
|
const bytes = isLegacy
|
|
3798
3801
|
? transaction.serialize({ requireAllSignatures: false, verifySignatures: false })
|
|
3799
3802
|
: transaction.serialize();
|
|
3800
|
-
return
|
|
3803
|
+
return bs58.encode(bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes));
|
|
3801
3804
|
}
|
|
3802
3805
|
/**
|
|
3803
3806
|
* Whether the active session carries an embedded wallet (so the provider should
|