Sp
getStorageProviders Query
List the storage providers info on chain.
example
await client.sp.getStorageProviders();
getStorageProviderInfo Query
Get the specified storage providers info on chain.
params | description |
---|---|
spId | sp's id |
example
await client.sp.getStorageProviderInfo(1);
getQuerySpStoragePrice Query
Get the storage price details for a particular storage provider, including update time, read price, store price and .etc.
params | description |
---|---|
spAddr | operator address of sp |
example
await client.sp.getQuerySpStoragePrice({
spAddr: '0x..',
});
listGroups Storage Provider
Get the group list by name and prefix. It provides fuzzy searches by inputting a specific name and prefix.
More details: get group list.
example
await client.sp.listGroups({
name: groupName,
prefix: '',
sourceType: 'SOURCE_TYPE_ORIGIN',
limit: 1000,
offset: 0,
});
listGroupsMembers Storage Provider
Query a list of group members by a given group id.
params | description |
---|---|
groupId | group id |
example
await client.sp.listGroupsMembers({
groupId: 269,
});
listUserGroups Storage Provider
Query a list of groups by a given user.
example
await client.sp.listUserGroups({
address: '0x000..',
limit: 10,
startAfter: '0',
});
listUserOwnedGroups Storage Provider
Retrieve groups where the user is the owner.
example
await client.sp.listUserOwnedGroups({
address: '0x000..',
limit: 10,
startAfter: '0',
});