Skip to content

Releases: gitmachtl/scripts

SPO Scripts Light-Mode

17 Dec 12:53
Compare
Choose a tag to compare

SPO Scripts 17-12-2023

🔥 New Feature - LIGHT-Mode, running the SPO Scripts without a local node 🔥

This is an exciting new feature in the SPO Scripts. Before we had two operational modes, Online-Mode and Offline-Mode. Now we have an additional one, the Light-Mode.

So whats this Light-Mode? If you switch the scripts into Light-Mode - see below how easy it is to do so - you have the advantage of being online with your machine, but you don't
need a running synced cardano-node. You can switch between Networks Mainnet, PreProd and PreView within seconds.

This comes is handy if you just don't want to install and run a cardano-node, if you don't have the space for the database or if you just don't have the time to wait for a resync.

All transactions are of course generated and signed locally, but the queries and the transmit is done via online APIs like Koios.

How do you switch between Online-, Light- and Offline-Mode?

Thats simple, you just change a single entry in the 00_common.sh, common.inc or $HOME/.common.inc config-file:
image

  • workMode="online": Scripts are working in Online-Mode aka Full-Mode. A locally running and synced cardano-node is needed.
  • workMode="light": Scripts are working in Light-Mode. No cardano-node needed.
  • workMode="offline": Scripts are working in isolation and completely offline. No cardano-node needed.

Here is a simple example of a transaction in Light-Mode:
image

Notice the new mode is indicated via the Mode: online(light) in the header.

And we can of course check that the amount arrived, this has all been done in Light-Mode. There is no Mainnet Cardano-Node running on that machine 😄
image

You can do ALL OPERATIONS in Light-Mode now! 💙 Currently supported Chains are Mainnet, PreProd and PreView. You can switch between chains in seconds, and if you put a
different common.inc file into your folders, you can run them all in parallel too. I also wanna thank Holger from Cardano24, because i am hosting
the Online-Version of the Protocol-Parameters JSON files on his distributed Server-Platform uptime.live, thank you! The JSON files are updates every 10 mins to make them available in Light-Mode.

If you have an Online/Offline Workflow, you can use the Online machine in Light-Mode, and your Offline machine is still offline of course.


 

🔥 New Feature - $Sub-Handle & $Virtual-Handle support for $Adahandles 🔥

Complete support for the upcoming Sub-Handle and Virtual-Handle release. All scripts than can use Adahandles for queries and destinations are upgraded to support these additional formats.
As always, the scripts doing a second lookup if the Handles are really on the UTXOs that the APIs report. For the Virtual-Handles the Scripts are doing an extra Koios request to checkout the Inline-Datum
content of the UTXO holding the Virtual-Handle. Virtual-Handles store the destination address within the Inline-Datum.

Sub-Handles
image

As you can see this address also holds the Virtual-Handle $virtual@hndl which points to another address, we can query that too like below.

Virtual-Handles
image

Also there has been an Update to show all the different types of Adahandles in the Query, like ADA Handle for the original CIP-25 one, Ada Handle(Own) for the new CIP68 ones. Ada Handle(Ref) and Ada Handle(Virt) for the newest formats.


 

Improvements to the Online-Mode (aka Full-Mode)

  • Critical queries now always do a check if the local node is 100% synced with the chain before continuation.
    image


 

Improvements to the Offline-Mode

  • In Offline-Mode the header on each Script Call now shows your local machine time. This is really important if you are doing things like an OpCert-Update to generate the right KES period.
    So now you can do an easy check if the time on your Offline-Machine is correct
  • NativeAsset Token-Registry Information also in Offline-Mode. To get the UTXO data of an address you wanna use in Offline-Mode you are using the command ./01_workOffline.sh add <walletname>.
    This query - if enabled in the config - now also stores the Token-Registry information about NativeAssets on this address within the offlineTransfer.json file.

image


 

General updates

  • The SPO Scripts are now fully Conway-Era compatible! 🔥

  • 01_claimRewards.sh, 01_queryAddress.sh are now showing if the Stake-Address is delegated to a pool. If so it tries to show additional pool-informations like the Ticker, Description and the current Pool-Status
    image

  • 03a_genStakingPaymentAddr.sh: The generation of the Stake-Address registration certificate has been moved to be done within 03b_regStakingAddrCert.sh. This is a change for conway-era, because we now have to check
    the StakeAdress-Registration Deposit-Fee also for the deregistration. The Deposit-Fee can change after a registration has been done, so with conway-era the used amount is now stored within the certificate itself.
    If the StakeAddress is already registered on chain, the Script will tell you that and if also delegated to a Pool, it wil try to show you additional informations.


    Already registered:
    image

    New registration in conway-era:
    image

  • 03c_checkStakingAddrOnChain.sh now also shows the used Deposit-Fee of a registered Stake-Address. If delegated to a pool, it tries to show additional Informations.
    image

  • 04d_genNodeOpCert.sh now directly ready out the onDisKOpCertCount from the via an own new CBOR-Decode function to provide checking information in Light-Mode.

  • 04e_checkNodeOpCert.sh now ready out the onDiscOpCertCount and the onDiskKESSStart values for checking in Online- and Light-Mode

  • 05a_genStakepoolCert.sh now shows the set poolPledge also in ADA and not only in lovecase. Shows minPoolCost now also in ADA and not only in lovelaces. Shows the poolMargin now in percentage and not as decimal value.

  • 05c_regStakepoolCert.sh now shows the set poolPledge also in ADA and not only in lovecase. Shows minPoolCost now also in ADA and not only in lovelaces. Shows the poolMargin now in percentage and not as decimal value.

    A pool update/registration/retirement of course now also works in Light-Mode:
    image
    If there are external Witnesses (MultiOwnerPool) and the registration is done with an attached Metadata-JSON/CBOR, that information is now also stored to be represented in the external witness file.

  • 05e_checkPoolOnChain.sh now gives you detailed informations about the current pool-status. You can of course also use a pool-id in bech or hex to query this information with this script.


    Registered:
    image

    Retired:
    image

    Was never registered on the chain:
    image

  • 06_regDelegationCert.sh now checks the pool status you wanna send the delegation before continue with the transaction. If a pool is retired or was not registered on the chain(yet), such a transaction would let to an error.
    This precheck avoids this issue. In addition there is now a check that the Stake-Address is already registered on chain. Also, it now shows information about a current delegation and the planned delegation. The script directly reads out the delegation destination pool-id from the delegation certificate to show
    this information.


    Pool to delegate to not registered on chain(yet):
    image

    Showing the old delegation and the new delegation:
    image

  • 08a_genStakingAddrRetireCert.shnow checks if the Stake-Address is even registered before generating the Retirement-Certificate. Also now important, it checks the Deposit-Fee that was used to register the Stake-Address
    in first place. Because we need to use the exact Fee again to retire the Stake-Address. There is now also a check if the Stake-Address you wanna retire still holds rewards. If the Stake-Address still hold rewards, it will
    show you the amount and refuse to generate a Retirement certificate. In that case please first claim all your rewards via 01_claimRewards.sh and after that retire the Stake-Address.


    Stake-Address not registered, so no need to deregister it:
    ![image](https://gi...

Read more

SPO Scripts 04-10-2023

04 Oct 18:34
Compare
Choose a tag to compare

New feature - Create Base- and Staking-Keys from Mnemonic words

Script 03a_genStakingPaymentAddr.sh has been updated to also provide the method mnemonics as an option. As shown in the screenshot below, its now possible to generate new Base(Payment)- and Staking-Keys directly from 24-word mnemonics. These mnemonics are compatible with the ones from other wallets like Daedalus, Eternl, Typhon, etc...

If no mnemonics are provided, new ones are automatically generated and stored along the key files in a separate *.payment.mnemonics file.

Also you can set another accountNumber or indexNumber for the derivation path if needed!

image


 

New feature - Sending Transaction-Messages (encrypted or unencrypted), attaching Metadata-Files in JSON/CBOR

Many scripts already supported the direct sending of Transaction-Messages. Along with this update, the option to include Transaction-Metadata via attached a JSON or CBOR file has also been added.

This update now enables this features for all scripts in the Suite that are capable of doing a transaction.

The newly enabled ones are:

  • 03b_regStakingAddrCert.sh
  • 05c_regStakepoolCert.sh
  • 05d_poolWitness.sh (Updated to show the metadata filenames)
  • 06_regDelegationCert.sh
  • 07b_deregStakepoolCert.sh
  • 08b_deregStakingAddrCert.sh

So you can now add a comment or an encrypted message or metadata to every transaction that is possible via the StakepoolOperatorScripts. Which is a great tool to improve documentation, end also enabled other features that requires metadata files being attached to certain transactions. Like adding a proof of Ownership to a Stakepool-Registration, etc...

SPO Scripts 15-08-2023

15 Aug 08:27
Compare
Choose a tag to compare

Update for the Catalyst Voting Script 09a

New feature added to the scripts 09a_catalystVote.sh and 09a_catalystVoteF10.sh.

  • Query your Catalyst Voting Power

    Added a query feature so you can now verify your registered Voting-Power. This works on MainNet and on TestNet, because its a combined API at the moment.

    The result is the currently registered total Voting-Power, and all the Delegators/Delegations that are done to that Voting-Key.

    Queries can be done by providing the name of the Voting-Key file, by providing a bech encoded Voting-Key or by directly providing a hex encoded Voting-Key like:

    09a_catalystVoteF10.sh query myvote-test
    09a_catalystVoteF10.sh query cvote_vk1lca8dhe30dtmuk4yq3c9f20af0jk7ne9vhzhemheczjtpy3dq85qcdzn3e
    09a_catalystVoteF10.sh query fe3a76df317b57be5aa4047054a9fd4be56f4f2565c57ceef9c0a4b0922d01e8

⚠️ Make sure to also download the latest version of the 00_common.sh file!

Example Query:
image

SPO Scripts 06-05-2023

06 May 13:58
Compare
Choose a tag to compare

Update for the SPO Poll

Two new scripts have been added to the testnet folder on the repo.

  • Script 13a_spoPoll.sh:
    Simply run this script with a given txHash for the question transaction in your SPO Scripts env. This pulls the metadata via koios, presents the question, collects your answer and generates a cbor-file for transmission. The script does NOT REQUIRE to update to a newer cardano-cli version, your current 1.35.7 is ok. Because all the cbor generation, question handling is done within the script itself, no cardano-cli call.

image

  • Script 13b_sendSpoPoll.sh:
    This is an updated version of the normal 01_sendLovelaces.sh script, it simply allows you to specify your poolFile as the 4th parameter. So you can sign the transaction with the cbor-file attached also with your mypool.node.skey file. You can also do the payment with a HW-Wallet if you want.

image

Please do some testing, so tool providers have some data to work with. For the current test simply setup your env for PreProd chain and run script 13a like:

./13a_spoPoll.sh d8c1b1d871a27d74fbddfa16d28ce38288411a75c5d3561bb74066bcd54689e2

A test-poll dashboard for the PreProd-Chain is available here:
https://adastat.net/polls/62c6be72bdf0b5b16e37e4f55cf87e46bd1281ee358b25b8006358bf25e71798

SPO Scripts 29-04-2023

29 Apr 17:19
9cbccae
Compare
Choose a tag to compare

Thats a nice updateround, some highlights:

  • minimum Node & CLI Version is now 1.35.5

  • minimum HW-CLI Version is now 1.13.0

  • minimum Ledger-Cardano-App is now 6.0.3 for CIP36 Catalyst-Registration, 5.0.0 for other operations

  • minimum Trezor-Firmware is now 2.6.0

  • added support for CIP68 $adahandles (root-handles), original CIP25 $adahandels are still supported too

  • 01_claimRewards.sh can now also encrypt added transaction messages (CIP83)

  • 01_sendAssets.sh can now also encrypt added transaction messages (CIP83)

  • 01_sendLovelaces.sh can now also encrypt added transaction messages (CIP83)

  • 11a_mintAsset.sh can now also encrypt added transaction messages (CIP83)

  • 11b_burnAsset.sh can now also encrypt added transaction messages (CIP83)

  • 04b_genVRFKeys.sh is not writing an .skey file anymore to disc before doing the encryption

  • 05a_genStakepoolCert.sh is now using cardano-signer and not jcli anymore for ITN-Pool-Witness-generation

  • using cardano-signer instead of cardano-address, jcli, etc...

  • removed cardano-address and jcli binary dependencies

  • set preview explorer to use https://preview.cardanoscan.io

  • added a function to set the minVersion for HW-Wallet operations on a "per-call-base"

  • 09a_catalystVote.sh is now using the new CIP36 method with support for delegating the voting power to more than one vote-public-key (own, dReps, etc.)

  • 09a_catalystVote.sh can now generate mnemonics for wallets to be used as the vote-key-wallet later on with the CatalystVotingCenter

  • added information on how to get newer Ledger CardanoApp version via the experimental features

  • minor tweaks here and there