web3-token icon indicating copy to clipboard operation
web3-token copied to clipboard

Incorrect type for verify() output

Open bluenex opened this issue 3 years ago • 0 comments

The actual output object looks like this:

{
  address: string;
  body: {
    "expiration-time": string;
    "issued-at": string;
    "nonce": string;
    "uri": string;
    "web3-token-version": string;
  }
}

But the type defined is this:

https://github.com/bytesbay/web3-token/blob/da90d152bb4ba0b07933bf2b65434f7c5d5d238f/src/lib.d.ts#L25-L31

The problem is VerifyBody doesn't have those fields mentioned above. I think having another type for verifying result is reasonable (probably as VerifyResult).

bluenex avatar Jun 02 '22 16:06 bluenex