Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

deadmanswitch source realm

Constants 1

Functions 11

Types 4

type Beneficiary

struct
1type Beneficiary struct {
2	Addr     string
3	SharePct int64 // out of 100
4}
source

type Registry

struct
1type Registry struct {
2	admin         string
3	switches      map[string]*Switch
4	nextSeq       int64
5	currentHeight int64
6}
source

Methods on Registry

func Cancel

method on Registry
1func (r *Registry) Cancel(caller, switchID string) bool
source

func Checkin

method on Registry
1func (r *Registry) Checkin(caller, switchID string) bool
source

func ClaimShare

method on Registry
1func (r *Registry) ClaimShare(caller, switchID string) int64
source

func CreateSwitch

method on Registry
1func (r *Registry) CreateSwitch(owner string, timeoutBlocks int64) (string, bool)
source

func Deposit

method on Registry
1func (r *Registry) Deposit(switchID string, amount int64) bool
source

func GetSwitch

method on Registry
1func (r *Registry) GetSwitch(id string) (*Switch, bool)
source

func SetBeneficiaries

method on Registry
1func (r *Registry) SetBeneficiaries(caller, switchID string, addrs []string, pcts []int64) bool
source

func Tick

method on Registry
1func (r *Registry) Tick(height int64)
source

func Trigger

method on Registry
1func (r *Registry) Trigger(switchID string) bool
source

type Switch

struct
 1type Switch struct {
 2	ID            string
 3	Owner         string
 4	LastCheckin   int64
 5	TimeoutBlocks int64
 6	Balance       int64
 7	Beneficiaries []Beneficiary
 8	Status        SwitchStatus
 9	claimed       map[string]bool
10}
source

Source Files 2