Skip to content

Commit

Permalink
Docs/deps (#556)
Browse files Browse the repository at this point in the history
* docs: Update deps

* docs: Update doc refs
  • Loading branch information
rrr523 authored May 31, 2024
1 parent 87890ab commit d1b742a
Show file tree
Hide file tree
Showing 27 changed files with 13,498 additions and 11,088 deletions.
3 changes: 1 addition & 2 deletions doc-site/docs/api/group.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Examples of permissions include:
- `Create`, `Associate payment accounts`
- `Grant`, `Revoke` the above permissions

For more details regarding `Group`, please refer to
https://docs.bnbchain.org/greenfield-docs/docs/guide/greenfield-blockchain/modules/permission.
For more details regarding `Group`, please refer to [permisson](https://github.com/bnb-chain/greenfield/blob/master/docs/modules/permission.md).

| params | description |
| --------- | ------------------------------------------------------- |
Expand Down
4 changes: 2 additions & 2 deletions doc-site/docs/api/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ The SDK contains three APIs:

- <ApiTypes type="Query" />

[query](https://docs.bnbchain.org/greenfield-docs/docs/api/blockchain-rest) info from greenfield.
[query](https://greenfield-chain.bnbchain.org/openapi#/Query/) info from greenfield.

- <ApiTypes type="Storage Provider" />

[more details](https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest)
[more details](https://github.com/bnb-chain/greenfield-storage-provider/tree/master/docs/modules).
3 changes: 1 addition & 2 deletions doc-site/docs/api/sp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ Get the global storage price details, including update time and store price. -->
Get the group list by name and prefix. It provides fuzzy searches by inputting a specific name and
prefix.

More details:
https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_group_list.
More details: [get group list](https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_group_list.md).

```jsx title="example"
await client.sp.listGroups({
Expand Down
4 changes: 2 additions & 2 deletions doc-site/docs/client/greenfield.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ const client = Client.create(GRPC_URL, GREEN_CHAIN_ID);

The JS SDK consists of two parts:

- Chain: https://docs.bnbchain.org/greenfield-docs/docs/api/blockchain-rest
- Storage Provider: https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest
- [BlockChain API](https://greenfield-chain.bnbchain.org/openapi#/Query/StorageParams)
- [Storage Provider API](https://github.com/bnb-chain/greenfield-storage-provider/tree/master/docs/storage-provider-rest-api)
27 changes: 12 additions & 15 deletions doc-site/docs/client/query-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ title: 'Query Client'
sidebar_position: 2
---

It's an encapsulation of the
[Blockchain API](https://docs.bnbchain.org/greenfield-docs/docs/api/blockchain-rest).
It's an encapsulation of the [BlockChain API](https://greenfield-chain.bnbchain.org/openapi#/Query/StorageParams)

:::info

Expand All @@ -22,7 +21,7 @@ await rpc.Account({
});
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/account-info
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AccountInfo

## getBankQueryClient

Expand All @@ -34,7 +33,7 @@ await rpc.Balance({
});
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/account-info
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AccountInfo

## getBridgeQueryClient

Expand All @@ -43,7 +42,7 @@ const rpc = await client.queryClient.getBridgeQueryClient();
await rpc.Params();
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/bridge-params
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/BridgeParams

## getChallengeQueryClient

Expand All @@ -52,7 +51,7 @@ const rpc = await client.queryClient.getChallengeQueryClient();
await rpc.Params();
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/attested-challenge
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AttestedChallenge

## getCrosschainQueryClient

Expand All @@ -61,7 +60,7 @@ const rpc = await client.queryClient.getCrosschainQueryClient();
await rpc.Params();
```

More apis: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/attested-challenge
More apis: https://greenfield-chain.bnbchain.org/openapi#/Query/AttestedChallenge

## getFeeGrantQueryClient

Expand All @@ -70,7 +69,7 @@ const rpc = await client.queryClient.getFeeGrantQueryClient();
await rpc.Params();
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/allowance
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/Allowance

## getGashubClient

Expand All @@ -79,7 +78,7 @@ const rpc = await this.queryClient.getGashubClient();
await rpc.MsgGasParams(request);
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/msg-gas-params
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/MsgGasParams

## getPaymentQueryClient

Expand All @@ -88,7 +87,7 @@ const rpc = await this.queryClient.getPaymentQueryClient();
await rpc.Params();
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/msg-gas-params
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/MsgGasParams

## getSpQueryClient

Expand All @@ -97,8 +96,7 @@ const rpc = await this.queryClient.getSpQueryClient();
await rpc.Params();
```

More APIs:
https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/query-global-sp-store-price-by-time
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/QueryGlobalSpStorePriceByTime

## getStorageQueryClient

Expand All @@ -109,7 +107,7 @@ await rpc.HeadBucketById({
});
```

More APIs: https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/query-group-members-exist
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/QueryGroupMembersExist

## getVirtualGroupClient

Expand All @@ -118,5 +116,4 @@ const rpc = await client.queryClient.getVirtualGroupClient();
await rpc.Params();
```

More APIs:
https://docs.bnbchain.org/greenfield-docs/docs/greenfield-api/available-global-virtual-group-families
More APIs: https://greenfield-chain.bnbchain.org/openapi#/Query/AvailableGlobalVirtualGroupFamilies
2 changes: 1 addition & 1 deletion doc-site/docs/client/sp-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The API related to storage providers is troublesome.
## AuthType

SDK support two
[authentication type](https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest#authentication-type):
[authentication type](https://github.com/bnb-chain/greenfield-storage-provider/tree/master/docs/storage-provider-rest-api#authentication-type):

- ECDSA: It is usually used on Node.js(Because it need to use a private key)
- EDDSA: It is usually used in a browser
Expand Down
2 changes: 1 addition & 1 deletion doc-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@docusaurus/core": "3.2.1",
"@docusaurus/plugin-ideal-image": "^3.2.1",
"@docusaurus/plugin-ideal-image": "3.2.1",
"@docusaurus/preset-classic": "3.2.1",
"@mdx-js/react": "^3.0.1",
"clsx": "^1.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/src/clients/spclient/spApis/approval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getSortQueryParams } from '../auth';

export type APPROVAL_ACTION = 'CreateBucket' | 'CreateObject' | 'MigrateBucket';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_approval
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_approval.md
export const getApprovalMetaInfo = <T>(endpoint: string, action: APPROVAL_ACTION, msg: T) => {
const path = '/greenfield/admin/v1/get-approval';
const queryMap = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { XMLParser } from 'fast-xml-parser';
import { getSortQueryParams } from '../auth';
import { SPMetaInfo } from './metaInfos';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_bucket_meta
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_bucket_meta.md
export const getBucketMetaInfo = (
endpoint: string,
params: GetBucketMetaRequest,
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/src/clients/spclient/spApis/getObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ReqMeta } from '@/types';
import { generateUrlByBucketName } from '@/utils/asserts/s3';
import { encodePath } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_object
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_object.md
export const getGetObjectMetaInfo = async (
endpoint: string,
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { XMLParser } from 'fast-xml-parser';
import { encodePath, getSortQueryParams } from '../auth';
import type { SPMetaInfo } from './metaInfos';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_object_meta
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_object_meta.md
export const getObjectMetaInfo = (
endpoint: string,
params: GetObjectMetaRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { convertStrToBool, formatBucketInfo, formatVGF } from '@/types/sp/Common
import { XMLParser } from 'fast-xml-parser';
import { SPMetaInfo } from './metaInfos';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_user_buckets
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_user_buckets.md
export const getUserBucketMetaInfo = (endpoint: string): Pick<SPMetaInfo, 'url'> => {
return {
url: endpoint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { XMLParser } from 'fast-xml-parser';
import { getSortQuery, getSortQueryParams } from '../auth';
import { SPMetaInfo } from './metaInfos';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_bucket_read_records
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_bucket_read_records.md
export const getListBucketReadRecordMetaInfo = (
endpoint: string,
params: ListBucketReadRecordRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { XMLParser } from 'fast-xml-parser';
import { getSortQueryParams } from '../auth';
import { SPMetaInfo } from './metaInfos';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_buckets_by_ids
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_buckets_by_ids.md
export const getListBucketsByIDsMetaInfo = (
endpoint: string,
params: ListBucketsByIDsRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
import { XMLParser } from 'fast-xml-parser';
import { getSortQueryParams } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_payment_account_streams
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_payment_account_streams.md
export const getListBucketByPaymentMetaInfo = (
endpoint: string,
params: ListBucketsByPaymentAccountRequest,
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/src/clients/spclient/spApis/listGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { XMLParser } from 'fast-xml-parser';
import { getSortQueryParams } from '../auth';
import { SPMetaInfo } from './metaInfos';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_group_list
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/get_group_list.md
export const getListGroupMetaInfo = (
endpoint: string,
params: ListGroupsResquest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ListGroupsMembersResponse } from '@/types';
import { formatGroupInfo, convertStrToBool } from '@/types/sp/Common';
import { XMLParser } from 'fast-xml-parser';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_group_members
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_group_members.md
export const parseListGroupsMembersResponse = async (data: string) => {
const xmlParser = new XMLParser({
parseTagValue: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { convertStrToBool, formatObjectInfo } from '@/types/sp/Common';
import { ListObjectsByBucketNameResponse } from '@/types/sp/ListObjectsByBucketName';
import { XMLParser } from 'fast-xml-parser';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_objects_by_bucket
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_objects_by_bucket.md
export const parseListObjectsByBucketNameResponse = async (data: string) => {
const xmlParser = new XMLParser({
parseTagValue: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { formatObjectInfo, convertStrToBool } from '@/types/sp/Common';
import { XMLParser } from 'fast-xml-parser';
import { getSortQueryParams } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_objects_by_ids
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_objects_by_ids.md
export const getListObjectsByIDsMetaInfo = (endpoint: string, params: ListObjectsByIDsRequest) => {
const path = '';
const queryMap = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ListUserGroupsResponse } from '@/types';
import { formatGroupInfo, convertStrToBool } from '@/types/sp/Common';
import { XMLParser } from 'fast-xml-parser';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storgae-provider-rest/list_user_groups
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_user_groups.md
export const parseListUserGroupsResponse = async (data: string) => {
const xmlParser = new XMLParser({
parseTagValue: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { formatGroupInfo, convertStrToBool } from '@/types/sp/Common';
import { ListUserOwnedGroupsResponse } from '@/types/sp/ListUserOwnedGroups';
import { XMLParser } from 'fast-xml-parser';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storgae-provider-rest/list_user_owned_groups
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_user_owned_groups.md
export const parseListUserOwnedGroupsResponse = async (data: string) => {
const xmlParser = new XMLParser({
parseTagValue: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { XMLParser } from 'fast-xml-parser';
import { getSortQuery, getSortQueryParams } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/list_user_payment_accounts
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/list_user_payment_accounts.md
export const getListUserPaymentAccountMetaInfo = (
endpoint: string,
params: ListUserPaymentAccountsResquest,
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/src/clients/spclient/spApis/putObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { UploadFile } from '@/types/sp/Common';
import { generateUrlByBucketName } from '@/utils/asserts/s3';
import { encodePath, getSortQueryParams } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/put_object
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/put_object.md
export const getPutObjectMetaInfo = async (
endpoint: string,
params: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { generateUrlByBucketName } from '@/utils/asserts/s3';
import { XMLParser } from 'fast-xml-parser';
import { getSortQuery } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/query_bucket_read_quota
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/query_bucket_read_quota.md
export const getQueryBucketReadQuotaMetaInfo = async (
endpoint: string,
params: ReadQuotaRequest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { DelegatedOpts } from '@/types/sp/Common';
import { generateUrlByBucketName } from '@/utils/asserts/s3';
import { encodePath, getSortQueryParams } from '../auth';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/resumable_put_object
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/resumable_put_object.md
export const getResumablePutObjectMetaInfo = async (
endpoint: string,
params: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { VerifyPermissionResponse } from '@/types/sp/VerifyPermission';
import { XMLParser } from 'fast-xml-parser';

// https://docs.bnbchain.org/greenfield-docs/docs/api/storgae-provider-rest/verify_permission
// https://github.com/bnb-chain/greenfield-storage-provider/blob/master/docs/storage-provider-rest-api/verify_permission.md
export const parseVerifyPermissionResponse = async (data: string) => {
const xmlParser = new XMLParser({
parseTagValue: false,
Expand Down
Loading

0 comments on commit d1b742a

Please sign in to comment.