Umi — API References - v1.3.0
Preparing search index...
umi
GpaBuilder
Class GpaBuilder<Account, Fields>
Builder for
getProgramAccounts
RPC requests.
Type Parameters
Account
extends
object
=
RpcAccount
Fields
extends
object
=
{}
Index
Constructors
constructor
Properties
options
program
Id
Methods
add
Filter
deserialize
Using
get
get
And
Map
get
Data
As
Public
Keys
get
Deserialized
get
Public
Keys
register
Fields
register
Fields
From
Struct
reset
slice
slice
Field
sort
Using
where
where
Field
where
Size
without
Data
Constructors
constructor
new
GpaBuilder
<
Account
extends
object
=
RpcAccount
,
Fields
extends
object
=
{}
>
(
context
:
Pick
<
Context
,
"rpc"
>
,
programId
:
PublicKey
,
options
?:
{
dataSlice
?:
RpcDataSlice
;
deserializeCallback
?:
GpaBuilderMapCallback
<
Account
>
;
fields
?:
GpaBuilderFieldSerializers
<
Fields
,
Fields
>
;
filters
?:
RpcDataFilter
[]
;
sortCallback
?:
GpaBuilderSortCallback
;
}
,
)
:
GpaBuilder
<
Account
,
Fields
>
Type Parameters
Account
extends
object
=
RpcAccount
Fields
extends
object
=
{}
Parameters
context
:
Pick
<
Context
,
"rpc"
>
programId
:
PublicKey
options
:
{
dataSlice
?:
RpcDataSlice
;
deserializeCallback
?:
GpaBuilderMapCallback
<
Account
>
;
fields
?:
GpaBuilderFieldSerializers
<
Fields
,
Fields
>
;
filters
?:
RpcDataFilter
[]
;
sortCallback
?:
GpaBuilderSortCallback
;
}
= {}
Returns
GpaBuilder
<
Account
,
Fields
>
Properties
Readonly
options
options
:
{
dataSlice
?:
RpcDataSlice
;
deserializeCallback
?:
GpaBuilderMapCallback
<
Account
>
;
fields
?:
GpaBuilderFieldSerializers
<
Fields
,
Fields
>
;
filters
?:
RpcDataFilter
[]
;
sortCallback
?:
GpaBuilderSortCallback
;
}
= {}
Readonly
program
Id
programId
:
PublicKey
Methods
add
Filter
addFilter
(
...
filters
:
RpcDataFilter
[]
)
:
GpaBuilder
<
Account
,
Fields
>
Parameters
...
filters
:
RpcDataFilter
[]
Returns
GpaBuilder
<
Account
,
Fields
>
deserialize
Using
deserializeUsing
<
T
extends
object
>
(
callback
:
GpaBuilderMapCallback
<
T
>
,
)
:
GpaBuilder
<
T
,
Fields
>
Type Parameters
T
extends
object
Parameters
callback
:
GpaBuilderMapCallback
<
T
>
Returns
GpaBuilder
<
T
,
Fields
>
get
get
(
options
?:
RpcGetProgramAccountsOptions
)
:
Promise
<
RpcAccount
[]
>
Parameters
options
:
RpcGetProgramAccountsOptions
= {}
Returns
Promise
<
RpcAccount
[]
>
get
And
Map
getAndMap
<
T
>
(
callback
:
GpaBuilderMapCallback
<
T
>
,
options
?:
RpcGetProgramAccountsOptions
,
)
:
Promise
<
T
[]
>
Type Parameters
T
Parameters
callback
:
GpaBuilderMapCallback
<
T
>
options
:
RpcGetProgramAccountsOptions
= {}
Returns
Promise
<
T
[]
>
get
Data
As
Public
Keys
getDataAsPublicKeys
(
options
?:
RpcGetProgramAccountsOptions
,
)
:
Promise
<
PublicKey
[]
>
Parameters
options
:
RpcGetProgramAccountsOptions
= {}
Returns
Promise
<
PublicKey
[]
>
get
Deserialized
getDeserialized
(
options
?:
RpcGetProgramAccountsOptions
)
:
Promise
<
Account
[]
>
Parameters
options
:
RpcGetProgramAccountsOptions
= {}
Returns
Promise
<
Account
[]
>
get
Public
Keys
getPublicKeys
(
options
?:
RpcGetProgramAccountsOptions
)
:
Promise
<
PublicKey
[]
>
Parameters
options
:
RpcGetProgramAccountsOptions
= {}
Returns
Promise
<
PublicKey
[]
>
register
Fields
registerFields
<
T
extends
object
>
(
fields
:
GpaBuilderFieldSerializers
<
T
,
T
>
,
)
:
GpaBuilder
<
Account
,
T
>
Type Parameters
T
extends
object
Parameters
fields
:
GpaBuilderFieldSerializers
<
T
,
T
>
Returns
GpaBuilder
<
Account
,
T
>
register
Fields
From
Struct
registerFieldsFromStruct
<
T
extends
object
>
(
structFields
:
StructToSerializerTuple
<
T
,
T
>
,
)
:
GpaBuilder
<
Account
,
T
>
Type Parameters
T
extends
object
Parameters
structFields
:
StructToSerializerTuple
<
T
,
T
>
Returns
GpaBuilder
<
Account
,
T
>
reset
reset
()
:
GpaBuilder
<
Account
,
Fields
>
Returns
GpaBuilder
<
Account
,
Fields
>
slice
slice
(
offset
:
number
,
length
:
number
)
:
GpaBuilder
<
Account
,
Fields
>
Parameters
offset
:
number
length
:
number
Returns
GpaBuilder
<
Account
,
Fields
>
slice
Field
sliceField
(
field
:
keyof
Fields
,
offset
?:
number
)
:
GpaBuilder
<
Account
,
Fields
>
Parameters
field
:
keyof
Fields
Optional
offset
:
number
Returns
GpaBuilder
<
Account
,
Fields
>
sort
Using
sortUsing
(
callback
:
GpaBuilderSortCallback
)
:
GpaBuilder
<
Account
,
Fields
>
Parameters
callback
:
GpaBuilderSortCallback
Returns
GpaBuilder
<
Account
,
Fields
>
where
where
(
offset
:
number
,
data
:
|
string
|
number
|
bigint
|
boolean
|
Uint8Array
<
ArrayBufferLike
>
|
PublicKey
,
)
:
GpaBuilder
<
Account
,
Fields
>
Parameters
offset
:
number
data
:
string
|
number
|
bigint
|
boolean
|
Uint8Array
<
ArrayBufferLike
>
|
PublicKey
Returns
GpaBuilder
<
Account
,
Fields
>
where
Field
whereField
<
K
extends
string
|
number
|
symbol
>
(
field
:
K
,
data
:
Fields
[
K
]
,
offset
?:
number
,
)
:
GpaBuilder
<
Account
,
Fields
>
Type Parameters
K
extends
string
|
number
|
symbol
Parameters
field
:
K
data
:
Fields
[
K
]
Optional
offset
:
number
Returns
GpaBuilder
<
Account
,
Fields
>
where
Size
whereSize
(
dataSize
:
number
)
:
GpaBuilder
<
Account
,
Fields
>
Parameters
dataSize
:
number
Returns
GpaBuilder
<
Account
,
Fields
>
without
Data
withoutData
()
:
GpaBuilder
<
Account
,
Fields
>
Returns
GpaBuilder
<
Account
,
Fields
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
options
program
Id
Methods
add
Filter
deserialize
Using
get
get
And
Map
get
Data
As
Public
Keys
get
Deserialized
get
Public
Keys
register
Fields
register
Fields
From
Struct
reset
slice
slice
Field
sort
Using
where
where
Field
where
Size
without
Data
Umi — API References - v1.3.0
Loading...
Builder for
getProgramAccounts
RPC requests.