Documentation ¶
Index ¶
- Constants
- Variables
- func CheckThreshold(fs []base.Sign, keys AccountKeys) error
- func ChecksumHex(buf [42]byte) []byte
- func IsZeroAddress(ad string) bool
- func ParseDIDScheme(did string) (method, methodSpecificID string, err error)
- type Account
- func (ac Account) Address() base.Address
- func (ac Account) Bytes() []byte
- func (ac *Account) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ac *Account) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (ac Account) EncodeJSON() AccountJSONMarshaler
- func (ac Account) GenerateHash() util.Hash
- func (ac Account) Hash() util.Hash
- func (ac Account) IsValid([]byte) error
- func (ac Account) Keys() AccountKeys
- func (ac Account) MarshalBSON() ([]byte, error)
- func (ac Account) MarshalJSON() ([]byte, error)
- func (ac Account) SetKeys(keys AccountKeys) (Account, error)
- type AccountBSONUnmarshaler
- type AccountJSONMarshaler
- type AccountJSONUnmarshaler
- type AccountKey
- type AccountKeys
- type AddFee
- type Address
- type Addresses
- type Amount
- func (am Amount) Big() common.Big
- func (am Amount) Bytes() []byte
- func (am Amount) Currency() CurrencyID
- func (am *Amount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (am *Amount) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (am Amount) Equal(b Amount) bool
- func (am Amount) GenerateHash() util.Hash
- func (am Amount) Hash() util.Hash
- func (am Amount) IsEmpty() bool
- func (am Amount) IsValid([]byte) error
- func (am Amount) MarshalBSON() ([]byte, error)
- func (am Amount) MarshalJSON() ([]byte, error)
- func (am Amount) String() string
- func (am Amount) WithBig(big common.Big) Amount
- type AmountBSONUnmarshaler
- type AmountJSONMarshaler
- type AmountJSONUnmarshaler
- type AsymmetricKeyAuthentication
- func (d AsymmetricKeyAuthentication) AuthType() string
- func (d AsymmetricKeyAuthentication) Bytes() []byte
- func (d AsymmetricKeyAuthentication) Controller() string
- func (d *AsymmetricKeyAuthentication) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *AsymmetricKeyAuthentication) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d AsymmetricKeyAuthentication) Details() interface{}
- func (d AsymmetricKeyAuthentication) ID() string
- func (d AsymmetricKeyAuthentication) IsValid([]byte) error
- func (d AsymmetricKeyAuthentication) MarshalBSON() ([]byte, error)
- func (d AsymmetricKeyAuthentication) MarshalJSON() ([]byte, error)
- type AsymmetricKeyAuthenticationBSONUnmarshaler
- type AsymmetricKeyAuthenticationJSONMarshaler
- type AsymmetricKeyAuthenticationJSONUnmarshaler
- type BaseAccountKey
- func (ky BaseAccountKey) Bytes() []byte
- func (ky *BaseAccountKey) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ky *BaseAccountKey) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (ky BaseAccountKey) Equal(b AccountKey) bool
- func (ky BaseAccountKey) IsValid([]byte) error
- func (ky BaseAccountKey) Key() base.Publickey
- func (ky BaseAccountKey) MarshalBSON() ([]byte, error)
- func (ky BaseAccountKey) MarshalJSON() ([]byte, error)
- func (ky BaseAccountKey) Weight() uint
- type BaseAccountKeys
- func (ks BaseAccountKeys) Bytes() []byte
- func (ks *BaseAccountKeys) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ks *BaseAccountKeys) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (ks BaseAccountKeys) Equal(b AccountKeys) bool
- func (ks BaseAccountKeys) GenerateHash() (util.Hash, error)
- func (ks BaseAccountKeys) Hash() util.Hash
- func (ks BaseAccountKeys) IsValid([]byte) error
- func (ks BaseAccountKeys) Key(k base.Publickey) (AccountKey, bool)
- func (ks BaseAccountKeys) Keys() []AccountKey
- func (ks BaseAccountKeys) MarshalBSON() ([]byte, error)
- func (ks BaseAccountKeys) MarshalJSON() ([]byte, error)
- func (ks BaseAccountKeys) Threshold() uint
- type BaseStringAddress
- type ContractAccountBSONUnmarshaler
- type ContractAccountKeys
- func (ks ContractAccountKeys) Bytes() []byte
- func (ks *ContractAccountKeys) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ks *ContractAccountKeys) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (ks ContractAccountKeys) Equal(b AccountKeys) bool
- func (ks ContractAccountKeys) GenerateHash() (util.Hash, error)
- func (ks ContractAccountKeys) Hash() util.Hash
- func (ks ContractAccountKeys) IsValid([]byte) error
- func (ks ContractAccountKeys) Key(k base.Publickey) (AccountKey, bool)
- func (ks ContractAccountKeys) Keys() []AccountKey
- func (ks ContractAccountKeys) MarshalBSON() ([]byte, error)
- func (ks ContractAccountKeys) MarshalJSON() ([]byte, error)
- func (ks ContractAccountKeys) Threshold() uint
- type ContractAccountStatus
- func (cs ContractAccountStatus) Bytes() []byte
- func (cs *ContractAccountStatus) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (cs *ContractAccountStatus) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (cs ContractAccountStatus) Equal(b ContractAccountStatus) bool
- func (cs ContractAccountStatus) GenerateHash() util.Hash
- func (cs ContractAccountStatus) Handlers() []base.Address
- func (cs ContractAccountStatus) Hash() util.Hash
- func (cs ContractAccountStatus) IsActive() bool
- func (cs ContractAccountStatus) IsHandler(ad base.Address) bool
- func (cs ContractAccountStatus) IsRecipients(ad base.Address) bool
- func (cs ContractAccountStatus) IsValid([]byte) error
- func (cs ContractAccountStatus) MarshalBSON() ([]byte, error)
- func (cs ContractAccountStatus) MarshalJSON() ([]byte, error)
- func (cs ContractAccountStatus) Owner() base.Address
- func (cs ContractAccountStatus) Recipients() []base.Address
- func (cs *ContractAccountStatus) SetHandlers(handlers []base.Address) error
- func (cs ContractAccountStatus) SetIsActive(b bool) ContractAccountStatus
- func (cs *ContractAccountStatus) SetOwner(a base.Address) error
- func (cs *ContractAccountStatus) SetRecipients(recipients []base.Address) error
- type ContractAccountStatusJSONMarshaler
- type ContractAccountStatusJSONUnmarshaler
- type ContractID
- type CurrencyDesign
- func (de CurrencyDesign) AddTotalSupply(b common.Big) (CurrencyDesign, error)
- func (de CurrencyDesign) Bytes() []byte
- func (de CurrencyDesign) Currency() CurrencyID
- func (de CurrencyDesign) Decimal() common.Big
- func (de *CurrencyDesign) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (de *CurrencyDesign) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (de CurrencyDesign) GenesisAccount() base.Address
- func (de CurrencyDesign) InitialSupply() Amount
- func (de CurrencyDesign) IsValid([]byte) error
- func (de CurrencyDesign) MarshalBSON() ([]byte, error)
- func (de CurrencyDesign) MarshalJSON() ([]byte, error)
- func (de CurrencyDesign) Policy() CurrencyPolicy
- func (de *CurrencyDesign) SetGenesisAccount(ac base.Address)
- func (de *CurrencyDesign) SetPolicy(po CurrencyPolicy)
- func (de CurrencyDesign) TotalSupply() common.Big
- type CurrencyDesignBSONUnmarshaler
- type CurrencyDesignJSONMarshaler
- type CurrencyDesignJSONUnmarshaler
- type CurrencyID
- type CurrencyPolicy
- func (po CurrencyPolicy) Bytes() []byte
- func (po *CurrencyPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (po *CurrencyPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (po CurrencyPolicy) Feeer() Feeer
- func (po CurrencyPolicy) IsValid([]byte) error
- func (po CurrencyPolicy) MarshalBSON() ([]byte, error)
- func (po CurrencyPolicy) MarshalJSON() ([]byte, error)
- func (po CurrencyPolicy) MinBalance() common.Big
- type CurrencyPolicyBSONUnmarshaler
- type CurrencyPolicyJSONMarshaler
- type CurrencyPolicyJSONUnmarshaler
- type DIDDocument
- func (d DIDDocument) Authentication(id string) (IAuthentication, error)
- func (d DIDDocument) Bytes() []byte
- func (d DIDDocument) DID() string
- func (d *DIDDocument) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *DIDDocument) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d DIDDocument) IsValid([]byte) error
- func (d DIDDocument) MarshalBSON() ([]byte, error)
- func (d DIDDocument) MarshalJSON() ([]byte, error)
- func (d DIDDocument) VerificationMethod(id string) (IVerificationMethod, error)
- type DIDDocumentBSONUnmarshaler
- type DIDDocumentJSONMarshaler
- type DIDDocumentJSONUnmarshaler
- type DIDResource
- func (d DIDResource) Bytes() []byte
- func (d DIDResource) DID() string
- func (d DIDResource) DIDUrl() string
- func (d *DIDResource) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *DIDResource) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d DIDResource) Equal(b DIDResource) bool
- func (d DIDResource) IsValid([]byte) error
- func (d DIDResource) MarshalBSON() ([]byte, error)
- func (d DIDResource) MarshalJSON() ([]byte, error)
- func (d DIDResource) Method() string
- func (d DIDResource) MethodSpecificID() string
- func (d *DIDResource) SetFragment(fragment string)
- type DIDResourceBSONUnmarshaler
- type DIDResourceJSONMarshaler
- type DIDResourceJSONUnmarshaler
- type Data
- func (d Data) Address() base.Address
- func (d Data) Bytes() []byte
- func (d Data) DID() string
- func (d Data) DIDResource() DIDResource
- func (d *Data) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *Data) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d Data) Equal(b Data) bool
- func (d Data) IsValid([]byte) error
- func (d Data) MarshalBSON() ([]byte, error)
- func (d Data) MarshalJSON() ([]byte, error)
- type DataBSONUnmarshaler
- type DataJSONMarshaler
- type DataJSONUnmarshaler
- type Design
- func (de Design) Bytes() []byte
- func (de Design) DIDMethod() string
- func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (de Design) Equal(cd Design) bool
- func (de Design) GenerateHash() util.Hash
- func (de Design) Hash() util.Hash
- func (de Design) IsValid([]byte) error
- func (de Design) MarshalBSON() ([]byte, error)
- func (de Design) MarshalJSON() ([]byte, error)
- type DesignBSONUnmarshaler
- type DesignJSONMarshaler
- type DesignJSONUnmarshaler
- type DuplicationType
- type Feeer
- type FixedFeeer
- func (fa FixedFeeer) Bytes() []byte
- func (fa *FixedFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fa *FixedFeeer) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fa FixedFeeer) Fee(common.Big) (common.Big, error)
- func (fa FixedFeeer) IsValid([]byte) error
- func (fa FixedFeeer) MarshalBSON() ([]byte, error)
- func (fa FixedFeeer) MarshalJSON() ([]byte, error)
- func (fa FixedFeeer) Min() common.Big
- func (fa FixedFeeer) Receiver() base.Address
- func (FixedFeeer) Type() string
- type FixedFeeerBSONUnmarshaler
- type FixedFeeerJSONMarshaler
- type FixedFeeerJSONUnmarshaler
- type GetNewProcessor
- type GetNewProcessorWithProposal
- type IAuthentication
- type IVerificationMethod
- type KeyBSONUnmarshaler
- type KeyJSONMarshaler
- type KeyJSONUnmarshaler
- type KeysBSONUnmarshaler
- type KeysHashJSONUnMarshaler
- type KeysJSONMarshaler
- type KeysJSONUnMarshaler
- type MEPrivatekey
- func (k MEPrivatekey) Bytes() []byte
- func (k MEPrivatekey) Equal(b base.PKKey) bool
- func (k MEPrivatekey) IsValid([]byte) error
- func (k MEPrivatekey) MarshalText() ([]byte, error)
- func (k MEPrivatekey) Publickey() base.Publickey
- func (k MEPrivatekey) Sign(b []byte) (base.Signature, error)
- func (k MEPrivatekey) String() string
- func (k *MEPrivatekey) UnmarshalText(b []byte) error
- type MEPublickey
- func (k MEPublickey) Bytes() []byte
- func (k MEPublickey) Equal(b base.PKKey) bool
- func (k MEPublickey) IsValid([]byte) error
- func (k MEPublickey) MarshalText() ([]byte, error)
- func (k MEPublickey) String() string
- func (k *MEPublickey) UnmarshalText(b []byte) error
- func (k MEPublickey) Verify(input []byte, sig base.Signature) error
- type NetworkPolicy
- func (p *NetworkPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (p *NetworkPolicy) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (p NetworkPolicy) EmptyProposalNoBlock() bool
- func (p NetworkPolicy) HashBytes() []byte
- func (p NetworkPolicy) IsValid([]byte) error
- func (p NetworkPolicy) MarshalBSON() ([]byte, error)
- func (p NetworkPolicy) MarshalJSON() ([]byte, error)
- func (p NetworkPolicy) MaxOperationsInProposal() uint64
- func (p NetworkPolicy) MaxSuffrageSize() uint64
- func (p *NetworkPolicy) SetEmptyProposalNoBlock(i bool) NetworkPolicy
- func (p *NetworkPolicy) SetMaxOperationsInProposal(i uint64) NetworkPolicy
- func (p *NetworkPolicy) SetMaxSuffrageSize(i uint64) NetworkPolicy
- func (p *NetworkPolicy) SetSuffrageCandidateLifespan(i base.Height) NetworkPolicy
- func (p *NetworkPolicy) SetSuffrageCandidateLimiterRule(i base.SuffrageCandidateLimiterRule) NetworkPolicy
- func (p *NetworkPolicy) SetSuffrageExpelLifespan(i base.Height) NetworkPolicy
- func (p NetworkPolicy) SuffrageCandidateLifespan() base.Height
- func (p NetworkPolicy) SuffrageCandidateLimiterRule() base.SuffrageCandidateLimiterRule
- func (p NetworkPolicy) SuffrageExpelLifespan() base.Height
- type NetworkPolicyBSONUnMarshaler
- type NetworkPolicyStateValue
- func (s *NetworkPolicyStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *NetworkPolicyStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (s NetworkPolicyStateValue) HashBytes() []byte
- func (s NetworkPolicyStateValue) IsValid([]byte) error
- func (s NetworkPolicyStateValue) MarshalBSON() ([]byte, error)
- func (s NetworkPolicyStateValue) MarshalJSON() ([]byte, error)
- func (s NetworkPolicyStateValue) Policy() base.NetworkPolicy
- type NetworkPolicyStateValueBSONUnmarshaler
- type NetworkPolicyStateValueJSONMarshaler
- type NetworkPolicyStateValueJSONUnmarshaler
- type NilAccountKeys
- func (ks NilAccountKeys) Bytes() []byte
- func (ks *NilAccountKeys) DecodeBSON(b []byte, _ *bsonenc.Encoder) error
- func (ks *NilAccountKeys) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (ks NilAccountKeys) Equal(b AccountKeys) bool
- func (ks NilAccountKeys) GenerateHash(pub base.Publickey) util.Hash
- func (ks NilAccountKeys) Hash() util.Hash
- func (ks NilAccountKeys) IsValid([]byte) error
- func (ks NilAccountKeys) Key(pub base.Publickey) (AccountKey, bool)
- func (ks NilAccountKeys) Keys() []AccountKey
- func (ks NilAccountKeys) MarshalBSON() ([]byte, error)
- func (ks NilAccountKeys) MarshalJSON() ([]byte, error)
- func (ks NilAccountKeys) Threshold() uint
- type NilFeeer
- func (NilFeeer) Bytes() []byte
- func (NilFeeer) Fee(common.Big) (common.Big, error)
- func (fa NilFeeer) IsValid([]byte) error
- func (fa NilFeeer) MarshalBSON() ([]byte, error)
- func (fa NilFeeer) MarshalJSON() ([]byte, error)
- func (NilFeeer) Min() common.Big
- func (NilFeeer) Receiver() base.Address
- func (NilFeeer) Type() string
- func (fa *NilFeeer) UnmarsahlBSON(b []byte) error
- func (fa *NilFeeer) UnmarsahlJSON(b []byte) error
- type Proof
- type ProofBSONUnmarshaler
- type ProofJSONMarshaler
- type ProofJSONUnmarshaler
- type RatioFeeer
- func (fa RatioFeeer) Bytes() []byte
- func (fa *RatioFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fa *RatioFeeer) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fa RatioFeeer) Fee(a common.Big) (common.Big, error)
- func (fa RatioFeeer) IsValid([]byte) error
- func (fa RatioFeeer) MarshalBSON() ([]byte, error)
- func (fa RatioFeeer) MarshalJSON() ([]byte, error)
- func (fa RatioFeeer) Min() common.Big
- func (fa RatioFeeer) Receiver() base.Address
- func (RatioFeeer) Type() string
- type RatioFeeerBSONUnmarshaler
- type RatioFeeerJSONMarshaler
- type RatioFeeerJSONUnmarshaler
- type Service
- type ServiceBSONUnmarshaler
- type ServiceJSONMarshaler
- type ServiceJSONUnmarshaler
- type ServiceMarshaler
- type SocialLogInAuthentication
- func (d SocialLogInAuthentication) AuthType() string
- func (d SocialLogInAuthentication) Bytes() []byte
- func (d SocialLogInAuthentication) Controller() string
- func (d *SocialLogInAuthentication) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *SocialLogInAuthentication) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d SocialLogInAuthentication) Details() interface{}
- func (d SocialLogInAuthentication) ID() string
- func (d SocialLogInAuthentication) IsValid([]byte) error
- func (d SocialLogInAuthentication) MarshalBSON() ([]byte, error)
- func (d SocialLogInAuthentication) MarshalJSON() ([]byte, error)
- type SocialLogInAuthenticationBSONUnmarshaler
- type SocialLogInAuthenticationJSONMarshaler
- type SocialLogInAuthenticationJSONUnmarshaler
- type StringAddress
- type VerificationMethod
- func (d VerificationMethod) Bytes() []byte
- func (d VerificationMethod) Controller() string
- func (d *VerificationMethod) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (d *VerificationMethod) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (d VerificationMethod) ID() string
- func (d VerificationMethod) IsValid([]byte) error
- func (d VerificationMethod) MarshalBSON() ([]byte, error)
- func (d VerificationMethod) MarshalJSON() ([]byte, error)
- func (d VerificationMethod) VerificationType() string
- type VerificationMethodBSONUnmarshaler
- type VerificationMethodJSONMarshaler
- type VerificationMethodJSONUnmarshaler
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 ¶
ChecksumHex return the hex in the manner of EIP55
func IsZeroAddress ¶
func ParseDIDScheme ¶
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) EncodeJSON ¶
func (ac Account) EncodeJSON() AccountJSONMarshaler
func (Account) GenerateHash ¶
func (Account) Keys ¶
func (ac Account) Keys() AccountKeys
func (Account) MarshalBSON ¶
func (Account) MarshalJSON ¶
type AccountBSONUnmarshaler ¶
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 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
type Address ¶
type Address struct {
base.BaseStringAddress
}
func NewAddress ¶
func NewAddressFromKeys ¶
func NewAddressFromKeys(keys AccountKeys) (Address, error)
func ZeroAddress ¶
func ZeroAddress(cid CurrencyID) Address
func (Address) MarshalBSONValue ¶
func (Address) MarshalText ¶
type Amount ¶
type Amount struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewAmount ¶
func MustNewAmount(big common.Big, cid CurrencyID) Amount
func NewZeroAmount ¶
func NewZeroAmount(cid CurrencyID) Amount
func (Amount) Currency ¶
func (am Amount) Currency() CurrencyID
func (Amount) GenerateHash ¶
func (Amount) MarshalBSON ¶
func (Amount) MarshalJSON ¶
type AmountBSONUnmarshaler ¶
type AmountJSONMarshaler ¶
type AmountJSONMarshaler struct { AmountBig string `json:"amount"` Currency CurrencyID `json:"currency"` hint.BaseHinter }
type AmountJSONUnmarshaler ¶
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 (d AsymmetricKeyAuthentication) ID() string
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 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 (ks BaseAccountKeys) Key(k base.Publickey) (AccountKey, bool)
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) 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 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 (ks ContractAccountKeys) Key(k base.Publickey) (AccountKey, bool)
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 (cs ContractAccountStatus) Equal(b ContractAccountStatus) bool
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 (cs ContractAccountStatus) SetIsActive(b bool) ContractAccountStatus
func (*ContractAccountStatus) SetOwner ¶
func (cs *ContractAccountStatus) SetOwner(a base.Address) error
func (*ContractAccountStatus) SetRecipients ¶
func (cs *ContractAccountStatus) SetRecipients(recipients []base.Address) error
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 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 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 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 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 (Data) DIDResource ¶
func (d Data) DIDResource() DIDResource
func (Data) MarshalBSON ¶
func (Data) MarshalJSON ¶
type DataBSONUnmarshaler ¶
type DataJSONMarshaler ¶
type DataJSONMarshaler struct { hint.BaseHinter Address string `json:"address"` DID string `json:"did"` }
type DataJSONUnmarshaler ¶
type Design ¶
type Design struct { hint.BaseHinter // contains filtered or unexported fields }
func (Design) GenerateHash ¶
func (Design) MarshalBSON ¶
func (Design) MarshalJSON ¶
type DesignBSONUnmarshaler ¶
type DesignJSONMarshaler ¶
type DesignJSONMarshaler struct { hint.BaseHinter DIDMethod string `json:"didMethod"` }
type DesignJSONUnmarshaler ¶
type DuplicationType ¶
type DuplicationType string
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) 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 FixedFeeerJSONMarshaler ¶
type FixedFeeerJSONMarshaler struct { hint.BaseHinter Receiver base.Address `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 IVerificationMethod ¶
type KeyBSONUnmarshaler ¶
type KeyJSONMarshaler ¶
type KeyJSONMarshaler struct { hint.BaseHinter Weight uint `json:"weight"` Key base.Publickey `json:"key"` }
type KeyJSONUnmarshaler ¶
type KeysBSONUnmarshaler ¶
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) 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) 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) 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
type NetworkPolicy ¶
type NetworkPolicy struct { hint.BaseHinter // contains filtered or unexported fields }
func DefaultNetworkPolicy ¶
func DefaultNetworkPolicy() NetworkPolicy
func NewNetworkPolicy ¶
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 ¶
func (s NetworkPolicyStateValue) Policy() base.NetworkPolicy
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) MarshalBSON ¶
func (NilFeeer) MarshalJSON ¶
func (*NilFeeer) UnmarsahlBSON ¶
func (*NilFeeer) UnmarsahlJSON ¶
type Proof ¶
type Proof struct {
// contains filtered or unexported fields
}
func (Proof) MarshalBSON ¶
func (Proof) MarshalJSON ¶
func (*Proof) UnmarshalBSON ¶
func (*Proof) UnmarshalJSON ¶
func (Proof) VerificationMethod ¶
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 (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) 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 RatioFeeerJSONMarshaler ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (Service) MarshalBSON ¶
func (Service) MarshalJSON ¶
func (*Service) UnmarshalBSON ¶
func (*Service) UnmarshalJSON ¶
type ServiceBSONUnmarshaler ¶
type ServiceJSONMarshaler ¶
type ServiceJSONUnmarshaler ¶
type ServiceMarshaler ¶
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 (d SocialLogInAuthentication) ID() string
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 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
Source Files ¶
- account.go
- account_bson.go
- account_encode.go
- account_json.go
- address.go
- address_bson.go
- address_json.go
- amount.go
- amount_bson.go
- amount_encode.go
- amount_json.go
- authentication.go
- authentication_bson.go
- authentication_encode.go
- authentication_json.go
- base_string_address.go
- contract_account_status.go
- contract_account_status_bson.go
- contract_account_status_encode.go
- contract_account_status_json.go
- currency.go
- currency_design.go
- currency_design_bson.go
- currency_design_encode.go
- currency_design_json.go
- currency_policy.go
- currency_policy_bson.go
- currency_policy_encode.go
- currency_policy_json.go
- currency_pool.go
- design.go
- design_bson.go
- design_encode.go
- design_json.go
- did_data.go
- did_data_bson.go
- did_data_encode.go
- did_data_json.go
- did_document.go
- did_document_bson.go
- did_document_encode.go
- did_document_json.go
- feeer.go
- feeer_bson.go
- feeer_encode.go
- feeer_json.go
- keys.go
- keys_bson.go
- keys_encode.go
- keys_json.go
- network_policy.go
- network_policy_bson.go
- network_policy_encode.go
- network_policy_json.go
- pk_priv.go
- pk_pub.go
- string_address.go
- type.go
Click to show internal directories.
Click to hide internal directories.