Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
01756af
add dynssz-max annotations for dynamic hash root calculation
pk910 Aug 17, 2024
d094e28
add `HashRootProvider` and `HashRoot`
pk910 Aug 17, 2024
483b592
Merge branch 'pk910/dynssz-hashroot' into pk910/dynssz-hashroot-electra
pk910 Aug 17, 2024
da46a1c
add `dynssz-max` annotations for dynamic hash tree root calculation
pk910 Aug 17, 2024
47f1ea2
add fulu as alias for electra
pk910 Dec 13, 2024
4ac60ce
Merge branch 'electra' into fulu
pk910 Jan 6, 2025
2efbdf7
fix dynssz annotation for electra.Attestation
pk910 Feb 5, 2025
3644a22
Merge pull request #196 from pk910/pk910/fix-attestation-annotations
mcdee Feb 5, 2025
0c99cbc
Increase limit for blob sidecars.
mcdee Feb 5, 2025
f19fd9b
Release 0.24.0
mcdee Feb 6, 2025
ad9bd19
Add more accessors
jtraglia Feb 6, 2025
7db107c
Merge branch 'master' into fulu
pk910 Feb 7, 2025
26106a4
Merge pull request #1 from attestantio/master
samcm Feb 10, 2025
c6e89b5
fix: Only fall back to ContentTypeJSON when theres an empty body & no…
samcm Feb 10, 2025
45804fe
Additional validation on beacon block header
Bez625 Feb 11, 2025
d9244a7
Merge pull request #199 from attestantio/additional_validation
Bez625 Feb 11, 2025
9fb728e
draft
olegshmuelov Feb 3, 2025
a794dd0
add tests
olegshmuelov Feb 11, 2025
279701a
revert ordering package imports
olegshmuelov Feb 11, 2025
d92968d
add missing copyright
olegshmuelov Feb 11, 2025
e1610c0
Return empty array of blob sidecards on valid but empty SSZ response.
mcdee Feb 11, 2025
30fdab6
add missing validator liveness mock service
olegshmuelov Feb 11, 2025
1124ee6
handle eip7805 blocks and states
pk910 Feb 11, 2025
c8302f9
Merge branch 'fulu' into pk910/eip-7805-blocks
pk910 Feb 11, 2025
e02ace3
Merge remote-tracking branch 'origin/master' into more-accessors
jtraglia Feb 12, 2025
161becd
Merge pull request #198 from samcm/master
mcdee Feb 12, 2025
c8d0b08
Merge pull request #201 from attestantio/zero-blob-sidecars-ssz
mcdee Feb 12, 2025
e5ca431
Merge pull request #203 from jtraglia/more-accessors
mcdee Feb 12, 2025
648471a
Merge pull request #200 from olegshmuelov/feat/validator-liveness
mcdee Feb 12, 2025
32387da
Fix linting errors.
mcdee Feb 12, 2025
c92fd5e
Merge pull request #204 from attestantio/linting
mcdee Feb 12, 2025
9ba0fb5
Update event to emit spec.VersionedAttestation
mcdee Feb 17, 2025
da982dd
Merge pull request #205 from attestantio/update-events
mcdee Feb 17, 2025
6e26298
Fix YAML unmarshalling of blob sidecars.
mcdee Feb 17, 2025
a21f56f
Update tests.
mcdee Feb 17, 2025
57d7302
fix error message for electra
skylenet Feb 17, 2025
029404e
Merge pull request #207 from attestantio/fix-spec-tests
mcdee Feb 17, 2025
9480cba
Merge pull request #208 from skylenet/patch-1
mcdee Feb 17, 2025
d68c87c
Update test assertions to avoid differences in codec representation.
mcdee Feb 17, 2025
3985c39
Merge pull request #209 from attestantio/fix-test-eq
mcdee Feb 17, 2025
a91ff1e
Merge branch 'master' into pk910/dynssz-hashroot-electra
pk910 Feb 18, 2025
0e7cfde
remove HashRootProvider & dynssz dependency replacement
pk910 Feb 18, 2025
7745c3d
fix linter issues
pk910 Feb 18, 2025
f26b372
fixes
pk910 Feb 18, 2025
270f1b6
fix dynssz-max tags for electra containers
pk910 Feb 18, 2025
b41ce95
Merge pull request #211 from pk910/pk910/dynssz-hashroot-electra
mcdee Feb 19, 2025
fb96b70
Update events handlers.
mcdee Feb 20, 2025
b6e6450
Update version.
mcdee Mar 10, 2025
9166b10
Update dataversion.go
MariusVanDerWijden Mar 10, 2025
3f6752b
Update dataversion.go
MariusVanDerWijden Mar 10, 2025
901f04c
Add pending deposits api
Bez625 Mar 14, 2025
88a8702
fix: add `dynssz-max` tag to capella withdrawals
filoozom Mar 20, 2025
215434a
Merge pull request #217 from filoozom/fix/dynssz-withdrawals
mcdee Mar 21, 2025
a652878
Merge pull request #212 from attestantio/updated-events-handlers
mcdee Mar 31, 2025
fa66d8f
Bump version.
mcdee Mar 31, 2025
311e1e8
Update attestationpool endpoint to receive versioned attestations.
mcdee Apr 8, 2025
75d08e7
fix missing initializer
pk910 Apr 9, 2025
9f47166
Merge pull request #219 from attestantio/update-attestationpool
mcdee Apr 15, 2025
fb3abfe
Update version.
mcdee Apr 15, 2025
3100459
spec: add DataVersionFromString
MariusVanDerWijden Apr 16, 2025
434e76b
spec: rework UnmarshalJSON
MariusVanDerWijden Apr 16, 2025
745b7f3
Merge pull request #215 from attestantio/add_pending_deposits
Bez625 Apr 17, 2025
208768c
spec: fix lint
MariusVanDerWijden Apr 22, 2025
386d286
Merge pull request #213 from MariusVanDerWijden/patch-1
mcdee Apr 22, 2025
07599e7
Lint.
mcdee Apr 22, 2025
e898418
feat: implement proof generation and verification
ahmohamed Apr 13, 2025
321957b
Linting
ahmohamed Apr 13, 2025
dcc7abe
refactor Tree interface methods, and enhance error handling for valid…
ahmohamed May 6, 2025
d693f8a
version bump
ahmohamed May 6, 2025
f473f42
update changelog for v0.25.0
ahmohamed May 6, 2025
3fee7a6
Merge branch 'master' into fulu
pk910 May 12, 2025
130a93a
add full fulu version handling
pk910 May 12, 2025
b9f384d
make linter happy
pk910 May 12, 2025
50d2321
fix spec parsing with complex types
pk910 May 15, 2025
1d7c6ee
fix spec parsing
pk910 May 15, 2025
b7698db
add `VersionedExecutionPayload`
pk910 May 15, 2025
02d6ebd
Update changelog.
Bez625 May 19, 2025
5cf20f4
Merge pull request #226 from attestantio/update_changelog
Bez625 May 19, 2025
625ef6d
Merge branch 'master' into feature/beaconstate-proofs
Bez625 May 20, 2025
ce514c4
Create submitblindedproposal.go
klim0v May 22, 2025
d1cc843
Update multi/submitblindedproposal.go
klim0v May 22, 2025
bcb38f5
Merge branch 'fulu' into pk910/eip-7805-blocks
pk910 May 22, 2025
70da0a1
Apply patches
Bez625 May 20, 2025
207d586
Apply patches
Bez625 May 20, 2025
a44541f
remove Tree type; fix tests and lints
ahmohamed May 23, 2025
548954e
Merge pull request #231 from attestantio/proof_beacon
ahmohamed May 23, 2025
a994a23
Merge pull request #229 from klim0v/patch-1
Bez625 May 24, 2025
b6169d9
Update changelog.
Bez625 May 24, 2025
0eb5b6e
Example blob schedule parsing.
Bez625 May 24, 2025
da4c3f3
Merge pull request #233 from attestantio/update_changelog
Bez625 May 24, 2025
6f15804
Refactor to handle non-string types.
Bez625 May 25, 2025
0fceca7
Lint.
Bez625 May 25, 2025
8800515
Remove unused file
Bez625 Jun 2, 2025
bee68cc
Merge pull request #234 from attestantio/blob_sched_dict
Bez625 Jun 2, 2025
3833365
Merge remote-tracking branch 'upstream/fulu' into fulu
pk910 Jun 2, 2025
0b121d7
update fulu types (EIP-7917)
pk910 Jun 2, 2025
3d5d178
update eip-7917
pk910 Jun 2, 2025
e910c09
Update spec/fulu/beaconstate_json.go
pk910 Jun 2, 2025
7089230
fix copyright year
pk910 Jun 2, 2025
a1ceddc
fix copyright year
pk910 Jun 2, 2025
ce8ba1e
Merge pull request #223 from pk910/fulu
Bez625 Jun 3, 2025
91340bc
fix bpo spec parsing
pk910 Jun 3, 2025
ed52aac
Merge branch 'fulu' into pk910/fulu-bpo-fix
pk910 Jun 3, 2025
6ac0bfd
Merge pull request #240 from pk910/pk910/fulu-bpo-fix
Bez625 Jun 3, 2025
00d0da1
Support fetching pending consolidations and deposits.
ahmohamed Jun 9, 2025
5b91d6a
Add handling of complex http.Spec types
Bez625 Jun 9, 2025
1f7eb06
Merge pull request #243 from attestantio/fetch-pending-execution-requ…
Bez625 Jun 9, 2025
0f48627
Merge pull request #244 from attestantio/refactor_spec_reading
Bez625 Jun 10, 2025
b02c75e
feat(fulu): Add data_column_sidecar event topic support
samcm Jul 14, 2025
b821a9c
Merge pull request #246 from samcm/feat/data-column-sidecar
Bez625 Jul 14, 2025
1ed56c0
Apply suggestions from code review
pk910 Jul 14, 2025
d11f046
Merge pull request #225 from pk910/pk910/versioned-execution-payload
Bez625 Jul 14, 2025
0ca6033
Merge branch 'master' into fulu-rebase
pk910 Jul 16, 2025
3ff0731
add missing fulu getters
pk910 Jul 16, 2025
063fbc9
Merge branch 'master' into pk910/eip-7805-blocks
pk910 Jul 16, 2025
c236ee1
Merge branch 'fulu-rebase' into pk910/eip-7805-blocks
pk910 Jul 16, 2025
3858200
add missing eip7805 getters
pk910 Jul 16, 2025
6caf764
Merge pull request #248 from pk910/fulu-rebase
Bez625 Jul 17, 2025
3f50c55
Remove versionedHashes from data_column_sidecar events
mininny Jul 21, 2025
dc29288
Merge pull request #250 from mininny/feat/mininny/datacolumnsidecar-r…
Bez625 Jul 21, 2025
640f974
Update maintainers.
Bez625 Jul 22, 2025
e8c9fbe
Merge pull request #251 from attestantio/update_maintainers
Bez625 Jul 22, 2025
31ae99e
Merge branch 'fulu' into pk910/eip-7805-blocks
pk910 Jul 23, 2025
bd11e7c
Allow fulu versioned attestations
KaloyanTanev Aug 11, 2025
a39055f
Update IsEmpty on versioned structs.
Bez625 Aug 12, 2025
fcc5010
Linting
KaloyanTanev Aug 12, 2025
9e592ed
Merge pull request #257 from ObolNetwork/kalo/fulu-versioned-attestat…
Bez625 Aug 12, 2025
d5163d6
Merge branch 'fulu' into add_missing_fulu
Bez625 Aug 12, 2025
a4bcce2
Merge pull request #258 from attestantio/add_missing_fulu
Bez625 Aug 12, 2025
8e3b717
Update more versioned structures
bharath-123 Aug 28, 2025
c3b4ff9
Add fulu structures
jtraglia Apr 10, 2025
4049bdc
Update some ssz files
jtraglia Apr 10, 2025
c7167e4
fix KZGProofs
bharath-123 Aug 28, 2025
7a4378e
updates
bharath-123 Aug 28, 2025
c6cdb87
review comments
bharath-123 Aug 28, 2025
83b90d8
remove signedblindedbeaconblock
bharath-123 Aug 28, 2025
e40370b
generate ssz files
bharath-123 Aug 28, 2025
50d07b4
fix lint issue
bharath-123 Aug 29, 2025
78196b9
Update api/v1/fulu/blockcontents.go
Bez625 Aug 29, 2025
ff89a21
Merge pull request #264 from bharath-123/fulu
Bez625 Aug 29, 2025
d5f22bd
Update release information.
Bez625 Sep 20, 2025
c819f2c
Merge pull request #267 from attestantio/fulu
Bez625 Sep 20, 2025
288b5f5
Merge branch 'master' into pk910/eip-7805-blocks
pk910 Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*.dll
*.so
*.dylib

*.ssz
# Test binary, build with `go test -c`
*.test

Expand Down
34 changes: 4 additions & 30 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,35 +74,9 @@ run:

# output configuration options
output:
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.json,colored-line-number"
#
# Default: colored-line-number
# format: json

# Print lines of code with issue.
# Default: true
# print-issued-lines: false

# Print linter name in the end of issue text.
# Default: true
# print-linter-name: false

# Make issues output unique by line.
# Default: true
# uniq-by-line: false

# Add a prefix to the output file references.
# Default is no prefix.
# path-prefix: ""

# Sort results by: filepath, line and column.
# sort-results: true

formats:
- format: colored-line-number
path: stderr

# All available settings of specific linters.
linters-settings:
Expand Down Expand Up @@ -183,7 +157,6 @@ linters:
- dupl
- exhaustive
- exhaustruct
- exportloopref
- forcetypeassert
- funlen
- gci
Expand All @@ -200,6 +173,7 @@ linters:
- musttag
- perfsprint
- recvcheck
- tenv
- varnamelen
- wrapcheck
- wsl
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
0.27.0:
- support fulu
- introduce data column sidecar event api and corresponding event handler
- add blockcontents and signedblockcontents for fulu api
- add beaconstate container updates as per spec
- add fulu cases for all versioned spec, versioned api and http functions

0.26.0:
- refactor http.Spec to allow more complex types in the keys
- support pending consolidations and deposits

0.25.2:
- add multi/submitblindedproposal

0.25.1:
- add Merkle tree and proof generation utils
- add convenience methods on versioned beaconstate for field access and proofs:
- ValidatorAtIndex
- ValidatorBalance
- FieldIndex
- FieldGeneralizedIndex
- FieldRoot
- FieldTree
- ProveField
- VerifyFieldProof

0.25.0:
- update attestation pool endpoint to receive versioned attestations

0.24.2:
- support single_attestation event
- support change to attestation event; this event now emits a spec.VersionedAttestation
- support change to attester_slashing event; this event now emits an electra.AttesterSlashing
- update Events endpoint to provide specific handlers for each event

0.24.0:
- support electra
- the most notable change is that a number of functions now use spec.VersionedAttestation in place of phase0.Attestation
- this release uses a number of new beacon API endpoints, specifically:
- /eth/v2/validator/aggregate_attestation
- /eth/v2/validator/aggregate_and_proofs
- /eth/v2/beacon/pool/attestations
These endpoints are supported in all current releases of major beacon nodes at the time of release

0.23.1:
- add ability to override individual provider functions in mock client

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func main() {

## Maintainers

Jim McDonald: [@mcdee](https://github.com/mcdee).
Chris Berry: [@bez625](https://github.com/Bez625).

## Contribute

Expand Down
4 changes: 2 additions & 2 deletions api/blobsidecars.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import (

// BlobSidecars is an API construct to allow decoding an array of blob sidecars.
type BlobSidecars struct {
Sidecars []*deneb.BlobSidecar `ssz-max:"6"`
Sidecars []*deneb.BlobSidecar `ssz-max:"12"`
}

// UnmarshalSSZ ssz unmarshals the BlobSidecars object.
// This is a hand-crafted function, as automatic generation does not support immediate arrays.
func (b *BlobSidecars) UnmarshalSSZ(buf []byte) error {
num, err := ssz.DivideInt2(len(buf), 131928, 6)
num, err := ssz.DivideInt2(len(buf), 131928, 12)
if err != nil {
return err
}
Expand Down
116 changes: 116 additions & 0 deletions api/eventsopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
// Copyright © 2025 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

import (
"context"

apiv1 "github.com/attestantio/go-eth2-client/api/v1"
"github.com/attestantio/go-eth2-client/spec"
"github.com/attestantio/go-eth2-client/spec/altair"
"github.com/attestantio/go-eth2-client/spec/capella"
"github.com/attestantio/go-eth2-client/spec/electra"
"github.com/attestantio/go-eth2-client/spec/phase0"
)

// EventsOpts are the options for obtaining events.
type EventsOpts struct {
Common CommonOpts

// Topics are the topics of events to which we want to listen.
Topics []string

// Handler is a generic handler function to which to send all events.
// In general, it is better to use event-specific handlers as they avoid casting, and also provide a context.
Handler EventHandlerFunc

// AttestationHandler is a handler for the attestation event.
AttestationHandler AttestationEventHandlerFunc
// AttesterSlashingHandler is a handler for the attester_slashing event.
AttesterSlashingHandler AttesterSlashingEventHandlerFunc
// BlobSidecarHandler is a handler for the blob_sidecar event.
BlobSidecarHandler BlobSidecarEventHandlerFunc
// BlockHandler is a handler for the block event.
BlockHandler BlockEventHandlerFunc
// BlockGossipHandler is a handler for the block_gossip event.
BlockGossipHandler BlockGossipEventHandlerFunc
// BLSToExecutionChangeHandler is a handler for the bls_to_execution_change event.
BLSToExecutionChangeHandler BLSToExecutionChangeEventHandlerFunc
// ChainReorgHandler is a handler for the chain_reorg event.
ChainReorgHandler ChainReorgEventHandlerFunc
// ContributionAndProofHandler is a handler for the contribution_and_proof event.
ContributionAndProofHandler ContributionAndProofEventHandlerFunc
// DataColumnSidecarHandler is a handler for the data_column_sidecar event.
DataColumnSidecarHandler DataColumnSidecarEventHandlerFunc
// FinalizedCheckpointHandler is a handler for the finalized_checkpoint event.
FinalizedCheckpointHandler FinalizedCheckpointEventHandlerFunc
// HeadHandler is a handler for the head event.
HeadHandler HeadEventHandlerFunc
// PayloadAttributesHandler is a handler for the payload_attributes event.
PayloadAttributesHandler PayloadAttributesEventHandlerFunc
// ProposerSlashingHandler is a handler for the proposer_slashing event.
ProposerSlashingHandler ProposerSlashingEventHandlerFunc
// SingleAttestationHandler is a handler for the single_attestation event.
SingleAttestationHandler SingleAttestationEventHandlerFunc
// VoluntaryExitHandler is a handler for the voluntary_exit event.
VoluntaryExitHandler VoluntaryExitEventHandlerFunc
}

// EventHandlerFunc is the handler for generic events.
type EventHandlerFunc func(*apiv1.Event)

// AttestationEventHandlerFunc is the handler for attestation events.
type AttestationEventHandlerFunc func(context.Context, *spec.VersionedAttestation)

// AttesterSlashingEventHandlerFunc is the handler for attestation_slashing events.
type AttesterSlashingEventHandlerFunc func(context.Context, *electra.AttesterSlashing)

// BlobSidecarEventHandlerFunc is the handler for blob_sidecar events.
type BlobSidecarEventHandlerFunc func(context.Context, *apiv1.BlobSidecarEvent)

// BlockEventHandlerFunc is the handler for block events.
type BlockEventHandlerFunc func(context.Context, *apiv1.BlockEvent)

// BlockGossipEventHandlerFunc is the handler for block_gossip events.
type BlockGossipEventHandlerFunc func(context.Context, *apiv1.BlockGossipEvent)

// BLSToExecutionChangeEventHandlerFunc is the handler for bls_to_execution_change events.
type BLSToExecutionChangeEventHandlerFunc func(context.Context, *capella.SignedBLSToExecutionChange)

// ChainReorgEventHandlerFunc is the handler for chain_reorg events.
type ChainReorgEventHandlerFunc func(context.Context, *apiv1.ChainReorgEvent)

// ContributionAndProofEventHandlerFunc is the handler for contribution_and_proof events.
type ContributionAndProofEventHandlerFunc func(context.Context, *altair.SignedContributionAndProof)

// FinalizedCheckpointEventHandlerFunc is the handler for finalized_checkpoint events.
type FinalizedCheckpointEventHandlerFunc func(context.Context, *apiv1.FinalizedCheckpointEvent)

// HeadEventHandlerFunc is the handler for head events.
type HeadEventHandlerFunc func(context.Context, *apiv1.HeadEvent)

// PayloadAttributesEventHandlerFunc is the handler for payload_attributes events.
type PayloadAttributesEventHandlerFunc func(context.Context, *apiv1.PayloadAttributesEvent)

// ProposerSlashingEventHandlerFunc is the handler for proposer_slashing events.
type ProposerSlashingEventHandlerFunc func(context.Context, *phase0.ProposerSlashing)

// SingleAttestationEventHandlerFunc is the handler for single_attestation events.
type SingleAttestationEventHandlerFunc func(context.Context, *electra.SingleAttestation)

// VoluntaryExitEventHandlerFunc is the handler for voluntary_exit events.
type VoluntaryExitEventHandlerFunc func(context.Context, *phase0.SignedVoluntaryExit)

// DataColumnSidecarEventHandlerFunc is the handler for data_column_sidecar events.
type DataColumnSidecarEventHandlerFunc func(context.Context, *apiv1.DataColumnSidecarEvent)
23 changes: 23 additions & 0 deletions api/pendingconsolidationsopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright © 2025 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

// PendingConsolidationsOpts are the options for obtaining pending consolidations.
type PendingConsolidationsOpts struct {
Common CommonOpts

// State is the state at which the data is obtained.
// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
State string
}
23 changes: 23 additions & 0 deletions api/pendingdepositsopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright © 2025 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

// PendingDepositsOpts are the options for obtaining pending deposits.
type PendingDepositsOpts struct {
Common CommonOpts

// State is the state at which the data is obtained.
// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
State string
}
23 changes: 23 additions & 0 deletions api/pendingpartialwithdrawalsopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright © 2025 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

// PendingPartialWithdrawalsOpts are the options for obtaining pending partial withdrawals.
type PendingPartialWithdrawalsOpts struct {
Common CommonOpts

// State is the state at which the data is obtained.
// It can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized".
State string
}
2 changes: 1 addition & 1 deletion api/v1/bellatrix/blindedbeaconblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func TestBlindedBeaconBlockYAML(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, res.String(), string(rt))
rt = bytes.TrimSuffix(rt, []byte("\n"))
assert.Equal(t, string(test.input), string(rt))
assert.YAMLEq(t, string(test.input), string(rt))
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1/bellatrix/blindedbeaconblockbody_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func TestBlindedBeaconBlockBodyYAML(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, res.String(), string(rt))
rt = bytes.TrimSuffix(rt, []byte("\n"))
assert.Equal(t, string(test.input), string(rt))
assert.YAMLEq(t, string(test.input), string(rt))
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1/bellatrix/signedblindedbeaconblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestSignedBlindedBeaconBlockYAML(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, res.String(), string(rt))
rt = bytes.TrimSuffix(rt, []byte("\n"))
assert.Equal(t, string(test.input), string(rt))
assert.YAMLEq(t, string(test.input), string(rt))
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions api/v1/capella/blindedbeaconblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/attestantio/go-eth2-client/api/v1/capella"
"github.com/goccy/go-yaml"
require "github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
require "github.com/stretchr/testify/require"
)

func TestBlindedBeaconBlockJSON(t *testing.T) {
Expand Down Expand Up @@ -161,7 +161,7 @@ func TestBlindedBeaconBlockYAML(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, res.String(), string(rt))
rt = bytes.TrimSuffix(rt, []byte("\n"))
assert.Equal(t, string(test.input), string(rt))
assert.YAMLEq(t, string(test.input), string(rt))
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion api/v1/capella/blindedbeaconblockbody_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func TestBlindedBeaconBlockBodyYAML(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, res.String(), string(rt))
rt = bytes.TrimSuffix(rt, []byte("\n"))
assert.Equal(t, string(test.input), string(rt))
assert.YAMLEq(t, string(test.input), string(rt))
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions api/v1/capella/signedblindedbeaconblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (

"github.com/attestantio/go-eth2-client/api/v1/capella"
"github.com/goccy/go-yaml"
require "github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
require "github.com/stretchr/testify/require"
)

func TestSignedBlindedBeaconBlockJSON(t *testing.T) {
Expand Down Expand Up @@ -116,7 +116,7 @@ func TestSignedBlindedBeaconBlockYAML(t *testing.T) {
require.NoError(t, err)
assert.Equal(t, res.String(), string(rt))
rt = bytes.TrimSuffix(rt, []byte("\n"))
assert.Equal(t, string(test.input), string(rt))
assert.YAMLEq(t, string(test.input), string(rt))
}
})
}
Expand Down
Loading
Loading