Skip to content

Commit 89444b7

Browse files
author
Rodolfo Miranda
committed
exchange get
1 parent 87f2aa2 commit 89444b7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

examples/integration-scripts/multisig.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,9 +1592,8 @@ async function run() {
15921592
msgSaid = '';
15931593
while (msgSaid == '') {
15941594
let notifications = await client4.notifications().list();
1595+
console.log(JSON.stringify(notifications))
15951596
for (let notif of notifications.notes) {
1596-
console.log(notif)
1597-
console.log(notif.a)
15981597
if (notif.a.r == '/exn/ipex/grant') {
15991598
msgSaid = notif.a.d;
16001599
await client4.notifications().mark(notif.i);
@@ -1606,4 +1605,7 @@ async function run() {
16061605
await new Promise((resolve) => setTimeout(resolve, 1000));
16071606
}
16081607

1608+
res = await client4.exchanges().get('holder',msgSaid);
1609+
console.log(JSON.stringify(res))
1610+
16091611
}

src/keri/app/exchanging.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ export class Exchanges {
126126
let res = await this.client.fetch(path, method, data);
127127
return await res.json();
128128
}
129+
130+
async get(name:string, said:string) {
131+
let path = `/identifiers/${name}/exchanges/${said}`;
132+
let method = 'GET';
133+
let res = await this.client.fetch(path, method, null);
134+
return await res.json();
135+
136+
}
129137
}
130138

131139
export function exchange(

0 commit comments

Comments
 (0)