Skip to content

Python Myriad exposes wallet_address parameter; TypeScript Myriad uses privateKey #464

@realfishsam

Description

@realfishsam

Drift

The Python Myriad constructor exposes a wallet_address parameter (which is internally mapped to private_key). The TypeScript Myriad constructor uses ExchangeOptions, where the wallet address is passed as privateKey. The parameter names differ across SDKs, forcing users to remember different names when switching languages.

TypeScript SDK

sdks/typescript/pmxt/client.ts, lines 2488–2492:

export class Myriad extends Exchange {
    constructor(options: ExchangeOptions = {}) {
        super("myriad", options);
    }
}

Docstring (lines 2477–2486): "The privateKey field is used as the wallet address."
Usage: new Myriad({ privateKey: process.env.MYRIAD_WALLET_ADDRESS })

Python SDK

sdks/python/pmxt/_exchanges.py, lines 244–272:

class Myriad(Exchange):
    def __init__(
        self,
        api_key: Optional[str] = None,
        wallet_address: Optional[str] = None,   # ← different name
        ...
    ):
        super().__init__(
            exchange_name="myriad",
            ...
            private_key=wallet_address,           # mapped internally
            ...
        )

Usage: Myriad(wallet_address=os.environ["MYRIAD_WALLET_ADDRESS"])

Expected

Both SDKs should use the same semantic parameter name. Options:

  • Python: rename wallet_address to private_key with a deprecation alias (matching TypeScript's privateKey).
  • TypeScript: add a walletAddress alias in a MyriadOptions interface, with privateKey kept for consistency.

The docstring in TypeScript should be updated to match whichever form is canonical.

Impact

Users migrating Myriad setup code from TypeScript to Python (or vice versa) must remember to rename the parameter. Documentation code examples for one SDK are misleading when read alongside the other.


Found by automated SDK cross-language drift audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    sdk-driftCross-language SDK consistency findings (TypeScript vs Python)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions