types

Version:
sha256:3ed336b
wit

chain interface

A string mostly following the caip-2 format of namespace:reference, e.g. "eip155:1" for Ethereum mainnet or "cosmos:cosmoshub-4" for Cosmos Hub however, we allow up to 32 characters for the "namespace" part, and we call the "reference" part "chain-id" to confirm with popular usage

chain-key:string
evm-tx-hash:list<u8>

32 bytes, a keccak hash of an RLP encoded signed transaction

cosmos-tx-hash:string
any-tx-hash:variant {}
cosmos-address:record {
bech32-addr: string
prefix-len: u32

prefix is the first part of the bech32 address

}
cosmos-event:record {
ty: string
attributes: list<tuple<string, string>>
}
cosmos-chain-config:record {
chain-id: string
rpc-endpoint: option<string>
grpc-endpoint: option<string>
grpc-web-endpoint: option<string>
gas-price: f32
gas-denom: string
bech32-prefix: string
}
evm-address:record {
raw-bytes: list<u8>
}
evm-event-log-data:record {
topics: list<list<u8>>

the raw log topics that can be decoded into an event

data: list<u8>

the raw log data that can be decoded into an event

}

The overall idea is to map alloy_rpc_types_eth::Log<LogData>

evm-event-log:record {
address: evm-address

These two fields are essentially alloy_primitives::Log<LogData>

tx-hash: evm-tx-hash
block-number: u64
log-index: u64
block-hash: list<u8>
block-timestamp: option<u64>

256 bytes

tx-index: u64
}
evm-chain-config:record {
chain-id: string
ws-endpoints: list<string>
http-endpoint: option<string>
}

core interface

digest:string
timestamp:record {
nanos: u64
}
duration:record {
secs: u64
}

128-bit unsigned integer represented as two 64-bit values.

The tuple is stored in little-endian order:

  • First element (index 0): Lower 64 bits (bits 0-63)
  • Second element (index 1): Upper 64 bits (bits 64-127)
u128:record {
value: tuple<u64, u64>
}
log-level:variant {
error
warn
info
debug
trace
}

events interface

Imported Types
wavs:types/chain.{chain-key}
wavs:types/chain.{evm-address}
wavs:types/chain.{evm-event-log}
wavs:types/chain.{cosmos-address}
wavs:types/chain.{cosmos-event}
wavs:types/core.{timestamp}
event-id:list<u8>
trigger-data-evm-contract-event:record {
chain: chain-key
}
trigger-data-cosmos-contract-event:record {
contract-address: cosmos-address
chain: chain-key
event-index: u64
block-height: u64
}
trigger-data-block-interval:record {
chain: chain-key
block-height: u64
}
trigger-data-cron:record {
trigger-time: timestamp
}
trigger-data-atproto-event:record {
sequence: s64
timestamp: s64
repo: string
collection: string
rkey: string
action: string
cid: option<string>
record-data: option<string>
rev: option<string>
op-index: option<u32>
}
trigger-data-hypercore-append:record {
feed-key: string
index: u64
data: list<u8>
}

20-byte unique hash

trigger-data:variant {
cosmos-contract-event(trigger-data-cosmos-contract-event)
raw(list<u8>)
}

service interface

Imported Types
wavs:types/core.{digest}
wavs:types/core.{timestamp}
wavs:types/chain.{chain-key}
wavs:types/chain.{evm-address}
wavs:types/chain.{cosmos-address}

Basic types

service-id:string
workflow-id:string
package-ref:string
semver-version:string
service-status:variant {
active
paused
}
evm-manager:record {
chain: chain-key
address: evm-address
}
cosmos-manager:record {
chain: chain-key
}
service-manager:variant {}
component-source-download:record {
uri: string
digest: digest
}
registry:record {
digest: digest
domain: option<string>
version: option<semver-version>
}
component-source:variant {
registry(registry)
digest(digest)
}
allowed-host-permission:variant {
all
only(list<string>)
none
}

Permissions types

permissions:record {
allowed-http-hosts: allowed-host-permission
file-system: bool
raw-sockets: bool
dns-resolution: bool
}

Component types

component:record {
permissions: permissions
fuel-limit: option<u64>
time-limit-seconds: option<u64>
config: list<tuple<string, string>>
env-keys: list<string>
}
trigger-evm-contract-event:record {
address: evm-address
chain: chain-key
event-hash: list<u8>
}
trigger-cosmos-contract-event:record {
chain: chain-key
event-type: string
}
trigger-block-interval:record {
chain: chain-key
n-blocks: u32
start-block: option<u64>
end-block: option<u64>
}
trigger-cron:record {
schedule: string
start-time: option<timestamp>
end-time: option<timestamp>
}
trigger-atproto-event:record {
collection: string
repo-did: option<string>
action: option<string>
}
trigger-hypercore-append:record {
feed-key: string
}

Trigger types

trigger:variant {
evm-contract-event(trigger-evm-contract-event)
cosmos-contract-event(trigger-cosmos-contract-event)
block-interval(trigger-block-interval)
atproto-event(trigger-atproto-event)
hypercore-append(trigger-hypercore-append)
manual
}
signature-algorithm:variant {
secp256k1
}
signature-prefix:variant {
eip191
}
signature-kind:record {
prefix: option<signature-prefix>
}
aggregator-submit:record {
component: component
signature-kind: signature-kind
}

Submit types

submit:variant {
none
aggregator(aggregator-submit)
}

Workflow types

workflow:record {
trigger: trigger
component: component
submit: submit
}

Service types

service:record {
name: string
workflows: list<tuple<workflow-id, workflow>>
}

Aggregator types

service-and-workflow-id:record {
service: service
workflow-id: workflow-id
}
workflow-and-workflow-id:record {
workflow: workflow
workflow-id: workflow-id
}