Skip to content

list_vtxos needs to support pagination #153

@bonomat

Description

@bonomat

The GRPC endpoint has support for pagination already but our API doesn't :

pub async fn list_vtxos(
&self,
request: GetVtxosRequest,
) -> Result<Vec<VirtualTxOutPoint>, Error> {
if request.reference().is_empty() {
return Ok(Vec::new());
}
let mut client = self.indexer_client()?;
let response = client
.get_vtxos(generated::ark::v1::GetVtxosRequest::from(request))
.await
.map_err(Error::request)?;
let vtxos = response
.get_ref()
.vtxos
.iter()
.map(VirtualTxOutPoint::try_from)
.collect::<Result<Vec<_>, _>>()?;
Ok(vtxos)
}

page: None,

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions