TriaProvider

This class helps to use all the outside functions/actions for all chain interactions, adding all config at one place.

Create a instance

import { TriaProvider } from "@tria-sdk/connect";

export const triaProvider = new TriaProvider({
  authUrl: "https://auth.tria.so",
  environment: "mainnet",
  aa: {
    supportAa: true,
    pimlicoApiKey: <API_KEY>,
    accountType: "Kernel",
    isSponsored: true,
    sponsorshipPolicyIds: {
      FUSE: "sp_cheerful_thing",
      POLYGON: "sp_slim_namor",
    },
  },
} as TriaProviderParams);
export type TriaProviderParams = {
  authUrl?: string;
  dappDomain?: string;
  dappLogo?: string;
  aa?: AaDetails;
  environment?: ENV;
};

Example

Last updated