Documentation ¶
Index ¶
- Constants
- func ScriptHashBE(id fmt.Stringer) ([]byte, error)
- type ID
- func (id *ID) Equal(id2 *ID) bool
- func (id *ID) Marshal(b ...[]byte) ([]byte, error)
- func (id *ID) MarshalJSON() ([]byte, error)
- func (id *ID) Parse(s string) error
- func (id *ID) SetNeo3Wallet(v *NEO3Wallet)
- func (id *ID) String() string
- func (id *ID) ToV2() *refs.OwnerID
- func (id *ID) Unmarshal(data []byte) error
- func (id *ID) UnmarshalJSON(data []byte) error
- type NEO3Wallet
Constants ¶
const NEO3WalletSize = 25
NEO3WalletSize contains size of neo3 wallet.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ID ¶
ID represents v2-compatible owner identifier.
func NewID ¶
func NewID() *ID
NewID creates and initializes blank ID.
Works similar as NewIDFromV2(new(OwnerID)).
Defaults:
- value: nil.
func NewIDFromNeo3Wallet ¶
func NewIDFromNeo3Wallet(v *NEO3Wallet) *ID
NewIDFromNeo3Wallet creates new owner identity from 25-byte neo wallet.
func (*ID) Equal ¶
Equal defines a comparison relation on ID's.
ID's are equal if they have the same binary representation.
func (*ID) Marshal ¶
Marshal marshals ID into a protobuf binary form.
Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.
func (*ID) MarshalJSON ¶
MarshalJSON encodes ID to protobuf JSON format.
func (*ID) SetNeo3Wallet ¶
func (id *ID) SetNeo3Wallet(v *NEO3Wallet)
SetNeo3Wallet sets owner identifier value to NEO3 wallet address.
func (*ID) UnmarshalJSON ¶
UnmarshalJSON decodes ID from protobuf JSON format.
type NEO3Wallet ¶
type NEO3Wallet [NEO3WalletSize]byte
NEO3Wallet represents NEO3 wallet address.
func NEO3WalletFromECDSAPublicKey ¶
func NEO3WalletFromECDSAPublicKey(key ecdsa.PublicKey) (*NEO3Wallet, error)
NEO3WalletFromECDSAPublicKey converts ecdsa.PublicKey key to NEO3 wallet address.
func (*NEO3Wallet) Bytes ¶
func (w *NEO3Wallet) Bytes() []byte
Bytes returns slice of NEO3 wallet address bytes.
func (*NEO3Wallet) String ¶
func (w *NEO3Wallet) String() string