Skip to content

Commit 89b33c0

Browse files
github-actions[bot]algo-dev-service
authored andcommitted
Regenerate code from specification file (algorand#631)
Co-authored-by: Algorand Generation Bot <codegen@algorand.com>
1 parent b28ed19 commit 89b33c0

16 files changed

+144
-65
lines changed

client/v2/algod/algod.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ func (c *Client) GetTransactionProof(round uint64, txid string) *GetTransactionP
110110
return &GetTransactionProof{c: c, round: round, txid: txid}
111111
}
112112

113+
func (c *Client) GetBlockLogs(round uint64) *GetBlockLogs {
114+
return &GetBlockLogs{c: c, round: round}
115+
}
116+
113117
func (c *Client) Supply() *Supply {
114118
return &Supply{c: c}
115119
}

client/v2/algod/getBlockLogs.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package algod
2+
3+
import (
4+
"context"
5+
"fmt"
6+
7+
"github.com/algorand/go-algorand-sdk/v2/client/v2/common"
8+
"github.com/algorand/go-algorand-sdk/v2/client/v2/common/models"
9+
)
10+
11+
// GetBlockLogs get all of the logs from outer and inner app calls in the given
12+
// round
13+
type GetBlockLogs struct {
14+
c *Client
15+
16+
round uint64
17+
}
18+
19+
// Do performs the HTTP request
20+
func (s *GetBlockLogs) Do(ctx context.Context, headers ...*common.Header) (response models.BlockLogsResponse, err error) {
21+
err = s.c.get(ctx, &response, fmt.Sprintf("/v2/blocks/%s/logs", common.EscapeParams(s.round)...), nil, headers)
22+
return
23+
}

client/v2/common/models/account.go

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,44 @@ type Account struct {
77
// Address the account public key
88
Address string `json:"address"`
99

10-
// Amount (algo) total number of MicroAlgos in the account
10+
// Amount total number of MicroAlgos in the account
1111
Amount uint64 `json:"amount"`
1212

1313
// AmountWithoutPendingRewards specifies the amount of MicroAlgos in the account,
1414
// without the pending rewards.
1515
AmountWithoutPendingRewards uint64 `json:"amount-without-pending-rewards"`
1616

17-
// AppsLocalState (appl) applications local data stored in this account.
17+
// AppsLocalState application local data stored in this account.
1818
// Note the raw object uses `map[int] -> AppLocalState` for this type.
1919
AppsLocalState []ApplicationLocalState `json:"apps-local-state,omitempty"`
2020

21-
// AppsTotalExtraPages (teap) the sum of all extra application program pages for
22-
// this account.
21+
// AppsTotalExtraPages the sum of all extra application program pages for this
22+
// account.
2323
AppsTotalExtraPages uint64 `json:"apps-total-extra-pages,omitempty"`
2424

25-
// AppsTotalSchema (tsch) stores the sum of all of the local schemas and global
26-
// schemas in this account.
25+
// AppsTotalSchema the sum of all of the local schemas and global schemas in this
26+
// account.
2727
// Note: the raw account uses `StateSchema` for this type.
2828
AppsTotalSchema ApplicationStateSchema `json:"apps-total-schema,omitempty"`
2929

30-
// Assets (asset) assets held by this account.
30+
// Assets assets held by this account.
3131
// Note the raw object uses `map[int] -> AssetHolding` for this type.
3232
Assets []AssetHolding `json:"assets,omitempty"`
3333

34-
// AuthAddr (spend) the address against which signing should be checked. If empty,
35-
// the address of the current account is used. This field can be updated in any
34+
// AuthAddr the address against which signing should be checked. If empty, the
35+
// address of the current account is used. This field can be updated in any
3636
// transaction by setting the RekeyTo field.
3737
AuthAddr string `json:"auth-addr,omitempty"`
3838

3939
// ClosedAtRound round during which this account was most recently closed.
4040
ClosedAtRound uint64 `json:"closed-at-round,omitempty"`
4141

42-
// CreatedApps (appp) parameters of applications created by this account including
43-
// app global data.
42+
// CreatedApps parameters of applications created by this account including app
43+
// global data.
4444
// Note: the raw account uses `map[int] -> AppParams` for this type.
4545
CreatedApps []Application `json:"created-apps,omitempty"`
4646

47-
// CreatedAssets (apar) parameters of assets created by this account.
47+
// CreatedAssets parameters of assets created by this account.
4848
// Note: the raw account uses `map[int] -> Asset` for this type.
4949
CreatedAssets []Asset `json:"created-assets,omitempty"`
5050

@@ -54,33 +54,43 @@ type Account struct {
5454
// Deleted whether or not this account is currently closed.
5555
Deleted bool `json:"deleted,omitempty"`
5656

57+
// IncentiveEligible can the account receive block incentives if its balance is in
58+
// range at proposal time.
59+
IncentiveEligible bool `json:"incentive-eligible,omitempty"`
60+
61+
// LastHeartbeat the round in which this account last went online, or explicitly
62+
// renewed their online status.
63+
LastHeartbeat uint64 `json:"last-heartbeat,omitempty"`
64+
65+
// LastProposed the round in which this account last proposed the block.
66+
LastProposed uint64 `json:"last-proposed,omitempty"`
67+
5768
// Participation accountParticipation describes the parameters used by this account
5869
// in consensus protocol.
5970
Participation AccountParticipation `json:"participation,omitempty"`
6071

6172
// PendingRewards amount of MicroAlgos of pending rewards in this account.
6273
PendingRewards uint64 `json:"pending-rewards"`
6374

64-
// RewardBase (ebase) used as part of the rewards computation. Only applicable to
65-
// accounts which are participating.
75+
// RewardBase used as part of the rewards computation. Only applicable to accounts
76+
// which are participating.
6677
RewardBase uint64 `json:"reward-base,omitempty"`
6778

68-
// Rewards (ern) total rewards of MicroAlgos the account has received, including
69-
// pending rewards.
79+
// Rewards total rewards of MicroAlgos the account has received, including pending
80+
// rewards.
7081
Rewards uint64 `json:"rewards"`
7182

7283
// Round the round for which this information is relevant.
7384
Round uint64 `json:"round"`
7485

75-
// SigType indicates what type of signature is used by this account, must be one
76-
// of:
86+
// SigType the type of signature used by this account, must be one of:
7787
// * sig
7888
// * msig
7989
// * lsig
8090
// * or null if unknown
8191
SigType string `json:"sig-type,omitempty"`
8292

83-
// Status (onl) delegation status of the account's MicroAlgos
93+
// Status voting status of the account's MicroAlgos
8494
// * Offline - indicates that the associated account is delegated.
8595
// * Online - indicates that the associated account used as part of the delegation
8696
// pool.

client/v2/common/models/account_participation.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ package models
33
// AccountParticipation accountParticipation describes the parameters used by this
44
// account in consensus protocol.
55
type AccountParticipation struct {
6-
// SelectionParticipationKey (sel) Selection public key (if any) currently
7-
// registered for this round.
6+
// SelectionParticipationKey selection public key (if any) currently registered for
7+
// this round.
88
SelectionParticipationKey []byte `json:"selection-participation-key"`
99

10-
// StateProofKey (stprf) Root of the state proof key (if any)
10+
// StateProofKey root of the state proof key (if any)
1111
StateProofKey []byte `json:"state-proof-key,omitempty"`
1212

13-
// VoteFirstValid (voteFst) First round for which this participation is valid.
13+
// VoteFirstValid first round for which this participation is valid.
1414
VoteFirstValid uint64 `json:"vote-first-valid"`
1515

16-
// VoteKeyDilution (voteKD) Number of subkeys in each batch of participation keys.
16+
// VoteKeyDilution number of subkeys in each batch of participation keys.
1717
VoteKeyDilution uint64 `json:"vote-key-dilution"`
1818

19-
// VoteLastValid (voteLst) Last round for which this participation is valid.
19+
// VoteLastValid last round for which this participation is valid.
2020
VoteLastValid uint64 `json:"vote-last-valid"`
2121

22-
// VoteParticipationKey (vote) root participation public key (if any) currently
23-
// registered for this round.
22+
// VoteParticipationKey root participation public key (if any) currently registered
23+
// for this round.
2424
VoteParticipationKey []byte `json:"vote-participation-key"`
2525
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package models
2+
3+
// AppCallLogs the logged messages from an app call along with the app ID and outer
4+
// transaction ID. Logs appear in the same order that they were emitted.
5+
type AppCallLogs struct {
6+
// ApplicationIndex the application from which the logs were generated
7+
ApplicationIndex uint64 `json:"application-index"`
8+
9+
// Logs an array of logs
10+
Logs [][]byte `json:"logs"`
11+
12+
// Txid the transaction ID of the outer app call that lead to these logs
13+
Txid string `json:"txId"`
14+
}

client/v2/common/models/application.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ type Application struct {
1111
// DeletedAtRound round when this application was deleted.
1212
DeletedAtRound uint64 `json:"deleted-at-round,omitempty"`
1313

14-
// Id (appidx) application index.
14+
// Id application index.
1515
Id uint64 `json:"id"`
1616

17-
// Params (appparams) application parameters.
17+
// Params application parameters.
1818
Params ApplicationParams `json:"params"`
1919
}

client/v2/common/models/application_local_state.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ type ApplicationLocalState struct {
1212
// Id the application which this local state is for.
1313
Id uint64 `json:"id"`
1414

15-
// KeyValue (tkv) storage.
15+
// KeyValue storage.
1616
KeyValue []TealKeyValue `json:"key-value,omitempty"`
1717

1818
// OptedInAtRound round when the account opted into the application.
1919
OptedInAtRound uint64 `json:"opted-in-at-round,omitempty"`
2020

21-
// Schema (hsch) schema.
21+
// Schema schema.
2222
Schema ApplicationStateSchema `json:"schema"`
2323
}

client/v2/common/models/application_log_data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package models
22

33
// ApplicationLogData stores the global information associated with an application.
44
type ApplicationLogData struct {
5-
// Logs (lg) Logs for the application being executed by the transaction.
5+
// Logs logs for the application being executed by the transaction.
66
Logs [][]byte `json:"logs"`
77

88
// Txid transaction ID

client/v2/common/models/application_params.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ package models
22

33
// ApplicationParams stores the global information associated with an application.
44
type ApplicationParams struct {
5-
// ApprovalProgram (approv) approval program.
5+
// ApprovalProgram approval program.
66
ApprovalProgram []byte `json:"approval-program"`
77

8-
// ClearStateProgram (clearp) approval program.
8+
// ClearStateProgram clear state program.
99
ClearStateProgram []byte `json:"clear-state-program"`
1010

1111
// Creator the address that created this application. This is the address where the
1212
// parameters and global state for this application can be found.
1313
Creator string `json:"creator,omitempty"`
1414

15-
// ExtraProgramPages (epp) the amount of extra program pages available to this app.
15+
// ExtraProgramPages the number of extra program pages available to this app.
1616
ExtraProgramPages uint64 `json:"extra-program-pages,omitempty"`
1717

18-
// GlobalState [\gs) global schema
18+
// GlobalState global state
1919
GlobalState []TealKeyValue `json:"global-state,omitempty"`
2020

21-
// GlobalStateSchema [\gsch) global schema
21+
// GlobalStateSchema global schema
2222
GlobalStateSchema ApplicationStateSchema `json:"global-state-schema,omitempty"`
2323

24-
// LocalStateSchema [\lsch) local schema
24+
// LocalStateSchema local schema
2525
LocalStateSchema ApplicationStateSchema `json:"local-state-schema,omitempty"`
2626
}

client/v2/common/models/application_state_schema.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package models
33
// ApplicationStateSchema specifies maximums on the number of each type that may be
44
// stored.
55
type ApplicationStateSchema struct {
6-
// NumByteSlice (nbs) num of byte slices.
6+
// NumByteSlice number of byte slices.
77
NumByteSlice uint64 `json:"num-byte-slice"`
88

9-
// NumUint (nui) num of uints.
9+
// NumUint number of uints.
1010
NumUint uint64 `json:"num-uint"`
1111
}

0 commit comments

Comments
 (0)