Skip to content

Commit f3e17ad

Browse files
authored
add ledger support (#277)
* add ledger support * address feedbacks
1 parent 1c6977e commit f3e17ad

File tree

6 files changed

+1312
-47
lines changed

6 files changed

+1312
-47
lines changed
Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Pyth Multisig CLI Program
1+
# Pyth Governance Multisig CLI Program
22

33
This program allows you to create/execute a multisig transaction that includes an instruction from wormhole for cross-chain governance.
44

@@ -10,28 +10,65 @@ npm install
1010

1111
## Usage
1212

13-
Note: Node.js v17.15.0 or higher is required as it [introduces support for fetch API](https://nodejs.org/tr/blog/release/v17.5.0/).
13+
Note:
14+
15+
- Node.js v17.15.0 or higher is required as it [introduces support for fetch API](https://nodejs.org/tr/blog/release/v17.5.0/).
16+
- When using with Ledger, please enable [blind signing](https://www.ledger.com/academy/enable-blind-signing-why-when-and-how-to-stay-safe) in the Solana app settings. TLDR: When you enable blind signing, you enable your device to approve a smart contract transaction, even though it hasn’t been able to display full contract data to you. In other words, you’re agreeing to trust, instead of verify, the transaction. You still have to manually approve each transactions.
17+
- Information about ledger derivation can be found [here](https://github.com/LedgerHQ/ledger-live-common/blob/master/docs/derivation.md).
18+
- RPC URLs can be found [here](https://book.wormhole.com/reference/rpcnodes.html).
1419

1520
### Create a multisig transaction
1621

1722
```
18-
npm start -- create -c <CLUSTER> -v <VAULT_ADDRESS> -w <WALLET_SECRET_KEY_FILEPATH> -p <PAYLOAD>
23+
npm start -- create -c <CLUSTER> -v <VAULT_ADDRESS> -l -lda <LEDGER_DERIVATION_ACCOUNT> -ldc <LEDGER_DERIVATION_CHANGE> -w <WALLET_SECRET_KEY_FILEPATH> -p <PAYLOAD>
1924
```
2025

21-
Example:
26+
To use ledger with default derivation account and change:
27+
28+
```
29+
npm start -- create -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -l -p hello
30+
```
31+
32+
To use ledger with custom derivation account and/or change:
33+
34+
```
35+
npm start -- create -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -l -lda 0 -p hello
36+
37+
npm start -- create -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -l -lda 0 -ldc 1 -p hello
38+
```
39+
40+
To use hot wallet :
2241

2342
```
2443
npm start -- create -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -w keys/key.json -p hello
2544
```
2645

46+
---
47+
2748
### Execute a multisig transaction
2849

2950
```
3051
npm start -- execute -c <CLUSTER> -v <VAULT_ADDRESS> -w <WALLET_SECRET_KEY_FILEPATH> -m <MESSAGE_SECRET_KEY_FILEPATH> -t <TX_ID> -u <RPC_URL>
3152
```
3253

54+
To use ledger with default derivation account and change:
55+
56+
```
57+
npm start -- execute -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -l -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh -u https://wormhole-v2-testnet-api.certus.one/
58+
```
59+
60+
To use ledger with custom derivation account and/or change:
61+
62+
```
63+
npm start -- execute -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -l -lda 0 -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh -u https://wormhole-v2-testnet-api.certus.one/
64+
65+
npm start -- execute -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -l -lda 0 -ldc 1 -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh -u https://wormhole-v2-testnet-api.certus.one/
66+
```
67+
3368
Example:
3469

3570
```
3671
npm start -- execute -c devnet -v HezRVdwZmKpdKbksxFytKnHTQVztiTmL3GHdNadMFYui -w keys/key.json -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh -u https://wormhole-v2-testnet-api.certus.one/
3772
```
73+
74+
https://github.com/LedgerHQ/ledger-live/wiki/LLC:derivation

0 commit comments

Comments
 (0)