2022-09-14 10:26:39 -07:00
# Pyth Governance Multisig CLI Program
2022-09-13 19:36:52 -07:00
This program allows you to create/execute a multisig transaction that includes an instruction from wormhole for cross-chain governance.
## Installation
```
npm install
```
## Usage
2022-09-14 10:26:39 -07:00
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/ ).
2022-12-19 10:02:07 -08:00
- Node 19 doesn't work!
2022-09-14 10:26:39 -07:00
- 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.
- Information about ledger derivation can be found [here ](https://github.com/LedgerHQ/ledger-live-common/blob/master/docs/derivation.md ).
2022-09-13 19:36:52 -07:00
### Create a multisig transaction
```
2022-10-25 05:45:26 -07:00
npm start -- create -c < CLUSTER: [ mainnet | devnet ] > -l -lda < LEDGER_DERIVATION_ACCOUNT > -ldc < LEDGER_DERIVATION_CHANGE > -w < WALLET_SECRET_KEY_FILEPATH > -p < PAYLOAD >
2022-09-13 19:36:52 -07:00
```
2022-09-14 10:26:39 -07:00
To use ledger with default derivation account and change:
```
2022-10-25 05:45:26 -07:00
npm start -- create -c devnet -l -p hello
2022-09-14 10:26:39 -07:00
```
To use ledger with custom derivation account and/or change:
```
2022-10-25 05:45:26 -07:00
npm start -- create -c devnet -l -lda 0 -p hello
2022-09-14 10:26:39 -07:00
2022-10-25 05:45:26 -07:00
npm start -- create -c devnet -l -lda 0 -ldc 1 -p hello
2022-09-14 10:26:39 -07:00
```
To use hot wallet :
2022-09-13 19:36:52 -07:00
```
2022-10-25 05:45:26 -07:00
npm start -- create -c devnet -w keys/key.json -p hello
2022-09-13 19:36:52 -07:00
```
2022-09-14 10:26:39 -07:00
---
2022-09-13 19:36:52 -07:00
### Execute a multisig transaction
```
2022-10-25 05:45:26 -07:00
npm start -- execute -c < CLUSTER: [ mainnet | devnet ] > -w < WALLET_SECRET_KEY_FILEPATH > -t < TX_ID >
2022-09-13 19:36:52 -07:00
```
2022-09-14 10:26:39 -07:00
To use ledger with default derivation account and change:
```
2022-10-25 05:45:26 -07:00
npm start -- execute -c devnet -l -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh
2022-09-14 10:26:39 -07:00
```
To use ledger with custom derivation account and/or change:
```
2022-10-25 05:45:26 -07:00
npm start -- execute -c devnet -l -lda 0 -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh
2022-09-14 10:26:39 -07:00
2022-10-25 05:45:26 -07:00
npm start -- execute -c devnet -l -lda 0 -ldc 1 -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh
2022-09-14 10:26:39 -07:00
```
2022-09-13 19:36:52 -07:00
Example:
```
2022-10-25 05:45:26 -07:00
npm start -- execute -c devnet -w keys/key.json -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh
2022-09-13 19:36:52 -07:00
```
2022-09-14 10:26:39 -07:00
https://github.com/LedgerHQ/ledger-live/wiki/LLC:derivation