Nostro/packaging/dbus/net.catcrafts.Nostro1.xml

208 lines
11 KiB
XML
Raw Normal View History

2026-11-01 18:35:23 +01:00
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!-- SPDX-License-Identifier: LGPL-3.0-only -->
<!-- SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts® -->
<!-- nostrod's interface: net.catcrafts.Nostro1 on the system bus, at /net/catcrafts/Nostro1. Generate a proxy from
this file (gdbus-codegen, qdbusxml2cpp, zbus-xmlgen); C++ programs can use Nostro::Client instead. A test in nostro
keeps this file the interface nostrod serves.
Every call is answered for the calling user only, and authorised with polkit first
(packaging/system/net.catcrafts.Nostro1.policy): allow interactive authorization on your calls, so the user can be
asked for their password, and give them a timeout of minutes. Every reply ends with `notes`, the warnings the
library gave during the call, to show the user.
Conventions:
account an account's name or IBAN
to, from an IBAN, an e-mail address, or a phone number starting with +
amount in the currency's smallest unit (1250 is 12.50), positive; balances and transactions are negative
when money goes out
currency an ISO code: "EUR"
times x: microseconds since 1970-01-01 00:00 UTC
optionals an array of zero or one element (ax)
Types:
connectors (Connectors) a(ssssb): name, bank ("bunq"), environment ("production" or "sandbox"),
auth ("api key" or "oauth"), whether a call to the bank works now
feat(app): add the Nostro app, a window for phones and desktops Linux phones have no banking apps, and a command line is no answer on a phone. The app does everything the nostro command does and, like it, only talks to nostrod: it holds no key and no token. - Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens; Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics; nostro-app; and Nostro.DebugCommands for the --debug-api build. - Client: every method also in an asynchronous form for an sd-event loop, with DaemonMissing and OutcomeUnknown. - nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both Flatpaks cross-built for aarch64, and the licence texts they carry. - nostro-fake-system, a made-up bus and bank with a real nostrod on them, to look at the app against. The README's screenshots are taken on it. - The nostro command: an API key's environment is the key's own to say, so --sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL. The published contract changes in three places, before any release (design rule 10): - Transactions' query takes `stored`: answered from what nostrod has stored, without asking the bank. The app searches with it; before, every search was a call to bunq. - AddBunq's `environment` no longer chooses over what the key says of itself: a key of the other environment is refused. - SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one as DEACTIVATED however well it pays, and leaves it as it is when asked, without an error. The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved from one to the other (design rule 13). Transaction's schema is unchanged. Verified: the 17 tests pass with every line, function and region of what they link run, and the five lint runs are clean. Every screen was looked at on the made-up system, at a phone's and a desktop's sizes in the light and the dark look, on Plasma under Wayland. What is said of bunq's cards comes from its sandbox, with throwaway users, and from one real virtual card. Known to have been used against production: connecting, and reading accounts, payments and cards. Not known to have been tried: a payment from the app against bunq, OAuth against bunq, and anything on a phone. Building the app takes --graphics=, a Crafter.Graphics checkout on its branch claude/nostro-app, until that branch is merged and pinned here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
environment (AddBunq) empty: an API key says itself which it is of, a sandbox key by starting with
sandbox_. "production" or "sandbox" only has a key of the other one refused
(InvalidArgument), before anyone is asked and before the key goes anywhere.
AddBunqOAuth needs it named: nothing of an OAuth client says which it is of
2026-11-01 18:35:23 +01:00
connectors (Accounts) a(ssa(ssssx)): connector name, bank, accounts: name, BIC, IBAN, currency, balance
feat(app): add the Nostro app, a window for phones and desktops Linux phones have no banking apps, and a command line is no answer on a phone. The app does everything the nostro command does and, like it, only talks to nostrod: it holds no key and no token. - Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens; Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics; nostro-app; and Nostro.DebugCommands for the --debug-api build. - Client: every method also in an asynchronous form for an sd-event loop, with DaemonMissing and OutcomeUnknown. - nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both Flatpaks cross-built for aarch64, and the licence texts they carry. - nostro-fake-system, a made-up bus and bank with a real nostrod on them, to look at the app against. The README's screenshots are taken on it. - The nostro command: an API key's environment is the key's own to say, so --sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL. The published contract changes in three places, before any release (design rule 10): - Transactions' query takes `stored`: answered from what nostrod has stored, without asking the bank. The app searches with it; before, every search was a call to bunq. - AddBunq's `environment` no longer chooses over what the key says of itself: a key of the other environment is refused. - SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one as DEACTIVATED however well it pays, and leaves it as it is when asked, without an error. The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved from one to the other (design rule 13). Transaction's schema is unchanged. Verified: the 17 tests pass with every line, function and region of what they link run, and the five lint runs are clean. Every screen was looked at on the made-up system, at a phone's and a desktop's sizes in the light and the dark look, on Plasma under Wayland. What is said of bunq's cards comes from its sandbox, with throwaway users, and from one real virtual card. Known to have been used against production: connecting, and reading accounts, payments and cards. Not known to have been tried: a payment from the app against bunq, OAuth against bunq, and anything on a phone. Building the app takes --graphics=, a Crafter.Graphics checkout on its branch claude/nostro-app, until that branch is merged and pinned here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
query (Transactions) a{sv}, each key optional: search s, amount x, from x, to x, limit t (100),
stored b (false). Transactions asks the bank for what is new before it
answers; with stored true it answers from what nostrod has stored alone, at
once and without the bank: for a search in a list it has just given. A key
nostrod does not know is ignored, so one from before `stored` asks the bank.
2026-11-01 18:35:23 +01:00
transactions a(sssssxxss): name, BIC, IBAN, description, currency, amount, time, the bank's
id, the bank's kind ("MASTERCARD/PAYMENT")
schedule (xaxsusax): start, end, unit (ONCE, HOURLY, DAILY, WEEKLY, MONTHLY, YEARLY),
every n units, status (ACTIVE, FINISHED, CANCELLED), next run
request (sent) (ts(ss)sxaxsxs): id, status, counterparty (name, IBAN), currency, amount asked,
amount paid, description, created, bunq.me link
requests (incoming) a(tss(ss)sxsx): id, status, type (INTERNAL, DIRECT_DEBIT, ...), counterparty,
currency, amount, description, created
scheduled a(t(ss)sxs(xaxsusax)): id, counterparty, currency, amount, description, schedule
drafts a(tssa((ss)sxs)s): id, status, created by, entries (counterparty, currency,
amount, description), bunq's time of its last change
cards / updated (tsssssssss): id, kind, product type, status, order status, name on card,
feat(app): add the Nostro app, a window for phones and desktops Linux phones have no banking apps, and a command line is no answer on a phone. The app does everything the nostro command does and, like it, only talks to nostrod: it holds no key and no token. - Nostro.Ui, a toolkit whose screens are functions that fill a frame, ported from imsd-messages ca5cd72d; Nostro.App, the app's state, forms and screens; Nostro.Ui.Shell, which puts them on a Wayland window with Crafter.Graphics; nostro-app; and Nostro.DebugCommands for the --debug-api build. - Client: every method also in an asynchronous form for an sd-event loop, with DaemonMissing and OutcomeUnknown. - nostrod's Flatpak is net.catcrafts.Nostrod now and the app takes net.catcrafts.Nostro; install.sh moves the state. The app's Flatpak, both Flatpaks cross-built for aarch64, and the licence texts they carry. - nostro-fake-system, a made-up bus and bank with a real nostrod on them, to look at the app against. The README's screenshots are taken on it. - The nostro command: an API key's environment is the key's own to say, so --sandbox is for bunq-oauth alone, and a virtual card is listed as VIRTUAL. The published contract changes in three places, before any release (design rule 10): - Transactions' query takes `stored`: answered from what nostrod has stored, without asking the bank. The app searches with it; before, every search was a call to bunq. - AddBunq's `environment` no longer chooses over what the key says of itself: a key of the other environment is refused. - SetCardStatus refuses to freeze or unfreeze a virtual card. bunq reports one as DEACTIVATED however well it pays, and leaves it as it is when asked, without an error. The app is GPL-3.0-only, the library stays LGPL-3.0-only, and no code moved from one to the other (design rule 13). Transaction's schema is unchanged. Verified: the 17 tests pass with every line, function and region of what they link run, and the five lint runs are clean. Every screen was looked at on the made-up system, at a phone's and a desktop's sizes in the light and the dark look, on Plasma under Wayland. What is said of bunq's cards comes from its sandbox, with throwaway users, and from one real virtual card. Known to have been used against production: connecting, and reading accounts, payments and cards. Not known to have been tried: a payment from the app against bunq, OAuth against bunq, and anything on a phone. Building the app takes --graphics=, a Crafter.Graphics checkout on its branch claude/nostro-app, until that branch is merged and pinned here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 12:27:14 +01:00
second line, last four digits, expiry, IBAN it pays from. A card whose order
status is VIRTUAL_DELIVERY is a virtual one: bunq has it as DEACTIVATED however
well it pays, so that status says nothing of it until it is LOST, STOLEN,
CANCELLED or EXPIRED. SetCardStatus refuses to set such a card ACTIVE or
DEACTIVATED (InvalidArgument): bunq would leave it as it is, without an error
2026-11-01 18:35:23 +01:00
account / chosen (ssssx): the account apps' checkouts pay from (net.catcrafts.Nostro1.Checkout),
as in Accounts; DefaultCheckoutAccount has none until one is chosen, or once
it is gone. An account reached through OAuth cannot pay a shop, and is refused.
Errors, besides org.freedesktop.DBus.Error.AccessDenied (refused, or polkit did not answer) and
org.freedesktop.DBus.Error.InteractiveAuthorizationRequired:
net.catcrafts.Nostro1.Error.InvalidArgument refused before anything was sent
net.catcrafts.Nostro1.Error.Cancelled the user did not authenticate: nothing was done
net.catcrafts.Nostro1.Error.Bank the bank's own refusal
net.catcrafts.Nostro1.Error.OAuthCannotPay an OAuth connection may only pay the user's own accounts
net.catcrafts.Nostro1.Error.NoCheckoutAccount (checkout) no account is chosen to pay checkouts from
net.catcrafts.Nostro1.Error.Failed anything else; a payment that failed this way may have been made -->
<node>
<interface name="net.catcrafts.Nostro1">
<method name="Connectors">
<arg type="a(ssssb)" name="connectors" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="AddBunq">
<arg type="s" name="apiKey" direction="in"/>
<arg type="s" name="allowedIps" direction="in"/>
<arg type="s" name="environment" direction="in"/>
<arg type="s" name="name" direction="out"/>
<arg type="s" name="addedEnvironment" direction="out"/>
<arg type="u" name="accounts" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="AddBunqOAuth">
<arg type="s" name="environment" direction="in"/>
<arg type="s" name="clientId" direction="in"/>
<arg type="s" name="clientSecret" direction="in"/>
<arg type="s" name="redirectUri" direction="in"/>
<arg type="s" name="code" direction="in"/>
<arg type="s" name="name" direction="out"/>
<arg type="s" name="addedEnvironment" direction="out"/>
<arg type="u" name="accounts" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="RemoveConnector">
<arg type="s" name="connector" direction="in"/>
<arg type="s" name="name" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Accounts">
<arg type="a(ssa(ssssx))" name="connectors" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Transactions">
<arg type="s" name="account" direction="in"/>
<arg type="a{sv}" name="query" direction="in"/>
<arg type="a(sssssxxss)" name="transactions" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Send">
<arg type="s" name="account" direction="in"/>
<arg type="s" name="to" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="x" name="amount" direction="in"/>
<arg type="s" name="description" direction="in"/>
<arg type="t" name="id" direction="out"/>
<arg type="s" name="currency" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Schedule">
<arg type="s" name="account" direction="in"/>
<arg type="s" name="to" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="x" name="amount" direction="in"/>
<arg type="s" name="description" direction="in"/>
<arg type="(xaxsusax)" name="schedule" direction="in"/>
<arg type="t" name="id" direction="out"/>
<arg type="s" name="currency" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Request">
<arg type="s" name="account" direction="in"/>
<arg type="s" name="from" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="x" name="amount" direction="in"/>
<arg type="s" name="description" direction="in"/>
<arg type="(ts(ss)sxaxsxs)" name="request" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Requests">
<arg type="s" name="account" direction="in"/>
<arg type="a(ts(ss)sxaxsxs)" name="requests" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="RevokeRequest">
<arg type="s" name="account" direction="in"/>
<arg type="t" name="id" direction="in"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="IncomingRequests">
<arg type="s" name="account" direction="in"/>
<arg type="a(tss(ss)sxsx)" name="requests" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="RespondToRequest">
<arg type="s" name="account" direction="in"/>
<arg type="t" name="id" direction="in"/>
<arg type="b" name="accept" direction="in"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="ScheduledPayments">
<arg type="s" name="account" direction="in"/>
<arg type="a(t(ss)sxs(xaxsusax))" name="scheduled" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="CancelScheduledPayment">
<arg type="s" name="account" direction="in"/>
<arg type="t" name="id" direction="in"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Draft">
<arg type="s" name="account" direction="in"/>
<arg type="s" name="to" direction="in"/>
<arg type="s" name="name" direction="in"/>
<arg type="x" name="amount" direction="in"/>
<arg type="s" name="description" direction="in"/>
<arg type="t" name="id" direction="out"/>
<arg type="s" name="currency" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="DraftPayments">
<arg type="s" name="account" direction="in"/>
<arg type="a(tssa((ss)sxs)s)" name="drafts" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="RespondToDraftPayment">
<arg type="s" name="account" direction="in"/>
<arg type="t" name="id" direction="in"/>
<arg type="b" name="accept" direction="in"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="Cards">
<arg type="a(ssa(tsssssssss))" name="connectors" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="SetCardStatus">
<arg type="t" name="card" direction="in"/>
<arg type="s" name="status" direction="in"/>
<arg type="(tsssssssss)" name="updated" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="DefaultCheckoutAccount">
<arg type="a(ssssx)" name="account" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
<method name="SetDefaultCheckoutAccount">
<arg type="s" name="account" direction="in"/>
<arg type="(ssssx)" name="chosen" direction="out"/>
<arg type="as" name="notes" direction="out"/>
</method>
</interface>
</node>