Skip to content

Commit

Permalink
Merge branch 'main' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 committed Jul 1, 2024
2 parents 710cdd4 + d1b742a commit fd63086
Show file tree
Hide file tree
Showing 34 changed files with 13,444 additions and 9,889 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ You can find some package documentation below:
| [@bnb-chain/create-gnfd-app](./packages/create-gnfd-app/README.md) | Create Greenfield App Quickly | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fcreate-gnfd-app?color=blue)](https://www.npmjs.com/package/@bnb-chain/create-gnfd-app) |
| [@bnb-chain/bsc-cross-greenfield-sdk](./packages/bsc-cross-sdk/README.md) | Execute tx in BSC | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fbsc-cross-greenfield-sdk?color=blue)](https://www.npmjs.com/package/@bnb-chain/bsc-cross-greenfield-sdk) |

## Playground

* [Browser](https://codesandbox.io/p/github/rrr523/greenfield-nextjs-template/main?import=true)
<!-- TODO: after upgrade SDK version -->
<!-- * [Nodejs](https://codesandbox.io/p/devbox/nodejs-greenfield-js-sdk-demo-wd5zft) -->

## Online Examples

* [Nextjs](https://codesandbox.io/p/github/rrr523/greenfield-nextjs-template/main?import=true)
* [Vite](https://codesandbox.io/p/github/rrr523/greenfield-vite-template/main)
* [Create React App](https://codesandbox.io/p/github/rrr523/greenfield-cra-template/main?import=true)

## Quick Start

You can use [`create-gnfd-app`](./packages/create-gnfd-app/README.md) to create a app quickly.
Expand Down
11 changes: 11 additions & 0 deletions doc-site/docs/FAQs/migrate-to-2.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
id: migrate
title: migrate to 2
order: 1
---

1. Remove `zkCryptoUrl` params when `Client` initializing. [PR: simply offchainauth (ED25519)](https://github.com/bnb-chain/greenfield-js-sdk/pull/489)

2. `bucket.createBucket` and `object.createObject` 's params changes. [PR: remove approval when create bucket / object](https://github.com/bnb-chain/greenfield-js-sdk/pull/498)

3. `object.uploadObject` 's params changes. [PR: upload object](https://github.com/bnb-chain/greenfield-js-sdk/pull/500)
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
15 changes: 7 additions & 8 deletions doc-site/docs/getting-started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ You can find some package documentation below:
| Package | Description | Version |
| --- | --- | --- |
| [@bnb-chain/greenfield-js-sdk](https://github.com/bnb-chain/greenfield-js-sdk/tree/main/packages/js-sdk/README.md) | A client library for Greenfield Chain | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-js-sdk?color=blue)](https://www.npmjs.com/package/@bnb-chain/greenfield-js-sdk) |
| [@bnb-chain/reed-solomon](https://github.com/bnb-chain/greenfield-js-sdk/tree/main/packages/reed-solomon) | calculate file's `checksums` | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Freed-solomon?color=blue)](https://www.npmjs.com/package/@bnb-chain/reed-solomon) |
| [@bnb-chain/reed-solomon](https://github.com/bnb-chain/greenfield-js-sdk/tree/main/packages/reed-solomon/README.md) | calculate file's `checksums` | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Freed-solomon?color=blue)](https://www.npmjs.com/package/@bnb-chain/reed-solomon) |
| [@bnb-chain/create-gnfd-app](https://github.com/bnb-chain/greenfield-js-sdk/tree/main/packages/create-gnfd-app/README.md) | Create Greenfield App Quickly | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fcreate-gnfd-app?color=blue)](https://www.npmjs.com/package/@bnb-chain/create-gnfd-app) |
| [@bnb-chain/bsc-cross-greenfield-sdk](https://github.com/bnb-chain/greenfield-js-sdk/tree/main/packages/bsc-cross-sdk/README.md) | Execute tx in BSC | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fbsc-cross-greenfield-sdk?color=blue)](https://www.npmjs.com/package/@bnb-chain/bsc-cross-greenfield-sdk) |

## Playground

* [Browser](https://codesandbox.io/p/github/rrr523/greenfield-nextjs-template/main?import=true)
<!-- * [Browser](https://codesandbox.io/p/github/rrr523/greenfield-nextjs-template/main?import=true) -->
<!-- TODO: after upgrade SDK version -->
<!-- * [Nodejs](https://codesandbox.io/p/devbox/nodejs-greenfield-js-sdk-demo-wd5zft) -->

## Online Examples
## Online Examples / Playground

* [Nextjs](https://codesandbox.io/p/github/rrr523/greenfield-nextjs-template/main?import=true)
* [Vite](https://codesandbox.io/p/github/rrr523/greenfield-vite-template/main)
* [Create React App](https://codesandbox.io/p/github/rrr523/greenfield-cra-template/main?import=true)
* [Nextjs](https://stackblitz.com/github/rrr523/greenfield-nextjs-template)
* [Vite](https://stackblitz.com/github/rrr523/greenfield-vite-template)
* [Create React App](https://stackblitz.com/github/rrr523/greenfield-cra-template)

## Supported JS environments

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: 2 additions & 0 deletions examples/browser-file-management/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
### Patch Changes

- Updated dependencies
[[`64a62b1e1d0387148bbd621448a67b2bb2c2aa5b`](https://github.com/bnb-chain/greenfield-js-sdk/commit/64a62b1e1d0387148bbd621448a67b2bb2c2aa5b)]:
- @bnb-chain/greenfield-js-sdk@2.0.1
[[`909b463c72a0c83bddc1e41b840d5c871325d54a`](https://github.com/bnb-chain/greenfield-js-sdk/commit/909b463c72a0c83bddc1e41b840d5c871325d54a),
[`34aa1c71d9ee1bc3856aa199a3eee9e50827376b`](https://github.com/bnb-chain/greenfield-js-sdk/commit/34aa1c71d9ee1bc3856aa199a3eee9e50827376b),
[`3e7f1cae3ac12215d5d46ef6755fd198ad450190`](https://github.com/bnb-chain/greenfield-js-sdk/commit/3e7f1cae3ac12215d5d46ef6755fd198ad450190)]:
Expand Down
5 changes: 3 additions & 2 deletions packages/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@ethersproject/units": "^5.7.0",
"@metamask/eth-sig-util": "^5.0.2",
"@noble/curves": "^1.3.0",
"browser-or-node": "^3.0.0",
"cross-fetch": "^4.0.0",
"dayjs": "^1.11.7",
"ethereum-cryptography": "^2.0.0",
Expand All @@ -82,7 +83,7 @@
"long": "^5.2.1",
"mime-types": "^2.1.35",
"reflect-metadata": "^0.1.13",
"superagent": "^8.1.2",
"superagent": "^9.0.2",
"tsyringe": "^4.8.0"
},
"devDependencies": {
Expand All @@ -96,7 +97,7 @@
"@types/lodash.sortby": "^4.7.7",
"@types/mime": "^3.0.1",
"@types/mime-types": "^2.1.4",
"@types/superagent": "^8.1.6",
"@types/superagent": "^8.1.7",
"@types/xml2js": "^0.4.11",
"dotenv": "^16.0.3",
"jest": "^29.5.0",
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
Loading

0 comments on commit fd63086

Please sign in to comment.