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
|
||||
https://groups.google.com/g/bitcoindev/c/5NgJbpVDgEc/m/TtGK9sF9BgAJ
|
||||
https://github.com/bitcoin/bips/pull/1951
|
||||
Version: 0.1.1
|
||||
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.
|
||||
|
||||
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
|
||||
descriptor set for new address generation.
|
||||
|
||||
`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
|
||||
lower bound for when the descriptor set may have received funds. Importing
|
||||
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
|
||||
|
||||
@@ -519,12 +524,15 @@ optional metadata fields:
|
||||
If optional boolean `archived` is `true`, importing wallets SHOULD NOT use the
|
||||
policy for new address generation.
|
||||
|
||||
`range` is an optional two-element array `[start, end]`, inclusive, describing the
|
||||
ranged derivation indexes covered by the policy.
|
||||
`range` is an optional two-element array `[start, end]`, inclusive, describing
|
||||
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
|
||||
bound for when the policy may have received funds. Importing 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.
|
||||
|
||||
##### 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
|
||||
also to @murchandamus, @jonatack, @craigraw, @jp1ac4, and @torkelrogstad for
|
||||
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