Skip to content

Commit

Permalink
update example READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Sep 12, 2024
1 parent 1975153 commit c65c409
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/with-ethers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ Wrapped 0.00001 ETH:
https://sepolia.etherscan.io/tx/0x7f98c1b2c7ff7f8ab876b27fdcd794653d8b7f728dbeec3b1d403789c38bcb71
```

Note: if you have a consensus-related policy resembling the following

```
{
"effect": "EFFECT_ALLOW",
"consensus": "approvers.count() >= 2"
}
```

then the script will await consensus to be met. Specifically, the script will attempt to poll for activity completion per the `activityPoller` config passed to the `TurnkeyServerSDK`. If consensus still isn't met during this period, then the resulting `Consensus Needed` error will be caught, and the script will prompt the user to indicate when consensus has been met. At that point, the script will continue.

```bash
$ pnpm start-legacy-sepolia
```
Expand Down
11 changes: 11 additions & 0 deletions examples/with-solana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ Transaction broadcast and confirmed! 🎉
https://explorer.solana.com/tx/3Wr1vmSwqf7jPJXzgqA3fGfELdTfiR8v86sRiTJxNYT4KYEcadQjceFsN8BoHQZqb6mnuqsJsgHdk6i8Sj8YtmVr?cluster=devnet
```

Note: if you have a consensus-related policy resembling the following

```
{
"effect": "EFFECT_ALLOW",
"consensus": "approvers.count() >= 2"
}
```

then the script will await consensus to be met. Specifically, the script will attempt to poll for activity completion per the `activityPoller` config passed to the `TurnkeyServerSDK`. If consensus still isn't met during this period, then the resulting `Consensus Needed` error will be caught, and the script will prompt the user to indicate when consensus has been met. At that point, the script will continue.

### 4/ Running the advanced script (multiple versioned transactions)

```bash
Expand Down
11 changes: 11 additions & 0 deletions examples/with-viem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,14 @@ Turnkey-powered signature:
Recovered address:
0xDC608F098255C89B36da905D9132A9Ee3DD266D9
```

Note: if you have a consensus-related policy resembling the following

```
{
"effect": "EFFECT_ALLOW",
"consensus": "approvers.count() >= 2"
}
```

then the script will await consensus to be met. Specifically, the script will attempt to poll for activity completion per the `activityPoller` config passed to the `TurnkeyServerSDK`. If consensus still isn't met during this period, then the resulting `Consensus Needed` error will be caught, and the script will prompt the user to indicate when consensus has been met. At that point, the script will continue.

0 comments on commit c65c409

Please sign in to comment.