API Reference:
TriaProvider:
Props:
| Property | Type | Description | Default |
|---|---|---|---|
| didDomain | string | suffix for did name eg: mydid@tria | ‘@tria’ |
| clientId | string | Tria ClientID | - |
| schema | string | Your DApp schema for deeplinking | ‘tria’ |
| authedScreenName | string | Screen name where you want Tria to redirect once authentication completes. | ‘dashboard’ |
uiConfig:
uiConfig property of TriaProvider allows you to alter how the Tria Auth Screens look in your DApp.
| Property | Type | Description | Default |
|---|---|---|---|
| dappName | string | Name of your dapp | 'My Dapp' |
| primaryColor | string | primary background color of the auth screens | "rgb(128, 69, 255)” |
| headerText | string | Header text for Login Screen | 'Get Started' |
| showHeader | boolean | Show header in auth modal | true |
| showPoweredByTria | boolean | Show 'Powered by Tria' | true |
| googleButtonText | string | Text for Google login button | 'Continue with Google' |
| twitterButtonText | string | Text for Twitter login button | 'Continue with X' |
| discordButtonText | string | Text for Discord login button | 'Continue with Discord' |
| appleButtonText | string | Text for Apple login button | 'Continue with Apple' |
| showDivider | boolean | Show divider in auth modal | true |
| OtpHeader | string | Header for OTP screen | 'Enter OTP' |
| OtpSubHeader | string | Sub-header for OTP screen | 'Verify your account using 6-digit code sent to:' |
| OtpRetryCaption | string | Text for OTP resend button | 'Resend' |
| usernameHeadingText | string | Header for username creation screen | 'Create Tria name' |
| layout | string[] | Order of auth options | ['email-phone', 'divider', 'web2'] |
| emailPhoneLoginMethods | string[] | Enabled email/phone login methods | ['email', 'phone'] |
| web2LoginMethods | string[] | Enabled Web2 login methods | ['google', 'twitter', 'apple', 'discord'] |
| tncPrechecked | boolean | Terms and Condition is already checked or not. | true |
config:
| Property | Type | Description | Default |
|---|---|---|---|
| chain | string | Blockchain network (e.g., 'FUSE', 'POLYGON') | - |
| customChain | object | Custom chain configuration | - |
| environment | 'testnet' | 'mainnet' | Network environment | 'mainnet' |
| dappDetails | { dappDomain: string, dappLogo: string } | Dapp-specific details | - |
| aa | object | Account Abstraction details | - |
| aaSolana | object | Solana Account Abstraction details | - |
| rpcUrl | string | Custom RPC URL | - |
| triaStaging | string | boolean | Staging environment flag | false |
| supportedChains | string[] | List of supported chains | [] |
| didDomain | string | suffix for did name eg: mydid@tria | @tria |