Skip to content

jmwalletd.models

jmwalletd.models

Pydantic request/response models for the wallet daemon API.

All models match the schemas defined in the reference JoinMarket OpenAPI spec (jm-wallet-rpc.yaml) to ensure JAM compatibility.

Attributes

MAX_MONEY_SATS = 21000000 * 100000000 module-attribute

WalletName = Annotated[str, AfterValidator(_validate_wallet_name)] module-attribute

Classes

ConfigGetRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/configget request.

Source code in jmwalletd/src/jmwalletd/models.py
471
472
473
474
475
class ConfigGetRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/configget request."""

    section: str
    field: str
Attributes
field: str instance-attribute
section: str instance-attribute

ConfigGetResponse

Bases: BaseModel

Response for configget.

Source code in jmwalletd/src/jmwalletd/models.py
478
479
480
481
class ConfigGetResponse(BaseModel):
    """Response for configget."""

    configvalue: str
Attributes
configvalue: str instance-attribute

ConfigSetRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/configset request.

Source code in jmwalletd/src/jmwalletd/models.py
484
485
486
487
488
489
class ConfigSetRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/configset request."""

    section: str
    field: str
    value: str
Attributes
field: str instance-attribute
section: str instance-attribute
value: str instance-attribute

CreateWalletRequest

Bases: BaseModel

POST /api/v1/wallet/create request.

Source code in jmwalletd/src/jmwalletd/models.py
62
63
64
65
66
67
class CreateWalletRequest(BaseModel):
    """POST /api/v1/wallet/create request."""

    walletname: WalletName
    password: str
    wallettype: str = "sw-fb"
Attributes
password: str instance-attribute
walletname: WalletName instance-attribute
wallettype: str = 'sw-fb' class-attribute instance-attribute

CreateWalletResponse

Bases: BaseModel

Response for wallet create and recover.

Source code in jmwalletd/src/jmwalletd/models.py
70
71
72
73
74
75
76
77
78
79
class CreateWalletResponse(BaseModel):
    """Response for wallet create and recover."""

    walletname: str
    seedphrase: str
    token: str
    token_type: str = "bearer"
    expires_in: int = 1800
    scope: str = ""
    refresh_token: str
Attributes
expires_in: int = 1800 class-attribute instance-attribute
refresh_token: str instance-attribute
scope: str = '' class-attribute instance-attribute
seedphrase: str instance-attribute
token: str instance-attribute
token_type: str = 'bearer' class-attribute instance-attribute
walletname: str instance-attribute

DirectSendRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/taker/direct-send request.

amount_sats is the amount to send in satoshis; 0 means sweep the entire mixdepth. mixdepth is the source account index.

Source code in jmwalletd/src/jmwalletd/models.py
351
352
353
354
355
356
357
358
359
360
361
class DirectSendRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/taker/direct-send request.

    ``amount_sats`` is the amount to send in satoshis; ``0`` means sweep the
    entire mixdepth. ``mixdepth`` is the source account index.
    """

    mixdepth: int = Field(..., ge=0)
    amount_sats: int = Field(..., ge=0, le=MAX_MONEY_SATS)
    destination: str
    txfee: int | None = Field(default=None, ge=0)
Attributes
amount_sats: int = Field(..., ge=0, le=MAX_MONEY_SATS) class-attribute instance-attribute
destination: str instance-attribute
mixdepth: int = Field(..., ge=0) class-attribute instance-attribute
txfee: int | None = Field(default=None, ge=0) class-attribute instance-attribute

DirectSendResponse

Bases: BaseModel

Response for direct-send.

Source code in jmwalletd/src/jmwalletd/models.py
364
365
366
367
class DirectSendResponse(BaseModel):
    """Response for direct-send."""

    txinfo: TxInfo
Attributes
txinfo: TxInfo instance-attribute

DoCoinjoinRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/taker/coinjoin request.

counterparties is the number of makers requested in the coinjoin; the lower bound of 2 matches the minimum the taker protocol can run with, and the upper bound prevents a malformed request from triggering large allocations / long-running RPC under the auth boundary.

Source code in jmwalletd/src/jmwalletd/models.py
375
376
377
378
379
380
381
382
383
384
385
386
387
388
class DoCoinjoinRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/taker/coinjoin request.

    ``counterparties`` is the number of makers requested in the coinjoin;
    the lower bound of 2 matches the minimum the taker protocol can run with,
    and the upper bound prevents a malformed request from triggering large
    allocations / long-running RPC under the auth boundary.
    """

    mixdepth: int = Field(..., ge=0)
    amount_sats: int = Field(..., ge=0, le=MAX_MONEY_SATS)
    counterparties: int = Field(..., ge=2, le=20)
    destination: str
    txfee: int | None = Field(default=None, ge=0)
Attributes
amount_sats: int = Field(..., ge=0, le=MAX_MONEY_SATS) class-attribute instance-attribute
counterparties: int = Field(..., ge=2, le=20) class-attribute instance-attribute
destination: str instance-attribute
mixdepth: int = Field(..., ge=0) class-attribute instance-attribute
txfee: int | None = Field(default=None, ge=0) class-attribute instance-attribute

ErrorMessage

Bases: BaseModel

Standard error response body.

Source code in jmwalletd/src/jmwalletd/models.py
28
29
30
31
class ErrorMessage(BaseModel):
    """Standard error response body."""

    message: str = ""
Attributes
message: str = '' class-attribute instance-attribute

FreezeRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/freeze request.

Note: the field name uses a hyphen in the reference API JSON. We use Field(alias=...) to handle this.

Source code in jmwalletd/src/jmwalletd/models.py
497
498
499
500
501
502
503
504
505
506
507
class FreezeRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/freeze request.

    Note: the field name uses a hyphen in the reference API JSON.
    We use Field(alias=...) to handle this.
    """

    utxo_string: str = Field(alias="utxo-string")
    freeze: bool

    model_config = {"populate_by_name": True}
Attributes
freeze: bool instance-attribute
model_config = {'populate_by_name': True} class-attribute instance-attribute
utxo_string: str = Field(alias='utxo-string') class-attribute instance-attribute

GetAddressResponse

Bases: BaseModel

Response for new address / timelock address requests.

Source code in jmwalletd/src/jmwalletd/models.py
210
211
212
213
class GetAddressResponse(BaseModel):
    """Response for new address / timelock address requests."""

    address: str
Attributes
address: str instance-attribute

GetInfoResponse

Bases: BaseModel

Response for GET /api/v1/getinfo.

Source code in jmwalletd/src/jmwalletd/models.py
137
138
139
140
141
class GetInfoResponse(BaseModel):
    """Response for GET /api/v1/getinfo."""

    version: str
    backend: str
Attributes
backend: str instance-attribute
version: str instance-attribute

GetSeedResponse

Bases: BaseModel

Response for GET /api/v1/wallet/{walletname}/getseed.

Source code in jmwalletd/src/jmwalletd/models.py
302
303
304
305
class GetSeedResponse(BaseModel):
    """Response for GET /api/v1/wallet/{walletname}/getseed."""

    seedphrase: str
Attributes
seedphrase: str instance-attribute

HistoryEntry

Bases: BaseModel

A single CoinJoin/spend record from the wallet history (history.csv).

Mirrors jmwallet.history.TransactionHistoryEntry; surfaced read-only so frontends can display past activity (maker earnings, taker spends, sends).

Source code in jmwalletd/src/jmwalletd/models.py
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
class HistoryEntry(BaseModel):
    """A single CoinJoin/spend record from the wallet history (history.csv).

    Mirrors ``jmwallet.history.TransactionHistoryEntry``; surfaced read-only so
    frontends can display past activity (maker earnings, taker spends, sends).
    """

    timestamp: str
    completed_at: str = ""
    confirmed_at: str = ""
    role: Literal["maker", "taker", "send", "deposit"] = "taker"
    success: bool = True
    failure_reason: str = ""
    confirmations: int = 0
    txid: str = ""
    cj_amount: int = 0
    peer_count: int | None = None
    counterparty_nicks: str = ""
    fee_received: int = 0
    txfee_contribution: int = 0
    total_maker_fees_paid: int = 0
    mining_fee_paid: int = 0
    net_fee: int = 0
    source_mixdepth: int = 0
    destination_address: str = ""
    change_address: str = ""
    utxos_used: str = ""
    broadcast_method: str = ""
    network: str = ""
    # "protocol" for rows recorded at protocol time (authoritative);
    # "onchain" for rows reconstructed from blockchain data after a seed
    # import (best-effort guesses).
    source: Literal["protocol", "onchain"] = "protocol"
Attributes
broadcast_method: str = '' class-attribute instance-attribute
change_address: str = '' class-attribute instance-attribute
cj_amount: int = 0 class-attribute instance-attribute
completed_at: str = '' class-attribute instance-attribute
confirmations: int = 0 class-attribute instance-attribute
confirmed_at: str = '' class-attribute instance-attribute
counterparty_nicks: str = '' class-attribute instance-attribute
destination_address: str = '' class-attribute instance-attribute
failure_reason: str = '' class-attribute instance-attribute
fee_received: int = 0 class-attribute instance-attribute
mining_fee_paid: int = 0 class-attribute instance-attribute
net_fee: int = 0 class-attribute instance-attribute
network: str = '' class-attribute instance-attribute
peer_count: int | None = None class-attribute instance-attribute
role: Literal['maker', 'taker', 'send', 'deposit'] = 'taker' class-attribute instance-attribute
source: Literal['protocol', 'onchain'] = 'protocol' class-attribute instance-attribute
source_mixdepth: int = 0 class-attribute instance-attribute
success: bool = True class-attribute instance-attribute
timestamp: str instance-attribute
total_maker_fees_paid: int = 0 class-attribute instance-attribute
txfee_contribution: int = 0 class-attribute instance-attribute
txid: str = '' class-attribute instance-attribute
utxos_used: str = '' class-attribute instance-attribute

ListUtxosResponse

Bases: BaseModel

Response for GET /api/v1/wallet/{walletname}/utxos.

Source code in jmwalletd/src/jmwalletd/models.py
242
243
244
245
class ListUtxosResponse(BaseModel):
    """Response for GET /api/v1/wallet/{walletname}/utxos."""

    utxos: list[UTXOEntry] = Field(default_factory=list)
Attributes
utxos: list[UTXOEntry] = Field(default_factory=list) class-attribute instance-attribute

ListWalletsResponse

Bases: BaseModel

Response for GET /api/v1/wallet/all.

Source code in jmwalletd/src/jmwalletd/models.py
126
127
128
129
class ListWalletsResponse(BaseModel):
    """Response for GET /api/v1/wallet/all."""

    wallets: list[str] = Field(default_factory=list)
Attributes
wallets: list[str] = Field(default_factory=list) class-attribute instance-attribute

LockWalletResponse

Bases: BaseModel

Response for wallet lock.

Source code in jmwalletd/src/jmwalletd/models.py
119
120
121
122
123
class LockWalletResponse(BaseModel):
    """Response for wallet lock."""

    walletname: str
    already_locked: bool
Attributes
already_locked: bool instance-attribute
walletname: str instance-attribute

RecoverWalletRequest

Bases: BaseModel

POST /api/v1/wallet/recover request.

Source code in jmwalletd/src/jmwalletd/models.py
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class RecoverWalletRequest(BaseModel):
    """POST /api/v1/wallet/recover request."""

    walletname: WalletName
    password: str
    wallettype: str = "sw-fb"
    seedphrase: str
    scan_range: int | None = Field(
        default=None,
        ge=1,
        le=10_000,
        description=(
            "Regular address indices to import per branch during descriptor-backend recovery. "
            "Widen-only: values below the configured [wallet].scan_range are "
            "raised to it, so legacy gaplimit-style values cannot shrink "
            "coverage."
        ),
    )
Attributes
password: str instance-attribute
scan_range: int | None = Field(default=None, ge=1, le=10000, description='Regular address indices to import per branch during descriptor-backend recovery. Widen-only: values below the configured [wallet].scan_range are raised to it, so legacy gaplimit-style values cannot shrink coverage.') class-attribute instance-attribute
seedphrase: str instance-attribute
walletname: WalletName instance-attribute
wallettype: str = 'sw-fb' class-attribute instance-attribute

RescanBlockchainResponse

Bases: BaseModel

Response for rescanblockchain.

Source code in jmwalletd/src/jmwalletd/models.py
535
536
537
538
class RescanBlockchainResponse(BaseModel):
    """Response for rescanblockchain."""

    walletname: str
Attributes
walletname: str instance-attribute

RescanInfoResponse

Bases: BaseModel

Response for getrescaninfo.

Source code in jmwalletd/src/jmwalletd/models.py
541
542
543
544
545
546
class RescanInfoResponse(BaseModel):
    """Response for getrescaninfo."""

    rescanning: bool
    progress: float | None = None
    error: str | None = None
Attributes
error: str | None = None class-attribute instance-attribute
progress: float | None = None class-attribute instance-attribute
rescanning: bool instance-attribute

SessionResponse

Bases: BaseModel

Response for GET /api/v1/session.

Source code in jmwalletd/src/jmwalletd/models.py
144
145
146
147
148
149
150
151
152
153
154
155
156
class SessionResponse(BaseModel):
    """Response for GET /api/v1/session."""

    session: bool
    maker_running: bool
    coinjoin_in_process: bool
    schedule: list[list[str | int | float]] | None = None
    wallet_name: str = ""
    offer_list: list[dict[str, str | int | float]] | None = None
    nickname: str | None = None
    rescanning: bool = False
    block_height: int | None = None
    descriptor_wallet_name: str | None = None
Attributes
block_height: int | None = None class-attribute instance-attribute
coinjoin_in_process: bool instance-attribute
descriptor_wallet_name: str | None = None class-attribute instance-attribute
maker_running: bool instance-attribute
nickname: str | None = None class-attribute instance-attribute
offer_list: list[dict[str, str | int | float]] | None = None class-attribute instance-attribute
rescanning: bool = False class-attribute instance-attribute
schedule: list[list[str | int | float]] | None = None class-attribute instance-attribute
session: bool instance-attribute
wallet_name: str = '' class-attribute instance-attribute

SignMessageRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/signmessage request.

Source code in jmwalletd/src/jmwalletd/models.py
515
516
517
518
519
class SignMessageRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/signmessage request."""

    hd_path: str
    message: str
Attributes
hd_path: str instance-attribute
message: str instance-attribute

SignMessageResponse

Bases: BaseModel

Response for signmessage.

Source code in jmwalletd/src/jmwalletd/models.py
522
523
524
525
526
527
class SignMessageResponse(BaseModel):
    """Response for signmessage."""

    signature: str
    message: str
    address: str
Attributes
address: str instance-attribute
message: str instance-attribute
signature: str instance-attribute

StartMakerRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/maker/start request.

All fields are strings per the reference implementation.

Source code in jmwalletd/src/jmwalletd/models.py
453
454
455
456
457
458
459
460
461
462
463
class StartMakerRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/maker/start request.

    All fields are strings per the reference implementation.
    """

    txfee: str
    cjfee_a: str
    cjfee_r: str
    ordertype: str
    minsize: str
Attributes
cjfee_a: str instance-attribute
cjfee_r: str instance-attribute
minsize: str instance-attribute
ordertype: str instance-attribute
txfee: str instance-attribute

TokenRequest

Bases: BaseModel

POST /api/v1/token request.

Source code in jmwalletd/src/jmwalletd/models.py
39
40
41
42
43
class TokenRequest(BaseModel):
    """POST /api/v1/token request."""

    grant_type: str
    refresh_token: str
Attributes
grant_type: str instance-attribute
refresh_token: str instance-attribute

TokenResponse

Bases: BaseModel

Token issuance response (used by create, unlock, recover, refresh).

Source code in jmwalletd/src/jmwalletd/models.py
46
47
48
49
50
51
52
53
54
class TokenResponse(BaseModel):
    """Token issuance response (used by create, unlock, recover, refresh)."""

    walletname: str = ""
    token: str
    token_type: str = "bearer"
    expires_in: int = 1800
    scope: str = ""
    refresh_token: str
Attributes
expires_in: int = 1800 class-attribute instance-attribute
refresh_token: str instance-attribute
scope: str = '' class-attribute instance-attribute
token: str instance-attribute
token_type: str = 'bearer' class-attribute instance-attribute
walletname: str = '' class-attribute instance-attribute

TumblerPhaseResponse

Bases: BaseModel

A single phase rendered for the API. Keeps the discriminator flat.

Source code in jmwalletd/src/jmwalletd/models.py
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
class TumblerPhaseResponse(BaseModel):
    """A single phase rendered for the API. Keeps the discriminator flat."""

    kind: str
    index: int
    status: str
    wait_seconds: float
    started_at: str | None = None
    finished_at: str | None = None
    error: str | None = None
    # Optional variant fields; only the ones relevant to ``kind`` are populated.
    mixdepth: int | None = None
    amount: int | None = None
    amount_fraction: float | None = None
    counterparty_count: int | None = None
    destination: str | None = None
    txid: str | None = None
    duration_seconds: float | None = None
    target_cj_count: int | None = None
    idle_timeout_seconds: float | None = None
    cj_served: int | None = None
    attempt_count: int | None = None
Attributes
amount: int | None = None class-attribute instance-attribute
amount_fraction: float | None = None class-attribute instance-attribute
attempt_count: int | None = None class-attribute instance-attribute
cj_served: int | None = None class-attribute instance-attribute
counterparty_count: int | None = None class-attribute instance-attribute
destination: str | None = None class-attribute instance-attribute
duration_seconds: float | None = None class-attribute instance-attribute
error: str | None = None class-attribute instance-attribute
finished_at: str | None = None class-attribute instance-attribute
idle_timeout_seconds: float | None = None class-attribute instance-attribute
index: int instance-attribute
kind: str instance-attribute
mixdepth: int | None = None class-attribute instance-attribute
started_at: str | None = None class-attribute instance-attribute
status: str instance-attribute
target_cj_count: int | None = None class-attribute instance-attribute
txid: str | None = None class-attribute instance-attribute
wait_seconds: float instance-attribute

TumblerPlanRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/tumbler/plan request.

Destinations are the external bitcoin addresses the tumble should ultimately sweep funds to; order is significant (first destination maps to the first non-empty landing mixdepth). parameters lets the caller override the builder defaults; omit for sensible knobs. force overrides a pending-only plan on disk; plans that are RUNNING in the daemon are always protected (stop first).

Source code in jmwalletd/src/jmwalletd/models.py
391
392
393
394
395
396
397
398
399
400
401
402
403
404
class TumblerPlanRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/tumbler/plan request.

    Destinations are the external bitcoin addresses the tumble should
    ultimately sweep funds to; order is significant (first destination
    maps to the first non-empty landing mixdepth). ``parameters`` lets
    the caller override the builder defaults; omit for sensible knobs.
    ``force`` overrides a pending-only plan on disk; plans that are
    ``RUNNING`` in the daemon are always protected (stop first).
    """

    destinations: list[str] = Field(..., min_length=1)
    parameters: dict[str, object] | None = None
    force: bool = False
Attributes
destinations: list[str] = Field(..., min_length=1) class-attribute instance-attribute
force: bool = False class-attribute instance-attribute
parameters: dict[str, object] | None = None class-attribute instance-attribute

TumblerPlanResponse

Bases: BaseModel

Response body returned by tumbler plan / status endpoints.

Source code in jmwalletd/src/jmwalletd/models.py
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
class TumblerPlanResponse(BaseModel):
    """Response body returned by tumbler plan / status endpoints."""

    plan_id: str
    wallet_name: str
    status: str
    destinations: list[str]
    current_phase: int
    phases: list[TumblerPhaseResponse]
    created_at: str
    updated_at: str
    error: str | None = None
    # True iff the plan was found in ``RUNNING`` on disk but no runner is
    # live in the daemon; set by the status endpoint so the UI can flag it.
    stale: bool = False
Attributes
created_at: str instance-attribute
current_phase: int instance-attribute
destinations: list[str] instance-attribute
error: str | None = None class-attribute instance-attribute
phases: list[TumblerPhaseResponse] instance-attribute
plan_id: str instance-attribute
stale: bool = False class-attribute instance-attribute
status: str instance-attribute
updated_at: str instance-attribute
wallet_name: str instance-attribute

TxInfo

Bases: BaseModel

Full transaction information.

Source code in jmwalletd/src/jmwalletd/models.py
330
331
332
333
334
335
336
337
338
339
340
341
class TxInfo(BaseModel):
    """Full transaction information."""

    hex: str
    inputs: list[TxInput] = Field(default_factory=list)
    outputs: list[TxOutput] = Field(default_factory=list)
    txid: str
    nLockTime: int = 0
    nVersion: int = 2
    # Confirmation count when known (set by the transaction monitor: ``0`` while
    # in the mempool, >=1 once mined). ``None`` for a freshly broadcast tx.
    confirmations: int | None = None
Attributes
confirmations: int | None = None class-attribute instance-attribute
hex: str instance-attribute
inputs: list[TxInput] = Field(default_factory=list) class-attribute instance-attribute
nLockTime: int = 0 class-attribute instance-attribute
nVersion: int = 2 class-attribute instance-attribute
outputs: list[TxOutput] = Field(default_factory=list) class-attribute instance-attribute
txid: str instance-attribute

TxInput

Bases: BaseModel

A transaction input.

Source code in jmwalletd/src/jmwalletd/models.py
313
314
315
316
317
318
319
class TxInput(BaseModel):
    """A transaction input."""

    outpoint: str
    scriptSig: str = ""
    nSequence: int = 4294967295
    witness: str = ""
Attributes
nSequence: int = 4294967295 class-attribute instance-attribute
outpoint: str instance-attribute
scriptSig: str = '' class-attribute instance-attribute
witness: str = '' class-attribute instance-attribute

TxOutput

Bases: BaseModel

A transaction output.

Source code in jmwalletd/src/jmwalletd/models.py
322
323
324
325
326
327
class TxOutput(BaseModel):
    """A transaction output."""

    value_sats: int
    scriptPubKey: str
    address: str
Attributes
address: str instance-attribute
scriptPubKey: str instance-attribute
value_sats: int instance-attribute

UTXOEntry

Bases: BaseModel

A single UTXO in the listutxos response.

Source code in jmwalletd/src/jmwalletd/models.py
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
class UTXOEntry(BaseModel):
    """A single UTXO in the listutxos response."""

    utxo: str  # "txid:vout"
    address: str
    path: str
    label: str = ""
    value: int
    tries: int = 0
    tries_remaining: int = 3
    external: bool = False
    mixdepth: int
    confirmations: int
    frozen: bool = False
    # Present only for timelocked fidelity bond UTXOs. Formatted as the legacy
    # joinmarket-clientserver UTC datetime string (e.g. "2025-06-01 00:00:00")
    # so JAM (which keys fidelity-bond detection off a truthy ``locktime``)
    # treats the UTXO as a bond. Regular UTXOs omit the field entirely.
    locktime: str | None = None
Attributes
address: str instance-attribute
confirmations: int instance-attribute
external: bool = False class-attribute instance-attribute
frozen: bool = False class-attribute instance-attribute
label: str = '' class-attribute instance-attribute
locktime: str | None = None class-attribute instance-attribute
mixdepth: int instance-attribute
path: str instance-attribute
tries: int = 0 class-attribute instance-attribute
tries_remaining: int = 3 class-attribute instance-attribute
utxo: str instance-attribute
value: int instance-attribute

UnlockWalletRequest

Bases: BaseModel

POST /api/v1/wallet/{walletname}/unlock request.

Source code in jmwalletd/src/jmwalletd/models.py
102
103
104
105
class UnlockWalletRequest(BaseModel):
    """POST /api/v1/wallet/{walletname}/unlock request."""

    password: str
Attributes
password: str instance-attribute

UnlockWalletResponse

Bases: BaseModel

Response for wallet unlock.

Source code in jmwalletd/src/jmwalletd/models.py
108
109
110
111
112
113
114
115
116
class UnlockWalletResponse(BaseModel):
    """Response for wallet unlock."""

    walletname: str
    token: str
    token_type: str = "bearer"
    expires_in: int = 1800
    scope: str = ""
    refresh_token: str
Attributes
expires_in: int = 1800 class-attribute instance-attribute
refresh_token: str instance-attribute
scope: str = '' class-attribute instance-attribute
token: str instance-attribute
token_type: str = 'bearer' class-attribute instance-attribute
walletname: str instance-attribute

WalletDisplayAccount

Bases: BaseModel

A single account (mixdepth) in the wallet display.

Source code in jmwalletd/src/jmwalletd/models.py
180
181
182
183
184
185
186
class WalletDisplayAccount(BaseModel):
    """A single account (mixdepth) in the wallet display."""

    account: str
    account_balance: str
    available_balance: str = "0.00000000"
    branches: list[WalletDisplayBranch] = Field(default_factory=list)
Attributes
account: str instance-attribute
account_balance: str instance-attribute
available_balance: str = '0.00000000' class-attribute instance-attribute
branches: list[WalletDisplayBranch] = Field(default_factory=list) class-attribute instance-attribute

WalletDisplayBranch

Bases: BaseModel

A branch (external/internal/bond) within an account.

Source code in jmwalletd/src/jmwalletd/models.py
171
172
173
174
175
176
177
class WalletDisplayBranch(BaseModel):
    """A branch (external/internal/bond) within an account."""

    branch: str
    balance: str
    available_balance: str = "0.00000000"
    entries: list[WalletDisplayEntry] = Field(default_factory=list)
Attributes
available_balance: str = '0.00000000' class-attribute instance-attribute
balance: str instance-attribute
branch: str instance-attribute
entries: list[WalletDisplayEntry] = Field(default_factory=list) class-attribute instance-attribute

WalletDisplayEntry

Bases: BaseModel

A single address entry in the wallet display.

Source code in jmwalletd/src/jmwalletd/models.py
159
160
161
162
163
164
165
166
167
168
class WalletDisplayEntry(BaseModel):
    """A single address entry in the wallet display."""

    hd_path: str
    address: str
    amount: str
    available_balance: str = "0.00000000"
    status: str = ""
    label: str = ""
    extradata: str = ""
Attributes
address: str instance-attribute
amount: str instance-attribute
available_balance: str = '0.00000000' class-attribute instance-attribute
extradata: str = '' class-attribute instance-attribute
hd_path: str instance-attribute
label: str = '' class-attribute instance-attribute
status: str = '' class-attribute instance-attribute

WalletDisplayResponse

Bases: BaseModel

Response for GET /api/v1/wallet/{walletname}/display.

Source code in jmwalletd/src/jmwalletd/models.py
198
199
200
201
202
class WalletDisplayResponse(BaseModel):
    """Response for GET /api/v1/wallet/{walletname}/display."""

    walletname: str
    walletinfo: WalletInfo
Attributes
walletinfo: WalletInfo instance-attribute
walletname: str instance-attribute

WalletHistoryResponse

Bases: BaseModel

Response for GET /api/v1/wallet/{walletname}/history.

history is ordered most-recent first.

Source code in jmwalletd/src/jmwalletd/models.py
288
289
290
291
292
293
294
class WalletHistoryResponse(BaseModel):
    """Response for GET /api/v1/wallet/{walletname}/history.

    ``history`` is ordered most-recent first.
    """

    history: list[HistoryEntry] = Field(default_factory=list)
Attributes
history: list[HistoryEntry] = Field(default_factory=list) class-attribute instance-attribute

WalletInfo

Bases: BaseModel

The walletinfo object within the display response.

Source code in jmwalletd/src/jmwalletd/models.py
189
190
191
192
193
194
195
class WalletInfo(BaseModel):
    """The walletinfo object within the display response."""

    wallet_name: str = "JM wallet"
    total_balance: str = "0.00000000"
    available_balance: str = "0.00000000"
    accounts: list[WalletDisplayAccount] = Field(default_factory=list)
Attributes
accounts: list[WalletDisplayAccount] = Field(default_factory=list) class-attribute instance-attribute
available_balance: str = '0.00000000' class-attribute instance-attribute
total_balance: str = '0.00000000' class-attribute instance-attribute
wallet_name: str = 'JM wallet' class-attribute instance-attribute

YieldGenReportResponse

Bases: BaseModel

Response for yieldgen/report.

Source code in jmwalletd/src/jmwalletd/models.py
554
555
556
557
class YieldGenReportResponse(BaseModel):
    """Response for yieldgen/report."""

    yigen_data: list[str] = Field(default_factory=list)
Attributes
yigen_data: list[str] = Field(default_factory=list) class-attribute instance-attribute