ethereum

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EthconnectConfigKey is a sub-key in the config to contain all the ethconnect specific config,
	EthconnectConfigKey = "ethconnect"
	// EthconnectConfigInstancePath is the /contracts/0x12345 or /instances/0x12345 path of the REST API exposed by ethconnect for the contract
	EthconnectConfigInstancePath = "instance"
	// EthconnectConfigTopic is the websocket listen topic that the node should register on, which is important if there are multiple
	// nodes using a single ethconnect
	EthconnectConfigTopic = "topic"
	// EthconnectConfigBatchSize is the batch size to configure on event streams, when auto-defining them
	EthconnectConfigBatchSize = "batchSize"
	// EthconnectConfigBatchTimeout is the batch timeout to configure on event streams, when auto-defining them
	EthconnectConfigBatchTimeout = "batchTimeout"
	// EthconnectPrefixShort is used in the query string in requests to ethconnect
	EthconnectPrefixShort = "prefixShort"
	// EthconnectPrefixLong is used in HTTP headers in requests to ethconnect
	EthconnectPrefixLong = "prefixLong"

	// AddressResolverConfigKey is a sub-key in the config to contain an address resolver config.
	AddressResolverConfigKey = "addressResolver"
	// AddressResolverRetainOriginal when true the original pre-resolved string is retained after the lookup, and passed down to EthConnect as the from address
	AddressResolverRetainOriginal = "retainOriginal"
	// AddressResolverMethod the HTTP method to use to call the address resolver (default GET)
	AddressResolverMethod = "method"
	// AddressResolverURLTemplate the URL go template string to use when calling the address resolver
	AddressResolverURLTemplate = "urlTemplate"
	// AddressResolverBodyTemplate the body go template string to use when calling the address resolver
	AddressResolverBodyTemplate = "bodyTemplate"
	// AddressResolverResponseField the name of a JSON field that is provided in the response, that contains the ethereum address (default "address")
	AddressResolverResponseField = "responseField"
	// AddressResolverCacheSize the size of the LRU cache
	AddressResolverCacheSize = "cache.size"
	// AddressResolverCacheTTL the TTL on cache entries
	AddressResolverCacheTTL = "cache.ttl"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ethereum

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

func (*Ethereum) AddSubscription added in v0.12.0

func (e *Ethereum) AddSubscription(ctx context.Context, subscription *fftypes.ContractSubscriptionInput) error

func (*Ethereum) Capabilities

func (e *Ethereum) Capabilities() *blockchain.Capabilities

func (*Ethereum) DeleteSubscription added in v0.12.0

func (e *Ethereum) DeleteSubscription(ctx context.Context, subscription *fftypes.ContractSubscription) error

func (*Ethereum) GetFFIParamValidator added in v0.12.0

func (e *Ethereum) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error)

func (*Ethereum) Init

func (e *Ethereum) Init(ctx context.Context, prefix config.Prefix, callbacks blockchain.Callbacks) (err error)

func (*Ethereum) InitPrefix

func (e *Ethereum) InitPrefix(prefix config.Prefix)

func (*Ethereum) InvokeContract added in v0.12.0

func (e *Ethereum) InvokeContract(ctx context.Context, operationID *fftypes.UUID, signingKey string, location *fftypes.JSONAny, method *fftypes.FFIMethod, input map[string]interface{}) (interface{}, error)

func (*Ethereum) Name

func (e *Ethereum) Name() string

func (*Ethereum) QueryContract added in v0.12.0

func (e *Ethereum) QueryContract(ctx context.Context, location *fftypes.JSONAny, method *fftypes.FFIMethod, input map[string]interface{}) (interface{}, error)

func (*Ethereum) ResolveSigningKey

func (e *Ethereum) ResolveSigningKey(ctx context.Context, key string) (string, error)

func (*Ethereum) Start

func (e *Ethereum) Start() error

func (*Ethereum) SubmitBatchPin

func (e *Ethereum) SubmitBatchPin(ctx context.Context, operationID *fftypes.UUID, ledgerID *fftypes.UUID, signingKey string, batch *blockchain.BatchPin) error

func (*Ethereum) ValidateContractLocation added in v0.12.0

func (e *Ethereum) ValidateContractLocation(ctx context.Context, location *fftypes.JSONAny) (err error)

type FFIParamValidator added in v0.12.0

type FFIParamValidator struct{}

func (*FFIParamValidator) Compile added in v0.12.0

func (v *FFIParamValidator) Compile(ctx jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)

func (*FFIParamValidator) GetExtensionName added in v0.12.0

func (v *FFIParamValidator) GetExtensionName() string

func (*FFIParamValidator) GetMetaSchema added in v0.12.0

func (v *FFIParamValidator) GetMetaSchema() *jsonschema.Schema

type Location added in v0.12.0

type Location struct {
	Address string `json:"address"`
}

Jump to

Keyboard shortcuts

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