Wallet SDK
Installation
npm install @docknetwork/wallet-sdk-core
npm install @docknetwork/wallet-sdk-react-native
React Native example
import {Box, Button, NativeBaseProvider, Text} from 'native-base';
import React, {useEffect} from 'react';
import {
WalletSDKProvider,
useWallet,
} from '@docknetwork/wallet-sdk-react-native/lib';
const WalletDetails = function () {
const {wallet, status, documents} = useWallet();
return (
<Box>
<Text>Wallet status: {status}</Text>
<Text>Wallet docs: {documents.length}</Text>
<Button onPress={() => wallet.addDocument({
name: 'my credential',
type: 'VerifiableCredential',
})}>
<Text>Add Credential</Text>
</Button>
</Box>
);
};
const App = () => {
return (
<NativeBaseProvider>
<WalletSDKProvider>
<Box p={8}>
<Text>Dock Wallet SDK Demo</Text>
<Text>Press on `add credential` button to create a new credential</Text>
</Box>
<WalletDetails />
</WalletSDKProvider>
</NativeBaseProvider>
);
};
export default App;
Documentation
Key features
Running on other platforms
Last updated
Was this helpful?