import { Keychain } from '@awesome-cordova-plugins/keychain/ngx';
constructor(private keychain: Keychain) { }
...
this.keychain.set(key, value).then(() => {
this.keychain.get(key)
.then(value => console.log('Got value', value))
.catch(err => console.error('Error getting', err));
})
.catch(err => console.error('Error setting', err));