Liking cljdoc? Tell your friends :D

monero-store.collect.wallet

The chain wallet as a port, plus the adapters that need no SDK.

Callers above this namespace see schema/Subaddress and schema/WalletObservation — never a gateway's JSON, never a wallet library's types. Two concrete adapters live here (MoneroPay over HTTP, and a fake); the monero-wallet-rpc adapter needs a Java SDK and lives behind its own alias in adapters/monero-rpc.

The chain wallet as a port, plus the adapters that need no SDK.

Callers above this namespace see `schema/Subaddress` and
`schema/WalletObservation` — never a gateway's JSON, never a wallet library's
types. Two concrete adapters live here (MoneroPay over HTTP, and a fake); the
monero-wallet-rpc adapter needs a Java SDK and lives behind its own alias in
`adapters/monero-rpc`.
raw docstring

callback-tokenclj

(callback-token secret invoice-id)

The token that belongs in the callback URL for invoice-id.

The token that belongs in the callback URL for `invoice-id`.
sourceraw docstring

credit!clj

(credit! wallet address amount)
(credit! wallet
         address
         amount
         {:keys [confirmations locked? double-spend? tx-hash]
          :or {confirmations 10 locked? false double-spend? false}})

Add an incoming transfer of amount to address on a fake wallet.

Add an incoming transfer of `amount` to `address` on a fake wallet.
sourceraw docstring

fake-walletclj

(fake-wallet)
(fake-wallet {:keys [prefix] :or {prefix "fake"}})

IChainWallet over an atom. Development, tests, and demos.

credit! is how money 'arrives': it appends a transfer to whatever the wallet reports for that address, so the whole settlement path can be driven from a REPL without a daemon, a gateway, or a coin.

IChainWallet over an atom. Development, tests, and demos.

`credit!` is how money 'arrives': it appends a transfer to whatever the
wallet reports for that address, so the whole settlement path can be driven
from a REPL without a daemon, a gateway, or a coin.
sourceraw docstring

IChainWalletcljprotocol

observeclj

(observe this address)

Incoming transfers the wallet has seen for address.

Returns a WalletObservation, or nil when the wallet cannot report on the address — no observation is no evidence, which is not the same as zero.

Incoming transfers the wallet has seen for `address`.

Returns a WalletObservation, or nil when the wallet cannot report on the
address — no observation is no evidence, which is not the same as zero.

open-address!clj

(open-address! this opening)

Open a fresh receiving address for one invoice. Returns a Subaddress.

opening is {:opening/label :opening/amount :opening/callback-url}. A wallet the store runs itself needs only the label; a gateway that watches on the store's behalf needs the amount to know what covers the invoice, and the callback URL to say so early.

Open a fresh receiving address for one invoice. Returns a Subaddress.

`opening` is {:opening/label :opening/amount :opening/callback-url}. A
wallet the store runs itself needs only the label; a gateway that watches
on the store's behalf needs the amount to know what covers the invoice, and
the callback URL to say so early.
source

moneropay-observationclj

(moneropay-observation address payload)

Normalize a MoneroPay receive body into a WalletObservation.

Handles both shapes the gateway emits: transactions on a read, and a singular transaction on a callback.

Normalize a MoneroPay receive body into a WalletObservation.

Handles both shapes the gateway emits: `transactions` on a read, and a
singular `transaction` on a callback.
sourceraw docstring

moneropay-walletclj

(moneropay-wallet {:keys [client base-url]
                   :or {base-url "http://moneropay:5000"}})

IChainWallet over a MoneroPay instance.

MoneroPay assigns one subaddress per expected amount and posts a callback when it sees money — with no signature of any kind. So the callback body is never evidence here: it is a prompt to re-read /receive/{address}, which is what observe does and what the rail above settles from.

IChainWallet over a MoneroPay instance.

MoneroPay assigns one subaddress per expected amount and posts a callback
when it sees money — with no signature of any kind. So the callback body is
never evidence here: it is a prompt to re-read `/receive/{address}`, which is
what `observe` does and what the rail above settles from.
sourceraw docstring

token-valid?clj

(token-valid? secret invoice-id presented)

True when presented is the token for invoice-id. Constant time.

A blank secret accepts nothing: a check that fails open is not a check.

True when `presented` is the token for `invoice-id`. Constant time.

A blank secret accepts nothing: a check that fails open is not a check.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close