Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Sep 11, 2023
1 parent bfc54c8 commit 02a797f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ API Docs: https://docs.turnkey.com/
| [`with-nonce-manager`](/examples/with-nonce-manager/) | Create a new Ethereum address, then sign and broadcast multiple transactions in a sequential or optimistic manner. |
| [`with-offline`](/examples/with-offline/) | Sign a Turnkey request in offline context |
| [`with-federated-passkeys`](/examples/with-federated-passkeys/) | A NextJS app that demonstrates how to use Turnkey to build a federated, webauthn powered authentication flow |
| [`with-ethers-and-passkeys`](/examples/with-ethers-and-passkeys/) | A NextJS app that demonstrates how to use `@turnkey/ethers` to build a passkey-powered application |
| [`with-viem-and-passkeys`](/examples/with-viem-and-passkeys/) | A NextJS app that demonstrates how to use `@turnkey/viem` to build a passkey-powered application |
| [`demo-consumer-wallet`](https://github.com/tkhq/demo-consumer-wallet) | A minimal consumer wallet app powered by Turnkey and WalletConnect |
| [`deployer`](/examples/deployer/) | Compile and deploy a smart contract |
Expand Down
Binary file modified examples/with-ethers-and-passkeys/img/ui-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/with-ethers-and-passkeys/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export default function Home() {
<p className={styles.explainer}>
Based on the parent organization ID and a stamp from your passkey
used to created the sub-organization, we can look up your
sug-organization using the
sug-organization using the{" "}
<a
href="https://docs.turnkey.com/api#tag/Who-am-I"
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-viem-and-passkeys/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default function Home() {
<p className={styles.explainer}>
Based on the parent organization ID and a stamp from your passkey
used to created the sub-organization, we can look up your
sug-organization using the
sug-organization using the{" "}
<a
href="https://docs.turnkey.com/api#tag/Who-am-I"
target="_blank"
Expand Down
19 changes: 16 additions & 3 deletions packages/ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,29 @@ $ npm install ethers @turnkey/ethers
```typescript
import { ethers } from "ethers";
import { TurnkeySigner } from "@turnkey/ethers";
import { TurnkeyClient } from "@turnkey/http";
import { ApiKeyStamper } from "@turnkey/api-key-stamper";

async function main() {
const network = "goerli";
const provider = new ethers.providers.InfuraProvider(network);

const turnkeyClient = new TurnkeyClient(
{
baseUrl: "https://api.turnkey.com",
},
// This uses API key credentials.
// If you're using passkeys, use `@turnkey/webauthn-stamper` to collect webauthn signatures:
// new WebauthnStamper({...options...})
new ApiKeyStamper({
apiPublicKey: "...",
apiPrivateKey: "...",
})
);

// Initialize a Turnkey Signer
const turnkeySigner = new TurnkeySigner({
apiPublicKey: "...",
apiPrivateKey: "...",
baseUrl: "https://api.turnkey.com",
client: turnkeyClient,
organizationId: "...",
privateKeyId: "...",
});
Expand Down

0 comments on commit 02a797f

Please sign in to comment.