Skip to content

Maestro: nullable spec fields fail to decode #570

Description

@solidsnakedev

Maestro responses that the provider schemas reject, found by checking Maestro's published spec (maestro-org/maestro-api-specifications at ccc8c1f, blockchain indexer API v1.8.0).

  1. Nullable or optional fields the SDK requires (packages/evolution/src/sdk/provider/internal/Maestro.ts):

    • Protocol parameters: delegate_representative_deposit, governance_action_deposit, min_fee_reference_scripts, and plutus_cost_models.plutus_v3 (the spec requires only plutus_v1 and plutus_v2).
    • UTxOs: datum, reference_script and datum.bytes.
    • Paging and accounts: next_cursor on paginated responses and delegated_pool on accounts.

    Any of these arriving as null or missing fails the call. Fix: Schema.optionalWith(X, { nullable: true }). For the three protocol parameters that the public ProtocolParameters type requires, choose between failing with a clear error and a default.

  2. Protocol parameters path. The SDK calls /protocol-parameters (MaestroEffect.ts:72), but the spec moved it to /general/protocol-parameters (spec commit ef726b3). Maestro's own TypeScript SDK still uses the old path, so it may still work. Needs a check with an API key before switching.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions