
Security News
npm Tooling Bug Incorrectly Marks One-Character Packages as Security Holders
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.
@trezoa-mobile/mobile-wallet-adapter-protocol
Advanced tools
An implementation of the Trezoa Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.
@trezoa-mobile/mobile-wallet-adapter-protocolThis is a reference implementation of the Mobile Wallet Adapter specification in JavaScript. Use this to start a session with a mobile wallet in which you can issue API calls to it (eg. sign_messages) as per the spec.
If you are simply looking to integrate a JavaScript application with mobile wallets, see @trezoa-mobile/wallet-adapter-mobile instead.
Use this API to start a session:
import {transact} from '@trezoa-mobile/mobile-wallet-adapter-protocol';
await transact(async (wallet) => {
/* ... */
});
The callback you provide will be called once a session has been established with a wallet. It will recieve the MobileWallet API as an argument. You can call protocol-specified methods using this function. Whatever you return from this callback will be returned by transact.
const signedPayloads = await transact(async (wallet) => {
const {signed_payloads} = await wallet.signMessages({
auth_token,
payloads: [/* ... */],
});
return signed_payloads;
});
The wallet session will stay active until your callback returns. Typically, wallets will redirect back to your app once the session ends.
You can catch exceptions at any level. See errors.ts for a list of exceptions that might be thrown.
try {
await transact(async (wallet) => {
try {
await wallet.signTransactions(/* ... */);
} catch (e) {
if (
e instanceof TrezoaMobileWalletAdapterProtocolError &&
e.code === TrezoaMobileWalletAdapterProtocolErrorCode.ERROR_REAUTHORIZE
) {
console.error('The auth token has gone stale');
await wallet.reauthorize({auth_token, identity});
// Retry...
}
throw e;
}
});
} catch(e) {
if (
e instanceof TrezoaMobileWalletAdapterError &&
e.code === TrezoaMobileWalletAdapterErrorCode.ERROR_WALLET_NOT_FOUND
) {
/* ... */
}
throw e;
}
FAQs
An implementation of the Trezoa Mobile Wallet Adapter protocol. Use this to open a session with a mobile wallet app, and to issue API calls to it.
We found that @trezoa-mobile/mobile-wallet-adapter-protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.