client

package
v0.0.5-rc-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

Scripts

Setup bridge

  1. Run bridge-setup.go with privateKey, accountId and network as flags to generate the configurations go run ./scripts/bridge/setup.go --privateKey=/your private key/ --accountID=/your account id/ --adminKey=/your admin key/ --network=/previewnet|testnet|mainnet/ --members=/int, the count of the wanted bridge custodians/

  2. Run create.go to create custom token and associate it with hedera go run ./scripts/token/native/create.go --privateKey=/your private key/ --accountID=/your account id/ --network=/previewnet|testnet|mainnet/ --memberPrKeys=/'The array of private keys from from the output of the previous step separated by ","'/ --bridgeID=/The bridge id from the output of the previous step/

  3. Run wrapped-token-create.go to create custom wrapped token with a bridge account treasury and associate it with hedera go run ./scripts/token/wrapped/wrapped-token-create.go --privateKey=/your private key/ --accountID=/your account id/ --adminKey=/your admin key/ --network=/previewnet|testnet|mainnet/ --memberPrKeys=/'The array of private keys from from the output of the previous step separated by ","'/ --bridgeID=/The bridge id from the output of the previous step/ --generateSupplyKeysFromMemberPrKeys=true

  4. Associate new account to token go run ./scripts/token/associate/associate.go --privateKey=/your private key/ --accountID=/your account id/ --network=/previewnet|testnet|mainnet/ --tokenID=/The Token id from the output of the previous step/

Update bridge config

  1. Run create-topic.go (only once) with supplyKeys, executorAccountID, executorPrivateKey, keyThreshold, network to create the topic with all given public keys and the key threshold. go run ./scripts/common/create-topic/create-topic.go --supplyKeys /public keys, split by comma/ --executorAccountID /executor account id/ --executorAccountID /executor private key/ --keyThreshold /key threshold (default: 1)/ --network /previewnet|testnet|mainnet/

  2. Run prepare-update-config.go with executorAccountID, topicID and configPath to create frozen transaction as bytes which to send for signing to all members go run ./scripts/bridge/update-config/prepare-update-config.go --executorAccountID /executor account id/ --topicID /topic id/ --network /previewnet|testnet|mainnet/ --configPath /full or relative path to bridge.yml/ --validStartMinutes /start minutes (default 2)/ --nodeAccountID /node account id which process the transaction (default: "0.0.3")/

  3. Depending on the threshold, n out of m keys of the threshold supply key have to sign the generated bytes by running sign-transaction.go with privateKeys and transaction itself go run ./scripts/common/sign/sign-transaction.go --privateKeys /member private key (or all members private keys separated by comma/ --transaction /transaction bytes/

  4. Submit the transaction after it has been signed by the required keys, by running submit-transaction.go with privateKey, accountID, network and transaction (the signed bytes) go run ./scripts/common/submit/submit-transaction.go --privateKey /private key of executor/ --accountID /account id of the executor/ --network=/previewnet|testnet|mainnet/ --transaction /signed transaction bytes/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientForNetwork

func GetClientForNetwork(network string) *hedera.Client

func Init

func Init(privateKey, accountID, network string) *hedera.Client

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL