the type of the account for which the GpaBuilder is used
web3.js {@link GetProgramAccountsConfig} configured via filter GpaBuilder filter methods.
Adds a memcmp filter for the provided {@link key} of the struct.
the name of the field by which to filter
the field value that the filter should match
Adds a memcmp filter for a field inside a field which is a struct value.
The provided keys need to be separated by a .
and only one level of
nesting is supported at this point.
The filter is applied to the inner value.
type Inner = {
a: number
}
type Outer = {
idx: number
inner: Inner
}
a
of the Inner
type:gpaBuilder.addInnerFilter('inner.a', 2)
the names of the fields by which to filter, i.e. 'outer.inner'
the field value that the filter should match
Adds a dataSize
filter which will match on account's sizes.
You have to provide that {@link size} for accounts that don't have a fixed size.
For fixed size accounts that size is determined for you.
the account size to match for
Attempts to find the accounts matching the configured filters.
used to query the program accounts on the cluster
Creates a GPA builder that supports adding up to four filters for fixed size fields.
Once a non-fixed field is encountered, the remaining fields following it will not be included as a filter option since their position in the bytes array will change depending on the content of the non-fixed field.
the id of the program that owns the accounts we are querying
the beet fields that make up the structure of the account data
Convenience wrapper around GpaBuilder.fromBeetFields that allows providing a struct which contains the beet fields.
the id of the program that owns the accounts we are querying
containing the beet fields
specifying the layout of the account
Generated using TypeDoc
Provides an Account specific GPA builder.