@bsv/sdk 1.6.11 → 1.6.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/package.json +1 -1
  3. package/dist/cjs/src/transaction/broadcasters/DefaultBroadcaster.js +1 -1
  4. package/dist/cjs/src/transaction/broadcasters/DefaultBroadcaster.js.map +1 -1
  5. package/dist/cjs/src/wallet/WalletClient.js +1 -0
  6. package/dist/cjs/src/wallet/WalletClient.js.map +1 -1
  7. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  8. package/dist/esm/src/transaction/broadcasters/DefaultBroadcaster.js +1 -1
  9. package/dist/esm/src/transaction/broadcasters/DefaultBroadcaster.js.map +1 -1
  10. package/dist/esm/src/wallet/WalletClient.js +1 -0
  11. package/dist/esm/src/wallet/WalletClient.js.map +1 -1
  12. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  13. package/dist/types/src/wallet/WalletClient.d.ts.map +1 -1
  14. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  15. package/dist/umd/bundle.js +1 -1
  16. package/docs/MARKDOWN_VALIDATION_GUIDE.md +175 -0
  17. package/docs/concepts/beef.md +8 -0
  18. package/docs/concepts/chain-tracking.md +12 -0
  19. package/docs/concepts/decentralized-identity.md +37 -0
  20. package/docs/concepts/fees.md +32 -0
  21. package/docs/concepts/identity-certificates.md +53 -1
  22. package/docs/concepts/index.md +15 -0
  23. package/docs/concepts/key-management.md +9 -0
  24. package/docs/concepts/script-templates.md +13 -0
  25. package/docs/concepts/sdk-philosophy.md +8 -0
  26. package/docs/concepts/signatures.md +15 -0
  27. package/docs/concepts/spv-verification.md +12 -0
  28. package/docs/concepts/transaction-encoding.md +19 -0
  29. package/docs/concepts/transaction-structure.md +4 -0
  30. package/docs/concepts/trust-model.md +16 -0
  31. package/docs/concepts/verification.md +31 -0
  32. package/docs/concepts/wallet-integration.md +6 -0
  33. package/docs/guides/development-wallet-setup.md +374 -0
  34. package/docs/guides/direct-transaction-creation.md +12 -2
  35. package/docs/guides/http-client-configuration.md +122 -48
  36. package/docs/guides/index.md +117 -9
  37. package/docs/guides/large-transactions.md +448 -0
  38. package/docs/guides/multisig-transactions.md +792 -0
  39. package/docs/guides/security-best-practices.md +494 -0
  40. package/docs/guides/transaction-batching.md +132 -0
  41. package/docs/guides/transaction-signing-methods.md +230 -79
  42. package/docs/index.md +0 -2
  43. package/docs/reference/auth.md +212 -159
  44. package/docs/reference/compat.md +120 -96
  45. package/docs/reference/configuration.md +6 -0
  46. package/docs/reference/debugging.md +5 -0
  47. package/docs/reference/errors.md +50 -0
  48. package/docs/reference/identity.md +21 -12
  49. package/docs/reference/index.md +14 -1
  50. package/docs/reference/kvstore.md +21 -19
  51. package/docs/reference/messages.md +3 -0
  52. package/docs/reference/op-codes.md +20 -1
  53. package/docs/reference/overlay-tools.md +46 -18
  54. package/docs/reference/primitives.md +571 -390
  55. package/docs/reference/registry.md +43 -20
  56. package/docs/reference/script.md +140 -105
  57. package/docs/reference/storage.md +32 -12
  58. package/docs/reference/totp.md +16 -11
  59. package/docs/reference/transaction-signatures.md +2 -1
  60. package/docs/reference/transaction.md +201 -120
  61. package/docs/reference/wallet.md +241 -64
  62. package/docs/tutorials/advanced-transaction.md +1 -4
  63. package/docs/tutorials/aes-encryption.md +3 -1
  64. package/docs/tutorials/authfetch-tutorial.md +29 -0
  65. package/docs/tutorials/ecdh-key-exchange.md +2 -0
  66. package/docs/tutorials/elliptic-curve-fundamentals.md +3 -0
  67. package/docs/tutorials/error-handling.md +1 -0
  68. package/docs/tutorials/first-transaction-low-level.md +1 -0
  69. package/docs/tutorials/first-transaction.md +5 -8
  70. package/docs/tutorials/hashes-and-hmacs.md +5 -31
  71. package/docs/tutorials/identity-management.md +27 -0
  72. package/docs/tutorials/index.md +114 -77
  73. package/docs/tutorials/key-management.md +5 -3
  74. package/docs/tutorials/protowallet-development.md +27 -0
  75. package/docs/tutorials/spv-merkle-proofs.md +9 -6
  76. package/docs/tutorials/testnet-transactions-low-level.md +25 -18
  77. package/docs/tutorials/transaction-broadcasting.md +10 -7
  78. package/docs/tutorials/transaction-types.md +5 -4
  79. package/docs/tutorials/type-42.md +0 -14
  80. package/docs/tutorials/uhrp-storage.md +23 -3
  81. package/package.json +1 -1
  82. package/src/identity/README.md +0 -1
  83. package/src/primitives/__tests/SymmetricKey.test.ts +45 -0
  84. package/src/primitives/__tests/SymmetricKeyCompatibility.test.ts +150 -0
  85. package/src/transaction/__tests/Transaction.test.ts +1 -1
  86. package/src/transaction/broadcasters/DefaultBroadcaster.ts +1 -1
  87. package/src/transaction/broadcasters/__tests/ARC.test.ts +1 -1
  88. package/src/wallet/WalletClient.ts +1 -0
@@ -2,6 +2,7 @@
2
2
  **Prerequisites**: Completed "Transaction Types and Data" tutorial, Node.js, basic TypeScript knowledge
3
3
 
4
4
  ## Learning Goals
5
+
5
6
  - Master multi-input/multi-output transaction construction
6
7
  - Implement advanced fee calculation and optimization strategies
7
8
  - Handle change outputs efficiently
@@ -449,7 +450,6 @@ async function createTransactionChain() {
449
450
  createTransactionChain().catch(console.error)
450
451
  ```
451
452
 
452
-
453
453
  ## Performance Optimization Strategies
454
454
 
455
455
  For high-throughput applications, consider these optimization techniques:
@@ -546,8 +546,6 @@ async function optimizedTransactionPatterns() {
546
546
  optimizedTransactionPatterns().catch(console.error)
547
547
  ```
548
548
 
549
-
550
-
551
549
  ## Conclusion
552
550
 
553
551
  You've now mastered advanced transaction construction with the BSV TypeScript SDK's `WalletClient`. You can:
@@ -567,7 +565,6 @@ These techniques enable you to build production-ready applications that efficien
567
565
 
568
566
  - Advanced transaction construction requires robust error handling for production applications. For comprehensive coverage of error handling patterns, retry mechanisms, and recovery strategies, see the dedicated [Error Handling Tutorial](./error-handling.md).
569
567
 
570
-
571
568
  ## Additional Resources
572
569
 
573
570
  - [Wallet Reference](../reference/wallet.md)
@@ -17,6 +17,7 @@
17
17
  Advanced Encryption Standard (AES) is a symmetric encryption algorithm where the same key is used for both encryption and decryption. The BSV TypeScript SDK provides the `SymmetricKey` class that implements AES-GCM (Galois/Counter Mode), which provides both confidentiality and authenticity.
18
18
 
19
19
  AES-GCM offers several advantages:
20
+
20
21
  - **Confidentiality**: Data is encrypted and unreadable without the key
21
22
  - **Authenticity**: Built-in authentication prevents tampering
22
23
  - **Performance**: Fast encryption/decryption operations
@@ -127,11 +128,13 @@ console.log('SDK decrypted from hex:', sdkDecryptedMessage)
127
128
  The `enc` parameter in the SDK's `encrypt()` and `decrypt()` methods can be confusing. Here's how it actually works:
128
129
 
129
130
  **In `encrypt(data, enc)`:**
131
+
130
132
  - `enc` specifies how to **interpret the input data**
131
133
  - `enc: 'hex'` means the input data is a hex string that should be converted to bytes
132
134
  - The output format is determined by the `enc` parameter (hex string if `enc: 'hex'`, byte array otherwise)
133
135
 
134
136
  **In `decrypt(data, enc)`:**
137
+
135
138
  - `enc` specifies the **output format**
136
139
  - `enc: 'hex'` returns the decrypted data as a hex string
137
140
  - `enc: 'utf8'` returns the decrypted data as a UTF-8 string
@@ -153,7 +156,6 @@ const finalMessage = Buffer.from(decryptedHex, 'hex').toString('utf8')
153
156
  console.log('Final message:', finalMessage) // 'Hello, World!'
154
157
  ```
155
158
 
156
-
157
159
  ## Complete Encryption Example
158
160
 
159
161
  Here's a comprehensive example demonstrating the full encryption workflow:
@@ -3,6 +3,7 @@
3
3
  **Duration**: 60 minutes
4
4
  **Prerequisites**: Node.js, basic TypeScript knowledge, understanding of HTTP and authentication
5
5
  **Learning Goals**:
6
+
6
7
  - Understand BRC-103/104 authentication protocols
7
8
  - Implement authenticated HTTP requests with AuthFetch
8
9
  - Handle peer-to-peer authentication and certificate exchange
@@ -11,6 +12,7 @@
11
12
  ## When to Use AuthFetch
12
13
 
13
14
  **Use AuthFetch when you need:**
15
+
14
16
  - BRC-103/104 cryptographic authentication
15
17
  - Wallet-signed HTTP requests for identity verification
16
18
  - Certificate-based peer authentication
@@ -18,6 +20,7 @@
18
20
  - APIs that require cryptographic proof of identity
19
21
 
20
22
  **For general HTTP client configuration, use [HTTP Client Configuration Guide](../guides/http-client-configuration.md) instead:**
23
+
21
24
  - Custom HTTP client setup (Axios, fetch, etc.)
22
25
  - Transaction broadcasting via ARC endpoints
23
26
  - Environment-specific configuration (timeouts, retries)
@@ -39,6 +42,7 @@ AuthFetch is a specialized HTTP client that implements BRC-103 and BRC-104 authe
39
42
  ## What You'll Build
40
43
 
41
44
  In this tutorial, you'll create:
45
+
42
46
  - Basic authenticated HTTP client
43
47
  - Peer-to-peer communication system
44
48
  - Certificate exchange mechanism
@@ -955,3 +959,28 @@ async function demonstrateErrorHandling() {
955
959
  }
956
960
 
957
961
  demonstrateErrorHandling().catch(console.error)
962
+ ```
963
+
964
+ ## Conclusion
965
+
966
+ Congratulations! You've successfully implemented a comprehensive authenticated communication system using the BSV TypeScript SDK. In this tutorial, you've learned how to:
967
+
968
+ ### Core Concepts Mastered
969
+
970
+ 1. **AuthFetch Integration**: Implemented authentication using identity-based signing
971
+ 2. **Certificate Management**: Created and managed identity certificates for secure communication
972
+ 3. **Request Signing**: Automatically signed requests with proper identity validation
973
+ 4. **Error Handling**: Built robust error handling for authentication failures
974
+ 5. **Network Resilience**: Implemented retry logic and connectivity testing
975
+
976
+ ## Next Steps
977
+
978
+ - Learn about [Identity Management](./identity-management.md) for advanced identity workflows
979
+ - Explore [Authenticated API Communication](../guides/authenticated-api-communication.md) for server-side implementation
980
+ - Understand [Security Best Practices](../guides/security-best-practices.md) for production deployments
981
+
982
+ ## Additional Resources
983
+
984
+ - [AuthFetch API Reference](../reference/auth.md)
985
+ - [Identity Client Documentation](../reference/identity.md)
986
+ - [BSV Identity Protocols](https://projectbabbage.com/docs/guides/identity)
@@ -4,6 +4,7 @@
4
4
  **Prerequisites**: Basic TypeScript knowledge, [Elliptic Curve Fundamentals](./elliptic-curve-fundamentals.md) tutorial completed
5
5
 
6
6
  ## Learning Goals
7
+
7
8
  - Understand Elliptic Curve Diffie-Hellman (ECDH) key exchange principles
8
9
  - Implement secure key exchange using the BSV TypeScript SDK
9
10
  - Create shared secrets for encrypted communication
@@ -15,6 +16,7 @@
15
16
  Elliptic Curve Diffie-Hellman (ECDH) is a key agreement protocol that allows two parties to establish a shared secret over an unsecured communication channel. Unlike traditional encryption where you need to share a secret key beforehand, ECDH allows two parties who have never met to create a shared secret that only they know.
16
17
 
17
18
  The mathematical foundation of ECDH relies on the commutative property of elliptic curve point multiplication:
19
+
18
20
  - Alice computes: `(Alice's private key) × (Bob's public key)`
19
21
  - Bob computes: `(Bob's private key) × (Alice's public key)`
20
22
  - Both arrive at the same shared secret point
@@ -6,6 +6,7 @@
6
6
  ## Learning Goals
7
7
 
8
8
  By the end of this tutorial, you will:
9
+
9
10
  - Understand the mathematical foundations of elliptic curves used in Bitcoin
10
11
  - Work with BigNumber for handling large integers in cryptographic operations
11
12
  - Manipulate elliptic curve points using the SDK
@@ -590,6 +591,7 @@ In this tutorial, you've learned:
590
591
  ### Next Steps
591
592
 
592
593
  Now that you understand elliptic curve fundamentals, you can explore:
594
+
593
595
  - **[ECDH Key Exchange](./ecdh-key-exchange.md)**: Implementing secure communication protocols
594
596
  - **[Signature Concepts](../concepts/signatures.md)**: Creating and verifying ECDSA signatures
595
597
  - **[Key Management](./key-management.md)**: Generating multiple keys from a master key
@@ -600,4 +602,5 @@ Understanding of `WalletClient` usage (for practical applications)
600
602
  While the `WalletClient` abstracts these operations for convenience, understanding the underlying mathematics helps you make informed decisions about security and implementation.
601
603
 
602
604
  ## Integration with `WalletClient`
605
+
603
606
  For production applications, the `WalletClient` provides secure key management:
@@ -439,6 +439,7 @@ robustTransactionCreation().catch(console.error)
439
439
  ```
440
440
 
441
441
  This example demonstrates:
442
+
442
443
  - **Specific error pattern matching** for different error types
443
444
  - **Dynamic amount adjustment** for insufficient funds
444
445
  - **Wallet synchronization handling** with appropriate delays
@@ -4,6 +4,7 @@
4
4
  **Prerequisites**: Node.js, basic TypeScript knowledge
5
5
 
6
6
  ## Learning Goals
7
+
7
8
  - Install and configure the BSV TypeScript SDK
8
9
  - Create a simple P2PKH transaction
9
10
  - Understand BSV transaction anatomy
@@ -4,6 +4,7 @@
4
4
  **Prerequisites**: Node.js, basic TypeScript knowledge
5
5
 
6
6
  ## Learning Goals
7
+
7
8
  - Install and configure the BSV TypeScript SDK
8
9
  - Create a simple transaction using `WalletClient` interface on the mainnet network. This approach makes it easy to build transactions by abstracting away many of the low-level details. By the end, you'll understand the basic components of a BSV transaction and how to construct, sign, and broadcast one on the BSV blockchain.
9
10
 
@@ -15,7 +16,7 @@ In this tutorial, you'll learn how to create your first Bitcoin SV transactions
15
16
 
16
17
  > **💡 Try It Interactive**: Want to experiment with the code examples from this tutorial? Check out our [Interactive BSV Coding Environment](https://fast.brc.dev/) where you can run SDK code directly in your browser without any setup!
17
18
 
18
- ## Precondition
19
+ ## Precondition
19
20
 
20
21
  Install a BRC-100 compliant wallet such as the [MetaNet Desktop Wallet](https://metanet.bsvb.tech/). When you install it, you'll receive a small amount of funds to play with.
21
22
 
@@ -118,8 +119,8 @@ Run it as follows:
118
119
  npx ts-node step1-simple-transaction.ts
119
120
  ```
120
121
 
121
-
122
122
  **What's happening here:**
123
+
123
124
  - We connect to your BRC-100 wallet (like MetaNet Desktop)
124
125
  - Create a transaction with one output containing "Hello BSV!" data
125
126
  - The wallet automatically handles inputs, change, and fees
@@ -161,7 +162,6 @@ async function createToken() {
161
162
  createToken().catch(console.error)
162
163
  ```
163
164
 
164
-
165
165
  Run it as follows:
166
166
 
167
167
  ```bash
@@ -169,8 +169,8 @@ Run it as follows:
169
169
  npx ts-node step2-create-token.ts
170
170
  ```
171
171
 
172
-
173
172
  **What's happening here:**
173
+
174
174
  - We create a minimal token (1 satoshi with OP_NOP script)
175
175
  - Store it in a wallet basket called 'my-tokens' for organization
176
176
  - This creates a spendable output we can use later
@@ -225,7 +225,6 @@ async function spendToken() {
225
225
  spendToken().catch(console.error)
226
226
  ```
227
227
 
228
-
229
228
  Run it as follows:
230
229
 
231
230
  ```bash
@@ -233,15 +232,13 @@ Run it as follows:
233
232
  npx ts-node step3-spend-token.ts
234
233
  ```
235
234
 
236
-
237
235
  **What's happening here:**
236
+
238
237
  - We list tokens from our 'my-tokens' basket
239
238
  - Spend the first available token by providing its outpoint
240
239
  - Create a new output with proof that we spent the token
241
240
  - The BEEF (Blockchain Exchange Format) provides the transaction history
242
241
 
243
-
244
-
245
242
  ## What You've Learned
246
243
 
247
244
  Congratulations! You've successfully created your first BSV transactions. Here's what you accomplished:
@@ -6,6 +6,7 @@
6
6
  ## Learning Goals
7
7
 
8
8
  By completing this tutorial, you will:
9
+
9
10
  - Understand cryptographic hash functions and their properties
10
11
  - Master the Hash module classes and helper functions in the BSV TypeScript SDK
11
12
  - Implement various hash algorithms (SHA-256, SHA-512, SHA-1, RIPEMD-160)
@@ -34,6 +35,7 @@ import { Hash, Utils } from '@bsv/sdk'
34
35
  ```
35
36
 
36
37
  The `Hash` module contains:
38
+
37
39
  - Hash function classes (`SHA256`, `SHA512`, `SHA1`, `RIPEMD160`)
38
40
  - HMAC classes (`SHA256HMAC`, `SHA512HMAC`, `SHA1HMAC`)
39
41
  - Helper functions (`sha256`, `sha512`, `hash256`, `hash160`, `sha256hmac`)
@@ -758,6 +760,7 @@ function efficientHashing(messages: string[]): string[] {
758
760
  This tutorial covered comprehensive usage of cryptographic hashing and HMACs in the BSV TypeScript SDK:
759
761
 
760
762
  **Key Concepts Learned:**
763
+
761
764
  - Hash function fundamentals and Bitcoin-specific applications
762
765
  - SHA-256, SHA-512, SHA-1, and RIPEMD-160 implementation
763
766
  - HMAC creation and verification for message authentication
@@ -766,6 +769,7 @@ This tutorial covered comprehensive usage of cryptographic hashing and HMACs in
766
769
  - Security best practices for key management and validation
767
770
 
768
771
  **Practical Applications:**
772
+
769
773
  - Data integrity verification systems
770
774
  - Message authentication protocols
771
775
  - Transaction metadata protection
@@ -773,6 +777,7 @@ This tutorial covered comprehensive usage of cryptographic hashing and HMACs in
773
777
  - Secure key derivation patterns
774
778
 
775
779
  **Security Considerations:**
780
+
776
781
  - Proper input validation and error handling
777
782
  - Constant-time comparison to prevent timing attacks
778
783
  - Secure key generation and storage practices
@@ -781,34 +786,3 @@ This tutorial covered comprehensive usage of cryptographic hashing and HMACs in
781
786
  The Hash module in the BSV TypeScript SDK provides both low-level control through classes and high-level convenience through helper functions, enabling developers to implement robust cryptographic solutions for Bitcoin applications.
782
787
 
783
788
  Continue exploring advanced cryptographic topics with the [ECDH Key Exchange](./ecdh-key-exchange.md) and [AES Symmetric Encryption](./aes-encryption.md) tutorials to build complete cryptographic systems.
784
-
785
- ```typescript
786
- // Example usage
787
- const metadataProtector = new SecureTransactionMetadata('user_password_123')
788
-
789
- const originalMetadata: TransactionMetadata = {
790
- description: 'Payment for services',
791
- category: 'business',
792
- tags: ['consulting', 'development'],
793
- amount: 100
794
- }
795
-
796
- const protectedData = metadataProtector.protectMetadata(originalMetadata)
797
- console.log('Protected metadata:', protectedData)
798
-
799
- const extracted = metadataProtector.verifyAndExtract(protectedData)
800
- console.log('Extracted metadata:', extracted)
801
- console.log('Metadata matches:', JSON.stringify(originalMetadata) === JSON.stringify(extracted))
802
- ```
803
-
804
- Follow these instructions to make the following change to my code document.
805
-
806
- Instruction: Update all occurrences of "WalletClient" to be formatted as inline code `WalletClient`, except in headers and when it appears in actual code blocks.
807
-
808
- Code Edit:
809
- ```typescript
810
- // Understanding of `WalletClient` usage (for practical applications)
811
- While the `WalletClient` provides high-level transaction operations, understanding hashes and HMACs enables you to build sophisticated cryptographic applications and secure data verification systems.
812
-
813
- ## Integration with `WalletClient`
814
- For production applications, the `WalletClient` provides secure hash operations:
@@ -3,6 +3,7 @@
3
3
  **Duration**: 90 minutes
4
4
  **Prerequisites**: Node.js, basic TypeScript knowledge, understanding of digital certificates
5
5
  **Learning Goals**:
6
+
6
7
  - Understand decentralized identity concepts
7
8
  - Use IdentityClient for certificate management
8
9
  - Implement identity verification systems
@@ -700,3 +701,29 @@ async function demonstrateVerificationService() {
700
701
  }
701
702
 
702
703
  demonstrateVerificationService().catch(console.error)
704
+ ```
705
+
706
+ ## Conclusion
707
+
708
+ Congratulations! You've successfully built a comprehensive identity management system using the BSV TypeScript SDK. In this tutorial, you've learned how to create, manage, and verify digital identities on the BSV blockchain.
709
+
710
+ ### Core Concepts Mastered
711
+
712
+ 1. **Identity Creation**: Generated unique BSV identities using cryptographic key pairs
713
+ 2. **Certificate Management**: Created and managed identity certificates for enhanced trust
714
+ 3. **Identity Resolution**: Implemented identity lookup and verification services
715
+ 4. **Trust Scoring**: Built systems to calculate and evaluate identity trustworthiness
716
+ 5. **Batch Processing**: Optimized identity operations for handling multiple identities efficiently
717
+
718
+ ## Next Steps
719
+
720
+ - Learn about [AuthFetch Integration](./authfetch-tutorial.md) to use identities for API authentication
721
+ - Explore [Identity Verification Systems](../guides/identity-verification-systems.md) for advanced verification patterns
722
+ - Understand [Security Best Practices](../guides/security-best-practices.md) for production identity systems
723
+
724
+ ## Additional Resources
725
+
726
+ - [Identity Client API Reference](../reference/identity.md)
727
+ - [Certificate Management Guide](../concepts/identity-certificates.md)
728
+ - [Decentralized Identity Concepts](../concepts/decentralized-identity.md)
729
+ - [BSV Identity Standards](https://projectbabbage.com/docs/guides/identity)
@@ -9,174 +9,211 @@ Before diving into the tutorials, you can experiment with many of these concepts
9
9
  ## Getting Started Track
10
10
 
11
11
  ### [Your First BSV Transaction](./first-transaction.md)
12
+
12
13
  - **Duration**: 30 minutes
13
14
  - **Prerequisites**: Node.js, basic TypeScript knowledge
14
15
  - **Learning Goals**:
15
- - Install and configure the SDK
16
- - Create a simple P2PKH transaction
17
- - Understand BSV transaction anatomy
16
+
17
+ - Install and configure the SDK
18
+ - Create a simple P2PKH transaction
19
+ - Understand BSV transaction anatomy
18
20
 
19
21
  ### [Transaction Types and Data](./transaction-types.md)
22
+
20
23
  - **Duration**: 30 minutes
21
24
  - **Prerequisites**: Completed "Your First BSV Transaction" tutorial
22
25
  - **Learning Goals**:
23
- - Create transactions with multiple outputs
24
- - Add data to transactions
25
- - Work with different output types
26
- - Use advanced `WalletClient` features
26
+
27
+ - Create transactions with multiple outputs
28
+ - Add data to transactions
29
+ - Work with different output types
30
+ - Use advanced `WalletClient` features
27
31
 
28
32
  ### [Key Management and Cryptography](./key-management.md)
33
+
29
34
  - **Duration**: 45 minutes
30
35
  - **Prerequisites**: Completed "Your First BSV Transaction" tutorial
31
36
  - **Learning Goals**:
32
- - Generate and manage private/public keys
33
- - Understand ECDSA signatures
34
- - Create and verify digital signatures
37
+
38
+ - Generate and manage private/public keys
39
+ - Understand ECDSA signatures
40
+ - Create and verify digital signatures
35
41
 
36
42
  ### [Transaction Broadcasting](./transaction-broadcasting.md)
43
+
37
44
  - **Duration**: 25 minutes
38
45
  - **Prerequisites**: Completed "Your First BSV Transaction" tutorial, Node.js, basic TypeScript knowledge
39
46
  - **Learning Goals**:
40
- - Understand `WalletClient` vs direct broadcasting approaches
41
- - Configure broadcasting for testnet vs mainnet
42
- - Implement custom broadcasters (ARC, WhatsOnChain)
43
- - Handle broadcasting errors and implement retry logic
44
- - Monitor and verify transaction acceptance
47
+
48
+ - Understand `WalletClient` vs direct broadcasting approaches
49
+ - Configure broadcasting for testnet vs mainnet
50
+ - Implement custom broadcasters (ARC, WhatsOnChain)
51
+ - Handle broadcasting errors and implement retry logic
52
+ - Monitor and verify transaction acceptance
45
53
 
46
54
  ## Intermediate Development Track
47
55
 
48
56
  ### [Working with ProtoWallet for Development](./protowallet-development.md)
57
+
49
58
  - **Duration**: 45 minutes
50
59
  - **Prerequisites**: Basic TypeScript knowledge, understanding of cryptographic concepts
51
60
  - **Learning Goals**:
52
- - Create and configure ProtoWallet instances
53
- - Perform key derivation and management
54
- - Implement signing, encryption, and HMAC operations
55
- - Build development toolkits and testing environments
61
+
62
+ - Create and configure ProtoWallet instances
63
+ - Perform key derivation and management
64
+ - Implement signing, encryption, and HMAC operations
65
+ - Build development toolkits and testing environments
56
66
 
57
67
  ### [Authenticated HTTP Requests with AuthFetch](./authfetch-tutorial.md)
68
+
58
69
  - **Duration**: 60 minutes
59
70
  - **Prerequisites**: Understanding of HTTP protocols, basic cryptography knowledge
60
71
  - **Learning Goals**:
61
- - Implement BRC-103/104 authentication protocols
62
- - Set up certificate exchange and peer authentication
63
- - Build secure API clients with cryptographic request signing
64
- - Handle authentication errors and implement retry logic
72
+
73
+ - Implement BRC-103/104 authentication protocols
74
+ - Set up certificate exchange and peer authentication
75
+ - Build secure API clients with cryptographic request signing
76
+ - Handle authentication errors and implement retry logic
65
77
 
66
78
  ### [Decentralized File Storage with UHRP](./uhrp-storage.md)
79
+
67
80
  - **Duration**: 75 minutes
68
81
  - **Prerequisites**: Understanding of content-addressed storage concepts
69
82
  - **Learning Goals**:
70
- - Upload and download files using UHRP protocol
71
- - Implement file integrity verification
72
- - Manage file retention and renewal
73
- - Build batch file operations and management systems
83
+
84
+ - Upload and download files using UHRP protocol
85
+ - Implement file integrity verification
86
+ - Manage file retention and renewal
87
+ - Build batch file operations and management systems
74
88
 
75
89
  ### [Identity Management and Certificates](./identity-management.md)
90
+
76
91
  - **Duration**: 90 minutes
77
92
  - **Prerequisites**: Understanding of PKI and certificate concepts
78
93
  - **Learning Goals**:
79
- - Work with decentralized identity systems
80
- - Resolve identities by keys and attributes
81
- - Manage identity certificates and verification
82
- - Build identity-based authentication services
94
+
95
+ - Work with decentralized identity systems
96
+ - Resolve identities by keys and attributes
97
+ - Manage identity certificates and verification
98
+ - Build identity-based authentication services
83
99
 
84
100
  ### [Advanced Transaction Construction](./advanced-transaction.md)
101
+
85
102
  - **Duration**: 75 minutes
86
103
  - **Learning Goals**:
87
- - Multi-input/multi-output transactions
88
- - Fee calculation and optimization
89
- - Change output handling
104
+
105
+ - Multi-input/multi-output transactions
106
+ - Fee calculation and optimization
107
+ - Change output handling
90
108
 
91
109
  ### [Script Construction and Custom Logic](./script-construction.md)
110
+
92
111
  - **Duration**: 90 minutes
93
112
  - **Learning Goals**:
94
- - Understand Bitcoin Script basics
95
- - Create custom locking scripts
96
- - Implement unlocking logic
113
+
114
+ - Understand Bitcoin Script basics
115
+ - Create custom locking scripts
116
+ - Implement unlocking logic
97
117
 
98
118
  ### [SPV and Merkle Proof Verification](./spv-merkle-proofs.md)
119
+
99
120
  - **Duration**: 90 minutes
100
121
  - **Learning Goals**:
101
- - Understand SPV principles
102
- - Verify Merkle proofs
103
- - Implement lightweight verification
122
+
123
+ - Understand SPV principles
124
+ - Verify Merkle proofs
125
+ - Implement lightweight verification
104
126
 
105
127
  ### [Error Handling and Edge Cases](./error-handling.md)
128
+
106
129
  - **Duration**: 60 minutes
107
130
  - **Learning Goals**:
108
- - Robust error handling patterns
109
- - Network failure recovery
110
- - Transaction validation edge cases
131
+
132
+ - Robust error handling patterns
133
+ - Network failure recovery
134
+ - Transaction validation edge cases
111
135
 
112
136
  ## Low-Level Cryptography Track
113
137
 
114
138
  ### [Elliptic Curve Fundamentals: Numbers & Points](./elliptic-curve-fundamentals.md)
139
+
115
140
  - **Duration**: 90 minutes
116
141
  - **Learning Goals**:
117
- - Understand the mathematical foundations of elliptic curves
118
- - Work with BigInteger numbers in the SDK
119
- - Manipulate elliptic curve points
120
- - Implement point addition and scalar multiplication
142
+
143
+ - Understand the mathematical foundations of elliptic curves
144
+ - Work with BigInteger numbers in the SDK
145
+ - Manipulate elliptic curve points
146
+ - Implement point addition and scalar multiplication
121
147
 
122
148
  ### [ECDH Key Exchange](./ecdh-key-exchange.md)
149
+
123
150
  - **Duration**: 75 minutes
124
151
  - **Learning Goals**:
125
- - Understand Elliptic Curve Diffie-Hellman (ECDH) key exchange principles
126
- - Implement secure key exchange using the SDK
127
- - Create shared secrets for encrypted communication
128
- - Apply ECDH in practical Bitcoin applications
152
+
153
+ - Understand Elliptic Curve Diffie-Hellman (ECDH) key exchange principles
154
+ - Implement secure key exchange using the SDK
155
+ - Create shared secrets for encrypted communication
156
+ - Apply ECDH in practical Bitcoin applications
129
157
 
130
158
  ### [AES Symmetric Encryption](./aes-encryption.md)
159
+
131
160
  - **Duration**: 60 minutes
132
161
  - **Learning Goals**:
133
- - Understand AES-GCM symmetric encryption principles
134
- - Use the `SymmetricKey` class for encryption and decryption
135
- - Implement secure key generation and management
136
- - Apply AES encryption in practical Bitcoin applications
137
- - Combine AES with ECDH for secure communication
138
- - Handle different data formats and encoding
162
+
163
+ - Understand AES-GCM symmetric encryption principles
164
+ - Use the `SymmetricKey` class for encryption and decryption
165
+ - Implement secure key generation and management
166
+ - Apply AES encryption in practical Bitcoin applications
167
+ - Combine AES with ECDH for secure communication
168
+ - Handle different data formats and encoding
139
169
 
140
170
  ### [Hashes and HMACs](./hashes-and-hmacs.md)
171
+
141
172
  - **Duration**: 75 minutes
142
173
  - **Learning Goals**:
143
- - Understand cryptographic hash functions and their properties
144
- - Master the Hash module classes and helper functions in the BSV TypeScript SDK
145
- - Implement various hash algorithms (SHA-256, SHA-512, SHA-1, RIPEMD-160)
146
- - Create and verify HMACs for message authentication
147
- - Apply Bitcoin-specific hashing patterns (hash256, hash160)
148
- - Build practical applications using hashing for data integrity and authentication
149
- - Understand performance considerations and security best practices
174
+
175
+ - Understand cryptographic hash functions and their properties
176
+ - Master the Hash module classes and helper functions in the BSV TypeScript SDK
177
+ - Implement various hash algorithms (SHA-256, SHA-512, SHA-1, RIPEMD-160)
178
+ - Create and verify HMACs for message authentication
179
+ - Apply Bitcoin-specific hashing patterns (hash256, hash160)
180
+ - Build practical applications using hashing for data integrity and authentication
181
+ - Understand performance considerations and security best practices
150
182
 
151
183
  ### [Type-42 Key Derivation](./type-42.md)
184
+
152
185
  - **Duration**: 75 minutes
153
186
  - **Prerequisites**: Basic TypeScript knowledge, Elliptic Curve Fundamentals tutorial completed, ECDH Key Exchange tutorial completed
154
187
  - **Learning Goals**:
155
- - Understand Type-42 key derivation protocol and its use cases
156
- - Implement Type-42 operations with the BSV TypeScript SDK
157
- - Create shared key universes between two parties
158
- - Apply Type-42 in practical Bitcoin applications like message signing and encryption
159
- - Understand the "anyone key" concept and its applications
160
188
 
189
+ - Understand Type-42 key derivation protocol and its use cases
190
+ - Implement Type-42 operations with the BSV TypeScript SDK
191
+ - Create shared key universes between two parties
192
+ - Apply Type-42 in practical Bitcoin applications like message signing and encryption
193
+ - Understand the "anyone key" concept and its applications
161
194
 
162
195
  ## Alternative Low-Level Transaction API Track
163
196
 
164
197
  These tutorials demonstrate how to use the lower-level APIs of the BSV TypeScript SDK for more direct control over transaction creation and management.
165
198
 
166
199
  ### [Your First BSV Transaction (Low-level API)](./first-transaction-low-level.md)
200
+
167
201
  - **Duration**: 45 minutes
168
202
  - **Prerequisites**: Node.js, basic TypeScript knowledge
169
203
  - **Learning Goals**:
170
- - Work with low-level transaction APIs
171
- - Create transactions without WalletClient abstraction
172
- - Understand transaction construction internals
173
- - Manually manage inputs, outputs, and signing
204
+
205
+ - Work with low-level transaction APIs
206
+ - Create transactions without WalletClient abstraction
207
+ - Understand transaction construction internals
208
+ - Manually manage inputs, outputs, and signing
174
209
 
175
210
  ### [Working with Testnet Transactions (Low-level API)](./testnet-transactions-low-level.md)
211
+
176
212
  - **Duration**: 60 minutes
177
213
  - **Prerequisites**: Completed "Your First BSV Transaction (Low-level API)" tutorial
178
214
  - **Learning Goals**:
179
- - Set up a BSV testnet environment with low-level APIs
180
- - Manually handle testnet transactions
181
- - Understand UTXO management without WalletClient
182
- - Implement custom transaction workflows
215
+
216
+ - Set up a BSV testnet environment with low-level APIs
217
+ - Manually handle testnet transactions
218
+ - Understand UTXO management without WalletClient
219
+ - Implement custom transaction workflows