Skip to main content
Version: 2.1.37

GardenConfig

GardenConfigWithWallets

This type represents the configuration object for the Garden instance using wallets.

type GardenConfigWithWallets = {
environment: ApiConfig;
digestKey: string | DigestKey;
secretManager?: ISecretManager;
auth?: IAuth;
orderbook?: IOrderbook;
quote?: IQuote;
blockNumberFetcher?: IBlockNumberFetcher;
wallets: {
evm?: WalletClient;
starknet?: AccountInterface;
};
};
PropertyTypeDescription
environmentApiConfigCan be either a string representing the environment (mainnet, testnet, localnet, etc.), or an object that includes a required environment field along with optional API endpoint overrides.
digestKeystring | DigestKeyIt is a 32-byte non-custodial identifier used for auth, identity, and secret management in atomic swaps.
secretManagerISecretManagerIt handles generation and retrieval of secrets and secretHashes for swaps.
authIAuthAuth implementation for SIWE (Sign-In With Ethereum.)
orderbookIOrderbookAllows creating and managing orders easily
quoteIQuoteGet a quote for the given orderpair and amount.
blockNumberFetcherIBlockNumberfetcherFetches the current block numbers across multiple chains.
walletsGardenWalletModulesSpecifies connected wallet clients (either EVM or starknet).

GardenWalletModules

{
evm?: WalletClient;
starknet?: AccountInterface;
}

GardenConfigWithHTLCs

This type represents the configuration object for the Garden instance using HTLCs.

type GardenConfigWithHTLCs = {
environment: ApiConfig;
digestKey: string | DigestKey;
secretManager?: ISecretManager;
auth?: IAuth;
orderbook?: IOrderbook;
quote?: IQuote;
blockNumberFetcher?: IBlockNumberFetcher;
htlc: {
evm?: IEVMHTLC;
starknet?: IStarknetHTLC;
};
};
PropertyTypeDescription
environmentApiConfigCan be either a string representing the environment (mainnet, testnet, localnet, etc.), or an object that includes a required environment field along with optional API endpoint overrides, specifying the network.
digestKeystring | DigestKeyIt is a 32-byte non-custodial identifier used for auth, identity, and secret management in atomic swaps.
secretManagerISecretManagerIt handles generation and retrieval of secrets and secretHashes for swaps.
authIAuthAuth implementation for SIWE (Sign-In With Ethereum.)
orderbookIOrderbookAllows creating and managing orders easily
quoteIQuoteGet a quote for the given orderpair and amount.
blockNumberFetcherIBlockNumberfetcherFetches the current block numbers across multiple chains.
htlcHTLCConfigHTLC implementations for supported networks.

HTLCConfig

{
evm?: IEVMHTLC;
starknet?: IStarknetHTLC;
}