JavaScript
Note: The package has not been published, please contact us or fill out this form for access
Our foundational package, crafted to interface directly with your backend, retrieves essential insurance information tailored for your project. Flexible in its application, it's designed to function smoothly whether integrated into your project's frontend or backend, ensuring a seamless connection to Web3Shield's insurance services.
Installation
Implementation
In your main.js
setup the following
Types
W3SInsurance
Constructor
apiKey
string
Web3Shield Project API Key
logs
boolean
Enable or disable logs, false
by default
environment
mainnet
| testnet
| local
Select which Web3Shield environment to operate in, local
by default
getInsurance()
user
string
Address of the user opting in for insurance
amount
string | number | BigNumber
Amount of sourceToken
being bridged
source
string
Chain ID of the source chain
destination
string
Chain ID of the destination chain
sourceToken
string
Address of the source token
destinationToken
string
Address of the destination token
message
string
Relevant success/error message
premium
float
Premium amount to be paid to cover amount
of sourceToken
minimumPremium
float
Minimum premium amount to be paid (in USD)
validTill
number
Epoch until which the policy is valid
Last updated