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

Classes

ConfigGetRequest

Bases: BaseModel

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

Source code in jmwalletd/src/jmwalletd/models.py
444
445
446
447
448
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
451
452
453
454
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
457
458
459
460
461
462
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
50
51
52
53
54
55
class CreateWalletRequest(BaseModel):
    """POST /api/v1/wallet/create request."""

    walletname: str
    password: str
    wallettype: str = "sw-fb"
Attributes
password: str instance-attribute
walletname: str 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
58
59
60
61
62
63
64
65
66
67
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
324
325
326
327
328
329
330
331
332
333
334
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
337
338
339
340
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
348
349
350
351
352
353
354
355
356
357
358
359
360
361
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
16
17
18
19
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
470
471
472
473
474
475
476
477
478
479
480
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
187
188
189
190
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
114
115
116
117
118
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
275
276
277
278
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
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: str = "taker"  # "maker" | "taker" | "send"
    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 = ""
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: str = 'taker' 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
219
220
221
222
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
103
104
105
106
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
 96
 97
 98
 99
100
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
70
71
72
73
74
75
76
class RecoverWalletRequest(BaseModel):
    """POST /api/v1/wallet/recover request."""

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

RescanBlockchainResponse

Bases: BaseModel

Response for rescanblockchain.

Source code in jmwalletd/src/jmwalletd/models.py
508
509
510
511
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
514
515
516
517
518
class RescanInfoResponse(BaseModel):
    """Response for getrescaninfo."""

    rescanning: bool
    progress: float | None = None
Attributes
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
121
122
123
124
125
126
127
128
129
130
131
132
133
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
488
489
490
491
492
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
495
496
497
498
499
500
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
426
427
428
429
430
431
432
433
434
435
436
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
27
28
29
30
31
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
34
35
36
37
38
39
40
41
42
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
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
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
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
303
304
305
306
307
308
309
310
311
312
313
314
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
286
287
288
289
290
291
292
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
295
296
297
298
299
300
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
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
79
80
81
82
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
85
86
87
88
89
90
91
92
93
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
157
158
159
160
161
162
163
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
148
149
150
151
152
153
154
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
136
137
138
139
140
141
142
143
144
145
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
175
176
177
178
179
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
261
262
263
264
265
266
267
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
166
167
168
169
170
171
172
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
526
527
528
529
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