client

package
v0.0.0-...-ea08b5f Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 20 Imported by: 21

Documentation

Overview

Package client enables interaction with APIs of test components like the mockserver and Chainlink nodes

Package client enables interaction with APIs of test components like the mockserver and Chainlink nodes

Index

Constants

View Source
const (
	// ChainlinkKeyPassword used to encrypt exported keys
	ChainlinkKeyPassword string = "twochains"
	// NodeURL string for logging
	NodeURL string = "Node URL"
)

Variables

View Source
var (
	// OneLINK representation of a single LINK token
	OneLINK = big.NewFloat(1e18)
)

Functions

func CreateNodeKeysBundle

func CreateNodeKeysBundle(nodes []*ChainlinkClient, chainName string, chainId string) ([]NodeKeysBundle, []*CLNodesWithKeys, error)

func MarshallTemplate

func MarshallTemplate(jobSpec interface{}, name, templateString string) (string, error)

marshallTemplate Helper to marshall templates

func ObservationSourceSpecBridge

func ObservationSourceSpecBridge(bta *BridgeTypeAttributes) string

ObservationSourceSpecBridge creates a bridge task spec for json data

func ObservationSourceSpecHTTP

func ObservationSourceSpecHTTP(url string) string

ObservationSourceSpecHTTP creates a http GET task spec for json data

func ReconnectChainlinkNodes

func ReconnectChainlinkNodes(testEnvironment *environment.Environment, nodes []*ChainlinkK8sClient) (err error)

ReconnectChainlinkNodes reconnects to Chainlink nodes after they have been modified, say through a Helm upgrade Note: Experimental as of now, will likely not work predictably.

func VerifyStatusCode

func VerifyStatusCode(actStatusCd, expStatusCd int) error

VerifyStatusCode verifies the status code of the response. Favor VerifyStatusCodeWithResponse over this for better errors

func VerifyStatusCodeWithResponse

func VerifyStatusCodeWithResponse(res *resty.Response, expStatusCd int) error

VerifyStatusCodeWithResponse verifies the status code of the response and returns the response as part of the error. Favor this over VerifyStatusCode

Types

type BlockHeaderFeederJobSpec

type BlockHeaderFeederJobSpec struct {
	Name                       string        `toml:"name"`
	CoordinatorV2Address       string        `toml:"coordinatorV2Address"`
	CoordinatorV2PlusAddress   string        `toml:"coordinatorV2PlusAddress"`
	BlockhashStoreAddress      string        `toml:"blockhashStoreAddress"`
	BatchBlockhashStoreAddress string        `toml:"batchBlockhashStoreAddress"`
	ExternalJobID              string        `toml:"externalJobID"`
	FromAddresses              []string      `toml:"fromAddresses"`
	EVMChainID                 string        `toml:"evmChainID"`
	ForwardingAllowed          bool          `toml:"forwardingAllowed"`
	PollPeriod                 time.Duration `toml:"pollPeriod"`
	RunTimeout                 time.Duration `toml:"runTimeout"`
	WaitBlocks                 int           `toml:"waitBlocks"`
	LookbackBlocks             int           `toml:"lookbackBlocks"`
}

BlockHeaderFeederJobSpec represents a blockheaderfeeder job

func (*BlockHeaderFeederJobSpec) String

func (b *BlockHeaderFeederJobSpec) String() (string, error)

String representation of the job

func (*BlockHeaderFeederJobSpec) Type

func (b *BlockHeaderFeederJobSpec) Type() string

Type returns the type of the job

type BlockhashStoreJobSpec

type BlockhashStoreJobSpec struct {
	Name                     string        `toml:"name"`
	CoordinatorV2Address     string        `toml:"coordinatorV2Address"`
	CoordinatorV2PlusAddress string        `toml:"coordinatorV2PlusAddress"`
	BlockhashStoreAddress    string        `toml:"blockhashStoreAddress"`
	ExternalJobID            string        `toml:"externalJobID"`
	FromAddresses            []string      `toml:"fromAddresses"`
	EVMChainID               string        `toml:"evmChainID"`
	ForwardingAllowed        bool          `toml:"forwardingAllowed"`
	PollPeriod               time.Duration `toml:"pollPeriod"`
	RunTimeout               time.Duration `toml:"runTimeout"`
	WaitBlocks               int           `toml:"waitBlocks"`
	LookbackBlocks           int           `toml:"lookbackBlocks"`
}

BlockhashStoreJobSpec represents a blockhashstore job

func (*BlockhashStoreJobSpec) String

func (b *BlockhashStoreJobSpec) String() (string, error)

String representation of the job

func (*BlockhashStoreJobSpec) Type

func (b *BlockhashStoreJobSpec) Type() string

Type returns the type of the job

type BridgeType

type BridgeType struct {
	Data BridgeTypeData `json:"data"`
}

BridgeType is the model that represents the bridge when read or created on a Chainlink node

type BridgeTypeAttributes

type BridgeTypeAttributes struct {
	Name        string `json:"name"`
	URL         string `json:"url"`
	RequestData string `json:"requestData,omitempty"`
}

BridgeTypeAttributes is the model that represents the bridge when read or created on a Chainlink node

type BridgeTypeData

type BridgeTypeData struct {
	Attributes BridgeTypeAttributes `json:"attributes"`
}

BridgeTypeData is the model that represents the bridge when read or created on a Chainlink node

type Bridges

type Bridges struct {
	Data []BridgeTypeData `json:"data"`
}

Bridges is the model that represents the bridges when read on a Chainlink node

type CLNodesWithKeys

type CLNodesWithKeys struct {
	Node       *ChainlinkClient
	KeysBundle NodeKeysBundle
}

type CSAKey

type CSAKey struct {
	Data CSAKeyData `json:"data"`
}

CSAKey is the model that represents the created CSA key when created

type CSAKeyAttributes

type CSAKeyAttributes struct {
	PublicKey string `json:"publicKey"`
	Version   int    `json:"version"`
}

CSAKeyAttributes is the model that represents the attributes of a CSA Key

type CSAKeyData

type CSAKeyData struct {
	Type       string           `json:"type"`
	ID         string           `json:"id"`
	Attributes CSAKeyAttributes `json:"attributes"`
}

CSAKeyData is the model that represents the created CSA key when read

type CSAKeys

type CSAKeys struct {
	Data []CSAKeyData `json:"data"`
}

CSAKeys is the model that represents the created CSA keys when read

type ChainlinkClient

type ChainlinkClient struct {
	APIClient *resty.Client
	Config    *ChainlinkConfig
	// contains filtered or unexported fields
}

func NewChainlinkClient

func NewChainlinkClient(c *ChainlinkConfig, logger zerolog.Logger) (*ChainlinkClient, error)

NewChainlinkClient creates a new Chainlink model using a provided config

func (*ChainlinkClient) CreateBridge

func (c *ChainlinkClient) CreateBridge(bta *BridgeTypeAttributes) (*http.Response, error)

func (*ChainlinkClient) CreateCSAKey

func (c *ChainlinkClient) CreateCSAKey() (*CSAKey, *http.Response, error)

CreateCSAKey creates a CSA key on the Chainlink node, only 1 CSA key per noe

func (*ChainlinkClient) CreateCosmosChain

func (c *ChainlinkClient) CreateCosmosChain(chain *CosmosChainAttributes) (*CosmosChainCreate, *http.Response, error)

CreateCosmosChain creates a cosmos chain

func (*ChainlinkClient) CreateCosmosNode

func (c *ChainlinkClient) CreateCosmosNode(node *CosmosNodeAttributes) (*CosmosNodeCreate, *http.Response, error)

CreateCosmosNode creates a cosmos node

func (*ChainlinkClient) CreateEI

func (c *ChainlinkClient) CreateEI(eia *EIAttributes) (*EIKeyCreate, *http.Response, error)

CreateEI creates an EI on the Chainlink node based on the provided attributes and returns the respective secrets

func (*ChainlinkClient) CreateJob

func (c *ChainlinkClient) CreateJob(spec JobSpec) (*Job, *resty.Response, error)

CreateJob creates a Chainlink job based on the provided spec struct

func (*ChainlinkClient) CreateJobRaw

func (c *ChainlinkClient) CreateJobRaw(spec string) (*Job, *http.Response, error)

CreateJobRaw creates a Chainlink job based on the provided spec string

func (*ChainlinkClient) CreateOCR2Key

func (c *ChainlinkClient) CreateOCR2Key(chain string) (*OCR2Key, *http.Response, error)

CreateOCR2Key creates an OCR2Key on the Chainlink node

func (*ChainlinkClient) CreateOCRKey

func (c *ChainlinkClient) CreateOCRKey() (*OCRKey, *http.Response, error)

CreateOCRKey creates an OCRKey on the Chainlink node

func (*ChainlinkClient) CreateP2PKey

func (c *ChainlinkClient) CreateP2PKey() (*P2PKey, *http.Response, error)

CreateP2PKey creates an P2PKey on the Chainlink node

func (*ChainlinkClient) CreateSolanaChain

func (c *ChainlinkClient) CreateSolanaChain(chain *SolanaChainAttributes) (*SolanaChainCreate, *http.Response, error)

CreateSolanaChain creates a solana chain

func (*ChainlinkClient) CreateSolanaNode

func (c *ChainlinkClient) CreateSolanaNode(node *SolanaNodeAttributes) (*SolanaNodeCreate, *http.Response, error)

CreateSolanaNode creates a solana node

func (*ChainlinkClient) CreateSpec

func (c *ChainlinkClient) CreateSpec(spec string) (*Spec, *http.Response, error)

CreateSpec creates a job spec on the Chainlink node

func (*ChainlinkClient) CreateStarkNetChain

func (c *ChainlinkClient) CreateStarkNetChain(chain *StarkNetChainAttributes) (*StarkNetChainCreate, *http.Response, error)

CreateStarkNetChain creates a starknet chain

func (*ChainlinkClient) CreateStarkNetNode

func (c *ChainlinkClient) CreateStarkNetNode(node *StarkNetNodeAttributes) (*StarkNetNodeCreate, *http.Response, error)

CreateStarkNetNode creates a starknet node

func (*ChainlinkClient) CreateTxKey

func (c *ChainlinkClient) CreateTxKey(chain string, chainId string) (*TxKey, *http.Response, error)

CreateTxKey creates a tx key on the Chainlink node

func (*ChainlinkClient) DeleteBridge

func (c *ChainlinkClient) DeleteBridge(name string) (*http.Response, error)

DeleteBridge deletes a bridge on the Chainlink node based on the provided name

func (*ChainlinkClient) DeleteEI

func (c *ChainlinkClient) DeleteEI(name string) (*http.Response, error)

DeleteEI deletes an external initiator in the Chainlink node based on the provided name

func (*ChainlinkClient) DeleteJob

func (c *ChainlinkClient) DeleteJob(id string) (*http.Response, error)

DeleteJob deletes a job with a provided ID from the Chainlink node

func (*ChainlinkClient) DeleteOCR2Key

func (c *ChainlinkClient) DeleteOCR2Key(id string) (*http.Response, error)

DeleteOCR2Key deletes an OCR2Key based on the provided ID

func (*ChainlinkClient) DeleteOCRKey

func (c *ChainlinkClient) DeleteOCRKey(id string) (*http.Response, error)

DeleteOCRKey deletes an OCRKey based on the provided ID

func (*ChainlinkClient) DeleteP2PKey

func (c *ChainlinkClient) DeleteP2PKey(id int) (*http.Response, error)

DeleteP2PKey deletes a P2PKey on the Chainlink node based on the provided ID

func (*ChainlinkClient) DeleteSpec

func (c *ChainlinkClient) DeleteSpec(id string) (*http.Response, error)

DeleteSpec deletes a job spec with the provided ID from the Chainlink node

func (*ChainlinkClient) DeleteTxKey

func (c *ChainlinkClient) DeleteTxKey(chain string, id string) (*http.Response, error)

DeleteTxKey deletes an tx key based on the provided ID

func (*ChainlinkClient) EthAddresses

func (c *ChainlinkClient) EthAddresses() ([]string, error)

EthAddresses returns the ETH addresses for the Chainlink node

func (*ChainlinkClient) EthAddressesForChain

func (c *ChainlinkClient) EthAddressesForChain(chainId string) ([]string, error)

EthAddresses returns the ETH addresses of the Chainlink node for a specific chain id

func (*ChainlinkClient) ExportEVMKeys

func (c *ChainlinkClient) ExportEVMKeys() ([]*ExportedEVMKey, error)

ExportEVMKeys exports Chainlink private EVM keys

func (*ChainlinkClient) ExportEVMKeysForChain

func (c *ChainlinkClient) ExportEVMKeysForChain(chainid string) ([]*ExportedEVMKey, error)

ExportEVMKeysForChain exports Chainlink private EVM keys for a particular chain

func (*ChainlinkClient) ExportVRFKey

func (c *ChainlinkClient) ExportVRFKey(keyId string) (*VRFExportKey, *http.Response, error)

ExportVRFKey exports a vrf key by key id

func (*ChainlinkClient) GetConfig

func (c *ChainlinkClient) GetConfig() ChainlinkConfig

func (*ChainlinkClient) GetForwarders

func (c *ChainlinkClient) GetForwarders() (*Forwarders, *http.Response, error)

GetForwarders get list of tracked forwarders

func (*ChainlinkClient) ImportVRFKey

func (c *ChainlinkClient) ImportVRFKey(vrfExportKey *VRFExportKey) (*VRFKey, *http.Response, error)

ImportVRFKey import vrf key

func (*ChainlinkClient) InternalIP

func (c *ChainlinkClient) InternalIP() string

InternalIP retrieves the inter-cluster IP of the Chainlink node, for use with inter-node communications

func (*ChainlinkClient) MustCreateBridge

func (c *ChainlinkClient) MustCreateBridge(bta *BridgeTypeAttributes) error

MustCreateBridge creates a bridge on the Chainlink node based on the provided attributes and returns error if the request is unsuccessful

func (*ChainlinkClient) MustCreateDkgEncryptKey

func (c *ChainlinkClient) MustCreateDkgEncryptKey() (*DKGEncryptKey, error)

MustCreateDkgEncryptKey creates a DKG Encrypt key on the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustCreateDkgSignKey

func (c *ChainlinkClient) MustCreateDkgSignKey() (*DKGSignKey, error)

MustCreateDkgSignKey creates a DKG Sign key on the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustCreateJob

func (c *ChainlinkClient) MustCreateJob(spec JobSpec) (*Job, error)

MustCreateJob creates a Chainlink job based on the provided spec struct and returns error if the request is unsuccessful

func (*ChainlinkClient) MustCreateVRFKey

func (c *ChainlinkClient) MustCreateVRFKey() (*VRFKey, error)

MustCreateVRFKey creates a VRF key on the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustDeleteJob

func (c *ChainlinkClient) MustDeleteJob(id string) error

MustDeleteJob deletes a job with a provided ID from the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustReadCSAKeys

func (c *ChainlinkClient) MustReadCSAKeys() (*CSAKeys, *resty.Response, error)

func (*ChainlinkClient) MustReadDKGEncryptKeys

func (c *ChainlinkClient) MustReadDKGEncryptKeys() (*DKGEncryptKeys, error)

MustReadDKGEncryptKeys reads all DKG Encrypt Keys from the Chainlink node returns err if response not 200

func (*ChainlinkClient) MustReadDKGSignKeys

func (c *ChainlinkClient) MustReadDKGSignKeys() (*DKGSignKeys, error)

MustReadDKGSignKeys reads all DKG Sign Keys from the Chainlink node returns err if response not 200

func (*ChainlinkClient) MustReadETHKeys

func (c *ChainlinkClient) MustReadETHKeys() (*ETHKeys, error)

MustReadETHKeys reads all ETH keys from the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustReadOCR2Keys

func (c *ChainlinkClient) MustReadOCR2Keys() (*OCR2Keys, error)

MustReadOCR2Keys reads all OCR2Keys from the Chainlink node returns err if response not 200

func (*ChainlinkClient) MustReadOCRKeys

func (c *ChainlinkClient) MustReadOCRKeys() (*OCRKeys, error)

MustReadOCRKeys reads all OCRKeys from the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustReadP2PKeys

func (c *ChainlinkClient) MustReadP2PKeys() (*P2PKeys, error)

MustReadP2PKeys reads all P2PKeys from the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustReadRunsByJob

func (c *ChainlinkClient) MustReadRunsByJob(jobID string) (*JobRunsResponse, error)

MustReadRunsByJob attempts to read all runs for a job and returns error if the request is unsuccessful

func (*ChainlinkClient) MustReadTransactionAttempts

func (c *ChainlinkClient) MustReadTransactionAttempts() (*TransactionsData, error)

MustReadTransactionAttempts reads all transaction attempts on the Chainlink node and returns error if the request is unsuccessful

func (*ChainlinkClient) MustSendNativeToken

func (c *ChainlinkClient) MustSendNativeToken(amount *big.Int, fromAddress, toAddress string) (TransactionData, error)

MustSendNativeToken sends native token (ETH usually) of a specified amount from one of its addresses to the target address and returns error if the request is unsuccessful WARNING: The txdata object that Chainlink sends back is almost always blank.

func (*ChainlinkClient) PrimaryEthAddress

func (c *ChainlinkClient) PrimaryEthAddress() (string, error)

PrimaryEthAddress returns the primary ETH address for the Chainlink node

func (*ChainlinkClient) PrimaryEthAddressForChain

func (c *ChainlinkClient) PrimaryEthAddressForChain(chainId string) (string, error)

PrimaryEthAddressForChain returns the primary ETH address for the Chainlink node for mentioned chain

func (*ChainlinkClient) Profile

func (c *ChainlinkClient) Profile(profileTime time.Duration, profileFunction func(*ChainlinkClient)) (*ChainlinkProfileResults, error)

Profile starts a profile session on the Chainlink node for a pre-determined length, then runs the provided function to profile it.

func (*ChainlinkClient) ReadBridge

func (c *ChainlinkClient) ReadBridge(name string) (*BridgeType, *http.Response, error)

ReadBridge reads a bridge from the Chainlink node based on the provided name

func (*ChainlinkClient) ReadBridges

func (c *ChainlinkClient) ReadBridges() (*Bridges, *resty.Response, error)

ReadBridges reads bridges from the Chainlink node

func (*ChainlinkClient) ReadCSAKeys

func (c *ChainlinkClient) ReadCSAKeys() (*CSAKeys, *resty.Response, error)

ReadCSAKeys reads CSA keys from the Chainlink node

func (*ChainlinkClient) ReadEIs

func (c *ChainlinkClient) ReadEIs() (*EIKeys, *http.Response, error)

ReadEIs reads all of the configured EIs from the Chainlink node

func (*ChainlinkClient) ReadETHKeyAtIndex

func (c *ChainlinkClient) ReadETHKeyAtIndex(keyIndex int) (*ETHKeyData, error)

ReadETHKeyAtIndex reads updated information about the Chainlink's ETH key at given index

func (*ChainlinkClient) ReadJob

func (c *ChainlinkClient) ReadJob(id string) (*Response, *http.Response, error)

ReadJob reads a job with the provided ID from the Chainlink node

func (*ChainlinkClient) ReadJobs

func (c *ChainlinkClient) ReadJobs() (*ResponseSlice, *http.Response, error)

ReadJobs reads all jobs from the Chainlink node

func (*ChainlinkClient) ReadOCR2Keys

func (c *ChainlinkClient) ReadOCR2Keys() (*OCR2Keys, *http.Response, error)

ReadOCR2Keys reads all OCR2Keys from the Chainlink node

func (*ChainlinkClient) ReadPrimaryETHKey

func (c *ChainlinkClient) ReadPrimaryETHKey() (*ETHKeyData, error)

ReadPrimaryETHKey reads updated information about the Chainlink's primary ETH key

func (*ChainlinkClient) ReadRunsByJob

func (c *ChainlinkClient) ReadRunsByJob(jobID string) (*JobRunsResponse, *http.Response, error)

ReadRunsByJob reads all runs for a job

func (*ChainlinkClient) ReadSpec

func (c *ChainlinkClient) ReadSpec(id string) (*Response, *http.Response, error)

ReadSpec reads a job spec with the provided ID on the Chainlink node

func (*ChainlinkClient) ReadTransactions

func (c *ChainlinkClient) ReadTransactions() (*TransactionsData, *http.Response, error)

ReadTransactions reads all transactions made by the Chainlink node

func (*ChainlinkClient) ReadTxKeys

func (c *ChainlinkClient) ReadTxKeys(chain string) (*TxKeys, *http.Response, error)

ReadTxKeys reads all tx keys from the Chainlink node

func (*ChainlinkClient) ReadVRFKeys

func (c *ChainlinkClient) ReadVRFKeys() (*VRFKeys, *http.Response, error)

ReadVRFKeys reads all VRF keys from the Chainlink node

func (*ChainlinkClient) ReplayLogPollerFromBlock

func (c *ChainlinkClient) ReplayLogPollerFromBlock(fromBlock, evmChainID int64) (*ReplayResponse, *http.Response, error)

Replays log poller from block number

func (*ChainlinkClient) SetPageSize

func (c *ChainlinkClient) SetPageSize(size int)

SetPageSize globally sets the page

func (*ChainlinkClient) TrackForwarder

func (c *ChainlinkClient) TrackForwarder(chainID *big.Int, address common.Address) (*Forwarder, *http.Response, error)

TrackForwarder track forwarder address in db.

func (*ChainlinkClient) URL

func (c *ChainlinkClient) URL() string

URL Chainlink instance http url

func (*ChainlinkClient) UpdateEthKeyMaxGasPriceGWei

func (c *ChainlinkClient) UpdateEthKeyMaxGasPriceGWei(keyId string, gWei int) (*ETHKey, *http.Response, error)

UpdateEthKeyMaxGasPriceGWei updates the maxGasPriceGWei for an eth key

type ChainlinkConfig

type ChainlinkConfig struct {
	URL         string         `toml:",omitempty"`
	Email       string         `toml:",omitempty"`
	Password    string         `toml:",omitempty"`
	InternalIP  string         `toml:",omitempty"`
	HTTPTimeout *time.Duration `toml:"-"`
}

ChainlinkConfig represents the variables needed to connect to a Chainlink node

type ChainlinkK8sClient

type ChainlinkK8sClient struct {
	ChartName string
	PodName   string
	*ChainlinkClient
}

func ConnectChainlinkNodeURL

func ConnectChainlinkNodeURL(url string) (*ChainlinkK8sClient, error)

ConnectChainlinkNodeURL creates a new Chainlink client based on just a URL, should only be used inside K8s tests

func ConnectChainlinkNodeURLs

func ConnectChainlinkNodeURLs(urls []string) ([]*ChainlinkK8sClient, error)

ConnectChainlinkNodeURLs creates new Chainlink clients based on just URLs, should only be used inside K8s tests

func ConnectChainlinkNodes

func ConnectChainlinkNodes(e *environment.Environment) ([]*ChainlinkK8sClient, error)

ConnectChainlinkNodes creates new Chainlink clients

func NewChainlinkK8sClient

func NewChainlinkK8sClient(c *ChainlinkConfig, podName, chartName string) (*ChainlinkK8sClient, error)

NewChainlink creates a new Chainlink model using a provided config

func (*ChainlinkK8sClient) GetConfig

func (c *ChainlinkK8sClient) GetConfig() ChainlinkConfig

func (*ChainlinkK8sClient) Name

func (c *ChainlinkK8sClient) Name() string

Name Chainlink instance chart/service name

func (*ChainlinkK8sClient) UpgradeVersion

func (c *ChainlinkK8sClient) UpgradeVersion(testEnvironment *environment.Environment, newImage, newVersion string) error

UpgradeVersion upgrades the chainlink node to the new version Note: You need to call Run() on the test environment for changes to take effect Note: This function is not thread safe, call from a single thread

type ChainlinkProfileResult

type ChainlinkProfileResult struct {
	Type string
	Data []byte
}

ChainlinkProfileResult contains the result of a single PPROF run

type ChainlinkProfileResults

type ChainlinkProfileResults struct {
	Reports                 []*ChainlinkProfileResult
	ScheduledProfileSeconds int // How long the profile was scheduled to last
	ActualRunSeconds        int // How long the target function to profile actually took to execute
	NodeIndex               int
}

ChainlinkProfileResults holds the results of asking the Chainlink node to run a PPROF session

func NewBlankChainlinkProfileResults

func NewBlankChainlinkProfileResults() *ChainlinkProfileResults

NewBlankChainlinkProfileResults returns all the standard types of profile results with blank data

type CosmosChain

type CosmosChain struct {
	Attributes CosmosChainAttributes `json:"attributes"`
}

CosmosChain is the model that represents the terra chain when read

type CosmosChainAttributes

type CosmosChainAttributes struct {
	ChainID string            `json:"chainID"`
	Config  CosmosChainConfig `json:"config"`
}

CosmosChainAttributes is the model that represents the terra chain

type CosmosChainConfig

type CosmosChainConfig struct {
	BlockRate             null.String
	BlocksUntilTxTimeout  null.Int
	ConfirmPollPeriod     null.String
	FallbackGasPriceULuna null.String
	GasLimitMultiplier    null.Float
	MaxMsgsPerBatch       null.Int
}

type CosmosChainCreate

type CosmosChainCreate struct {
	Data CosmosChain `json:"data"`
}

CosmosChainCreate is the model that represents the terra chain when created

type CosmosNode

type CosmosNode struct {
	Attributes CosmosNodeAttributes `json:"attributes"`
}

CosmosNode is the model that represents the terra node when read

type CosmosNodeAttributes

type CosmosNodeAttributes struct {
	Name          string `json:"name"`
	CosmosChainID string `json:"cosmosChainId"`
	TendermintURL string `json:"tendermintURL" db:"tendermint_url"`
}

CosmosNodeAttributes is the model that represents the terra noded

type CosmosNodeCreate

type CosmosNodeCreate struct {
	Data CosmosNode `json:"data"`
}

CosmosNodeCreate is the model that represents the terra node when created

type CronJobSpec

type CronJobSpec struct {
	Schedule          string `toml:"schedule"`          // CRON job style schedule string
	ObservationSource string `toml:"observationSource"` // List of commands for the Chainlink node
}

CronJobSpec represents a cron job spec

func (*CronJobSpec) String

func (c *CronJobSpec) String() (string, error)

String representation of the job

func (*CronJobSpec) Type

func (c *CronJobSpec) Type() string

Type is cron

type DKGEncryptKey

type DKGEncryptKey struct {
	Data DKGEncryptKeyData `json:"data"`
}

DKGEncryptKey is the model that represents the created DKG Encrypt key when read

type DKGEncryptKeyAttributes

type DKGEncryptKeyAttributes struct {
	PublicKey string `json:"publicKey"`
}

DKGEncryptKeyAttributes is the model that represents the created DKG Encrypt key attributes when read

type DKGEncryptKeyData

type DKGEncryptKeyData struct {
	Type       string                  `json:"type"`
	ID         string                  `json:"id"`
	Attributes DKGEncryptKeyAttributes `json:"attributes"`
}

DKGEncryptKeyData is the model that represents the created DKG Encrypt key's data when read

type DKGEncryptKeys

type DKGEncryptKeys struct {
	Data []DKGEncryptKey `json:"data"`
}

DKGEncryptKeys is the model that represents the created DKGEncryptKeys key when read

type DKGSignKey

type DKGSignKey struct {
	Data DKGSignKeyData `json:"data"`
}

DKGSignKey is the model that represents the created DKG Sign key when read

type DKGSignKeyAttributes

type DKGSignKeyAttributes struct {
	PublicKey string `json:"publicKey"`
}

DKGSignKeyAttributes is the model that represents the created DKG Sign key attributes when read

type DKGSignKeyData

type DKGSignKeyData struct {
	Type       string               `json:"type"`
	ID         string               `json:"id"`
	Attributes DKGSignKeyAttributes `json:"attributes"`
}

DKGSignKeyData is the model that represents the created DKG Sign key's data when read

type DKGSignKeys

type DKGSignKeys struct {
	Data []DKGSignKey `json:"data"`
}

DKGSignKeys is the model that represents the created DKGSignData key when read

type DecodeLogTaskRun

type DecodeLogTaskRun struct {
	Fee       int    `json:"fee"`
	JobID     []int  `json:"jobID"`
	KeyHash   []int  `json:"keyHash"`
	RequestID []byte `json:"requestID"`
	Sender    string `json:"sender"`
}

DecodeLogTaskRun is "ethabidecodelog" task run info, also used for "RequestID" tracing in perf tests

type DirectRequestJobSpec

type DirectRequestJobSpec struct {
	Name                     string `toml:"name"`
	ContractAddress          string `toml:"contractAddress"`
	EVMChainID               string `toml:"evmChainID"`
	ExternalJobID            string `toml:"externalJobID"`
	MinIncomingConfirmations string `toml:"minIncomingConfirmations"`
	ObservationSource        string `toml:"observationSource"` // List of commands for the Chainlink node
}

DirectRequestJobSpec represents a direct request spec

func (*DirectRequestJobSpec) String

func (d *DirectRequestJobSpec) String() (string, error)

String representation of the pipeline

func (*DirectRequestJobSpec) Type

func (d *DirectRequestJobSpec) Type() string

Type returns the type of the pipeline

type DirectRequestTxPipelineSpec

type DirectRequestTxPipelineSpec struct {
	BridgeTypeAttributes BridgeTypeAttributes
	DataPath             string
}

DirectRequestTxPipelineSpec oracle request with tx callback

func (*DirectRequestTxPipelineSpec) String

func (d *DirectRequestTxPipelineSpec) String() (string, error)

String representation of the pipeline

func (*DirectRequestTxPipelineSpec) Type

Type returns the type of the pipeline

type EIAttributes

type EIAttributes struct {
	Name              string `json:"name,omitempty"`
	URL               string `json:"url,omitempty"`
	IncomingAccessKey string `json:"incomingAccessKey,omitempty"`
	AccessKey         string `json:"accessKey,omitempty"`
	Secret            string `json:"incomingSecret,omitempty"`
	OutgoingToken     string `json:"outgoingToken,omitempty"`
	OutgoingSecret    string `json:"outgoingSecret,omitempty"`
}

EIAttributes is the model that represents the EI keys when created and read

type EIKey

type EIKey struct {
	Attributes EIAttributes `json:"attributes"`
}

EIKey is the model that represents the EI configs when read

type EIKeyCreate

type EIKeyCreate struct {
	Data EIKey `json:"data"`
}

EIKeyCreate is the model that represents the EI config when created

type EIKeys

type EIKeys struct {
	Data []EIKey `json:"data"`
}

EIKeys is the model that represents the EI configs when read

type EIServiceConfig

type EIServiceConfig struct {
	URL string
}

EIServiceConfig represents External Initiator service config

type ETHKey

type ETHKey struct {
	Data ETHKeyData `json:"data"`
}

ETHKey is the model that represents the created ETH keys when read

type ETHKeyAttributes

type ETHKeyAttributes struct {
	Address    string `json:"address"`
	ETHBalance string `json:"ethBalance"`
	ChainID    string `json:"evmChainID"`
}

ETHKeyAttributes is the model that represents the created ETH keys when read

type ETHKeyData

type ETHKeyData struct {
	Attributes ETHKeyAttributes `json:"attributes"`
}

ETHKeyData is the model that represents the created ETH keys when read

type ETHKeys

type ETHKeys struct {
	Data []ETHKeyData `json:"data"`
}

ETHKeys is the model that represents the created ETH keys when read

type ExportedEVMKey

type ExportedEVMKey struct {
	Address string `json:"address"`
	Crypto  struct {
		Cipher       string `json:"cipher"`
		CipherText   string `json:"ciphertext"`
		CipherParams struct {
			Iv string `json:"iv"`
		} `json:"cipherparams"`
		Kdf       string `json:"kdf"`
		KDFParams struct {
			DkLen int    `json:"dklen"`
			N     int    `json:"n"`
			P     int    `json:"p"`
			R     int    `json:"r"`
			Salt  string `json:"salt"`
		} `json:"kdfparams"`
		Mac string `json:"mac"`
	} `json:"crypto"`
	ID      string `json:"id"`
	Version int    `json:"version"`
}

ExportedEVMKey holds all details needed to recreate a private key of the Chainlink node

type FluxMonitorJobSpec

type FluxMonitorJobSpec struct {
	Name              string        `toml:"name"`
	ContractAddress   string        `toml:"contractAddress"`   // Address of the Flux Monitor script
	EVMChainID        string        `toml:"evmChainID"`        // Not optional
	Precision         int           `toml:"precision"`         // Optional
	Threshold         float32       `toml:"threshold"`         // Optional
	AbsoluteThreshold float32       `toml:"absoluteThreshold"` // Optional
	IdleTimerPeriod   time.Duration `toml:"idleTimerPeriod"`   // Optional
	IdleTimerDisabled bool          `toml:"idleTimerDisabled"` // Optional
	PollTimerPeriod   time.Duration `toml:"pollTimerPeriod"`   // Optional
	PollTimerDisabled bool          `toml:"pollTimerDisabled"` // Optional
	MaxTaskDuration   time.Duration `toml:"maxTaskDuration"`   // Optional
	ObservationSource string        `toml:"observationSource"` // List of commands for the Chainlink node
}

FluxMonitorJobSpec represents a flux monitor spec

func (*FluxMonitorJobSpec) String

func (f *FluxMonitorJobSpec) String() (string, error)

String representation of the job

func (*FluxMonitorJobSpec) Type

func (f *FluxMonitorJobSpec) Type() string

Type returns the type of the job

type Forwarder

type Forwarder struct {
	Data ForwarderData `json:"data"`
}

Forwarder the model that represents the created Forwarder when created

type ForwarderAttributes

type ForwarderAttributes struct {
	Address   string    `json:"address"`
	ChainID   string    `json:"evmChainId"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

ForwarderAttributes is the model that represents attributes of a Forwarder

type ForwarderData

type ForwarderData struct {
	Type       string              `json:"type"`
	ID         string              `json:"id"`
	Attributes ForwarderAttributes `json:"attributes"`
}

ForwarderData is the model that represents the created Forwarder when read

type Forwarders

type Forwarders struct {
	Data []ForwarderData `json:"data"`
}

Forwarders is the model that represents the created Forwarders when read

type Job

type Job struct {
	Data JobData `json:"data"`
}

Job contains the job data for a given job

type JobData

type JobData struct {
	ID string `json:"id"`
}

JobData contains the ID for a given job

type JobForm

type JobForm struct {
	TOML string `json:"toml"`
}

JobForm is the form used when creating a v2 job spec, containing the TOML of the v2 job

type JobRunsResponse

type JobRunsResponse struct {
	Data []RunsResponseData `json:"data"`
	Meta RunsMetaResponse   `json:"meta"`
}

JobRunsResponse job runs

type JobSpec

type JobSpec interface {
	Type() string
	// String Returns TOML representation of the job
	String() (string, error)
}

JobSpec represents the different possible job types that Chainlink nodes can handle

type KeeperJobSpec

type KeeperJobSpec struct {
	Name                     string `toml:"name"`
	ContractAddress          string `toml:"contractAddress"`
	FromAddress              string `toml:"fromAddress"` // Hex representation of the from address
	EVMChainID               string `toml:"evmChainID"`  // Not optional
	MinIncomingConfirmations int    `toml:"minIncomingConfirmations"`
}

KeeperJobSpec represents a V2 keeper spec

func (*KeeperJobSpec) String

func (k *KeeperJobSpec) String() (string, error)

String representation of the job

func (*KeeperJobSpec) Type

func (k *KeeperJobSpec) Type() string

Type returns the type of the job

type NodeKeysBundle

type NodeKeysBundle struct {
	OCR2Key    OCR2Key
	PeerID     string
	TXKey      TxKey
	P2PKeys    P2PKeys
	EthAddress string
}

type OCR2Key

type OCR2Key struct {
	Data OCR2KeyData `json:"data"`
}

OCR2Key is the model that represents the created OCR2 keys when read

type OCR2KeyAttributes

type OCR2KeyAttributes struct {
	ChainType         string `json:"chainType"`
	ConfigPublicKey   string `json:"configPublicKey"`
	OffChainPublicKey string `json:"offchainPublicKey"`
	OnChainPublicKey  string `json:"onchainPublicKey"`
}

OCR2KeyAttributes is the model that represents the created OCR2 keys when read

type OCR2KeyData

type OCR2KeyData struct {
	Type       string            `json:"type"`
	Attributes OCR2KeyAttributes `json:"attributes"`
	ID         string            `json:"id"`
}

OCR2KeyData is the model that represents the created OCR2 keys when read

type OCR2Keys

type OCR2Keys struct {
	Data []OCR2KeyData `json:"data"`
}

OCR2Keys is the model that represents the created OCR2 keys when read

type OCR2TaskJobSpec

type OCR2TaskJobSpec struct {
	Name              string `toml:"name"`
	JobType           string `toml:"type"`
	MaxTaskDuration   string `toml:"maxTaskDuration"` // Optional
	ForwardingAllowed bool   `toml:"forwardingAllowed"`
	OCR2OracleSpec    job.OCR2OracleSpec
	ObservationSource string `toml:"observationSource"` // List of commands for the Chainlink node
}

OCR2TaskJobSpec represents an OCR2 job that is given to other nodes, meant to communicate with the bootstrap node, and provide their answers

func (*OCR2TaskJobSpec) String

func (o *OCR2TaskJobSpec) String() (string, error)

String representation of the job

func (*OCR2TaskJobSpec) Type

func (o *OCR2TaskJobSpec) Type() string

Type returns the type of the job

type OCRBootstrapJobSpec

type OCRBootstrapJobSpec struct {
	Name                     string        `toml:"name"`
	BlockChainTimeout        time.Duration `toml:"blockchainTimeout"`                      // Optional
	ContractConfirmations    int           `toml:"contractConfigConfirmations"`            // Optional
	TrackerPollInterval      time.Duration `toml:"contractConfigTrackerPollInterval"`      // Optional
	TrackerSubscribeInterval time.Duration `toml:"contractConfigTrackerSubscribeInterval"` // Optional
	ContractAddress          string        `toml:"contractAddress"`                        // Address of the OCR contract
	EVMChainID               string        `toml:"evmChainID"`
	IsBootstrapPeer          bool          `toml:"isBootstrapPeer"` // Typically true
	P2PPeerID                string        `toml:"p2pPeerID"`       // This node's P2P ID
}

OCRBootstrapJobSpec represents the spec for bootstrapping an OCR job, given to one node that then must be linked back to by others by OCRTaskJobSpecs

func (*OCRBootstrapJobSpec) String

func (o *OCRBootstrapJobSpec) String() (string, error)

String representation of the job

func (*OCRBootstrapJobSpec) Type

func (o *OCRBootstrapJobSpec) Type() string

Type returns the type of the job

type OCRKey

type OCRKey struct {
	Data OCRKeyData `json:"data"`
}

OCRKey is the model that represents the created OCR keys when read

type OCRKeyAttributes

type OCRKeyAttributes struct {
	ConfigPublicKey       string `json:"configPublicKey"`
	OffChainPublicKey     string `json:"offChainPublicKey"`
	OnChainSigningAddress string `json:"onChainSigningAddress"`
}

OCRKeyAttributes is the model that represents the created OCR keys when read

type OCRKeyData

type OCRKeyData struct {
	Attributes OCRKeyAttributes `json:"attributes"`
	ID         string           `json:"id"`
}

OCRKeyData is the model that represents the created OCR keys when read

type OCRKeys

type OCRKeys struct {
	Data []OCRKeyData `json:"data"`
}

OCRKeys is the model that represents the created OCR keys when read

type OCRTaskJobSpec

type OCRTaskJobSpec struct {
	Name                     string             `toml:"name"`
	BlockChainTimeout        time.Duration      `toml:"blockchainTimeout"`                      // Optional
	ContractConfirmations    int                `toml:"contractConfigConfirmations"`            // Optional
	TrackerPollInterval      time.Duration      `toml:"contractConfigTrackerPollInterval"`      // Optional
	TrackerSubscribeInterval time.Duration      `toml:"contractConfigTrackerSubscribeInterval"` // Optional
	ForwardingAllowed        bool               `toml:"forwardingAllowed"`                      // Optional, by default false
	ContractAddress          string             `toml:"contractAddress"`                        // Address of the OCR contract
	EVMChainID               string             `toml:"evmChainID"`
	P2PBootstrapPeers        []*ChainlinkClient `toml:"p2pBootstrapPeers"`  // P2P ID of the bootstrap node
	IsBootstrapPeer          bool               `toml:"isBootstrapPeer"`    // Typically false
	P2PPeerID                string             `toml:"p2pPeerID"`          // This node's P2P ID
	KeyBundleID              string             `toml:"keyBundleID"`        // ID of this node's OCR key bundle
	MonitoringEndpoint       string             `toml:"monitoringEndpoint"` // Typically "chain.link:4321"
	TransmitterAddress       string             `toml:"transmitterAddress"` // ETH address this node will use to transmit its answer
	ObservationSource        string             `toml:"observationSource"`  // List of commands for the Chainlink node
}

OCRTaskJobSpec represents an OCR job that is given to other nodes, meant to communicate with the bootstrap node, and provide their answers

func (*OCRTaskJobSpec) String

func (o *OCRTaskJobSpec) String() (string, error)

String representation of the job

func (*OCRTaskJobSpec) Type

func (o *OCRTaskJobSpec) Type() string

Type returns the type of the job

type P2PData

type P2PData struct {
	InternalIP   string
	InternalPort string
	PeerID       string
}

P2PData holds the remote ip and the peer id and port

func (*P2PData) P2PV2Bootstrapper

func (p *P2PData) P2PV2Bootstrapper() string

type P2PKey

type P2PKey struct {
	Data P2PKeyData `json:"data"`
}

P2PKey is the model that represents the created P2P keys when read

type P2PKeyAttributes

type P2PKeyAttributes struct {
	ID        int    `json:"id"`
	PeerID    string `json:"peerId"`
	PublicKey string `json:"publicKey"`
}

P2PKeyAttributes is the model that represents the created P2P keys when read

type P2PKeyData

type P2PKeyData struct {
	Attributes P2PKeyAttributes `json:"attributes"`
}

P2PKeyData is the model that represents the created P2P keys when read

type P2PKeys

type P2PKeys struct {
	Data []P2PKeyData `json:"data"`
}

P2PKeys is the model that represents the created P2P keys when read

type PipelineSpec

type PipelineSpec struct {
	BridgeTypeAttributes BridgeTypeAttributes
	DataPath             string
}

PipelineSpec common API call pipeline

func (*PipelineSpec) String

func (d *PipelineSpec) String() (string, error)

String representation of the pipeline

func (*PipelineSpec) Type

func (d *PipelineSpec) Type() string

Type is common_pipeline

type ReplayResponse

type ReplayResponse struct {
	Data ReplayResponseData `json:"data"`
}

type ReplayResponseAttributes

type ReplayResponseAttributes struct {
	Message    string   `json:"message"`
	EVMChainID *big.Big `json:"evmChainID"`
}

type ReplayResponseData

type ReplayResponseData struct {
	Attributes ReplayResponseAttributes `json:"attributes"`
}

type Response

type Response struct {
	Data map[string]interface{}
}

Response is the generic model that can be used for all Chainlink API responses

type ResponseSlice

type ResponseSlice struct {
	Data []map[string]interface{}
}

ResponseSlice is the generic model that can be used for all Chainlink API responses that are an slice

type RunInputs

type RunInputs struct {
	Parse int `json:"parse"`
}

RunInputs run inputs (value)

type RunsAttributesResponse

type RunsAttributesResponse struct {
	Meta       interface{}   `json:"meta"`
	Errors     []interface{} `json:"errors"`
	Inputs     RunInputs     `json:"inputs"`
	TaskRuns   []TaskRun     `json:"taskRuns"`
	CreatedAt  time.Time     `json:"createdAt"`
	FinishedAt time.Time     `json:"finishedAt"`
}

RunsAttributesResponse runs attributes

type RunsMetaResponse

type RunsMetaResponse struct {
	Count int `json:"count"`
}

RunsMetaResponse runs meta

type RunsResponseData

type RunsResponseData struct {
	Type       string                 `json:"type"`
	ID         string                 `json:"id"`
	Attributes RunsAttributesResponse `json:"attributes"`
}

RunsResponseData runs response data

type SendEtherRequest

type SendEtherRequest struct {
	DestinationAddress string `json:"address"`
	FromAddress        string `json:"from"`
	Amount             string `json:"amount"`
	EVMChainID         int    `json:"evmChainID,omitempty"`
	AllowHigherAmounts bool   `json:"allowHigherAmounts"`
}

type Session

type Session struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Session is the form structure used for authenticating

type SingleTransactionDataWrapper

type SingleTransactionDataWrapper struct {
	Data TransactionData `json:"data"`
}

type SolanaChain

type SolanaChain struct {
	Attributes SolanaChainAttributes `json:"attributes"`
}

SolanaChain is the model that represents the solana chain when read

type SolanaChainAttributes

type SolanaChainAttributes struct {
	ChainID string            `json:"chainID"`
	Config  SolanaChainConfig `json:"config"`
}

SolanaChainAttributes is the model that represents the solana chain

type SolanaChainConfig

type SolanaChainConfig struct {
	BlockRate           null.String
	ConfirmPollPeriod   null.String
	OCR2CachePollPeriod null.String
	OCR2CacheTTL        null.String
	TxTimeout           null.String
	SkipPreflight       null.Bool
	Commitment          null.String
}

type SolanaChainCreate

type SolanaChainCreate struct {
	Data SolanaChain `json:"data"`
}

SolanaChainCreate is the model that represents the solana chain when created

type SolanaNode

type SolanaNode struct {
	Attributes SolanaNodeAttributes `json:"attributes"`
}

SolanaNode is the model that represents the solana node when read

type SolanaNodeAttributes

type SolanaNodeAttributes struct {
	Name          string `json:"name"`
	SolanaChainID string `json:"solanaChainId" db:"solana_chain_id"`
	SolanaURL     string `json:"solanaURL" db:"solana_url"`
}

SolanaNodeAttributes is the model that represents the solana noded

type SolanaNodeCreate

type SolanaNodeCreate struct {
	Data SolanaNode `json:"data"`
}

SolanaNodeCreate is the model that represents the solana node when created

type Spec

type Spec struct {
	Data SpecData `json:"data"`
}

Spec represents a job specification that contains information about the job spec

type SpecData

type SpecData struct {
	ID string `json:"id"`
}

SpecData contains the ID of the job spec

type SpecForm

type SpecForm struct {
	TOML string `json:"toml"`
}

SpecForm is the form used when creating a v2 job spec, containing the TOML of the v2 job

type StarkNetChain

type StarkNetChain struct {
	Attributes StarkNetChainAttributes `json:"attributes"`
}

StarkNetChain is the model that represents the starknet chain when read

type StarkNetChainAttributes

type StarkNetChainAttributes struct {
	Type    string              `json:"type"`
	ChainID string              `json:"chainID"`
	Config  StarkNetChainConfig `json:"config"`
}

StarkNetChainAttributes is the model that represents the starknet chain

type StarkNetChainConfig

type StarkNetChainConfig struct {
	OCR2CachePollPeriod null.String
	OCR2CacheTTL        null.String
	RequestTimeout      null.String
	TxTimeout           null.Bool
	TxSendFrequency     null.String
	TxMaxBatchSize      null.String
}

type StarkNetChainCreate

type StarkNetChainCreate struct {
	Data StarkNetChain `json:"data"`
}

StarkNetChainCreate is the model that represents the starknet chain when created

type StarkNetNode

type StarkNetNode struct {
	Attributes StarkNetNodeAttributes `json:"attributes"`
}

StarkNetNode is the model that represents the starknet node when read

type StarkNetNodeAttributes

type StarkNetNodeAttributes struct {
	Name    string `json:"name"`
	ChainID string `json:"chainId"`
	Url     string `json:"url"`
}

StarkNetNodeAttributes is the model that represents the starknet node

type StarkNetNodeCreate

type StarkNetNodeCreate struct {
	Data StarkNetNode `json:"data"`
}

StarkNetNodeCreate is the model that represents the starknet node when created

type TaskRun

type TaskRun struct {
	Type       string      `json:"type"`
	CreatedAt  time.Time   `json:"createdAt"`
	FinishedAt time.Time   `json:"finishedAt"`
	Output     string      `json:"output"`
	Error      interface{} `json:"error"`
	DotID      string      `json:"dotId"`
}

TaskRun is pipeline task run info

type TransactionAttributes

type TransactionAttributes struct {
	State    string `json:"state"`
	Data     string `json:"data"`
	From     string `json:"from"`
	To       string `json:"to"`
	Value    string `json:"value"`
	ChainID  string `json:"evmChainID"`
	GasLimit string `json:"gasLimit"`
	GasPrice string `json:"gasPrice"`
	Hash     string `json:"hash"`
	RawHex   string `json:"rawHex"`
	Nonce    string `json:"nonce"`
	SentAt   string `json:"sentAt"`
}

type TransactionData

type TransactionData struct {
	Type       string                `json:"type"`
	ID         string                `json:"id"`
	Attributes TransactionAttributes `json:"attributes"`
}

type TransactionsData

type TransactionsData struct {
	Data []TransactionData    `json:"data"`
	Meta TransactionsMetaData `json:"meta"`
}

type TransactionsMetaData

type TransactionsMetaData struct {
	Count int `json:"count"`
}

type TxKey

type TxKey struct {
	Data TxKeyData `json:"data"`
}

TxKey is the model that represents the created keys when read

type TxKeyAttributes

type TxKeyAttributes struct {
	PublicKey string `json:"publicKey"`
	Address   string `json:"address"`
	StarkKey  string `json:"starkPubKey,omitempty"`
}

TxKeyAttributes is the model that represents the created keys when read

type TxKeyData

type TxKeyData struct {
	Type       string          `json:"type"`
	ID         string          `json:"id"`
	Attributes TxKeyAttributes `json:"attributes"`
}

TxKeyData is the model that represents the created keys when read

type TxKeys

type TxKeys struct {
	Data []TxKeyData `json:"data"`
}

TxKeys is the model that represents the created keys when read

type VRFExportKey

type VRFExportKey struct {
	PublicKey string `json:"PublicKey"`
	VrfKey    struct {
		Address string `json:"address"`
		Crypto  struct {
			Cipher       string `json:"cipher"`
			Ciphertext   string `json:"ciphertext"`
			Cipherparams struct {
				Iv string `json:"iv"`
			} `json:"cipherparams"`
			Kdf       string `json:"kdf"`
			Kdfparams struct {
				Dklen int    `json:"dklen"`
				N     int    `json:"n"`
				P     int    `json:"p"`
				R     int    `json:"r"`
				Salt  string `json:"salt"`
			} `json:"kdfparams"`
			Mac string `json:"mac"`
		} `json:"crypto"`
		Version int `json:"version"`
	} `json:"vrf_key"`
}

VRFExportKey is the model that represents the exported VRF key

type VRFJobSpec

type VRFJobSpec struct {
	Name                     string `toml:"name"`
	CoordinatorAddress       string `toml:"coordinatorAddress"` // Address of the VRF CoordinatorV2 contract
	PublicKey                string `toml:"publicKey"`          // Public key of the proving key
	EVMChainID               string `toml:"evmChainID"`
	ExternalJobID            string `toml:"externalJobID"`
	ObservationSource        string `toml:"observationSource"` // List of commands for the Chainlink node
	MinIncomingConfirmations int    `toml:"minIncomingConfirmations"`
}

VRFJobSpec represents a VRF job

func (*VRFJobSpec) String

func (v *VRFJobSpec) String() (string, error)

String representation of the job

func (*VRFJobSpec) Type

func (v *VRFJobSpec) Type() string

Type returns the type of the job

type VRFKey

type VRFKey struct {
	Data VRFKeyData `json:"data"`
}

VRFKey is the model that represents the created VRF key when read

type VRFKeyAttributes

type VRFKeyAttributes struct {
	Compressed   string      `json:"compressed"`
	Uncompressed string      `json:"uncompressed"`
	Hash         string      `json:"hash"`
	CreatedAt    time.Time   `json:"createdAt"`
	UpdatedAt    time.Time   `json:"updatedAt"`
	DeletedAt    interface{} `json:"deletedAt"`
}

VRFKeyAttributes is the model that represents the created VRF key attributes when read

type VRFKeyData

type VRFKeyData struct {
	Type       string           `json:"type"`
	ID         string           `json:"id"`
	Attributes VRFKeyAttributes `json:"attributes"`
}

VRFKeyData is the model that represents the created VRF key's data when read

type VRFKeys

type VRFKeys struct {
	Data []VRFKey `json:"data"`
}

VRFKeys is the model that represents the created VRF keys when read

type VRFTxPipelineSpec

type VRFTxPipelineSpec struct {
	Address string
}

VRFTxPipelineSpec VRF request with tx callback

func (*VRFTxPipelineSpec) String

func (d *VRFTxPipelineSpec) String() (string, error)

String representation of the pipeline

func (*VRFTxPipelineSpec) Type

func (d *VRFTxPipelineSpec) Type() string

Type returns the type of the pipeline

type VRFV2JobSpec

type VRFV2JobSpec struct {
	Name                          string        `toml:"name"`
	CoordinatorAddress            string        `toml:"coordinatorAddress"` // Address of the VRF CoordinatorV2 contract
	PublicKey                     string        `toml:"publicKey"`          // Public key of the proving key
	ExternalJobID                 string        `toml:"externalJobID"`
	ObservationSource             string        `toml:"observationSource"` // List of commands for the Chainlink node
	MinIncomingConfirmations      int           `toml:"minIncomingConfirmations"`
	FromAddresses                 []string      `toml:"fromAddresses"`
	EVMChainID                    string        `toml:"evmChainID"`
	UseVRFOwner                   bool          `toml:"useVRFOwner"`
	VRFOwner                      string        `toml:"vrfOwnerAddress"`
	ForwardingAllowed             bool          `toml:"forwardingAllowed"`
	CustomRevertsPipelineEnabled  bool          `toml:"customRevertsPipelineEnabled"`
	PollPeriod                    time.Duration `toml:"pollPeriod"`
	RequestTimeout                time.Duration `toml:"requestTimeout"`
	BatchFulfillmentEnabled       bool          `toml:"batchFulfillmentEnabled"`
	BatchFulfillmentGasMultiplier float64       `toml:"batchFulfillmentGasMultiplier"`
	BackOffInitialDelay           time.Duration `toml:"backOffInitialDelay"`
	BackOffMaxDelay               time.Duration `toml:"backOffMaxDelay"`
}

VRFV2JobSpec represents a VRFV2 job

func (*VRFV2JobSpec) String

func (v *VRFV2JobSpec) String() (string, error)

String representation of the job

func (*VRFV2JobSpec) Type

func (v *VRFV2JobSpec) Type() string

Type returns the type of the job

type VRFV2PlusJobSpec

type VRFV2PlusJobSpec struct {
	Name                          string        `toml:"name"`
	CoordinatorAddress            string        `toml:"coordinatorAddress"` // Address of the VRF CoordinatorV2 contract
	PublicKey                     string        `toml:"publicKey"`          // Public key of the proving key
	ExternalJobID                 string        `toml:"externalJobID"`
	ObservationSource             string        `toml:"observationSource"` // List of commands for the Chainlink node
	MinIncomingConfirmations      int           `toml:"minIncomingConfirmations"`
	FromAddresses                 []string      `toml:"fromAddresses"`
	EVMChainID                    string        `toml:"evmChainID"`
	ForwardingAllowed             bool          `toml:"forwardingAllowed"`
	BatchFulfillmentEnabled       bool          `toml:"batchFulfillmentEnabled"`
	BatchFulfillmentGasMultiplier float64       `toml:"batchFulfillmentGasMultiplier"`
	BackOffInitialDelay           time.Duration `toml:"backOffInitialDelay"`
	BackOffMaxDelay               time.Duration `toml:"backOffMaxDelay"`
	PollPeriod                    time.Duration `toml:"pollPeriod"`
	RequestTimeout                time.Duration `toml:"requestTimeout"`
}

VRFV2PlusJobSpec represents a VRFV2 job

func (*VRFV2PlusJobSpec) String

func (v *VRFV2PlusJobSpec) String() (string, error)

String representation of the job

func (*VRFV2PlusJobSpec) Type

func (v *VRFV2PlusJobSpec) Type() string

Type returns the type of the job

type VRFV2PlusTxPipelineSpec

type VRFV2PlusTxPipelineSpec struct {
	Address               string
	EstimateGasMultiplier float64
	FromAddress           string
	SimulationBlock       *string // can be nil, "latest" or "pending".
}

VRFV2TxPipelineSpec VRFv2 request with tx callback

func (*VRFV2PlusTxPipelineSpec) String

func (d *VRFV2PlusTxPipelineSpec) String() (string, error)

String representation of the pipeline

func (*VRFV2PlusTxPipelineSpec) Type

func (d *VRFV2PlusTxPipelineSpec) Type() string

Type returns the type of the pipeline

type VRFV2TxPipelineSpec

type VRFV2TxPipelineSpec struct {
	Address               string
	EstimateGasMultiplier float64
	FromAddress           string
	SimulationBlock       *string // can be nil, "latest" or "pending".
}

VRFV2TxPipelineSpec VRFv2 request with tx callback

func (*VRFV2TxPipelineSpec) String

func (d *VRFV2TxPipelineSpec) String() (string, error)

String representation of the pipeline

func (*VRFV2TxPipelineSpec) Type

func (d *VRFV2TxPipelineSpec) Type() string

Type returns the type of the pipeline

type WebhookJobSpec

type WebhookJobSpec struct {
	Name              string `toml:"name"`
	Initiator         string `toml:"initiator"`         // External initiator name
	InitiatorSpec     string `toml:"initiatorSpec"`     // External initiator spec object in stringified form
	ObservationSource string `toml:"observationSource"` // List of commands for the Chainlink node
}

WebhookJobSpec reprsents a webhook job

func (*WebhookJobSpec) String

func (w *WebhookJobSpec) String() (string, error)

String representation of the job

func (*WebhookJobSpec) Type

func (w *WebhookJobSpec) Type() string

Type returns the type of the job

Jump to

Keyboard shortcuts

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