- Convert data to RDF
- Google takeout
- calendar(.ics) -- * .ics is a standard format, so it seems to be irrelevant to the provider
- youtube watch history(.html)
- Uber trip data(.csv)
- Google takeout
- Create infra ss58 DID Set: for issue(sign) VC / SD-JWT
- Issue VC: issue the JSON-LD to signed VC
- separation by period(day, month, quarter, semi-annual, yearly) (v0.2.0)
- Issue SD-JWT: issue the signed VC (or JSON of any kind) as SD-JWT. (v0.1.2)
Provider | Data | File extension |
---|---|---|
calendar | .ics | |
youtube watch history | .html | |
uber | trip data | .csv |
- Input VC data into PWN (API)
infra did init. Set to module but can be returned as variable if you want
// seed: infra did seed (required)
const seed = '0x8c9971953c5c82a51e3ab0ec9a16ced7054585081483e2489241b5b059f5f3cf';
const didSet = await PwnDataInput.initDIDSet(seed);
import { PeriodUnit } from './lib/interface';
// convert ical data to jsonld
// data:string data from calendar(.ics), youtube watch history(.html), uber trip data(.csv)
const data = fs.readFileSync(path.join('path/to/target', 'calendar.ics'), { encoding: 'utf-8'});
const icalJsonld = await PwnDataInput.convertRDF(data, 'ical', PeriodUnit.all, 'application/ld+json');
// vcId: vc identifier
const vcId = 'did:infra:space:15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5';
const signedVC = await PwnDataInput.IssueCredential(vcId, 'ical', JSON.parse(icalJsonld));
const issuedSdjwt = await PwnDataInput.issueSdJwt(signedVC);
const decodedSdJwt = decodeSDJWT(issuedSdjwt);
See
/example
,src/__tests__
folders