WebOfTrust / signify-browser-extension

Apache License 2.0
7 stars 7 forks source link

create a method which recieves aid and returns issuerName #124

Closed 2byrds closed 7 months ago

rodolfomiranda commented 8 months ago

@HunnySajid , we do not have a method in signify-ts to retrieve an aid by its aid string. What we can do is in the listIdentifiers function in the browser, it to iterate until we gel all aids, something like

  const listIdentifiers = async () => {
    validateClient();
    let aids: any[] = []
    let start = 0;
    let total = 25;
    while (start < total) {
      const res = await _client?.identifiers().list(start, start + 24);
      aids = aids.concat(res.aids);
      total = res.total;
      start = res.end + 1; 
    }
    return aids;
  };
HunnySajid commented 7 months ago

closing as it is merged with https://github.com/WebOfTrust/signify-browser-extension/pull/135