@quantabit/session-key-sdk
v1.1.0
Published
QuantaBit Session Key SDK - Temporary scoped session keys to reduce repeated wallet signing
Maintainers
Readme
@quantabit/session-key-sdk
Temporary scoped session keys to reduce repeated wallet signing prompts.
Install
npm install @quantabit/session-key-sdkUsage
import { SessionKeyManager } from '@quantabit/session-key-sdk';
const mgr = new SessionKeyManager();
const session = mgr.createSessionKey({
ownerAddress: 'HuM99...',
scopes: ['memo.anchor', 'social.like'],
ttlSeconds: 1800,
});
const sig = mgr.signWithSession(session.id, { action: 'like', postId: '1' }, 'social.like');License
MIT
