tezos

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TezosconnectConfigKey is a sub-key in the config to contain all the tezosconnect specific config
	TezosconnectConfigKey = "tezosconnect"
	// TezosconnectConfigTopic is the websocket listen topic that the node should register on, which is important if there are multiple
	// nodes using a single tezosconnect
	TezosconnectConfigTopic = "topic"
	// TezosconnectConfigBatchSize is the batch size to configure on event streams, when auto-defining them
	TezosconnectConfigBatchSize = "batchSize"
	// TezosconnectConfigBatchTimeout is the batch timeout to configure on event streams, when auto-defining them
	TezosconnectConfigBatchTimeout = "batchTimeout"
	// TezosconnectPrefixShort is used in the query string in requests to tezosconnect
	TezosconnectPrefixShort = "prefixShort"
	// TezosconnectPrefixLong is used in HTTP headers in requests to tezosconnect
	TezosconnectPrefixLong = "prefixLong"
	// TezosconnectBackgroundStart is used to not fail the tezos plugin on init and retry to start it in the background
	TezosconnectBackgroundStart = "backgroundStart.enabled"
	// TezosconnectBackgroundStartInitialDelay is delay between restarts in the case where we retry to restart in the tezos plugin
	TezosconnectBackgroundStartInitialDelay = "backgroundStart.initialDelay"
	// TezosconnectBackgroundStartMaxDelay is the max delay between restarts in the case where we retry to restart in the tezos plugin
	TezosconnectBackgroundStartMaxDelay = "backgroundStart.maxDelay"
	// TezosconnectBackgroundStartFactor is to set the factor by which the delay increases when retrying
	TezosconnectBackgroundStartFactor = "backgroundStart.factor"

	// AddressResolverConfigKey is a sub-key in the config to contain an address resolver config.
	AddressResolverConfigKey = "addressResolver"
	// AddressResolverAlwaysResolve causes the address resolve to be invoked on every API call that resolves an address and disables any caching
	AddressResolverAlwaysResolve = "alwaysResolve"
	// AddressResolverRetainOriginal when true the original pre-resolved string is retained after the lookup, and passed down to Tezosconnect 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 - a ".intent" string can be used in the go template
	AddressResolverURLTemplate = "urlTemplate"
	// AddressResolverBodyTemplate the body go template string to use when calling the address resolver - a ".intent" string can be used in the go template
	AddressResolverBodyTemplate = "bodyTemplate"
	// AddressResolverResponseField the name of a JSON field that is provided in the response, that contains the tezos address (default "address")
	AddressResolverResponseField = "responseField"

	// FFTMConfigKey is a sub-key in the config that optionally contains FireFly transaction connection information
	FFTMConfigKey = "fftm"
)
View Source
const (
	ReceiptTransactionSuccess string = "TransactionSuccess"
	ReceiptTransactionFailed  string = "TransactionFailed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenerCheckpoint

type ListenerCheckpoint struct {
	Block                   int64 `json:"block"`
	TransactionBatchIndex   int64 `json:"transactionBatchIndex"`
	TransactionIndex        int64 `json:"transactionIndex"`
	MetaInternalResultIndex int64 `json:"metaInternalResultIndex"`
}

type ListenerStatus

type ListenerStatus struct {
	Checkpoint ListenerCheckpoint `json:"checkpoint"`
	Catchup    bool               `json:"catchup"`
}

type Location

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

type PayloadSchema

type PayloadSchema struct {
	Type        string        `json:"type"`
	PrefixItems []*PrefixItem `json:"prefixItems"`
}

type PrefixItem

type PrefixItem struct {
	Name    string       `json:"name"`
	Type    string       `json:"type"`
	Details paramDetails `json:"details,omitempty"`
}

type Tezos

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

func (*Tezos) AddContractListener

func (t *Tezos) AddContractListener(ctx context.Context, listener *core.ContractListener) (err error)

func (*Tezos) AddFireflySubscription

func (t *Tezos) AddFireflySubscription(ctx context.Context, namespace *core.Namespace, contract *blockchain.MultipartyContract) (string, error)

func (*Tezos) Capabilities

func (t *Tezos) Capabilities() *blockchain.Capabilities

func (*Tezos) DeleteContractListener

func (t *Tezos) DeleteContractListener(ctx context.Context, subscription *core.ContractListener, okNotFound bool) error

func (*Tezos) DeployContract

func (t *Tezos) DeployContract(ctx context.Context, nsOpID, signingKey string, definition, contract *fftypes.JSONAny, input []interface{}, options map[string]interface{}) (submissionRejected bool, err error)

func (*Tezos) GenerateErrorSignature

func (t *Tezos) GenerateErrorSignature(ctx context.Context, event *fftypes.FFIErrorDefinition) string

func (*Tezos) GenerateEventSignature

func (t *Tezos) GenerateEventSignature(ctx context.Context, event *fftypes.FFIEventDefinition) string

func (*Tezos) GenerateFFI

func (t *Tezos) GenerateFFI(ctx context.Context, generationRequest *fftypes.FFIGenerationRequest) (*fftypes.FFI, error)

func (*Tezos) GetAndConvertDeprecatedContractConfig

func (t *Tezos) GetAndConvertDeprecatedContractConfig(ctx context.Context) (location *fftypes.JSONAny, fromBlock string, err error)

func (*Tezos) GetContractListenerStatus

func (t *Tezos) GetContractListenerStatus(ctx context.Context, namespace, subID string, okNotFound bool) (found bool, status interface{}, err error)

Note: In state of development. Approach can be changed.

func (*Tezos) GetFFIParamValidator

func (t *Tezos) GetFFIParamValidator(ctx context.Context) (fftypes.FFIParamValidator, error)

func (*Tezos) GetNetworkVersion

func (t *Tezos) GetNetworkVersion(ctx context.Context, location *fftypes.JSONAny) (version int, err error)

func (*Tezos) GetTransactionStatus

func (t *Tezos) GetTransactionStatus(ctx context.Context, operation *core.Operation) (interface{}, error)

func (*Tezos) Init

func (t *Tezos) Init(ctx context.Context, cancelCtx context.CancelFunc, conf config.Section, metrics metrics.Manager, cacheManager cache.Manager) (err error)

func (*Tezos) InitConfig

func (t *Tezos) InitConfig(config config.Section)

func (*Tezos) InvokeContract

func (t *Tezos) InvokeContract(ctx context.Context, nsOpID string, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}, batch *blockchain.BatchPin) (bool, error)

func (*Tezos) Name

func (t *Tezos) Name() string

func (*Tezos) NormalizeContractLocation

func (t *Tezos) NormalizeContractLocation(ctx context.Context, ntype blockchain.NormalizeType, location *fftypes.JSONAny) (result *fftypes.JSONAny, err error)

func (*Tezos) ParseInterface

func (t *Tezos) ParseInterface(ctx context.Context, method *fftypes.FFIMethod, errors []*fftypes.FFIError) (interface{}, error)

func (*Tezos) QueryContract

func (t *Tezos) QueryContract(ctx context.Context, signingKey string, location *fftypes.JSONAny, parsedMethod interface{}, input map[string]interface{}, options map[string]interface{}) (interface{}, error)

func (*Tezos) RemoveFireflySubscription

func (t *Tezos) RemoveFireflySubscription(ctx context.Context, subID string)

func (*Tezos) ResolveSigningKey

func (t *Tezos) ResolveSigningKey(ctx context.Context, key string, intent blockchain.ResolveKeyIntent) (resolved string, err error)

func (*Tezos) SetHandler

func (t *Tezos) SetHandler(namespace string, handler blockchain.Callbacks)

func (*Tezos) SetOperationHandler

func (t *Tezos) SetOperationHandler(namespace string, handler core.OperationCallbacks)

func (*Tezos) Start

func (t *Tezos) Start() (err error)

func (*Tezos) StartNamespace

func (t *Tezos) StartNamespace(ctx context.Context, namespace string) (err error)

func (*Tezos) StopNamespace

func (t *Tezos) StopNamespace(ctx context.Context, namespace string) (err error)

func (*Tezos) SubmitBatchPin

func (t *Tezos) SubmitBatchPin(ctx context.Context, nsOpID, networkNamespace, signingKey string, batch *blockchain.BatchPin, location *fftypes.JSONAny) error

func (*Tezos) SubmitNetworkAction

func (t *Tezos) SubmitNetworkAction(ctx context.Context, nsOpID string, signingKey string, action core.NetworkActionType, location *fftypes.JSONAny) error

func (*Tezos) ValidateInvokeRequest

func (t *Tezos) ValidateInvokeRequest(ctx context.Context, parsedMethod interface{}, input map[string]interface{}, hasMessage bool) error

func (*Tezos) VerifierType

func (t *Tezos) VerifierType() core.VerifierType

type TezosconnectMessageHeaders

type TezosconnectMessageHeaders struct {
	Type string `json:"type,omitempty"`
	ID   string `json:"id,omitempty"`
}

Jump to

Keyboard shortcuts

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