2020-04-07 12:17:44 +03:00
|
|
|
from dataclasses import dataclass
|
2021-03-10 05:27:27 +03:00
|
|
|
|
2020-07-13 19:40:32 +03:00
|
|
|
from blspy import G1Element
|
2020-04-07 12:17:44 +03:00
|
|
|
|
2021-02-16 12:15:24 +03:00
|
|
|
from src.types.blockchain_format.sized_bytes import bytes32
|
2020-04-07 12:17:44 +03:00
|
|
|
from src.util.ints import uint32
|
2021-03-10 05:27:27 +03:00
|
|
|
from src.util.streamable import Streamable, streamable
|
2020-04-07 12:17:44 +03:00
|
|
|
from src.wallet.util.wallet_types import WalletType
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
|
|
@streamable
|
|
|
|
class DerivationRecord(Streamable):
|
|
|
|
"""
|
|
|
|
These are records representing a puzzle hash, which is generated from a
|
|
|
|
public key, derivation index, and wallet type. Stored in the puzzle_store.
|
|
|
|
"""
|
|
|
|
|
|
|
|
index: uint32
|
|
|
|
puzzle_hash: bytes32
|
2020-07-13 19:40:32 +03:00
|
|
|
pubkey: G1Element
|
2020-04-07 12:17:44 +03:00
|
|
|
wallet_type: WalletType
|
|
|
|
wallet_id: uint32
|