types

package
v3.0.0-alpha.0...-52a94c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: GPL-3.0 Imports: 28 Imported by: 42

Documentation

Index

Constants

View Source
const (
	FeeerNil   = "nil"
	FeeerFixed = "fixed"
	FeeerRatio = "ratio"
)
View Source
const (
	AddressLength = 20
)
View Source
const AddressSuffix = "fca"
View Source
const AuthTypeECDSASECP = "EcdsaSecp256k1VerificationKey2019"
View Source
const AuthTypeED25519 = "Ed25519VerificationKey2020"
View Source
const AuthTypeVC = "VerifiableCredential"
View Source
const DIDPrefix = "did"
View Source
const DIDSeparator = ":"
View Source
const HexPrefix = "0x"
View Source
const MinKeyLen = 128

Variables

View Source
var (
	AddressHint       = hint.MustNewHint("fca-v0.0.1")
	ZeroAddressSuffix = "-X"
)
View Source
var (
	MaxAddressSize = 100
	MinAddressSize = base.AddressTypeSize + 3

	REStringAddressString = `[a-zA-Z0-9][\w]*[a-zA-Z0-9]`
)
View Source
var (
	MinLengthContractID = 3
	MaxLengthContractID = 50
	REContractIDExp     = regexp.MustCompile(`^[A-Z0-9][A-Z0-9-_\.\!\$\*\@]*[A-Z0-9]$`)
)
View Source
var (
	MinLengthCurrencyID = 3
	MaxLengthCurrencyID = 10
	ReCurrencyID        = `[A-Z0-9][A-Z0-9_\.\!\$\*\@]*[A-Z0-9]`
	ReValidCurrencyID   = regexp.MustCompile(`^` + ReCurrencyID + `$`)
	ReSpecialCh         = `[^\s:/?#\[\]$@]*`
	ReValidSpcecialCh   = regexp.MustCompile(`^` + ReSpecialCh + `$`)
)
View Source
var (
	NilFeeerHint   = hint.MustNewHint("mitum-currency-nil-feeer-v0.0.1")
	FixedFeeerHint = hint.MustNewHint("mitum-currency-fixed-feeer-v0.0.1")
	RatioFeeerHint = hint.MustNewHint("mitum-currency-ratio-feeer-v0.0.1")
)
View Source
var (
	AccountKeyHint     = hint.MustNewHint("mitum-currency-key-v0.0.1")
	AccountKeysHint    = hint.MustNewHint("mitum-currency-keys-v0.0.1")
	NilAccountKeysHint = hint.MustNewHint("mitum-currency-nil-keys-v0.0.1")
)
View Source
var (
	NetworkPolicyHint           = hint.MustNewHint("currency-network-policy-v0.0.1")
	NetworkPolicyStateValueHint = hint.MustNewHint("currency-network-policy-state-value-v0.0.1")

	DefaultMaxOperationsInProposal uint64 = 333
	DefaultMaxSuffrageSize         uint64 = 33

	// NOTE suffrage candidate can be approved within lifespan height; almost 15
	// days(based on 5 second for one block)
	DefaultSuffrageCandidateLifespan base.Height = 1 << 18
	DefaultSuffrageExpelLifespan                 = base.Height(333) //nolint:gomnd //...
	DefaultEmptyProposalNoBlock                  = false
)
View Source
var (
	MEPrivatekeyHint = hint.MustNewHint("fpr-v0.0.1")
	MEPublickeyHint  = hint.MustNewHint("fpu-v0.0.1")
)
View Source
var (
	AccountHint = hint.MustNewHint("mitum-currency-account-v0.0.1")
)
View Source
var (
	AmountHint = hint.MustNewHint("mitum-currency-amount-v0.0.1")
)
View Source
var AsymmetricKeyAuthenticationHint = hint.MustNewHint("mitum-did-asymmetric-key-authentication-v0.0.1")
View Source
var ContractAccountKeysHint = hint.MustNewHint("mitum-currency-contract-account-keys-v0.0.1")
View Source
var ContractAccountStatusHint = hint.MustNewHint("mitum-currency-contract-account-status-v0.0.1")
View Source
var (
	CurrencyDesignHint = hint.MustNewHint("mitum-currency-currency-design-v0.0.1")
)
View Source
var (
	CurrencyPolicyHint = hint.MustNewHint("mitum-currency-currency-policy-v0.0.1")
)
View Source
var DIDDocumentHint = hint.MustNewHint("mitum-did-document-v0.0.1")
View Source
var DIDResourceHint = hint.MustNewHint("mitum-did-resource-v0.0.1")
View Source
var DataHint = hint.MustNewHint("mitum-did-data-v0.0.1")
View Source
var DesignHint = hint.MustNewHint("mitum-did-design-v0.0.1")
View Source
var DocumentHint = hint.MustNewHint("mitum-did-document-v0.0.1")
View Source
var MaxAccountKeyInKeys = 10
View Source
var SocialLogInAuthenticationHint = hint.MustNewHint("mitum-did-social-login-authentication-v0.0.1")
View Source
var StringAddressHint = hint.MustNewHint("sas-v2")
View Source
var UnlimitedMaxFeeAmount = common.NewBig(-1)
View Source
var VerificationMethodHint = hint.MustNewHint("mitum-did-verification-method-authentication-v0.0.1")

Functions

func CheckThreshold

func CheckThreshold(fs []base.Sign, keys AccountKeys) error

func ChecksumHex

func ChecksumHex(buf [42]byte) []byte

ChecksumHex return the hex in the manner of EIP55

func IsZeroAddress

func IsZeroAddress(ad string) bool

func ParseDIDScheme

func ParseDIDScheme(did string) (method, methodSpecificID string, err error)

Types

type Account

type Account struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount(address base.Address, keys AccountKeys) (Account, error)

func NewAccountFromKeys

func NewAccountFromKeys(keys AccountKeys) (Account, error)

func ZeroAccount

func ZeroAccount(cid CurrencyID) (Account, error)

func (Account) Address

func (ac Account) Address() base.Address

func (Account) Bytes

func (ac Account) Bytes() []byte

func (*Account) DecodeBSON

func (ac *Account) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Account) DecodeJSON

func (ac *Account) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Account) EncodeJSON

func (ac Account) EncodeJSON() AccountJSONMarshaler

func (Account) GenerateHash

func (ac Account) GenerateHash() util.Hash

func (Account) Hash

func (ac Account) Hash() util.Hash

func (Account) IsValid

func (ac Account) IsValid([]byte) error

func (Account) Keys

func (ac Account) Keys() AccountKeys

func (Account) MarshalBSON

func (ac Account) MarshalBSON() ([]byte, error)

func (Account) MarshalJSON

func (ac Account) MarshalJSON() ([]byte, error)

func (Account) SetKeys

func (ac Account) SetKeys(keys AccountKeys) (Account, error)

type AccountBSONUnmarshaler

type AccountBSONUnmarshaler struct {
	Hint    string          `bson:"_hint"`
	Hash    valuehash.Bytes `bson:"hash"`
	Address string          `bson:"address"`
	Keys    bson.Raw        `bson:"keys"`
}

type AccountJSONMarshaler

type AccountJSONMarshaler struct {
	hint.BaseHinter
	Hash    util.Hash    `json:"hash"`
	Address base.Address `json:"address"`
	Keys    AccountKeys  `json:"keys"`
}

type AccountJSONUnmarshaler

type AccountJSONUnmarshaler struct {
	Hint    hint.Hint             `json:"_hint"`
	Hash    valuehash.HashDecoder `json:"hash"`
	Address string                `json:"address"`
	Keys    json.RawMessage       `json:"keys"`
}

type AccountKey

type AccountKey interface {
	hint.Hinter
	util.IsValider
	util.Byter
	Key() base.Publickey
	Weight() uint
	Equal(AccountKey) bool
}

type AccountKeys

type AccountKeys interface {
	hint.Hinter
	util.IsValider
	util.Byter
	util.Hasher
	Threshold() uint
	Keys() []AccountKey
	Key(base.Publickey) (AccountKey, bool)
	Equal(AccountKeys) bool
}

func NewNilAccountKeys

func NewNilAccountKeys(pub base.Publickey) (AccountKeys, error)

func NewNilAccountKeysFromAddress

func NewNilAccountKeysFromAddress(addr base.Address) (AccountKeys, error)

type AddFee

type AddFee map[CurrencyID][2]common.Big

func (AddFee) Add

func (af AddFee) Add(key CurrencyID, add common.Big) AddFee

func (AddFee) Fee

func (af AddFee) Fee(key CurrencyID, fee common.Big) AddFee

type Address

type Address struct {
	base.BaseStringAddress
}

func NewAddress

func NewAddress(s string) Address

func NewAddressFromKeys

func NewAddressFromKeys(keys AccountKeys) (Address, error)

func ZeroAddress

func ZeroAddress(cid CurrencyID) Address

func (*Address) DecodeBSON

func (ca *Address) DecodeBSON(b []byte, _ *bsonenc.Encoder) error

func (*Address) DecodeJSON

func (ca *Address) DecodeJSON(b []byte, _ encoder.Encoder) error

func (Address) IsValid

func (ad Address) IsValid([]byte) error

func (Address) MarshalBSONValue

func (ca Address) MarshalBSONValue() (bsontype.Type, []byte, error)

func (Address) MarshalText

func (ca Address) MarshalText() ([]byte, error)

type Addresses

type Addresses interface {
	Addresses() ([]base.Address, error)
}

type Amount

type Amount struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func MustNewAmount

func MustNewAmount(big common.Big, cid CurrencyID) Amount

func NewAmount

func NewAmount(big common.Big, cid CurrencyID) Amount

func NewZeroAmount

func NewZeroAmount(cid CurrencyID) Amount

func (Amount) Big

func (am Amount) Big() common.Big

func (Amount) Bytes

func (am Amount) Bytes() []byte

func (Amount) Currency

func (am Amount) Currency() CurrencyID

func (*Amount) DecodeBSON

func (am *Amount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Amount) DecodeJSON

func (am *Amount) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Amount) Equal

func (am Amount) Equal(b Amount) bool

func (Amount) GenerateHash

func (am Amount) GenerateHash() util.Hash

func (Amount) Hash

func (am Amount) Hash() util.Hash

func (Amount) IsEmpty

func (am Amount) IsEmpty() bool

func (Amount) IsValid

func (am Amount) IsValid([]byte) error

func (Amount) MarshalBSON

func (am Amount) MarshalBSON() ([]byte, error)

func (Amount) MarshalJSON

func (am Amount) MarshalJSON() ([]byte, error)

func (Amount) String

func (am Amount) String() string

func (Amount) WithBig

func (am Amount) WithBig(big common.Big) Amount

type AmountBSONUnmarshaler

type AmountBSONUnmarshaler struct {
	Hint      string `bson:"_hint"`
	Currency  string `bson:"currency"`
	AmountBig string `bson:"amount"`
}

type AmountJSONMarshaler

type AmountJSONMarshaler struct {
	AmountBig string     `json:"amount"`
	Currency  CurrencyID `json:"currency"`
	hint.BaseHinter
}

type AmountJSONUnmarshaler

type AmountJSONUnmarshaler struct {
	AmountBig string    `json:"amount"`
	Currency  string    `json:"currency"`
	Hint      hint.Hint `json:"_hint"`
}

type AsymmetricKeyAuthentication

type AsymmetricKeyAuthentication struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewAsymmetricKeyAuthentication

func NewAsymmetricKeyAuthentication(
	id, authType, controller string, publicKey base.Publickey,
) AsymmetricKeyAuthentication

func (AsymmetricKeyAuthentication) AuthType

func (d AsymmetricKeyAuthentication) AuthType() string

func (AsymmetricKeyAuthentication) Bytes

func (d AsymmetricKeyAuthentication) Bytes() []byte

func (AsymmetricKeyAuthentication) Controller

func (d AsymmetricKeyAuthentication) Controller() string

func (*AsymmetricKeyAuthentication) DecodeBSON

func (d *AsymmetricKeyAuthentication) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*AsymmetricKeyAuthentication) DecodeJSON

func (d *AsymmetricKeyAuthentication) DecodeJSON(b []byte, enc encoder.Encoder) error

func (AsymmetricKeyAuthentication) Details

func (d AsymmetricKeyAuthentication) Details() interface{}

func (AsymmetricKeyAuthentication) ID

func (AsymmetricKeyAuthentication) IsValid

func (d AsymmetricKeyAuthentication) IsValid([]byte) error

func (AsymmetricKeyAuthentication) MarshalBSON

func (d AsymmetricKeyAuthentication) MarshalBSON() ([]byte, error)

func (AsymmetricKeyAuthentication) MarshalJSON

func (d AsymmetricKeyAuthentication) MarshalJSON() ([]byte, error)

type AsymmetricKeyAuthenticationBSONUnmarshaler

type AsymmetricKeyAuthenticationBSONUnmarshaler struct {
	Hint       string `bson:"_hint"`
	ID         string `bson:"id"`
	AuthType   string `bson:"authType"`
	Controller string `bson:"controller"`
	PublicKey  string `bson:"publicKeyHex"`
}

type AsymmetricKeyAuthenticationJSONMarshaler

type AsymmetricKeyAuthenticationJSONMarshaler struct {
	hint.BaseHinter
	ID         string `json:"id"`
	AuthType   string `json:"authType"`
	Controller string `json:"controller"`
	PublicKey  string `json:"publicKey"`
}

type AsymmetricKeyAuthenticationJSONUnmarshaler

type AsymmetricKeyAuthenticationJSONUnmarshaler struct {
	Hint       hint.Hint `json:"_hint"`
	ID         string    `json:"id"`
	AuthType   string    `json:"authType"`
	Controller string    `json:"controller"`
	PublicKey  string    `json:"publicKey"`
}

type BaseAccountKey

type BaseAccountKey struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewBaseAccountKey

func NewBaseAccountKey(k base.Publickey, w uint) (BaseAccountKey, error)

func (BaseAccountKey) Bytes

func (ky BaseAccountKey) Bytes() []byte

func (*BaseAccountKey) DecodeBSON

func (ky *BaseAccountKey) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*BaseAccountKey) DecodeJSON

func (ky *BaseAccountKey) DecodeJSON(b []byte, enc encoder.Encoder) error

func (BaseAccountKey) Equal

func (ky BaseAccountKey) Equal(b AccountKey) bool

func (BaseAccountKey) IsValid

func (ky BaseAccountKey) IsValid([]byte) error

func (BaseAccountKey) Key

func (ky BaseAccountKey) Key() base.Publickey

func (BaseAccountKey) MarshalBSON

func (ky BaseAccountKey) MarshalBSON() ([]byte, error)

func (BaseAccountKey) MarshalJSON

func (ky BaseAccountKey) MarshalJSON() ([]byte, error)

func (BaseAccountKey) Weight

func (ky BaseAccountKey) Weight() uint

type BaseAccountKeys

type BaseAccountKeys struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func EmptyBaseAccountKeys

func EmptyBaseAccountKeys() BaseAccountKeys

func NewBaseAccountKeys

func NewBaseAccountKeys(keys []AccountKey, threshold uint) (BaseAccountKeys, error)

func (BaseAccountKeys) Bytes

func (ks BaseAccountKeys) Bytes() []byte

func (*BaseAccountKeys) DecodeBSON

func (ks *BaseAccountKeys) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*BaseAccountKeys) DecodeJSON

func (ks *BaseAccountKeys) DecodeJSON(b []byte, enc encoder.Encoder) error

func (BaseAccountKeys) Equal

func (ks BaseAccountKeys) Equal(b AccountKeys) bool

func (BaseAccountKeys) GenerateHash

func (ks BaseAccountKeys) GenerateHash() (util.Hash, error)

func (BaseAccountKeys) Hash

func (ks BaseAccountKeys) Hash() util.Hash

func (BaseAccountKeys) IsValid

func (ks BaseAccountKeys) IsValid([]byte) error

func (BaseAccountKeys) Key

func (BaseAccountKeys) Keys

func (ks BaseAccountKeys) Keys() []AccountKey

func (BaseAccountKeys) MarshalBSON

func (ks BaseAccountKeys) MarshalBSON() ([]byte, error)

func (BaseAccountKeys) MarshalJSON

func (ks BaseAccountKeys) MarshalJSON() ([]byte, error)

func (BaseAccountKeys) Threshold

func (ks BaseAccountKeys) Threshold() uint

type BaseStringAddress

type BaseStringAddress struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewBaseStringAddressWithHint

func NewBaseStringAddressWithHint(ht hint.Hint, s string) BaseStringAddress

func (BaseStringAddress) Bytes

func (ad BaseStringAddress) Bytes() []byte

func (BaseStringAddress) Equal

func (ad BaseStringAddress) Equal(b base.Address) bool

func (BaseStringAddress) IsValid

func (ad BaseStringAddress) IsValid([]byte) error

func (BaseStringAddress) MarshalText

func (ad BaseStringAddress) MarshalText() ([]byte, error)

func (BaseStringAddress) String

func (ad BaseStringAddress) String() string

type ContractAccountBSONUnmarshaler

type ContractAccountBSONUnmarshaler struct {
	Hint       string   `bson:"_hint"`
	Owner      string   `bson:"owner"`
	IsActive   bool     `bson:"is_active"`
	Handlers   []string `bson:"handlers"`
	Recipients []string `bson:"recipients"`
}

type ContractAccountKeys

type ContractAccountKeys struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func EmptyBaseContractAccountKeys

func EmptyBaseContractAccountKeys() ContractAccountKeys

func NewContractAccountKeys

func NewContractAccountKeys() (ContractAccountKeys, error)

func (ContractAccountKeys) Bytes

func (ks ContractAccountKeys) Bytes() []byte

func (*ContractAccountKeys) DecodeBSON

func (ks *ContractAccountKeys) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*ContractAccountKeys) DecodeJSON

func (ks *ContractAccountKeys) DecodeJSON(b []byte, enc encoder.Encoder) error

func (ContractAccountKeys) Equal

func (ks ContractAccountKeys) Equal(b AccountKeys) bool

func (ContractAccountKeys) GenerateHash

func (ks ContractAccountKeys) GenerateHash() (util.Hash, error)

func (ContractAccountKeys) Hash

func (ks ContractAccountKeys) Hash() util.Hash

func (ContractAccountKeys) IsValid

func (ks ContractAccountKeys) IsValid([]byte) error

func (ContractAccountKeys) Key

func (ContractAccountKeys) Keys

func (ks ContractAccountKeys) Keys() []AccountKey

func (ContractAccountKeys) MarshalBSON

func (ks ContractAccountKeys) MarshalBSON() ([]byte, error)

func (ContractAccountKeys) MarshalJSON

func (ks ContractAccountKeys) MarshalJSON() ([]byte, error)

func (ContractAccountKeys) Threshold

func (ks ContractAccountKeys) Threshold() uint

type ContractAccountStatus

type ContractAccountStatus struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewContractAccountStatus

func NewContractAccountStatus(owner base.Address, handlers []base.Address) ContractAccountStatus

func (ContractAccountStatus) Bytes

func (cs ContractAccountStatus) Bytes() []byte

func (*ContractAccountStatus) DecodeBSON

func (cs *ContractAccountStatus) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*ContractAccountStatus) DecodeJSON

func (cs *ContractAccountStatus) DecodeJSON(b []byte, enc encoder.Encoder) error

func (ContractAccountStatus) Equal

func (ContractAccountStatus) GenerateHash

func (cs ContractAccountStatus) GenerateHash() util.Hash

func (ContractAccountStatus) Handlers

func (cs ContractAccountStatus) Handlers() []base.Address

func (ContractAccountStatus) Hash

func (cs ContractAccountStatus) Hash() util.Hash

func (ContractAccountStatus) IsActive

func (cs ContractAccountStatus) IsActive() bool

func (ContractAccountStatus) IsHandler

func (cs ContractAccountStatus) IsHandler(ad base.Address) bool

func (ContractAccountStatus) IsRecipients

func (cs ContractAccountStatus) IsRecipients(ad base.Address) bool

func (ContractAccountStatus) IsValid

func (cs ContractAccountStatus) IsValid([]byte) error

func (ContractAccountStatus) MarshalBSON

func (cs ContractAccountStatus) MarshalBSON() ([]byte, error)

func (ContractAccountStatus) MarshalJSON

func (cs ContractAccountStatus) MarshalJSON() ([]byte, error)

func (ContractAccountStatus) Owner

func (cs ContractAccountStatus) Owner() base.Address

func (ContractAccountStatus) Recipients

func (cs ContractAccountStatus) Recipients() []base.Address

func (*ContractAccountStatus) SetHandlers

func (cs *ContractAccountStatus) SetHandlers(handlers []base.Address) error

func (ContractAccountStatus) SetIsActive

func (*ContractAccountStatus) SetOwner

func (cs *ContractAccountStatus) SetOwner(a base.Address) error

func (*ContractAccountStatus) SetRecipients

func (cs *ContractAccountStatus) SetRecipients(recipients []base.Address) error

type ContractAccountStatusJSONMarshaler

type ContractAccountStatusJSONMarshaler struct {
	hint.BaseHinter
	Owner      base.Address   `json:"owner"`
	IsActive   bool           `json:"is_active"`
	Handlers   []base.Address `json:"handlers"`
	Recipients []base.Address `json:"recipients"`
}

type ContractAccountStatusJSONUnmarshaler

type ContractAccountStatusJSONUnmarshaler struct {
	Hint       hint.Hint `json:"_hint"`
	Owner      string    `json:"owner"`
	IsActive   bool      `json:"is_active"`
	Handlers   []string  `json:"handlers"`
	Recipients []string  `json:"recipients"`
}

type ContractID

type ContractID string

func (ContractID) Bytes

func (cid ContractID) Bytes() []byte

func (ContractID) IsValid

func (cid ContractID) IsValid([]byte) error

func (ContractID) String

func (cid ContractID) String() string

type CurrencyDesign

type CurrencyDesign struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewCurrencyDesign

func NewCurrencyDesign(
	initialSupply common.Big, currency CurrencyID, decimal common.Big, genesisAccount base.Address, po CurrencyPolicy,
) CurrencyDesign

func (CurrencyDesign) AddTotalSupply

func (de CurrencyDesign) AddTotalSupply(b common.Big) (CurrencyDesign, error)

func (CurrencyDesign) Bytes

func (de CurrencyDesign) Bytes() []byte

func (CurrencyDesign) Currency

func (de CurrencyDesign) Currency() CurrencyID

func (CurrencyDesign) Decimal

func (de CurrencyDesign) Decimal() common.Big

func (*CurrencyDesign) DecodeBSON

func (de *CurrencyDesign) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*CurrencyDesign) DecodeJSON

func (de *CurrencyDesign) DecodeJSON(b []byte, enc encoder.Encoder) error

func (CurrencyDesign) GenesisAccount

func (de CurrencyDesign) GenesisAccount() base.Address

func (CurrencyDesign) InitialSupply

func (de CurrencyDesign) InitialSupply() Amount

func (CurrencyDesign) IsValid

func (de CurrencyDesign) IsValid([]byte) error

func (CurrencyDesign) MarshalBSON

func (de CurrencyDesign) MarshalBSON() ([]byte, error)

func (CurrencyDesign) MarshalJSON

func (de CurrencyDesign) MarshalJSON() ([]byte, error)

func (CurrencyDesign) Policy

func (de CurrencyDesign) Policy() CurrencyPolicy

func (*CurrencyDesign) SetGenesisAccount

func (de *CurrencyDesign) SetGenesisAccount(ac base.Address)

func (*CurrencyDesign) SetPolicy

func (de *CurrencyDesign) SetPolicy(po CurrencyPolicy)

func (CurrencyDesign) TotalSupply

func (de CurrencyDesign) TotalSupply() common.Big

type CurrencyDesignBSONUnmarshaler

type CurrencyDesignBSONUnmarshaler struct {
	Hint          string   `bson:"_hint"`
	InitialSupply string   `bson:"initial_supply"`
	Currency      string   `bson:"currency"`
	Decimal       string   `bson:"decimal"`
	Genesis       string   `bson:"genesis_account"`
	Policy        bson.Raw `bson:"policy"`
	TotalSupply   string   `bson:"total_supply"`
}

type CurrencyDesignJSONMarshaler

type CurrencyDesignJSONMarshaler struct {
	hint.BaseHinter
	InitialSupply string         `json:"initial_supply"`
	Currency      string         `json:"currency_id"`
	Decimal       string         `json:"decimal"`
	Genesis       base.Address   `json:"genesis_account"`
	Policy        CurrencyPolicy `json:"policy"`
	TotalSupply   string         `json:"total_supply"`
}

type CurrencyDesignJSONUnmarshaler

type CurrencyDesignJSONUnmarshaler struct {
	Hint          hint.Hint       `json:"_hint"`
	InitialSupply string          `json:"initial_supply"`
	Currency      string          `json:"currency_id"`
	Decimal       string          `json:"decimal"`
	Genesis       string          `json:"genesis_account"`
	Policy        json.RawMessage `json:"policy"`
	TotalSupply   string          `json:"total_supply"`
}

type CurrencyID

type CurrencyID string

func (CurrencyID) Bytes

func (cid CurrencyID) Bytes() []byte

func (CurrencyID) IsValid

func (cid CurrencyID) IsValid([]byte) error

func (CurrencyID) String

func (cid CurrencyID) String() string

type CurrencyPolicy

type CurrencyPolicy struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewCurrencyPolicy

func NewCurrencyPolicy(newAccountMinBalance common.Big, feeer Feeer) CurrencyPolicy

func (CurrencyPolicy) Bytes

func (po CurrencyPolicy) Bytes() []byte

func (*CurrencyPolicy) DecodeBSON

func (po *CurrencyPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*CurrencyPolicy) DecodeJSON

func (po *CurrencyPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error

func (CurrencyPolicy) Feeer

func (po CurrencyPolicy) Feeer() Feeer

func (CurrencyPolicy) IsValid

func (po CurrencyPolicy) IsValid([]byte) error

func (CurrencyPolicy) MarshalBSON

func (po CurrencyPolicy) MarshalBSON() ([]byte, error)

func (CurrencyPolicy) MarshalJSON

func (po CurrencyPolicy) MarshalJSON() ([]byte, error)

func (CurrencyPolicy) MinBalance

func (po CurrencyPolicy) MinBalance() common.Big

type CurrencyPolicyBSONUnmarshaler

type CurrencyPolicyBSONUnmarshaler struct {
	Hint       string   `bson:"_hint"`
	MinBalance string   `bson:"min_balance"`
	Feeer      bson.Raw `bson:"feeer"`
}

type CurrencyPolicyJSONMarshaler

type CurrencyPolicyJSONMarshaler struct {
	hint.BaseHinter
	MinBalance string `json:"min_balance"`
	Feeer      Feeer  `json:"feeer"`
}

type CurrencyPolicyJSONUnmarshaler

type CurrencyPolicyJSONUnmarshaler struct {
	Hint       hint.Hint       `json:"_hint"`
	MinBalance string          `json:"min_balance"`
	Feeer      json.RawMessage `json:"feeer"`
}

type DIDDocument

type DIDDocument struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDIDDocument

func NewDIDDocument(
	did string, auth []IAuthentication, vrf []IVerificationMethod, service Service,
) DIDDocument

func (DIDDocument) Authentication

func (d DIDDocument) Authentication(id string) (IAuthentication, error)

func (DIDDocument) Bytes

func (d DIDDocument) Bytes() []byte

func (DIDDocument) DID

func (d DIDDocument) DID() string

func (*DIDDocument) DecodeBSON

func (d *DIDDocument) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DIDDocument) DecodeJSON

func (d *DIDDocument) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DIDDocument) IsValid

func (d DIDDocument) IsValid([]byte) error

func (DIDDocument) MarshalBSON

func (d DIDDocument) MarshalBSON() ([]byte, error)

func (DIDDocument) MarshalJSON

func (d DIDDocument) MarshalJSON() ([]byte, error)

func (DIDDocument) VerificationMethod

func (d DIDDocument) VerificationMethod(id string) (IVerificationMethod, error)

type DIDDocumentBSONUnmarshaler

type DIDDocumentBSONUnmarshaler struct {
	Hint      string   `bson:"_hint"`
	Context_  string   `bson:"@context"`
	ID        string   `bson:"id"`
	Auth      bson.Raw `bson:"authentication"`
	VRFMethod bson.Raw `bson:"verificationMethod"`
	Service   bson.Raw `bson:"service"`
}

type DIDDocumentJSONMarshaler

type DIDDocumentJSONMarshaler struct {
	hint.BaseHinter
	Context_  string                `json:"@context"`
	ID        string                `json:"id"`
	Auth      []IAuthentication     `json:"authentication"`
	VRFMethod []IVerificationMethod `json:"verificationMethod"`
	Service   Service               `json:"service"`
}

type DIDDocumentJSONUnmarshaler

type DIDDocumentJSONUnmarshaler struct {
	Hint      hint.Hint       `json:"_hint"`
	Context_  string          `json:"@context"`
	ID        string          `json:"id"`
	Auth      json.RawMessage `json:"authentication"`
	VRFMethod json.RawMessage `json:"verificationMethod"`
	Service   json.RawMessage `json:"service"`
}

type DIDResource

type DIDResource struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDIDResource

func NewDIDResource(method, methodSpecificID string) DIDResource

func NewDIDResourceFromString

func NewDIDResourceFromString(didURL string) (*DIDResource, error)

func (DIDResource) Bytes

func (d DIDResource) Bytes() []byte

func (DIDResource) DID

func (d DIDResource) DID() string

func (DIDResource) DIDUrl

func (d DIDResource) DIDUrl() string

func (*DIDResource) DecodeBSON

func (d *DIDResource) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DIDResource) DecodeJSON

func (d *DIDResource) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DIDResource) Equal

func (d DIDResource) Equal(b DIDResource) bool

func (DIDResource) IsValid

func (d DIDResource) IsValid([]byte) error

func (DIDResource) MarshalBSON

func (d DIDResource) MarshalBSON() ([]byte, error)

func (DIDResource) MarshalJSON

func (d DIDResource) MarshalJSON() ([]byte, error)

func (DIDResource) Method

func (d DIDResource) Method() string

func (DIDResource) MethodSpecificID

func (d DIDResource) MethodSpecificID() string

func (*DIDResource) SetFragment

func (d *DIDResource) SetFragment(fragment string)

type DIDResourceBSONUnmarshaler

type DIDResourceBSONUnmarshaler struct {
	Hint     string   `bson:"_hint"`
	Resource bson.Raw `bson:"resource"`
}

type DIDResourceJSONMarshaler

type DIDResourceJSONMarshaler struct {
	hint.BaseHinter
	Resource url.URL `json:"resource"`
}

type DIDResourceJSONUnmarshaler

type DIDResourceJSONUnmarshaler struct {
	Hint     hint.Hint       `json:"_hint"`
	Resource json.RawMessage `json:"resource"`
}

type Data

type Data struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewData

func NewData(
	address base.Address, method string,
) Data

func (Data) Address

func (d Data) Address() base.Address

func (Data) Bytes

func (d Data) Bytes() []byte

func (Data) DID

func (d Data) DID() string

func (Data) DIDResource

func (d Data) DIDResource() DIDResource

func (*Data) DecodeBSON

func (d *Data) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Data) DecodeJSON

func (d *Data) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Data) Equal

func (d Data) Equal(b Data) bool

func (Data) IsValid

func (d Data) IsValid([]byte) error

func (Data) MarshalBSON

func (d Data) MarshalBSON() ([]byte, error)

func (Data) MarshalJSON

func (d Data) MarshalJSON() ([]byte, error)

type DataBSONUnmarshaler

type DataBSONUnmarshaler struct {
	Hint    string `bson:"_hint"`
	Address string `bson:"address"`
	DID     string `bson:"did"`
}

type DataJSONMarshaler

type DataJSONMarshaler struct {
	hint.BaseHinter
	Address string `json:"address"`
	DID     string `json:"did"`
}

type DataJSONUnmarshaler

type DataJSONUnmarshaler struct {
	Hint    hint.Hint `json:"_hint"`
	Address string    `json:"address"`
	DID     string    `json:"did"`
}

type Design

type Design struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDesign

func NewDesign(didMethod string) Design

func (Design) Bytes

func (de Design) Bytes() []byte

func (Design) DIDMethod

func (de Design) DIDMethod() string

func (*Design) DecodeBSON

func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Design) DecodeJSON

func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Design) Equal

func (de Design) Equal(cd Design) bool

func (Design) GenerateHash

func (de Design) GenerateHash() util.Hash

func (Design) Hash

func (de Design) Hash() util.Hash

func (Design) IsValid

func (de Design) IsValid([]byte) error

func (Design) MarshalBSON

func (de Design) MarshalBSON() ([]byte, error)

func (Design) MarshalJSON

func (de Design) MarshalJSON() ([]byte, error)

type DesignBSONUnmarshaler

type DesignBSONUnmarshaler struct {
	Hint      string `bson:"_hint"`
	DIDMethod string `bson:"didMethod"`
}

type DesignJSONMarshaler

type DesignJSONMarshaler struct {
	hint.BaseHinter
	DIDMethod string `json:"didMethod"`
}

type DesignJSONUnmarshaler

type DesignJSONUnmarshaler struct {
	Hint      hint.Hint `json:"_hint"`
	DIDMethod string    `json:"didMethod"`
}

type DuplicationType

type DuplicationType string

type Feeer

type Feeer interface {
	util.IsValider
	hint.Hinter
	Type() string
	Bytes() []byte
	Receiver() base.Address
	Min() common.Big
	Fee(common.Big) (common.Big, error)
}

type FixedFeeer

type FixedFeeer struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewFixedFeeer

func NewFixedFeeer(receiver base.Address, amount common.Big) FixedFeeer

func (FixedFeeer) Bytes

func (fa FixedFeeer) Bytes() []byte

func (*FixedFeeer) DecodeBSON

func (fa *FixedFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*FixedFeeer) DecodeJSON

func (fa *FixedFeeer) DecodeJSON(b []byte, enc encoder.Encoder) error

func (FixedFeeer) Fee

func (fa FixedFeeer) Fee(common.Big) (common.Big, error)

func (FixedFeeer) IsValid

func (fa FixedFeeer) IsValid([]byte) error

func (FixedFeeer) MarshalBSON

func (fa FixedFeeer) MarshalBSON() ([]byte, error)

func (FixedFeeer) MarshalJSON

func (fa FixedFeeer) MarshalJSON() ([]byte, error)

func (FixedFeeer) Min

func (fa FixedFeeer) Min() common.Big

func (FixedFeeer) Receiver

func (fa FixedFeeer) Receiver() base.Address

func (FixedFeeer) Type

func (FixedFeeer) Type() string

type FixedFeeerBSONUnmarshaler

type FixedFeeerBSONUnmarshaler struct {
	Hint     string `bson:"_hint"`
	Receiver string `bson:"receiver"`
	Amount   string `bson:"amount"`
}

type FixedFeeerJSONMarshaler

type FixedFeeerJSONMarshaler struct {
	hint.BaseHinter
	Receiver base.Address `json:"receiver"`
	Amount   string       `json:"amount"`
}

type FixedFeeerJSONUnmarshaler

type FixedFeeerJSONUnmarshaler struct {
	Hint     hint.Hint `json:"_hint"`
	Receiver string    `json:"receiver"`
	Amount   string    `json:"amount"`
}

type GetNewProcessor

type GetNewProcessor func(
	height base.Height,
	getStateFunc base.GetStateFunc,
	newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc,
	newProcessConstraintFunc base.NewOperationProcessorProcessFunc) (base.OperationProcessor, error)

type GetNewProcessorWithProposal

type GetNewProcessorWithProposal func(
	height base.Height,
	proposal *base.ProposalSignFact,
	getStateFunc base.GetStateFunc,
	newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc,
	newProcessConstraintFunc base.NewOperationProcessorProcessFunc) (base.OperationProcessor, error)

type IAuthentication

type IAuthentication interface {
	ID() string
	AuthType() string
	Controller() string
	Details() interface{}
	bson.Marshaler
	util.Byter
	util.IsValider
}

type IVerificationMethod

type IVerificationMethod interface {
	ID() string
	VerificationType() string
	Controller() string
	bson.Marshaler
	util.Byter
	util.IsValider
}

type KeyBSONUnmarshaler

type KeyBSONUnmarshaler struct {
	Hint   string `bson:"_hint"`
	Weight uint   `bson:"weight"`
	Keys   string `bson:"key"`
}

type KeyJSONMarshaler

type KeyJSONMarshaler struct {
	hint.BaseHinter
	Weight uint           `json:"weight"`
	Key    base.Publickey `json:"key"`
}

type KeyJSONUnmarshaler

type KeyJSONUnmarshaler struct {
	Hint   hint.Hint `json:"_hint"`
	Weight uint      `json:"weight"`
	Key    string    `json:"key"`
}

type KeysBSONUnmarshaler

type KeysBSONUnmarshaler struct {
	Hint      string   `bson:"_hint"`
	Hash      string   `bson:"hash"`
	Keys      bson.Raw `bson:"keys"`
	Threshold uint     `bson:"threshold"`
}

type KeysHashJSONUnMarshaler

type KeysHashJSONUnMarshaler struct {
	Hash common.HashDecoder `json:"hash"`
}

type KeysJSONMarshaler

type KeysJSONMarshaler struct {
	hint.BaseHinter
	Hash      util.Hash    `json:"hash"`
	Keys      []AccountKey `json:"keys"`
	Threshold uint         `json:"threshold"`
}

type KeysJSONUnMarshaler

type KeysJSONUnMarshaler struct {
	Hint      hint.Hint       `json:"_hint"`
	Keys      json.RawMessage `json:"keys"`
	Threshold uint            `json:"threshold"`
}

type MEPrivatekey

type MEPrivatekey struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

MEPrivatekey is the default privatekey of mitum, it is based on BTC Privatekey.

func LoadMEPrivatekey

func LoadMEPrivatekey(s string) (MEPrivatekey, error)

func NewMEPrivatekey

func NewMEPrivatekey() MEPrivatekey

func NewMEPrivatekeyFromSeed

func NewMEPrivatekeyFromSeed(s string) (MEPrivatekey, error)

func ParseMEPrivatekey

func ParseMEPrivatekey(s string) (MEPrivatekey, error)

func (MEPrivatekey) Bytes

func (k MEPrivatekey) Bytes() []byte

func (MEPrivatekey) Equal

func (k MEPrivatekey) Equal(b base.PKKey) bool

func (MEPrivatekey) IsValid

func (k MEPrivatekey) IsValid([]byte) error

func (MEPrivatekey) MarshalText

func (k MEPrivatekey) MarshalText() ([]byte, error)

func (MEPrivatekey) Publickey

func (k MEPrivatekey) Publickey() base.Publickey

func (MEPrivatekey) Sign

func (k MEPrivatekey) Sign(b []byte) (base.Signature, error)

func (MEPrivatekey) String

func (k MEPrivatekey) String() string

func (*MEPrivatekey) UnmarshalText

func (k *MEPrivatekey) UnmarshalText(b []byte) error

type MEPublickey

type MEPublickey struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

MEPublickey is the optional public key of mitum, it is based on Ether Privatekey.

func LoadMEPublicKey

func LoadMEPublicKey(s string) (MEPublickey, error)

func NewMEPublickey

func NewMEPublickey(k *ecdsa.PublicKey) MEPublickey

func ParseMEPublickey

func ParseMEPublickey(s string) (MEPublickey, error)

func (MEPublickey) Bytes

func (k MEPublickey) Bytes() []byte

func (MEPublickey) Equal

func (k MEPublickey) Equal(b base.PKKey) bool

func (MEPublickey) IsValid

func (k MEPublickey) IsValid([]byte) error

func (MEPublickey) MarshalText

func (k MEPublickey) MarshalText() ([]byte, error)

func (MEPublickey) String

func (k MEPublickey) String() string

func (*MEPublickey) UnmarshalText

func (k *MEPublickey) UnmarshalText(b []byte) error

func (MEPublickey) Verify

func (k MEPublickey) Verify(input []byte, sig base.Signature) error

type NetworkPolicy

type NetworkPolicy struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func DefaultNetworkPolicy

func DefaultNetworkPolicy() NetworkPolicy

func NewNetworkPolicy

func NewNetworkPolicy(
	suffrageCandidateLimit uint64,
	maxOperationsInProposal uint64,
	suffrageCandidateLifespan base.Height,
	maxSuffrageSize uint64,
	suffrageExpelLifespan base.Height,
	emptyProposalNoBlock bool,
) NetworkPolicy

func (*NetworkPolicy) DecodeBSON

func (p *NetworkPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*NetworkPolicy) DecodeJSON

func (p *NetworkPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error

func (NetworkPolicy) EmptyProposalNoBlock

func (p NetworkPolicy) EmptyProposalNoBlock() bool

func (NetworkPolicy) HashBytes

func (p NetworkPolicy) HashBytes() []byte

func (NetworkPolicy) IsValid

func (p NetworkPolicy) IsValid([]byte) error

func (NetworkPolicy) MarshalBSON

func (p NetworkPolicy) MarshalBSON() ([]byte, error)

func (NetworkPolicy) MarshalJSON

func (p NetworkPolicy) MarshalJSON() ([]byte, error)

func (NetworkPolicy) MaxOperationsInProposal

func (p NetworkPolicy) MaxOperationsInProposal() uint64

func (NetworkPolicy) MaxSuffrageSize

func (p NetworkPolicy) MaxSuffrageSize() uint64

func (*NetworkPolicy) SetEmptyProposalNoBlock

func (p *NetworkPolicy) SetEmptyProposalNoBlock(i bool) NetworkPolicy

func (*NetworkPolicy) SetMaxOperationsInProposal

func (p *NetworkPolicy) SetMaxOperationsInProposal(i uint64) NetworkPolicy

func (*NetworkPolicy) SetMaxSuffrageSize

func (p *NetworkPolicy) SetMaxSuffrageSize(i uint64) NetworkPolicy

func (*NetworkPolicy) SetSuffrageCandidateLifespan

func (p *NetworkPolicy) SetSuffrageCandidateLifespan(i base.Height) NetworkPolicy

func (*NetworkPolicy) SetSuffrageCandidateLimiterRule

func (p *NetworkPolicy) SetSuffrageCandidateLimiterRule(i base.SuffrageCandidateLimiterRule) NetworkPolicy

func (*NetworkPolicy) SetSuffrageExpelLifespan

func (p *NetworkPolicy) SetSuffrageExpelLifespan(i base.Height) NetworkPolicy

func (NetworkPolicy) SuffrageCandidateLifespan

func (p NetworkPolicy) SuffrageCandidateLifespan() base.Height

func (NetworkPolicy) SuffrageCandidateLimiterRule

func (p NetworkPolicy) SuffrageCandidateLimiterRule() base.SuffrageCandidateLimiterRule

func (NetworkPolicy) SuffrageExpelLifespan

func (p NetworkPolicy) SuffrageExpelLifespan() base.Height

type NetworkPolicyBSONUnMarshaler

type NetworkPolicyBSONUnMarshaler struct {
	Hint                         string      `bson:"_hint"`
	SuffrageCandidateLimiterRule bson.Raw    `bson:"suffrage_candidate_limiter"`
	MaxOperationsInProposal      uint64      `bson:"max_operations_in_proposal"`
	SuffrageCandidateLifespan    base.Height `bson:"suffrage_candidate_lifespan"`
	MaxSuffrageSize              uint64      `bson:"max_suffrage_size"`
	SuffrageExpelLifespan        base.Height `bson:"suffrage_expel_lifespan"`
	EmptyProposalNoBlock         bool        `bson:"empty_proposal_no_block"`
}

type NetworkPolicyStateValue

type NetworkPolicyStateValue struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewNetworkPolicyStateValue

func NewNetworkPolicyStateValue(policy base.NetworkPolicy) NetworkPolicyStateValue

func (*NetworkPolicyStateValue) DecodeBSON

func (s *NetworkPolicyStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*NetworkPolicyStateValue) DecodeJSON

func (s *NetworkPolicyStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (NetworkPolicyStateValue) HashBytes

func (s NetworkPolicyStateValue) HashBytes() []byte

func (NetworkPolicyStateValue) IsValid

func (s NetworkPolicyStateValue) IsValid([]byte) error

func (NetworkPolicyStateValue) MarshalBSON

func (s NetworkPolicyStateValue) MarshalBSON() ([]byte, error)

func (NetworkPolicyStateValue) MarshalJSON

func (s NetworkPolicyStateValue) MarshalJSON() ([]byte, error)

func (NetworkPolicyStateValue) Policy

type NetworkPolicyStateValueBSONUnmarshaler

type NetworkPolicyStateValueBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Policy bson.Raw `bson:"policy"`
}

type NetworkPolicyStateValueJSONMarshaler

type NetworkPolicyStateValueJSONMarshaler struct {
	Policy base.NetworkPolicy `json:"policy"`
	hint.BaseHinter
}

type NetworkPolicyStateValueJSONUnmarshaler

type NetworkPolicyStateValueJSONUnmarshaler struct {
	Policy json.RawMessage `json:"policy"`
}

type NilAccountKeys

type NilAccountKeys struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func (NilAccountKeys) Bytes

func (ks NilAccountKeys) Bytes() []byte

func (*NilAccountKeys) DecodeBSON

func (ks *NilAccountKeys) DecodeBSON(b []byte, _ *bsonenc.Encoder) error

func (*NilAccountKeys) DecodeJSON

func (ks *NilAccountKeys) DecodeJSON(b []byte, enc encoder.Encoder) error

func (NilAccountKeys) Equal

func (ks NilAccountKeys) Equal(b AccountKeys) bool

func (NilAccountKeys) GenerateHash

func (ks NilAccountKeys) GenerateHash(pub base.Publickey) util.Hash

func (NilAccountKeys) Hash

func (ks NilAccountKeys) Hash() util.Hash

func (NilAccountKeys) IsValid

func (ks NilAccountKeys) IsValid([]byte) error

func (NilAccountKeys) Key

func (ks NilAccountKeys) Key(pub base.Publickey) (AccountKey, bool)

func (NilAccountKeys) Keys

func (ks NilAccountKeys) Keys() []AccountKey

func (NilAccountKeys) MarshalBSON

func (ks NilAccountKeys) MarshalBSON() ([]byte, error)

func (NilAccountKeys) MarshalJSON

func (ks NilAccountKeys) MarshalJSON() ([]byte, error)

func (NilAccountKeys) Threshold

func (ks NilAccountKeys) Threshold() uint

type NilFeeer

type NilFeeer struct {
	hint.BaseHinter
}

func NewNilFeeer

func NewNilFeeer() NilFeeer

func (NilFeeer) Bytes

func (NilFeeer) Bytes() []byte

func (NilFeeer) Fee

func (NilFeeer) Fee(common.Big) (common.Big, error)

func (NilFeeer) IsValid

func (fa NilFeeer) IsValid([]byte) error

func (NilFeeer) MarshalBSON

func (fa NilFeeer) MarshalBSON() ([]byte, error)

func (NilFeeer) MarshalJSON

func (fa NilFeeer) MarshalJSON() ([]byte, error)

func (NilFeeer) Min

func (NilFeeer) Min() common.Big

func (NilFeeer) Receiver

func (NilFeeer) Receiver() base.Address

func (NilFeeer) Type

func (NilFeeer) Type() string

func (*NilFeeer) UnmarsahlBSON

func (fa *NilFeeer) UnmarsahlBSON(b []byte) error

func (*NilFeeer) UnmarsahlJSON

func (fa *NilFeeer) UnmarsahlJSON(b []byte) error

type Proof

type Proof struct {
	// contains filtered or unexported fields
}

func NewProof

func NewProof(
	verificationMethod string,
) Proof

func (Proof) Bytes

func (d Proof) Bytes() []byte

func (Proof) IsValid

func (d Proof) IsValid([]byte) error

func (Proof) MarshalBSON

func (d Proof) MarshalBSON() ([]byte, error)

func (Proof) MarshalJSON

func (d Proof) MarshalJSON() ([]byte, error)

func (*Proof) UnmarshalBSON

func (d *Proof) UnmarshalBSON(b []byte) error

func (*Proof) UnmarshalJSON

func (d *Proof) UnmarshalJSON(b []byte) error

func (Proof) VerificationMethod

func (d Proof) VerificationMethod() string

type ProofBSONUnmarshaler

type ProofBSONUnmarshaler struct {
	VerificationMethod string `bson:"verificationMethod"`
}

type ProofJSONMarshaler

type ProofJSONMarshaler struct {
	VerificationMethod string `json:"verificationMethod"`
}

type ProofJSONUnmarshaler

type ProofJSONUnmarshaler struct {
	VerificationMethod string `json:"verificationMethod"`
}

type RatioFeeer

type RatioFeeer struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewRatioFeeer

func NewRatioFeeer(receiver base.Address, ratio float64, min, max common.Big) RatioFeeer

func (RatioFeeer) Bytes

func (fa RatioFeeer) Bytes() []byte

func (*RatioFeeer) DecodeBSON

func (fa *RatioFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*RatioFeeer) DecodeJSON

func (fa *RatioFeeer) DecodeJSON(b []byte, enc encoder.Encoder) error

func (RatioFeeer) Fee

func (fa RatioFeeer) Fee(a common.Big) (common.Big, error)

func (RatioFeeer) IsValid

func (fa RatioFeeer) IsValid([]byte) error

func (RatioFeeer) MarshalBSON

func (fa RatioFeeer) MarshalBSON() ([]byte, error)

func (RatioFeeer) MarshalJSON

func (fa RatioFeeer) MarshalJSON() ([]byte, error)

func (RatioFeeer) Min

func (fa RatioFeeer) Min() common.Big

func (RatioFeeer) Receiver

func (fa RatioFeeer) Receiver() base.Address

func (RatioFeeer) Type

func (RatioFeeer) Type() string

type RatioFeeerBSONUnmarshaler

type RatioFeeerBSONUnmarshaler struct {
	Hint     string  `bson:"_hint"`
	Receiver string  `bson:"receiver"`
	Ratio    float64 `bson:"ratio"`
	Min      string  `bson:"min"`
	Max      string  `bson:"max"`
}

type RatioFeeerJSONMarshaler

type RatioFeeerJSONMarshaler struct {
	hint.BaseHinter
	Receiver base.Address `json:"receiver"`
	Ratio    float64      `json:"ratio"`
	Min      string       `json:"min"`
	Max      string       `json:"max"`
}

type RatioFeeerJSONUnmarshaler

type RatioFeeerJSONUnmarshaler struct {
	Hint     hint.Hint `json:"_hint"`
	Receiver string    `json:"receiver"`
	Ratio    float64   `json:"ratio"`
	Min      string    `json:"min"`
	Max      string    `json:"max"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	id, serviceType, serviceEndPoint string,
) Service

func (Service) Bytes

func (d Service) Bytes() []byte

func (Service) IsValid

func (d Service) IsValid([]byte) error

func (Service) MarshalBSON

func (d Service) MarshalBSON() ([]byte, error)

func (Service) MarshalJSON

func (d Service) MarshalJSON() ([]byte, error)

func (*Service) UnmarshalBSON

func (d *Service) UnmarshalBSON(b []byte) error

func (*Service) UnmarshalJSON

func (d *Service) UnmarshalJSON(b []byte) error

type ServiceBSONUnmarshaler

type ServiceBSONUnmarshaler struct {
	ID              string `bson:"id"`
	Type            string `bson:"type"`
	ServiceEndPoint string `bson:"service_end_point"`
}

type ServiceJSONMarshaler

type ServiceJSONMarshaler struct {
	ID              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndPoint string `json:"service_end_point"`
}

type ServiceJSONUnmarshaler

type ServiceJSONUnmarshaler struct {
	ID              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndPoint string `json:"service_end_point"`
}

type ServiceMarshaler

type ServiceMarshaler struct {
	ID              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndPoint string `json:"serviceEndpoint"`
}

type SocialLogInAuthentication

type SocialLogInAuthentication struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewSocialLogInAuthentication

func NewSocialLogInAuthentication(
	id, controller, serviceEndpoint string, proof Proof,
) SocialLogInAuthentication

func (SocialLogInAuthentication) AuthType

func (d SocialLogInAuthentication) AuthType() string

func (SocialLogInAuthentication) Bytes

func (d SocialLogInAuthentication) Bytes() []byte

func (SocialLogInAuthentication) Controller

func (d SocialLogInAuthentication) Controller() string

func (*SocialLogInAuthentication) DecodeBSON

func (d *SocialLogInAuthentication) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*SocialLogInAuthentication) DecodeJSON

func (d *SocialLogInAuthentication) DecodeJSON(b []byte, enc encoder.Encoder) error

func (SocialLogInAuthentication) Details

func (d SocialLogInAuthentication) Details() interface{}

func (SocialLogInAuthentication) ID

func (SocialLogInAuthentication) IsValid

func (d SocialLogInAuthentication) IsValid([]byte) error

func (SocialLogInAuthentication) MarshalBSON

func (d SocialLogInAuthentication) MarshalBSON() ([]byte, error)

func (SocialLogInAuthentication) MarshalJSON

func (d SocialLogInAuthentication) MarshalJSON() ([]byte, error)

type SocialLogInAuthenticationBSONUnmarshaler

type SocialLogInAuthenticationBSONUnmarshaler struct {
	Hint            string   `bson:"_hint"`
	ID              string   `bson:"id"`
	AuthType        string   `bson:"authType"`
	Controller      string   `bson:"controller"`
	ServiceEndPoint string   `bson:"serviceEndpoint"`
	Proof           bson.Raw `bson:"proof"`
}

type SocialLogInAuthenticationJSONMarshaler

type SocialLogInAuthenticationJSONMarshaler struct {
	hint.BaseHinter
	ID              string `json:"id"`
	AuthType        string `json:"authType"`
	Controller      string `json:"controller"`
	ServiceEndpoint string `json:"serviceEndpoint"`
	Proof           Proof  `json:"proof"`
}

type SocialLogInAuthenticationJSONUnmarshaler

type SocialLogInAuthenticationJSONUnmarshaler struct {
	Hint            hint.Hint       `json:"_hint"`
	ID              string          `json:"id"`
	AuthType        string          `json:"authType"`
	Controller      string          `json:"controller"`
	ServiceEndpoint string          `json:"serviceEndpoint"`
	Proof           json.RawMessage `json:"proof"`
}

type StringAddress

type StringAddress struct {
	BaseStringAddress
}

func NewStringAddress

func NewStringAddress(s string) StringAddress

func ParseStringAddress

func ParseStringAddress(s string) (StringAddress, error)

func (*StringAddress) DecodeBSON

func (ad *StringAddress) DecodeBSON(b []byte, _ *bsonenc.Encoder) error

func (StringAddress) IsValid

func (ad StringAddress) IsValid([]byte) error

func (StringAddress) MarshalBSONValue

func (ad StringAddress) MarshalBSONValue() (bsontype.Type, []byte, error)

func (*StringAddress) UnmarshalText

func (ad *StringAddress) UnmarshalText(b []byte) error

type VerificationMethod

type VerificationMethod struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewVerificationMethod

func NewVerificationMethod(
	id, verificationType, controller, publicKey string,
) VerificationMethod

func (VerificationMethod) Bytes

func (d VerificationMethod) Bytes() []byte

func (VerificationMethod) Controller

func (d VerificationMethod) Controller() string

func (*VerificationMethod) DecodeBSON

func (d *VerificationMethod) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*VerificationMethod) DecodeJSON

func (d *VerificationMethod) DecodeJSON(b []byte, enc encoder.Encoder) error

func (VerificationMethod) ID

func (d VerificationMethod) ID() string

func (VerificationMethod) IsValid

func (d VerificationMethod) IsValid([]byte) error

func (VerificationMethod) MarshalBSON

func (d VerificationMethod) MarshalBSON() ([]byte, error)

func (VerificationMethod) MarshalJSON

func (d VerificationMethod) MarshalJSON() ([]byte, error)

func (VerificationMethod) VerificationType

func (d VerificationMethod) VerificationType() string

type VerificationMethodBSONUnmarshaler

type VerificationMethodBSONUnmarshaler struct {
	Hint             string `bson:"_hint"`
	ID               string `bson:"id"`
	VerificationType string `bson:"verificationType"`
	Controller       string `bson:"controller"`
	PublicKey        string `bson:"publicKeyHex"`
}

type VerificationMethodJSONMarshaler

type VerificationMethodJSONMarshaler struct {
	hint.BaseHinter
	ID         string `json:"id"`
	VRFType    string `json:"verificationType"`
	Controller string `json:"controller"`
	PublicKey  string `json:"publicKeyHex"`
}

type VerificationMethodJSONUnmarshaler

type VerificationMethodJSONUnmarshaler struct {
	Hint       hint.Hint `json:"_hint"`
	ID         string    `json:"id"`
	VRFType    string    `json:"verificationType"`
	Controller string    `json:"controller"`
	PublicKey  string    `json:"publicKeyHex"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL