Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
SyedAhkam committed Mar 13, 2023
1 parent 4a36b59 commit 6a96963
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm i hotkeys-sdk
```ts
import * as hotkeys from "hotkeys-sdk";

const [txId, mintId] = await generateKey(
const [txId, mintId] = await hotkeys.generateKey(
connection,
owner,
"HK: Plugin",
Expand All @@ -48,14 +48,14 @@ console.log("txId: ", txId);
console.log("mintId: ", mintId);
```

### Sell a key
### Resell a key

```ts
import * as hotkeys from "hotkeys-sdk";

const token = new PublicKey("4eepA7KT2ZzyA8Gih94AxVb5uNPXy7d2mPZR6HF2TtZF");

const txId = await sellKey(connection, owner, buyer, token, 0.1);
const txId = await hotkeys.sellKey(connection, owner, buyer, token, 0.1);

console.log("txId: ", txId);
```
Expand All @@ -69,7 +69,7 @@ const tokenRequired = new PublicKey(
"4eepA7KT2ZzyA8Gih94AxVb5uNPXy7d2mPZR6HF2TtZF"
);

if (await checkAccess(connection, owner, tokenRequired)) {
if (await hotkeys.checkAccess(connection, owner, tokenRequired)) {
console.log("Access granted");
} else {
console.log("Access denied");
Expand Down

0 comments on commit 6a96963

Please sign in to comment.