Skip to content

Commit e0ecff3

Browse files
andyv09martines3000
authored andcommitted
feat: add resolveDID RPC method (#78)
* feat: add resolveDID
1 parent 68d6389 commit e0ecff3

File tree

16 files changed

+651
-406
lines changed

16 files changed

+651
-406
lines changed

packages/connector/src/methods.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { VerifiablePresentation, W3CVerifiableCredential } from '@veramo/core';
1+
import {
2+
DIDResolutionResult,
3+
VerifiablePresentation,
4+
W3CVerifiableCredential,
5+
} from '@veramo/core';
26
import {
37
AvailableMethods,
48
AvailableVCStores,
@@ -176,3 +180,13 @@ export async function getSnapSettings(
176180
): Promise<SSISnapConfig> {
177181
return await sendSnapMethod({ method: 'getSnapSettings' }, this.snapId);
178182
}
183+
184+
export async function resolveDID(
185+
this: MetaMaskSSISnap,
186+
did: string
187+
): Promise<DIDResolutionResult> {
188+
return await sendSnapMethod(
189+
{ method: 'resolveDID', params: { did } },
190+
this.snapId
191+
);
192+
}

packages/connector/src/snap.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
deleteVC,
1919
getSnapSettings,
2020
getAccountSettings,
21+
resolveDID,
2122
} from './methods';
2223

2324
export class MetaMaskSSISnap {
@@ -57,9 +58,9 @@ export class MetaMaskSSISnap {
5758
setVCStore: setVCStore.bind(this),
5859
getAvailableVCStores: getAvailableVCStores.bind(this),
5960
deleteVC: deleteVC.bind(this),
60-
6161
getSnapSettings: getSnapSettings.bind(this),
6262
getAccountSettings: getAccountSettings.bind(this),
63+
resolveDID: resolveDID.bind(this),
6364
};
6465
};
6566
}

0 commit comments

Comments
 (0)