RequestSignedDataOptions
Options for MolphaGateway.requestSignedData and the second argument to MolphaSDK.requestAndSubmit:
apiConfig must match the job’s committed configuration. maxAge (seconds) lets the gateway return a cached result when one is fresh enough.
RoundContext
Cached registry version, node set, and job config produced by sdk.gateway.prepareContext(jobId). Subsequent requestSignedData calls reuse this context so each round is a single gateway POST.
DataUpdateResult
A completed gateway round, ready to submit on-chain:
MolphaWallet
The wallet interface the SDK expects — satisfied by keypair-backed wallets (walletFromKeypairFile) or browser wallet adapters:
PlanType
Derivation helpers
deriveJobId must be exactly 32 bytes (owner is a Solana public key).
buildEvmVerifierArgs
Converts a DataUpdateResult into the two structs the EVM verifier’s verify() takes — a pure mapping with zero runtime dependency (use the output with ethers, viem, or a raw eth_call).
Gateway DataUpdateResult | EVM struct field |
|---|---|
jobId | DataUpdate.jobId |
registryVersion | DataUpdate.registryVersion |
signaturesRequired | DataUpdate.signaturesRequired |
valuePacked | DataUpdate.value |
timestamp | DataUpdate.canonicalTimestamp |
s | SchnorrSignature.signature |
commitmentAddr | SchnorrSignature.commitment |
signersBitmap | SchnorrSignature.signersBitmap |
buildStarknetVerifierArgs
Converts a DataUpdateResult into the Cairo verifier’s calldata structs, with no starknet.js runtime dependency.
Gateway DataUpdateResult | Cairo struct field | Cairo type |
|---|---|---|
jobId | data_update.job_id | u256 |
registryVersion | data_update.registry_version | u32 |
signaturesRequired | data_update.signatures_required | u32 |
valuePacked | data_update.value | u256 |
timestamp | data_update.canonical_timestamp | u64 |
s | schnorr_data.signature | u256 |
commitmentAddr | schnorr_data.commitment | felt252 (low 160 bits) |
signersBitmap | schnorr_data.signers_bitmap | u256 |