ArvoContract with standardized type formatting and metadata
If any of the validations in ArvoContract or createArvoContract fail
const contract = createSimpleArvoContract({
uri: 'api.example/contracts/user',
type: 'user.create',
description: 'User creation contract',
versions: {
'1.0.0': {
accepts: z.object({
name: z.string(),
email: z.string().email()
}),
emits: z.object({
userId: z.string(),
timestamp: z.date()
})
}
}
});
Creates an ArvoContract with standardized naming conventions and a simplified event pattern. Use this to create contracts with one emit type only.