The wallet REST backend (from cardano-wallet)

API reference

class cardano.backends.walletrest.JSONWithDecimalEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
default(o)

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

def default(self, o):
    try:
        iterable = iter(o)
    except TypeError:
        pass
    else:
        return list(iterable)
    # Let the base class default method raise the TypeError
    return JSONEncoder.default(self, o)
exception cardano.backends.walletrest.exceptions.BadRequest(*args, **kwargs)

Raised when the underlying REST API returns HTTP code 400.

exception cardano.backends.walletrest.exceptions.CreatedInvalidTransaction(*args, **kwargs)
exception cardano.backends.walletrest.exceptions.NotFound(*args, **kwargs)

Raised when the underlying REST API returns HTTP code 404.

exception cardano.backends.walletrest.exceptions.NotSupported(*args, **kwargs)

Raised when wallet doesn’t provide the requested feature.

exception cardano.backends.walletrest.exceptions.RESTServerError(*args, **kwargs)

Raised when the underlying REST API returns HTTP code 403 or 500 and the error cannot be handled.

exception cardano.backends.walletrest.exceptions.WalletRESTException(*args, **kwargs)