You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository provides detailed information on the core structure and behavior of each major component in the system.
5
5
6
6
If you're just getting started or looking to understand specific internals, here's a quick breakdown of the available documentation files:
@@ -9,13 +9,13 @@ If you're just getting started or looking to understand specific internals, here
9
9
10
10
## 🔹 [`Block`](./Block.md)
11
11
12
-
This file explains everything about individual blocks within the TinyChain.
12
+
This file explains everything about individual blocks within the TinyChain.
13
13
It covers how blocks are created, mined, validated, and how transaction IDs are generated and managed.
14
14
15
-
> **Includes:**
16
-
> - Mining logic
17
-
> - Transaction indexing
18
-
> - Data serialization
15
+
> **Includes:**
16
+
> - Mining logic
17
+
> - Transaction indexing
18
+
> - Data serialization
19
19
> - Cryptographic helpers
20
20
21
21
Use this file when you're working with block-level operations or modifying how transactions are stored and processed inside a block.
@@ -24,14 +24,14 @@ Use this file when you're working with block-level operations or modifying how t
24
24
25
25
## 🔸 [`Instance`](./Instance.md)
26
26
27
-
This is the heart of the chain – the instance that controls everything.
27
+
This is the heart of the chain – the instance that controls everything.
28
28
The `Instance.md` covers the full lifecycle of the TinyChain instance, including how chains are created, validated, forked, and how consensus is managed.
29
29
30
-
> **Includes:**
31
-
> - Chain state and structure
32
-
> - Import/export
33
-
> - Validation process
34
-
> - Fork handling
30
+
> **Includes:**
31
+
> - Chain state and structure
32
+
> - Import/export
33
+
> - Validation process
34
+
> - Fork handling
35
35
> - Gas and fee behavior
36
36
37
37
Refer to this file if you're implementing node behavior or syncing with other chains.
@@ -40,25 +40,62 @@ Refer to this file if you're implementing node behavior or syncing with other ch
40
40
41
41
## 🎯 [`Events`](./Events.md)
42
42
43
-
Want to listen for events like mining success, forks, or new transactions?
43
+
Want to listen for events like mining success, forks, or new transactions?
44
44
This file lists all the available **event names** you can use with your chain or block listeners.
45
45
46
-
> **Includes:**
47
-
> - Event naming conventions
48
-
> - When events are emitted
46
+
> **Includes:**
47
+
> - Event naming conventions
48
+
> - When events are emitted
49
49
> - Typical payloads
50
50
51
51
---
52
52
53
+
## 🔐 [`Secp256k1`](./Secp256k1/README.md)
54
+
55
+
Covers the generic elliptic curve cryptography used in TinyChain.
56
+
This is the base implementation shared by other curve wrappers like Bitcoin and Ethereum.
57
+
58
+
> **Includes:**
59
+
> - Key pair management
60
+
> - Public/private key access
61
+
> - Message signing and recovery
62
+
63
+
---
64
+
65
+
## 🪙 [`Secp256k1 - BTC`](./Secp256k1/Btc.md)
66
+
67
+
Bitcoin-style cryptography and address handling.
68
+
Extends the base secp256k1 with functions specific to Bitcoin, including `Hash160` and address checksum logic.
69
+
70
+
> **Includes:**
71
+
> - BTC address generation
72
+
> - Signature formatting
73
+
> - Base58Check support
74
+
75
+
---
76
+
77
+
## 🦊 [`Secp256k1 - ETH`](./Secp256k1/Eth.md)
78
+
79
+
Ethereum-specific cryptographic logic.
80
+
Supports `keccak256`, Ethereum signature prefixing, and checksum validation.
81
+
82
+
> **Includes:**
83
+
> - Ethereum message signing
84
+
> - Address derivation
85
+
> - Checksum-based validation
86
+
87
+
---
88
+
53
89
## 📚 How to Use This
54
90
55
-
If you're working with block internals → start with [`Block`](./Block.md).
56
-
If you're managing or extending the blockchain as a whole → check [`Instance`](./Instance.md).
91
+
If you're working with block internals → start with [`Block`](./Block.md).
92
+
If you're managing or extending the blockchain as a whole → check [`Instance`](./Instance.md).
57
93
And for anything that involves event hooks and listeners → open [`Events`](./Events.md).
94
+
To implement or customize cryptography → explore [`Secp256k1`](./Secp256k1/README.md), [`BTC`](./Secp256k1/Btc.md), or [`ETH`](./Secp256k1/Eth.md).
58
95
59
96
---
60
97
61
-
Feel free to explore, extend, and fork the system!
98
+
Feel free to explore, extend, and fork the system!
# 📘 `TinyBtcSecp256k1` – Bitcoin Key & Address Toolkit Built on `TinySecp256k1`
2
+
3
+
`TinyBtcSecp256k1` is an advanced Bitcoin-oriented wrapper class built on top of the generic `TinySecp256k1`. It enables easy management of private/public keys and address generation for Bitcoin (`p2pkh`, `bech32`) using the `secp256k1` elliptic curve. It supports lazy-loaded modules like `bech32` and `bs58check`, ensuring lightweight usage.
0 commit comments