Skip to main content

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.

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​

PropertyDescriptionTypeDefaultVersion
pinUser's password for unlocking. If using Portkey login or using did.save after logging in, user information can be retrieved through the PIN.string-
originChainIdChain ID where Portkey account is registeredChainId-
managerPrivateKeyPrivate key of delegate managementstring-
caHashPortkey account's caHashstring-
didStorageKeyNamestorageName used in did.savestring-