pyth-crosschain/third_party/pyth/multisig-wh-message-builder
guibescos bddcb69351
[multisig-cli] Refactor check that multisig vault already exists (#437)
* Refactor check that multisig vault already exists

* [Multisig] add transfer auth to multisig (#439)

* Checkpoint

* Cleanup

* Revert "[Multisig] add transfer auth to multisig (#439)" (#440)

This reverts commit 5fcbb4ca1f071f9da98946aededc2174f3e917bb.
2022-12-21 17:26:33 +01:00
..
src [multisig-cli] Refactor check that multisig vault already exists (#437) 2022-12-21 17:26:33 +01:00
.eslintrc.js Add pre-commit globally (#393) 2022-11-24 14:14:29 +01:00
.gitignore Add pre-commit globally (#393) 2022-11-24 14:14:29 +01:00
LICENSE add pyth multisig cli program (#276) 2022-09-14 10:36:52 +08:00
README.md Update README.md (#435) 2022-12-19 18:02:07 +00:00
jest.config.js Add pre-commit globally (#393) 2022-11-24 14:14:29 +01:00
package-lock.json Add the Squads Mesh program to Tilt and initialize a Vault for it (#421) 2022-12-13 14:05:06 +01:00
package.json Add the Squads Mesh program to Tilt and initialize a Vault for it (#421) 2022-12-13 14:05:06 +01:00
tsconfig.json add pyth multisig cli program (#276) 2022-09-14 10:36:52 +08:00

README.md

Pyth Governance Multisig CLI Program

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

Installation

npm install

Usage

Note:

  • Node.js v17.15.0 or higher is required as it introduces support for fetch API.
  • Node 19 doesn't work!
  • When using with Ledger, please enable blind signing in the Solana app settings. TLDR: When you enable blind signing, you enable your device to approve a smart contract transaction, even though it hasnt been able to display full contract data to you. In other words, youre agreeing to trust, instead of verify, the transaction. You still have to manually approve each transactions.
  • Information about ledger derivation can be found here.

Create a multisig transaction

npm start -- create -c <CLUSTER: [mainnet|devnet]> -l -lda <LEDGER_DERIVATION_ACCOUNT> -ldc <LEDGER_DERIVATION_CHANGE> -w <WALLET_SECRET_KEY_FILEPATH> -p <PAYLOAD>

To use ledger with default derivation account and change:

npm start -- create -c devnet -l -p hello

To use ledger with custom derivation account and/or change:

npm start -- create -c devnet -l -lda 0 -p hello

npm start -- create -c devnet -l -lda 0 -ldc 1 -p hello

To use hot wallet :

npm start -- create -c devnet -w keys/key.json -p hello

Execute a multisig transaction

npm start -- execute -c <CLUSTER: [mainnet|devnet]> -w <WALLET_SECRET_KEY_FILEPATH> -t <TX_ID>

To use ledger with default derivation account and change:

npm start -- execute -c devnet -l -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh

To use ledger with custom derivation account and/or change:

npm start -- execute -c devnet -l -lda 0 -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh

npm start -- execute -c devnet -l -lda 0 -ldc 1 -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh

Example:

npm start -- execute -c devnet -w keys/key.json -m keys/message.json -t GSC8r7Qsi9pc698fckaQgzHufG6LqVq3vZijyu5KsXLh

https://github.com/LedgerHQ/ledger-live/wiki/LLC:derivation