Skip to content

Commit

Permalink
Add stake, unstake, and unlock stake txn construction endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazy Nina committed Jan 8, 2024
1 parent 43493e3 commit c3e0dc9
Show file tree
Hide file tree
Showing 2 changed files with 443 additions and 0 deletions.
26 changes: 26 additions & 0 deletions routes/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,11 @@ const (

// validators.go
RoutePathValidators = "/api/v0/validators"

// stake.go
RoutePathStake = "/api/v0/stake"
RoutePathUnstake = "/api/v0/unstake"
RoutePathUnlockStake = "/api/v0/unlock-stake"
)

// APIServer provides the interface between the blockchain and things like the
Expand Down Expand Up @@ -1304,6 +1309,27 @@ func (fes *APIServer) NewRouter() *muxtrace.Router {
fes.GetValidatorByPublicKeyBase58Check,
PublicAccess,
},
{
"Stake",
[]string{"POST", "OPTIONS"},
RoutePathStake,
fes.Stake,
PublicAccess,
},
{
"Unstake",
[]string{"POST", "OPTIONS"},
RoutePathUnstake,
fes.Unstake,
PublicAccess,
},
{
"UnlockStake",
[]string{"POST", "OPTIONS"},
RoutePathUnlockStake,
fes.UnlockStake,
PublicAccess,
},
// Jumio Routes
{
"JumioBegin",
Expand Down
Loading

0 comments on commit c3e0dc9

Please sign in to comment.