Documentation ¶
Index ¶
- Constants
- Variables
- type Address
- func (a Address) Decrypt(c, s1, s2 []byte) (m []byte, err error)
- func (a Address) Encrypt(m, s1, s2 []byte) (ct []byte, err error)
- func (a Address) EncryptWithSeed(seed io.Reader, m, s1, s2 []byte) (ct []byte, err error)
- func (a Address) GhostPrivateKey(mask *crypto.Key, outputIndex uint64) *crypto.Key
- func (a Address) GhostPublicKey(r *crypto.Key, outputIndex uint64) *crypto.Key
- func (a Address) MarshalJSON() ([]byte, error)
- func (a Address) PrivateEncryptKey() *ecies.PrivateKey
- func (a Address) PrivateSpendKey() *crypto.Key
- func (a Address) PrivateViewKey() *crypto.Key
- func (a Address) PublicEncryptKey() *ecies.PublicKey
- func (a Address) PublicSpendKey() *crypto.Key
- func (a Address) PublicViewKey() *crypto.Key
- func (a *Address) UnmarshalJSON(b []byte) error
- func (a Address) VerifyOutputs(outputs []*Output) []int
- type Card
- type Input
- type Key
- func (k Key) Alg() string
- func (k Key) Convert() *crypto.Key
- func (k Key) MarshalJSON() ([]byte, error)
- func (k Key) PublicKey() Key
- func (k Key) Sign(signingString string, key interface{}) (string, error)
- func (k *Key) UnmarshalJSON(b []byte) error
- func (k Key) Verify(signingString, signature string, key interface{}) error
- type Metadata
- type Organization
- type Output
- type PrivateKey
- type PublicKey
- type Transaction
Constants ¶
View Source
const ( CardTypeID = 1 CardTypePolice = 2 CardNameID = "身份证" CardNamePolice = "警官证" )
Variables ¶
View Source
var (
ErrED25519Verification = errors.New("ed25519: verification error")
)
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
// contains filtered or unexported fields
}
func NewAddress ¶
func (Address) EncryptWithSeed ¶
func (Address) GhostPrivateKey ¶
func (Address) GhostPublicKey ¶
func (Address) PrivateEncryptKey ¶
func (a Address) PrivateEncryptKey() *ecies.PrivateKey
func (Address) PrivateSpendKey ¶
func (Address) PrivateViewKey ¶
func (Address) PublicEncryptKey ¶
func (Address) PublicSpendKey ¶
func (Address) PublicViewKey ¶
func (Address) VerifyOutputs ¶
type Key ¶
func KeyFromString ¶
func NewKeyWithSeed ¶
func (Key) MarshalJSON ¶
func (*Key) UnmarshalJSON ¶
type Organization ¶
type Output ¶
type PrivateKey ¶
type PrivateKey ecies.PrivateKey
func ECIESPrivateKeyFromBytes ¶
func ECIESPrivateKeyFromBytes(s []byte) (*PrivateKey, error)
func NewECIESPrivateKey ¶
func NewECIESPrivateKey() (*PrivateKey, error)
func (*PrivateKey) ECIESPrivateKey ¶
func (pri *PrivateKey) ECIESPrivateKey() *ecies.PrivateKey
func (*PrivateKey) Marshal ¶
func (pri *PrivateKey) Marshal() ([]byte, error)
func (*PrivateKey) Public ¶
func (pri *PrivateKey) Public() *PublicKey
type Transaction ¶
type Transaction struct { Version uint8 `json:"version"` Asset crypto.Hash `json:"asset"` Inputs []*Input `json:"inputs"` Outputs []*Output `json:"outputs"` Extra []byte `json:"extra,omitempty"` }
func (Transaction) MarshalRaw ¶
func (t Transaction) MarshalRaw() ([]byte, error)
TODO unimplement MarshalRaw marshal raw message for signing transaction
Click to show internal directories.
Click to hide internal directories.