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
Copy file name to clipboardExpand all lines: docs/docs/keypairs.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
1
---
2
2
sidebar_position: 5
3
+
pagination_next: xrpl/currency
3
4
---
4
5
5
6
# keypairs
6
7
7
-
## Introduction
8
+
## Introduction
8
9
9
10
The keypairs package provides a set of functions for generating and managing cryptographic keypairs. It includes functionality for creating new keypairs, deriving public keys from private keys, and verifying signatures.
10
11
@@ -27,9 +28,9 @@ Cryptographic algorithms supported by this package are:
27
28
- ed25519
28
29
- secp256k1
29
30
30
-
Every function in the package that requires a cryptographic algorithm will accept any type that satisfies the `KeypairCryptoAlg` interface. So, if desired, you can implement your own algorithm and use it in this package.
31
+
Every function in the package that requires a cryptographic algorithm will accept any type that satisfies the `KeypairCryptoAlg` interface. So, if desired, you can implement your own algorithm and use it in this package.
31
32
32
-
However, the library already exports both algorithm getters that satisfy the `KeypairCryptoAlg` and `NodeDerivationCryptoAlg` interfaces. They're available under the package `github.com/Peersyst/xrpl-go/pkg/crypto`, which exports both algorithm getters that satisfy the `KeypairCryptoAlg`, `NodeDerivationCryptoAlg` interfaces.
33
+
However, the library already exports both algorithm getters that satisfy the `KeypairCryptoAlg` and `NodeDerivationCryptoAlg` interfaces. They're available under the package `github.com/Peersyst/xrpl-go/pkg/crypto`, which exports both algorithm getters that satisfy the `KeypairCryptoAlg`, `NodeDerivationCryptoAlg` interfaces.
33
34
34
35
### crypto package
35
36
@@ -73,7 +74,7 @@ They can be split into two groups:
73
74
func GenerateSeed(entropy string, alg interfaces.KeypairCryptoAlg, r interfaces.Randomizer) (string, error)
74
75
```
75
76
76
-
Generate a seed that can be used to generate keypairs. You can specify the entropy of the seed or let the function generate a random one (by passing an empty string as entropy and providing a randomizer) and use one of the supported algorithms to generate the seed. The result is a base58-encoded seed, which starts with the character `s`.
77
+
Generate a seed that can be used to generate keypairs. You can specify the entropy of the seed or let the function generate a random one (by passing an empty string as entropy and providing a randomizer) and use one of the supported algorithms to generate the seed. The result is a base58-encoded seed, which starts with the character `s`.
Derives a keypair (private and public keys) from a seed. If the `validator` parameter is `true`, the keypair will be a validator keypair; otherwise, it will be a user keypair. The result for both the private and public keys is a 33-byte hexadecimal string.
91
92
92
-
93
93
#### DeriveClassicAddress
94
94
95
95
```go
@@ -165,7 +165,6 @@ func main() {
165
165
}
166
166
```
167
167
168
-
169
168
### How to generate a new keypair from entropy
170
169
171
170
This example generates a new keypair using the `ED25519` algorithm and a provided entropy. Then, it derives the keypair and the address as the previous example.
Copy file name to clipboardExpand all lines: docs/docs/xrpl/hash.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,11 @@
2
2
3
3
## Overview
4
4
5
-
The `hash` package contains functions and types related to the XRPL hash types. Currently, it only contains the function `SignTxBlob` that hashes a signed transaction blob, which is mainly used for multisigning.
5
+
The `hash` package contains functions for hashing XRPL transactions.
6
+
7
+
-`SignTxBlob`: Hashes a signed transaction blob. It accepts a signed transaction blob as input and returns the transaction's hash. This is mainly used for verifying transaction integrity, including multisigned transactions.
8
+
9
+
-`SignTx`: Hashes a signed transaction provided as a decoded map object. Primarily used internally for batch transactions within the wallet.
0 commit comments