mirror of
https://github.com/bitcoin/bips.git
synced 2026-10-19 19:29:18 +00:00
Merge pull request #2298 from Sjors/2026/09/bip138-metadata
bip138: clarify receive-only descriptor set, 0 birth time, and BIP32 range
This commit is contained in:
24
bip-0138.md
24
bip-0138.md
@@ -10,6 +10,7 @@
|
|||||||
Discussion: https://delvingbitcoin.org/t/a-simple-backup-scheme-for-wallet-accounts/1607
|
Discussion: https://delvingbitcoin.org/t/a-simple-backup-scheme-for-wallet-accounts/1607
|
||||||
https://groups.google.com/g/bitcoindev/c/5NgJbpVDgEc/m/TtGK9sF9BgAJ
|
https://groups.google.com/g/bitcoindev/c/5NgJbpVDgEc/m/TtGK9sF9BgAJ
|
||||||
https://github.com/bitcoin/bips/pull/1951
|
https://github.com/bitcoin/bips/pull/1951
|
||||||
|
Version: 0.1.1
|
||||||
Requires: 32, 340, 380, 388, 389
|
Requires: 32, 340, 380, 388, 389
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -473,17 +474,21 @@ For BIP389 multipath descriptors, `/<0;1>` means receive and change,
|
|||||||
respectively. The `change_descriptor` field MUST NOT be used.
|
respectively. The `change_descriptor` field MUST NOT be used.
|
||||||
|
|
||||||
For descriptors without BIP389 multipath key expressions, `descriptor` is the
|
For descriptors without BIP389 multipath key expressions, `descriptor` is the
|
||||||
receive descriptor and `change_descriptor` is the change descriptor.
|
receive descriptor. The optional `change_descriptor` string can be omitted for a
|
||||||
|
receive-only set.
|
||||||
|
|
||||||
If optional boolean `archived` is `true`, importing wallets SHOULD NOT use the
|
If optional boolean `archived` is `true`, importing wallets SHOULD NOT use the
|
||||||
descriptor set for new address generation.
|
descriptor set for new address generation.
|
||||||
|
|
||||||
`range` is an optional two-element array `[start, end]`, inclusive, describing
|
`range` is an optional two-element array `[start, end]`, inclusive, describing
|
||||||
the ranged derivation indexes covered by the descriptor set.
|
the [BIP32](bip-0032.mediawiki) non-hardened child indexes covered by the
|
||||||
|
descriptor set, with `start <= end`.
|
||||||
|
|
||||||
`birth_time` is an optional integer Unix timestamp in seconds, indicating a
|
`birth_time` is an optional integer Unix timestamp in seconds, indicating a
|
||||||
lower bound for when the descriptor set may have received funds. Importing
|
lower bound for when the descriptor set may have received funds. Importing
|
||||||
wallets MAY use this value as a scanning hint.
|
wallets MAY use this value as a scanning hint.
|
||||||
|
If `0` or omitted, no lower bound is known. Importers SHOULD scan from the wallet
|
||||||
|
birthday if known, otherwise from genesis.
|
||||||
|
|
||||||
#### BIP388 Wallet Policy Backup Content
|
#### BIP388 Wallet Policy Backup Content
|
||||||
|
|
||||||
@@ -519,12 +524,15 @@ optional metadata fields:
|
|||||||
If optional boolean `archived` is `true`, importing wallets SHOULD NOT use the
|
If optional boolean `archived` is `true`, importing wallets SHOULD NOT use the
|
||||||
policy for new address generation.
|
policy for new address generation.
|
||||||
|
|
||||||
`range` is an optional two-element array `[start, end]`, inclusive, describing the
|
`range` is an optional two-element array `[start, end]`, inclusive, describing
|
||||||
ranged derivation indexes covered by the policy.
|
the [BIP32](bip-0032.mediawiki) non-hardened child indexes covered by the
|
||||||
|
policy, with `start <= end`.
|
||||||
|
|
||||||
`birth_time` is an optional integer Unix timestamp in seconds, indicating a lower
|
`birth_time` is an optional integer Unix timestamp in seconds, indicating a lower
|
||||||
bound for when the policy may have received funds. Importing wallets MAY use this
|
bound for when the policy may have received funds. Importing wallets MAY use this
|
||||||
value as a scanning hint.
|
value as a scanning hint.
|
||||||
|
If `0` or omitted, no lower bound is known. Importers SHOULD scan from the wallet
|
||||||
|
birthday if known, otherwise from genesis.
|
||||||
|
|
||||||
##### Multiple Policies Document
|
##### Multiple Policies Document
|
||||||
|
|
||||||
@@ -617,3 +625,11 @@ Thanks to @Sjors for extensive reviews, many design contributions to the payload
|
|||||||
encoding, and a proof-of-concept implementation on top of Bitcoin Core. Thanks
|
encoding, and a proof-of-concept implementation on top of Bitcoin Core. Thanks
|
||||||
also to @murchandamus, @jonatack, @craigraw, @jp1ac4, and @torkelrogstad for
|
also to @murchandamus, @jonatack, @craigraw, @jp1ac4, and @torkelrogstad for
|
||||||
their reviews and suggestions.
|
their reviews and suggestions.
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
* __0.1.1__ (2026-09-23):
|
||||||
|
* Clarify derivation range bounds and zero or omitted birth-time semantics for descriptors and policies.
|
||||||
|
* Clarify receive-only descriptor sets and add a corresponding test vector.
|
||||||
|
* __0.1.0__ (2026-09-21):
|
||||||
|
* Initial publication.
|
||||||
|
|||||||
@@ -29,5 +29,17 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Receive-only descriptor set without optional metadata",
|
||||||
|
"valid": true,
|
||||||
|
"document": {
|
||||||
|
"version": 1,
|
||||||
|
"descriptor_sets": [
|
||||||
|
{
|
||||||
|
"descriptor": "wpkh([d34db33f/84h/1h/0h]tpubDC5FSnBiZDMmhiuCmWAYsLwgLYrrT9rAqvTySfuCCrgsWz8wxMXUS9Tb9iVMvcRbvFcAHGkMD5Kx8koh4GquNGNTfohfk7pgjhaPCdXpoba/0/*)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user