Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultProofBlockRange = 30 DefaultProofBlockMinDuration = 300 DefaultProofDuration = 15 * 60 * time.Second DefaultHashProofTarget = "0000" DefaultHashProofCount = 60 )
View Source
const (
AppOriginSD = "StableDiffusion"
)
Variables ¶
This section is empty.
Functions ¶
func ProofByCalcHash ¶
Types ¶
type EIP155Signer ¶
type EIP155Signer struct {
// contains filtered or unexported fields
}
func NewEIP155Signer ¶
func NewEIP155Signer(forks crypto.ForksInTime, networkID uint64) *EIP155Signer
NewEIP155Signer returns a new EIP155Signer object
func (*EIP155Signer) CalculateV ¶
func (e *EIP155Signer) CalculateV(parity byte) []byte
calculateV returns the V value for app provider signatures. Based on EIP155
func (*EIP155Signer) Hash ¶
func (e *EIP155Signer) Hash(resp *EdgeResponse) types.Hash
Hash is a wrapper function that calls calcCallHash with the EIP155Signer's networkID
func (*EIP155Signer) Provider ¶
func (e *EIP155Signer) Provider(resp *EdgeResponse) (types.Address, error)
Provider returns the telegram provider
func (*EIP155Signer) SignEdgeResp ¶
func (e *EIP155Signer) SignEdgeResp( resp *EdgeResponse, privateKey *ecdsa.PrivateKey, ) (*EdgeResponse, error)
SignMsg signs the transaction using the passed in private key
type EdgeResponse ¶
type EdgeResponse struct { RespString string V *big.Int R *big.Int S *big.Int From types.Address Hash types.Hash }
func (*EdgeResponse) Copy ¶
func (r *EdgeResponse) Copy() *EdgeResponse
func (*EdgeResponse) MarshalRLP ¶
func (r *EdgeResponse) MarshalRLP() []byte
func (*EdgeResponse) MarshalRLPTo ¶
func (r *EdgeResponse) MarshalRLPTo(dst []byte) []byte
func (*EdgeResponse) MarshalRLPWith ¶
func (r *EdgeResponse) MarshalRLPWith(arena *fastrlp.Arena) *fastrlp.Value
MarshalRLPWith marshals the EdgeResponse to RLP with a specific fastrlp.Arena
func (*EdgeResponse) UnmarshalRLP ¶
func (r *EdgeResponse) UnmarshalRLP(input []byte) error
type Signer ¶
type Signer interface { // Hash returns the hash of the transaction Hash(resp *EdgeResponse) types.Hash // Provider returns the provider of the edge call request Provider(resp *EdgeResponse) (types.Address, error) // SignMsg signs a transaction SignEdgeResp(resp *EdgeResponse, priv *ecdsa.PrivateKey) (*EdgeResponse, error) // CalculateV calculates the V value based on the type of signer used CalculateV(parity byte) []byte }
Signer is a utility interface used to recover data from a rtc
Click to show internal directories.
Click to hide internal directories.