Skip to content

Commit e712e99

Browse files
committed
more fiat and edits
1 parent 71ac992 commit e712e99

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

bip-0329.mediawiki

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,38 +146,45 @@ wallet generating the export, and yet would be hard or impossible
146146
for importing tools to reconstruct.
147147

148148
All of the following values are optional for exporter to provide,
149-
but should be given if they are readily on-hand.
149+
but should be given if they are readily available.
150150

151151
=== Transactions ===
152152

153-
* `height`: an integer giving the block height where this fully-confirmed transaction can be found.
154-
Omit for transactions that are confirmed by less than 6 blocks, or use value zero.
153+
* <tt>height</tt>: An integer giving the block height where this fully-confirmed transaction can be found. Omit for transactions that are confirmed by less than 6 blocks, or use value zero.
155154
156-
* `time`: ISO-8601 formated timestamp of the block given by height, preferably in UTC.
157-
Example: `2025-01-23T11:40:35-05:00`.
155+
* <tt>time</tt>: ISO-8601 formatted timestamp of the block given by height, preferably in UTC, although ISO-8601 can represent local times. Example: <tt>2025-01-23T11:40:35-05:00</tt>.
158156
159-
* `fee`: integer giving the number of Satoshis that went to the miner for this transaction.
157+
* <tt>fee</tt>: Integer giving the number of Satoshis that went to the miner for this transaction.
158+
159+
* <tt>rate</tt>: Exchange rate at time of transaction. This is the fiat value of a Bitcoin at the time of the transaction, based on user preferences for data source. Example: <tt>"rate": { "USD": 105620.00 }</tt>
160160
161161
=== Address, Inputs, and Outputs ===
162162

163-
* `keypath`: the data needed to build full descriptor down to the specific address.
164-
This extends `origin` with the final two components are are unhardened (in the typical case,
165-
assuming BIP-84). Provide string `/1/123` for `wpkh([d34db33f/84'/0'/0'/1/123])`. If
166-
the first character is not `/`, then it should be interpreted as a full descriptior,
167-
independant of `origin` (if any).
163+
* <tt>keypath</tt>: The data needed to build full descriptor down to the specific address. This extends <tt>origin</tt> with the final two components are are unhardened (in the typical case, assuming BIP-84). Provide string <tt>/1/123</tt> for <tt>wpkh([d34db33f/84'/0'/0'/1/123])</tt>. If the first character is not <tt>/</tt>, then it should be interpreted as a full descriptor, independant of <tt>origin</tt> (if any).
168164
169165
=== Inputs, and Outputs ===
170166

171-
* `value`: integer with the number of Satoshis (`nValue`) of the input or output.
167+
* <tt>value</tt>: Integer with the number of Satoshis (<tt>nValue</tt>) of the input or output.
168+
169+
* <tt>fmv</tt>: Fair market value of the input/output relative to some other currency, typically fiat. The value should be a mapping, from currency code to decimal number. Example: <tt>"fmv": { "USD": 1233.45 }</tt>. Most situations will have only a single currency value, and it represents the real price of the goods/services expressed in some fiat currency. This is not an exchange *rate*, but an absolute value. By dividing by the <tt>value</tt> (above), it is possible to calculate an effective change rate for the transaction.
170+
172171

173172
=== Address ===
174173

175-
* `heights`: a list of block heights which contain inputs which deposit to the address.
174+
* <tt>heights</tt>: a list of block heights which contain inputs which deposit to the address.
175+
176+
== Comment on Types in JSON ==
176177

178+
JSON can serialize a number of basic types, including string, integer
179+
and boolean (true/false). Decimal values (<tt>123.45</tt>) can
180+
also be serialized, but some parsing libraries may interpret them as floating
181+
point values which is generally not what we want in financial applications.
182+
When hand-crafting JSON data, be careful not to write <tt>"false"</tt> (with quotes),
183+
since that is a string with 5 characters and not a boolean.
177184

178185
==Reference Implementation==
179186

180-
TBD
187+
* [https://github.com/Labelbase/python-bip329 Python-BIP329 package]
181188
182189
==References==
183190

0 commit comments

Comments
 (0)