PortkeyAssetProvider
User asset provider, used for initializing user information and data management.
Before using this component, please make sure you are logged-in or you know the caHash of user's Portkey account and the management of Portkey.
Before using this component, we assume that you are already familiar with the basic configuration of Portkey.
Before using this component, we assume that you are already familiar with the basic configuration of Portkey.
Usage
import { PortkeyAssetProvider, Asset } from '@portkey/did-ui-react';
const App: React.FC = () => {
return (
<PortkeyAssetProvider pin="your pin" originChainId="AELF">
<Asset />
</PortkeyAssetProvider>
);
};
export default App;
API
Property | Description | Type | Default | Version |
---|---|---|---|---|
pin | User's password for unlocking. If using Portkey login or using did.save after logging in, user information can be retrieved through the PIN. | string | - | |
originChainId | Chain ID where Portkey account is registered | ChainId | - | |
managerPrivateKey | Private key of delegate management | string | - | |
caHash | Portkey account's caHash | string | - | |
didStorageKeyName | storageName used in did.save | string | - |