killswitch

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOGGER = logging.MustGetLogger("killswitch")

Functions

func ValidateAccount

func ValidateAccount(account string) bool

ValidateAccount is a utility function to validate the argument passed as parameter is a valid type of Stellar key according to the Stellar's key encoding.

Types

type KillSwitch

type KillSwitch struct {
	// contains filtered or unexported fields
}

func CreateKillSwitch

func CreateKillSwitch() (KillSwitch, error)

CreateKillSwitch is a Context initializing function

func (KillSwitch) ReactivateAccount

func (ks KillSwitch) ReactivateAccount(w http.ResponseWriter, req *http.Request)

ReactivateAccount function would be called by passing a suspended Stellar Address in the request parameter and the account passed will be reactivated by adding SHA256 signer to the signer list, making master key's weigh to 2. At the same time, this function would modify the Threshold value to [1,2,3]. So that participant could do regular operations.

func (KillSwitch) SuspendAccount

func (ks KillSwitch) SuspendAccount(w http.ResponseWriter, req *http.Request)

SuspendAccount function would be called by passing a Stellar Address in the request parameter and the account passed will be suspended by removing SHA256 signer from the signer list, making master key's weigh to 0. At the same time, this function would modify the Threshold value to [1,1,1]. So that IBM account which is in the signer list with weight 1 could do all the operations.

type Operations

type Operations struct {
	GasServiceClient    gasserviceclient.GasServiceClient
	CryptoServiceClient crypto_client.CryptoServiceClient
}

Jump to

Keyboard shortcuts

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