Returns information about the dAPI provider, including who this provider is, the version of their dAPI, and the NEP that the interface is compatible with.
Input Arguments
None
Success Response
Parameter
Description
Error Response
Parameter
Description
Example
Request
neoline.getProvider().then(provider => {const {name,website,version,compatibility,extra } = provider;console.log('Provider name: '+ name);console.log('Provider website: '+ website);console.log('Provider dAPI version: '+ version);console.log('Provider dAPI compatibility: '+JSON.stringify(compatibility));console.log('Extra provider specific atributes: '+JSON.stringify(compatibility));}).catch((error) => {const {type,description,data} = error;switch(type) {case'NO_PROVIDER':console.log('No provider available.');break;case'CONNECTION_DENIED':console.log('The user rejected the request to connect with your dApp.');break;default:// Not an expected error object. Just write the error to the console.console.error(error);break; }});