@eco-foundation/routes-sdk
Version:
Eco Routes SDK
44 lines (39 loc) • 986 B
text/typescript
import { Hex } from "viem"
import { RoutesSupportedChainId } from "../constants.js"
import { SolverQuote } from "../quotes/types.js"
import { IntentType } from "@eco-foundation/routes-ts"
export type CreateSimpleIntentParams = {
creator: Hex
originChainID: RoutesSupportedChainId
destinationChainID: RoutesSupportedChainId
receivingToken: Hex
spendingToken: Hex
spendingTokenLimit: bigint
amount: bigint
prover?: "HyperProver" | "StorageProver"
recipient?: Hex
expiryTime?: Date
}
export type CreateIntentParams = {
creator: Hex
originChainID: RoutesSupportedChainId
destinationChainID: RoutesSupportedChainId
calls: IntentCall[]
callTokens: IntentToken[]
tokens: IntentToken[]
prover: "HyperProver" | "StorageProver" | Hex
expiryTime?: Date
}
export type ApplyQuoteToIntentParams = {
intent: IntentType
quote: SolverQuote
}
type IntentCall = {
target: Hex
data: Hex
value: bigint
}
type IntentToken = {
token: Hex
amount: bigint
}