the type of the account for which the GpaBuilder is used
Readonly
configweb3.js GetProgramAccountsConfig configured via filter GpaBuilder filter methods.
Adds a memcmp filter for the provided 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 size for accounts that don't have a fixed size.
For fixed size accounts that size is determined for you.
Optional
size: numberthe account size to match for
Attempts to find the accounts matching the configured filters.
used to query the program accounts on the cluster
Static
fromCreates 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
Static
fromConvenience wrapper around 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.