
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
@txkit/tx-protocol
Advanced tools
Open protocol for prepared Web3 operations - envelope + content discriminated union, CAIP-2 chain ids, EIP-5792 aligned batches, EIP-712 signature requests. Post-quantum ready producer signatures.
Open protocol for AI-initiated Web3 operations. TypeScript types, zod schemas, and runtime validators for the PreparedEnvelope shape flowing between producers (MCP tools, AI agents, DeFi protocol adapters) and consumers (wallets, signer orchestrators, UI preview layers, policy engines).
Covers: single EVM transactions, EIP-5792 batches, EIP-712 signature requests. Reserves kinds for ERC-4337 UserOperations, EIP-8141 frames, EIP-7702 delegated set-code, ERC-7683 / UniswapX intents, AP2 / Visa TAP / Mastercard Verifiable Intent mandates, Bitcoin PSBT, Solana, Move (Aptos / Sui), and Cosmos.
Messaging: "OWS signs. txKit decides what's safe to sign."
pnpm add @txkit/tx-protocol
# or
npm install @txkit/tx-protocol
# or
yarn add @txkit/tx-protocol
Zero UI dependencies. Only runtime dep is zod. No peer dependencies - hex types (0x${string}) are defined locally, so consumers without viem work as-is.
import { createEvmTx, validateEnvelope } from '@txkit/tx-protocol'
import type { EvmTxContent } from '@txkit/tx-protocol'
const content: EvmTxContent = {
chain: 'eip155:1',
from: '0x1111111111111111111111111111111111111111',
calls: [
{
to: '0xAC0F906E433d58FA868F936E8A43230473652885',
value: '0xde0b6b3a7640000',
data: '0x6e553f650000...',
},
],
validity: { notAfter: Math.floor(Date.now() / 1000) + 3600 },
description: { short: 'Stake 1 ETH in Genesis Vault', action: 'stake' },
metadata: {
protocol: 'stakewise-v3',
tokenMovements: [
{
token: 'native',
standard: 'native',
symbol: 'ETH',
decimals: 18,
amount: '1000000000000000000',
kind: 'transfer',
from: '0x1111111111111111111111111111111111111111',
to: '0xAC0F906E433d58FA868F936E8A43230473652885',
},
],
counterparties: [
{
address: '0xAC0F906E433d58FA868F936E8A43230473652885',
role: 'pool',
label: 'StakeWise Genesis Vault',
labelSource: 'protocol_directory',
},
],
},
decoderRef: 'stakewise-v3/vault/deposit',
}
const envelope = createEvmTx(content, {
origin: { url: 'https://app.stakewise.io', verifyStatus: 'VERIFIED' },
})
const result = validateEnvelope(envelope)
if (!result.ok) {
throw new Error(result.error)
}
// `result.value` is a type-safe PreparedEnvelope
See examples/stakewise-deposit.ts, examples/uniswap-permit2-swap.ts, and examples/safe-delegatecall-warning.ts for runnable versions.
This is:
PreparedEnvelope) and zod schemas for runtime validationevm-tx, evm-batch, signature implemented today; 9 more kinds reserved for v0.3+ (UserOp, Frame, 7702, mandate, intent, PSBT, Solana, Move, Cosmos)This is not:
@txkit/react for rendering.metadata and risk fields.Canonical spec: spec/v0.1/prepared-transaction.md. The version field in every envelope pins it to the spec version.
createEvmTx(content: EvmTxContent, envelope?): EvmTxEnvelope // single call
createEvmBatch(content: EvmTxContent, envelope?): EvmBatchEnvelope // calls.length >= 2
createSignature(content: SignatureContent, envelope?): SignatureEnvelope
Each pre-fills $schema, version, kind, issuedAt, and derives expiresAt from content.validity.notAfter when not overridden.
validateEnvelope(input: unknown): ValidationResult<PreparedEnvelope>
Result shape: { ok: true, value, warnings? } | { ok: false, error, issues }.
Unknown and reserved kinds are rejected. Reserved kinds carry explicit "not yet implemented in v0.1" errors so consumers can route them to future decoders without guessing.
Advisories emitted even on successful validation:
delegatecall on any call => "requires explicit wallet verification against allowlisted targets"kind: 'approve', isUnlimited: true) => hard-warning advisoryserialize(envelope: PreparedEnvelope): string
deserialize(json: string): PreparedEnvelope // throws on invalid
import { IMPLEMENTED_KINDS, RESERVED_KINDS } from '@txkit/tx-protocol'
// IMPLEMENTED_KINDS = ['evm-tx', 'evm-batch', 'signature']
// RESERVED_KINDS = ['evm-userop', 'evm-frame', 'evm-7702', 'mandate', 'intent', 'psbt', 'svm-tx', 'move-tx', 'cosmos-tx']
import { CALLS_STATUS } from '@txkit/tx-protocol'
// PENDING: 100, CONFIRMED: 200, OFFCHAIN_FAILURE: 400, REVERTED: 500, PARTIALLY_REVERTED: 600
Composable zod schemas for consumers that want to extend validation. Import from the main entry:
import { preparedEnvelopeSchema, tokenMovementSchema } from '@txkit/tx-protocol'
Exposed: preparedEnvelopeSchema (discriminated union over kind), evmTxEnvelopeSchema, evmBatchEnvelopeSchema, signatureEnvelopeSchema, evmTxContentSchema, signatureContentSchema, plus every sub-schema (producerSchema, originSchema, riskAssessmentSchema, capabilitiesSchema, tokenMovementSchema, counterpartySchema, validitySchema, descriptionSchema, metadataSchema, feeBreakdownSchema, estimationSchema, evmCallSchema, actionTypeSchema, eip712DomainSchema).
description, metadata, origin, risk, decoderRef, clearSigning, and meta carry no cryptographic integrity on their own. Producer signatures (producer.signature with coverage: 'envelope') provide end-to-end integrity; consumer-side decoder re-verification (@txkit/tx-decoder when that package ships) provides defense in depth.{chain, calls[*].to, calls[*].data, calls[*].value}. Trusting description.short is a blind-signing pattern.capabilities is an open record matching EIP-5792 design. Vendor-specific fields MUST use x- prefix. Capabilities MUST NOT influence security-critical UI unless the wallet explicitly recognizes them.@txkit/tx-protocol is a presentational protocol for human-readable transaction previews. It does not provide cryptographic integrity guarantees for off-chain data on its own (signatures and decoder re-verification provide the integrity layer). Under EU MiCA and similar frameworks, liability for transaction execution rests with the signing party (wallet / signer provider), not with txKit. This package does not custody keys, broker trades, or provide investment advice.
version field to 0.2. Additive fields within the same version are non-breaking.MIT. See LICENSE.
@txkit/core - runtime utilities (formatting, errors)@txkit/react - React components and hookswiki/projects/txkit-tx-protocol-spec-v0.1-research-2026-04-21.md (historical research doc; v0.1 ships the hardened shape designed there)FAQs
Open protocol for prepared Web3 operations - envelope + content discriminated union, CAIP-2 chain ids, EIP-5792 aligned batches, EIP-712 signature requests. Post-quantum ready producer signatures.
The npm package @txkit/tx-protocol receives a total of 4 weekly downloads. As such, @txkit/tx-protocol popularity was classified as not popular.
We found that @txkit/tx-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.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.