@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
36 lines • 1.23 kB
JavaScript
import { z } from 'zod';
import { ZChainName } from '../metadata/customZodTypes.js';
import { TokenConfigSchema } from '../token/IToken.js';
/**
* Configuration used for instantiating a WarpCore
* Contains the relevant tokens and their connections
*/
const FeeConstantConfigSchema = z.array(z.object({
origin: ZChainName,
destination: ZChainName,
amount: z.union([z.string(), z.number(), z.bigint()]),
addressOrDenom: z.string().optional(),
}));
export const WarpCoreConfigSchema = z.object({
tokens: z.array(TokenConfigSchema),
options: z
.object({
localFeeConstants: FeeConstantConfigSchema.optional(),
interchainFeeConstants: FeeConstantConfigSchema.optional(),
routeBlacklist: z
.array(z.object({
origin: ZChainName,
destination: ZChainName,
}))
.optional(),
})
.optional(),
});
// Transaction types for warp core remote transfers
export var WarpTxCategory;
(function (WarpTxCategory) {
WarpTxCategory["Approval"] = "approval";
WarpTxCategory["Revoke"] = "revoke";
WarpTxCategory["Transfer"] = "transfer";
})(WarpTxCategory || (WarpTxCategory = {}));
//# sourceMappingURL=types.js.map