SDK Reference
This section provides a detailed technical reference for the public interfaces of the CRE Go SDK. Use this reference for quick lookups of specific functions, types, and method signatures.
How to read this section
The SDK Reference is broken down into several pages, each corresponding to a core part of the SDK's functionality:
- Core SDK: Covers the fundamental building blocks of any workflow, including
cre.Handler,cre.Runtime, andcre.Promise. - Triggers: Details the configuration and payload structures for all available trigger types (
Cron,HTTP,EVM Log). - EVM Client: Provides a reference for the
evm.Client, the primary tool for all EVM interactions, including reads and writes. - HTTP Client: Provides a reference for the
http.Client, used for making offchain API requests from individual nodes. - Consensus & Aggregation: Describes how to use aggregators like
ConsensusMedianAggregationandConsensusAggregationFromTagswithRunInNodeModeto process and consolidate data from multiple nodes.
Contract Bindings
For interacting with smart contracts, use the CRE CLI's binding generator to automatically create type-safe Go bindings from your contract ABIs. These generated bindings work seamlessly with the EVM Client to provide a simple and reliable developer experience.