-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4cd4273
commit c392c2e
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package types | ||
|
||
import ( | ||
"github.com/samber/mo" | ||
) | ||
|
||
// PrivateKey is a chia_rs type that represents a private key | ||
type PrivateKey struct { | ||
// @TODO CHIA_RS BINDINGS: Add when we have the rust -> go bindings | ||
} | ||
|
||
// KeyDataSecrets contains the secret portion of key data | ||
type KeyDataSecrets struct { | ||
Mnemonic []string `json:"mnemonic" streamable:""` | ||
Entropy []byte `json:"entropy" streamable:""` | ||
PrivateKey PrivateKey `json:"PrivateKey" streamable:""` | ||
} | ||
|
||
// KeyData is the KeyData type from chia-blockchain | ||
type KeyData struct { | ||
Fingerprint uint32 `json:"fingerprint" streamable:""` | ||
PublicKey G1Element `json:"public_key" streamable:""` | ||
Label mo.Option[string] `json:"label" streamable:""` | ||
Secrets mo.Option[KeyDataSecrets] `json:"secrets" streamable:""` | ||
} |