Skip to content

Releases: molpha/sdk

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 21 Jul 10:43
87cb5c5

Minor Changes

  • d586e89: rename job IDs to feed IDs and unify the EVM verifier address

    Feed terminology replaces job IDs across the public API, and feed derivation now
    includes the quorum threshold:

    • deriveJobId / deriveJobIdString → deriveFeedId / deriveFeedIdString
      (now requires signaturesRequired)
    • jobId options and params → feedId (requestSignedData, requestAndSubmit,
      Solana client helpers, gateway auth message fields)
    • Solana account/PDA helpers updated for the feed-id layout

    EVM verifier constants collapse to a single CREATE2 address shared by every
    supported chain:

    • MOLPHA_VERIFIER_* per-network constants, MOLPHA_VERIFIER_ADDRESSES, and
      getMolphaVerifierAddress → MOLPHA_VERIFIER_ADDRESS

Patch Changes

  • f1e3cef: update dependencies

  • 60f56af: Update idl

  • 330f0f0: Authenticate private API node encryption keys before encrypting secrets.

    MolphaGateway.requestSignedData({ encrypt }) now fails closed unless selected
    gateway node keys are verified or callers explicitly opt into unsafe development
    behavior with allowUnverifiedNodeKeysForPrivateApi: true. MolphaSDK wires the
    default verifier to Solana registry index accounts, comparing on-chain
    secp256k1 key coordinates with selected gateway node keys before encryption.

  • 5aa17fe: update gateway url

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 21 Jul 18:26
45484bf

Minor Changes

  • cd8ad49: Rename package from @molpha-oracle/sdk to @molpha/sdk. @molpha-oracle/sdk is deprecated; migrate imports to @molpha/sdk.

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 17 Jun 15:33
982dd27

Patch Changes

  • 1131c0b: fix audit vulnerabilities in transitive dependencies via pnpm overrides

    Force patched versions of vulnerable transitive dependencies:

    The bigint-buffer advisory (GHSA-3gc7-fjrx-p6mg, via @solana/spl-token) has
    no patched release available and is ignored through pnpm.auditConfig.ignoreGhsas.

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 17 Jun 15:14
97d704e

Patch Changes

  • dc65759: update the default gateway endpoint to https://gateway.molpha.io

    DEFAULT_GATEWAY_ENDPOINT now points at the production Molpha gateway instead of the
    previous dev IP address.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 11 Jun 16:28
9087cdc

Minor Changes

  • 113b5d3: add a cached-context "short" flow to MolphaGateway.requestSignedData

    Introduce RoundContext (registryVersion, nodes, jobConfig) and a
    gateway.prepareContext(jobId) helper that fetches these slow-changing round
    inputs once. Pass them back via requestSignedData({ ..., context }) (also
    accepted by requestAndSubmit) to skip the prelude and run rounds as a single
    gateway POST. context is partial, so any omitted field is still fetched. The
    default full flow now also fetches the registry version, node set, and job
    config in parallel.

  • d916cd6: rename the gateway round APIs to reflect that they request signed data

    The gateway never executes anything on-chain — it returns a threshold-signed
    data update. The methods and types are renamed accordingly:

    • MolphaGateway.execute(...) → MolphaGateway.requestSignedData(...)
    • MolphaSDK.executeAndSubmit(...) → MolphaSDK.requestAndSubmit(...)
    • ExecuteOptions → RequestSignedDataOptions
    • ExecuteContext → RoundContext

    The gateway HTTP route (POST /v1/jobs/{id}/execute) is unchanged.

Patch Changes

  • a1c15a5: wire wallet auth into MolphaSDK.gateway.requestSignedData

    MolphaSDK now passes the wallet's gateway signer to MolphaGateway as its
    default, so sdk.gateway.requestSignedData({ jobId, apiConfig }) authenticates
    without an explicit signer. Per-call signer still overrides the default.
    Standalone MolphaGateway accepts an optional third defaultSigner constructor
    argument; omitting it keeps the all-zero dev authSig behavior.

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 10 Jun 20:13
58eb35b

Patch Changes

  • 9211268: ci: verify dev snapshot pipeline increments above latest

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 10 Jun 19:47
e1f87cf

Patch Changes

  • a1c15a5: wire wallet auth into MolphaSDK.gateway.execute

    MolphaSDK now passes the wallet's gateway signer to MolphaGateway as its
    default, so sdk.gateway.execute({ jobId, apiConfig }) authenticates without
    an explicit signer. Per-call signer still overrides the default.
    Standalone MolphaGateway accepts an optional third defaultSigner constructor
    argument; omitting it keeps the all-zero dev authSig behavior.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 07 Jun 17:28
4d2f209

Minor Changes

  • b381ffe: add EVM verifier address constants and tuple helpers

    Export deployed Molpha verifier addresses for Ethereum Sepolia, Arbitrum Sepolia,
    Avalanche Fuji, and BSC testnet, plus framework-agnostic helpers to convert
    DataUpdateResult into verify(DataUpdate, SchnorrSignature) contract arguments
    for use with ethers or viem.

  • 113b5d3: add a cached-context "short" flow to MolphaGateway.execute

    Introduce ExecuteContext (registryVersion, nodes, jobConfig) and a
    gateway.prepareContext(jobId) helper that fetches these slow-changing round
    inputs once. Pass them back via execute({ ..., context }) (also accepted by
    executeAndSubmit) to skip the prelude and run rounds as a single gateway POST.
    context is partial, so any omitted field is still fetched. The default full
    flow now also fetches the registry version, node set, and job config in
    parallel.

Patch Changes

  • b381ffe: improve gateway execution reliability and align API config hash defaults

    canonicalizeAPIConfig now defaults valueTransform to an empty string instead of multiply:1e6, so API config hashing reflects explicit transforms only. Gateway execution now retries job-config fetches on transient 404 responses for newly created jobs, and gateway errors include backend-provided details for easier debugging of 400, 503, and other non-OK responses.

  • 113b5d3: add Starknet verifier address helpers and calldata builders

    Expose the deployed Starknet Sepolia verifier address and helpers to convert a
    gateway DataUpdateResult into Starknet verifier DataUpdate and
    SchnorrSignature calldata structs.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 06 Jun 10:14
4e70e10

Minor Changes

  • d843e36: add readPlan, readSubscription, and readJob on MolphaSolanaClient

    On-chain read helpers for plan, subscription, and job accounts (nullable, like
    readFeed). getPlan now delegates to readPlan and throws when missing.

  • 4e48226: make subscription payment explicit on subscribe/extendSubscription

    subscribe and extendSubscription now require a maxPriceUsdc confirmation
    (USDC base units) so callers explicitly acknowledge the on-chain USDC charge.
    The SDK reads the live plan price and aborts before sending the transaction if
    it exceeds the confirmed maximum, and returns the amount charged as pricePaid.
    Added getPlan(plan) to fetch the current price/terms for display beforehand.

Patch Changes

  • 8f90138: require maxPriceUsdc confirmation for subscribe/extend

  • 48878d9: align deriveApiConfigHash with node hashing (keccak256(JSON.stringify(canonicalApiConfig)))

    API config hashing now matches node-side verification by hashing the canonicalized
    config JSON string directly (with SDK defaults applied), instead of JCS.

  • 41b0816: simplify sdk init, add api-config hasher