I am trying to find a way to integrate endpoints from a native token staking contract and implement them into the PAB. I am assuming I will heavily be using the getSchema instance. Like so:
instance HasDefinitions StakingContracts where getDefinitions = [Monitor exampleAddr] getContract (Monitor addr) = SomeBuiltin $ Monitor.monitor addr getSchema = const $ endpointsToSchemas @Empty
My endpoints schema look as follows:
type StakingSchema = Endpoint "feed" MainToken .\/ Endpoint "register" () .\/ Endpoint "unregister" () .\/ Endpoint "deposit" MainToken .\/ Endpoint "withdraw" MainToken .\/ Endpoint "claim" () .\/ Endpoint "compound" ()
What I do not understand is how to tell the PAB's getSchema to use these endpoints I have tried:
getSchema = const $ endpointsToSchemas @feed getSchema = const $ endpointsToSchemas @StakingSchema
But none have worked. I feel like there is an easy solution here, but I am just not seeing it. Furthermore, documentation on PAB is scarce and so I cannot find anything online to help. Any help here would be greatly appreciated!