Economics 2.0
The configuration is a deployment ID. The SDK resolves the MCR URL (https://mcr.peaq.xyz for peaq-mainnet), chain ID, MachineRegistry address, and protocol version from the same deployment record that activation uses; callers cannot supply or override any of them.
solanaSigner / solana_signer in MonetizationConfig, a five-line message with home_chain: 5, plain Ed25519 signMessage, body with signer_pubkey), but Solana-homed writes are refused. When solanaSigner / solana_signer is set, the SDK first reads the machine’s home chain (a compatibility GET and a profile GET) and refuses a Solana-homed write with MonetizationValidationError (JS) / ValidationError (Python) code SOLANA_MONETIZATION_UNVERIFIED before anything is signed. Without a Solana signer the SDK does not check the home chain and sends the EIP-191 write. Reads work for every home. Details: SDK JS, SDK Python.
Machine key
Reads take the machine as a full-widthuint256 (bigint in JS, int in Python) or as did:peaq:<canonical decimal machine id>; optIn / opt_in and optOut / opt_out take the numeric machineId / machine_id, the DID form goes into their separate key argument. Address-form DIDs (did:peaq:0x…), decimal strings in JS, leading zeros, signs, and exponents are rejected locally before any HTTP. There is no lookup from a 1.0 address DID to a 2.0 machine ID.
Who may sign
The machine’s currentMachineRegistry owner or DID controller. A legacy machine-wallet key or a 1.0 EventRegistry operator key is not authorized (403 UNAUTHORIZED_SIGNER). The canonical message binds registry: <MachineRegistry address, lowercased> and chain_id: 3338.
Configuration
The resolved values are readable (
api_base, registry, chain_id, api_version in Python) but not settable. apiBase, registry, and chainId as constructor fields are gone; passing them is a TypeError in Python and a type error in TypeScript.
Compatibility check
Before every read and write the SDK fetchesGET {apiBase}/.well-known/peaq-monetization and requires the exact protocol version (tokenomics-2.0-monetization-v1, exported as TOKENOMICS_MONETIZATION_API_VERSION), the canonical decimal chain ID, and the lowercased MachineRegistry address from the selected deployment. A write runs this check before invoking the signer. Missing, malformed, or mismatched signals raise MonetizationCompatibilityError (code MONETIZATION_API_INCOMPATIBLE). Not cached, cannot be bypassed.
Retries, deadline, cancellation
Python passes these through
GetMonetizationOptions and SetMonetizationOptions.
The response
Errors
Re-sending the identical signed request surfaces
STALE_SIGNATURE; re-signing the same state with a newer timestamp succeeds, so the toggle is idempotent to retry.
From the terminal
The CLI wraps this surface aspeaqos monetize opt-in | opt-out | status; all signing and HTTP stay in the SDK.
Related
- Monetize function: where opt-in fits in the flow
- Provisioning SDK reference: the step after opting in
- PUT /machine/{key}/monetization: the wire contract, canonical message, and error codes
- Economics 2.0: what changed and what is live

