Skip to content

Commit 3e5c391

Browse files
committed
Minor fix
1 parent 2296a6c commit 3e5c391

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

_code-samples/verify-credential/js/README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,28 @@ Verifies that a specific credential exists on the XRPL and is valid.
55
Quick install & usage:
66

77
```sh
8-
blob
8+
npm install
99
```
1010

1111
`verify_credential.js` can also be used as a commandline utility. Full usage statement:
1212

1313
```sh
1414
$ ./verify_credential.js -h
15-
usage: verify_credential.js [-h] [-b] [-n {devnet,testnet,mainnet}]
16-
[issuer] [subject] [credential_type]
1715

18-
Verify an XRPL credential
16+
Usage: verify-credential [options] [issuer] [subject] [credential_type]
1917

20-
positional arguments:
21-
issuer Credential issuer address as base58.
22-
subject Credential subject (holder) address as base58.
23-
credential_type Credential type as string
18+
Verify an XRPL credential
2419

25-
options:
26-
-h, --help show this help message and exit
27-
-b, --binary Use binary (hexadecimal) for credential_type
28-
-n, --network {devnet,testnet,mainnet}
29-
Use the specified network for lookup
20+
Arguments:
21+
issuer Credential issuer address as base58 (default:
22+
"rEzikzbnH6FQJ2cCr4Bqmf6c3jyWLzkonS")
23+
subject Credential subject (holder) address as base58 (default:
24+
"rsYhHbanGpnYe3M6bsaMeJT5jnLTfDEzoA")
25+
credential_type Credential type as string. (default: "my_credential")
26+
27+
Options:
28+
-b, --binary Use binary (hexadecimal) for credential_type
29+
-n, --network <network> {devnet,testnet,mainnet} Use the specified network for lookup (default: "devnet")
30+
-q, --quiet Don't print log messages
31+
-h, --help display help for command
3032
```

_code-samples/verify-credential/js/verify_credential.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,11 @@ async function verifyCredential(client, issuer, subject, credentialType, binary=
3030
* as of the most recently validated ledger.
3131
* Parameters:
3232
* client - Client for interacting with rippled servers.
33-
* issuer - Address of the credential issuer, in base58
34-
* subject - Address of the credential holder/subject, in base58
33+
* issuer - Address of the credential issuer, in base58.
34+
* subject - Address of the credential holder/subject, in base58.
3535
* credentialType - Credential type to check for as a string,
3636
* which will be encoded as UTF-8 (1-128 bytes long).
3737
* binary - Specifies that the credential type is provided in hexadecimal format.
38-
* verbose - If true, print details to stdout during lookup.
3938
* You must provide the credential_type as input.
4039
* Returns True if the account holds the specified, valid credential.
4140
* Returns False if the credential is missing, expired, or not accepted.
@@ -81,7 +80,7 @@ async function verifyCredential(client, issuer, subject, credentialType, binary=
8180
logger.info("Credential was not found");
8281
return false;
8382
} else {
84-
//Other errors, for example invalidly-specified addresses.
83+
// Other errors, for example invalidly pecified addresses.
8584
throw new XRPLLookupError(xrplResponse);
8685
}
8786
}
@@ -129,7 +128,7 @@ async function verifyCredential(client, issuer, subject, credentialType, binary=
129128

130129
// Commandline usage -----------------------------------------------------------
131130
async function main() {
132-
// JSON-RPC URLs of public servers
131+
// Websocket URLs of public servers
133132
const NETWORKS = {
134133
devnet: "wss://s.devnet.rippletest.net:51233",
135134
testnet: "wss://s.altnet.rippletest.net:51233",

0 commit comments

Comments
 (0)