Global variables
The global variables are all available in the window instances on browsers.
interface Window {
// Sentre
sentre: {
wallet?: import('@senswap/sen-js').WalletInterface
lamports: import('@senswap/sen-js').Lamports
splt: import('@senswap/sen-js').SPLT
swap: import('@senswap/sen-js').Swap
}
// Utility
notify: ({ type, description, onClick }: SentreNotification) => void
message: ({ type, description, onClick }: SentreMessage) => void
}Global sentre
window.sentre = {
wallet?: import('@senswap/sen-js').WalletInterface
lamports: import('@senswap/sen-js').Lamports
splt: import('@senswap/sen-js').SPLT
swap: import('@senswap/sen-js').Swap
}Property
Type
Description
wallet
WalletInterface | undefined
Wallet instance.
lamports
Lamports
Lamports instance.
splt
SPLT
SPLT instance.
swap
Swap
Swap instance.
Global notification
To create top-right notifications.
API
Property
Type
Description
type
error | warning | success | info | loading
The notification type.
description
string
The notification message.
onClick
function | undefined
The action that is activated when users click to the notification pop-up.
Examples
Last updated