Adding custom messages before or after route execution

The executeRoute method now accepts beforeMsg and afterMsg parameter to allow for the execution of custom Cosmos messages before and/or after the route is executed. This is useful for executing custom messages that are not part of the route definition.

const msg = JSON.stringify({
  fromAddress: 'cosmos1...',  // Replace with sender address
  toAddress: 'cosmos1...',    // Replace with recipient address
  amount: [{
    denom: 'uatom',           // Replace with the actual denom, e.g., 'uatom' for ATOM
    amount: '1000000'         // Replace with the actual amount (in smallest unit, e.g., micro-ATOM)
  }]
});

await skip.executeRoute({
  route,
  userAddresses,
  beforeMsg: { msg, msgTypeURL: '/cosmos.bank.v1beta1.MsgSend' }
});

Use the Go Fast Transfer system

When initializing your client, specify the goFast boolean in the routeConfig prop. If a route is eligible for a Go Fast transfer, the API will return it as one of the transfer operations. No further action is required on your part.

import { SkipClient } from '@skip-go/client';

const skipClient = new SkipClient({
  // ...otherProps,
  routeConfig: {
    goFast: true
  }
});

await skip.executeRoute({
  ...
});