user5605: 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!

user1118: Here is my code I used to setup the PAB contract instances which works for the PAB simluator.
    getDefinitions = [ InitLottoContract, UseLottoContract ]
    getSchema =  \case
        InitLottoContract    -> Builtin.endpointsToSchemas @LottoInitSchema
        UseLottoContract     -> Builtin.endpointsToSchemas @LottoUseSchema   
   
    getContract = \case
        InitLottoContract    -> Builtin.SomeBuiltin initEndpoint
        UseLottoContract     -> Builtin.SomeBuiltin useEndpoint

A word of caution though, the PAB is great for development and the simulator, but will run into challenges getting it to work on the testnet and it doesn't work on mainnet.
https://github.com/lley154/cardano-lottery/blob/main/app/LottoContract.hs

5605: <p>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:</p>
<pre><code>instance HasDefinitions StakingContracts where

    getDefinitions        = [Monitor exampleAddr]

    getContract (Monitor addr) = SomeBuiltin $ Monitor.monitor addr

    getSchema = const $ endpointsToSchemas @Empty
</code></pre>
<p>My endpoints schema look as follows:</p>
<pre><code>type StakingSchema = Endpoint &quot;feed&quot;       MainToken
                 .\/ Endpoint &quot;register&quot;   ()
                 .\/ Endpoint &quot;unregister&quot; ()
                 .\/ Endpoint &quot;deposit&quot;    MainToken
                 .\/ Endpoint &quot;withdraw&quot;   MainToken
                 .\/ Endpoint &quot;claim&quot;      ()
                 .\/ Endpoint &quot;compound&quot;   ()
</code></pre>
<p>What I do not understand is how to tell the PAB's getSchema to use these endpoints I have tried:</p>
<pre><code>
    getSchema = const $ endpointsToSchemas @feed

    getSchema = const $ endpointsToSchemas @StakingSchema
</code></pre>
<p>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!</p>
 1118: <p>Here is my code I used to setup the PAB contract instances which works for the PAB simluator.</p>
<pre><code>    getDefinitions = [ InitLottoContract, UseLottoContract ]
    getSchema =  \case
        InitLottoContract    -&gt; Builtin.endpointsToSchemas @LottoInitSchema
        UseLottoContract     -&gt; Builtin.endpointsToSchemas @LottoUseSchema   
   
    getContract = \case
        InitLottoContract    -&gt; Builtin.SomeBuiltin initEndpoint
        UseLottoContract     -&gt; Builtin.SomeBuiltin useEndpoint
</code></pre>
<p>A word of caution though, the PAB is great for development and the simulator, but will run into challenges getting it to work on the testnet and it doesn't work on mainnet.</p>
<p><a href="https://github.com/lley154/cardano-lottery/blob/main/app/LottoContract.hs" rel="nofollow noreferrer">https://github.com/lley154/cardano-lottery/blob/main/app/LottoContract.hs</a></p>
