From e181ae7e56aa987e22cf8ea8bc0aceaf140fc026 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Fri, 5 Jan 2024 10:53:45 +0800 Subject: [PATCH 01/10] 1.2.0 (#474) * chore: [ci] release (alpha) (#138) Co-authored-by: github-actions[bot] * feat: Bump version (#139) * chore: [ci] release (alpha) (#140) Co-authored-by: github-actions[bot] * feat: Split approval and simulate (#141) * chore: [ci] release (alpha) (#142) Co-authored-by: github-actions[bot] * Revert "feat: Split approval and simulate" (#143) * Revert "feat: Split approval and simulate" This reverts commit 76defa7f31b7f2d4683f8ed04e8dc2786dd1ef6c. * Create dirty-parrots-hear.md * chore: [ci] release (alpha) (#144) Co-authored-by: github-actions[bot] * Chore/test case (#145) * chore(test): Remove private key from config * chore: Test CI * chore: Update rainkit version (#146) * feat: Query Lock Fee API (#147) * feat: Query Lock Fee API * Create green-avocados-jump.md * chore: [ci] release (alpha) (#148) Co-authored-by: github-actions[bot] * Update bucket.ts (#149) * Update bucket.ts throw error * Create hot-countries-begin.md --------- Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#150) Co-authored-by: github-actions[bot] * fix: Return real statuscode when call metaservice (#164) * fix: Return real statuscode when call metaservice * Create kind-eyes-brake.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#166) Co-authored-by: github-actions[bot] * feat: Upgrade types version (#167) * chore: [ci] release (alpha) (#168) Co-authored-by: github-actions[bot] * Feat/sp exit (#169) * feat: Add Virtual Group API * feat: Compatibility createBukcet and createObject API * feat: Add Migrate bucket API * Feat/batch upload (#171) * feat: Feegrant * feat: Feegrant * Create angry-horses-enjoy.md * Feat/batch upload (#174) * feat: Feegrant * feat: Feegrant * feat: Feegrant grantAllowance API * feat: CreateObject example * feat: CreateBucket example * feat: Transfer example * feat: AuthInfoBytes add feePayer and feeGranter * feat: Add Two Apis (#179) * feat: Add Two Apis * Create mean-wombats-remain.md * chore: [ci] release (alpha) (#170) Co-authored-by: github-actions[bot] * feat AuthV1 (#182) * chore: Update example * chore: Update Example * feat: V1Auth * feat: V1Auth generate * feat: V1Auth createObject Approval * Create shaggy-experts-approve.md * Feat/com new (#186) * feat: Remove GetUserBuckets API Auth * feat: Update BucketProps type * feat: Remove listObjects api auth and update response type * feat: Remove listGroup api auth * feat: Update Types * chore: [ci] release (alpha) (#183) Co-authored-by: github-actions[bot] * feat: Offchainauth timeout reduced to 2s (#187) * feat: Offchainauth timeout reduced to 2s * Create warm-planets-exercise.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#188) Co-authored-by: github-actions[bot] * Feat/auth v1 (#189) * feat: Upgrade types * chore: Update Example Account config * feat: Object create update * Create empty-pens-sing.md * chore: [ci] release (alpha) (#190) Co-authored-by: github-actions[bot] * Feat/auth v1 (#191) * feat: Upgrade types * chore: Update Example Account config * feat: Object create update * feat: API getStorageProviderInfo params update * chore: Upgrade types * feat: GetSpURLfrom bucket * feat: Remove Sp param when create object and bucket * chore: [ci] release (alpha) (#192) Co-authored-by: github-actions[bot] * feat: Change Allwance value type (#193) * chore: Test config update * feat: Change Allowance Type * chore: [ci] release (alpha) (#194) Co-authored-by: github-actions[bot] * feat: MultiTx support private key (#195) * fix: Throw sp error code and message (#197) * fix: Throw sp error code and message * Create good-bobcats-hang.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#196) Co-authored-by: github-actions[bot] * fix: No sp available error (#200) * fix: No sp available error * Create khaki-ducks-brake.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * Opt (#198) * chore: Update Example * refactor: Replace @ethereumjs/util with @ethersproject/bytes * feat: Upload Object V1 auth * fix: CreateObjectTx content-type msg * chore: [ci] release (alpha) (#201) Co-authored-by: github-actions[bot] * feat: Extend response time to 3s (#202) * feat: Extend response time to 3s * Create orange-spiders-add.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#203) Co-authored-by: github-actions[bot] * Chore/conflict (#209) * release 0.2.2 (#204) * feat: Update Types * chore: [ci] release (alpha) * Feat/query status (#42) * fix: Return types * feat: Feegrant * fix: Pubkey typeUrl * feat: Upgrade Cosmos SDK * refactor: Simply broadcast and simulate tx * feat: Support Tx by PrivateKey * feat: Replace local message with types npm * test: Test Framework * chore: Upgrade Example wagmi version, Replace ethersjs with viem * feat: Support EIP712 callback use external provider * feat: Support dynamic provider * test: Support jest test * test: Account Query * feat: Change Tx API * feat: Type Complete * chore: Complate Example in New API * fix: Rollup bundle Support Nodejs * feat: Resolute Module (IoC) * docs: Update README * chore: [ci] release (alpha) (#43) Co-authored-by: github-actions[bot] * Feat/multi msg (#49) * feat: Multi Send * feat: Compatibility multi tx message * Revert "Feat/multi msg (#49)" (#53) This reverts commit fc3dd986646624c81f3cc43bdffb02e70d170b4f. * Update WASM (#55) * feat: Update WASM * feat: Update create object tx * docs: Update doc (#56) * feat: Pre alpha (#57) * chore: [ci] release (alpha) (#58) Co-authored-by: github-actions[bot] * Update README.md * multi msg (#59) * feat: Multi Send * feat: Compatibility multi tx message * chore: [ci] release (alpha) (#62) Co-authored-by: github-actions[bot] * fix: CreateObject Msg (#65) * feat: add offchainauth method (#64) * feat: Add offchainauth method * feat: Compatiable old get approval method * Create ten-suits-crash.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> Co-authored-by: rrr523 * chore: [ci] release (alpha) (#66) Co-authored-by: github-actions[bot] * feat: Add Sp params (#67) * feat: Optimize get approval types and add throw error (#70) * feat: Optimize get approval types and add throw error * Create fluffy-snails-explain.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#68) Co-authored-by: github-actions[bot] * chore: Update example without greenfield-cosmos-types (#71) * fix: Return Promise (#72) * fix: Return Promise * Create strong-snails-count.md * chore: [ci] release (alpha) (#73) Co-authored-by: github-actions[bot] * fix: Create Group message (#74) * fix: Create Group message * Create young-bears-scream.md * feat: Add Storage Params API (#76) * chore: [ci] release (alpha) (#75) Co-authored-by: github-actions[bot] * Chore/group example (#77) * feat: Group API * chore: Group and Mirror example * chore: [ci] release (alpha) (#78) Co-authored-by: github-actions[bot] * chore: Update example (#79) * feat: Add query param to ListObjects API for display folder. (#80) * feat: Add query params to ListObjects API for folder * Create clean-dogs-joke.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * Feat/group (#82) * chore: Update Example * feat: Add some group API * Create sweet-feet-hide.md * chore: [ci] release (alpha) (#81) Co-authored-by: github-actions[bot] * Update objectt.ts (#83) * Update objectt.ts add missing resp params * Create cold-suns-accept.md --------- Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * Feat/policy (#86) * feat: Policy API * fix: Object API name * Create pretty-bulldogs-notice.md * feat: Migrate out zkbas-js-sdk and upate the sign msg format (#85) * feat: Migrate out zkbas-js-sdk and upate the sign msg format * Create fluffy-pumas-yawn.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#84) Co-authored-by: github-actions[bot] * fix: Head Group (#96) * fix: Head Group * Create cyan-ties-cross.md * feat: Multi Send Txs (#97) * feat: Multi Send Txs * Create lovely-knives-smile.md * chore: [ci] release (alpha) (#98) Co-authored-by: github-actions[bot] * feat: Allow to have sp auth fail (#101) * feat: Allow to have sp auth fail * fix: Replace endpoint with address when auth failed * Create tidy-dodos-care.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: TS lib (#104) * feat: Sync cosmos types (#106) * chore: [ci] release (alpha) (#102) Co-authored-by: github-actions[bot] * chore: Use rainbowkit simply wallet of example (#107) * Feat/update group (#108) * feat: Update group extra api * chore: Test group api * Create quiet-planets-shop.md * chore: [ci] release (alpha) (#109) Co-authored-by: github-actions[bot] * Feat/sp listgroup (#110) * feat: Add sp.listGroup API * chore: Update Example * chore: [ci] release (alpha) (#111) Co-authored-by: github-actions[bot] * chore: Update Example (#112) * chore: Update Examples (#114) * chore(dep): Add cross-env * chore(dep): Npm script * chore: Pnpm engines * chore: Codesandbox Example (#115) * chore(docs): Update stackblitz url (#116) * refactor: CreateFoler API params (#119) * chore: [ci] release (alpha) (#120) Co-authored-by: github-actions[bot] * feat: TimeStamp format * chore: [ci] release (alpha) (#121) Co-authored-by: github-actions[bot] * Refactor/policy (#122) * refactor: Bucket policy * refactor: Bucket policy * chore: [ci] release (alpha) (#123) Co-authored-by: github-actions[bot] * chore(example): BucketPolicy (#127) * Chore/update policy example (#128) * chore(example): BucketPolicy * chore(example): BucketPolicy * Feat/gashub (#129) * feat: Add gas hub API * refactor: TypeUrl as constants * chore: [ci] release (alpha) (#130) Co-authored-by: github-actions[bot] * feat: Export queryClient (#131) * feat: Export queryClient * Create calm-birds-sleep.md * Update README.md * fix: Compatiable net error (#133) * fix: Compatiable net error * Create old-roses-play.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#132) Co-authored-by: github-actions[bot] * Test/test case (#134) * feat: Isomorphic fetch * test: Uint test and e2e test * feat: Sync Types (#136) * feat: Sync Types * Create weak-hounds-sell.md * chore: [ci] release (alpha) (#135) Co-authored-by: github-actions[bot] * Fix/sort types (#137) * feat: Sort EIP712 message field * feat: Extra field * Create happy-humans-thank.md * chore: [ci] release (alpha) (#138) Co-authored-by: github-actions[bot] * feat: Bump version (#139) * chore: [ci] release (alpha) (#140) Co-authored-by: github-actions[bot] * feat: Split approval and simulate (#141) * chore: [ci] release (alpha) (#142) Co-authored-by: github-actions[bot] * Revert "feat: Split approval and simulate" (#143) * Revert "feat: Split approval and simulate" This reverts commit 76defa7f31b7f2d4683f8ed04e8dc2786dd1ef6c. * Create dirty-parrots-hear.md * chore: [ci] release (alpha) (#144) Co-authored-by: github-actions[bot] * Chore/test case (#145) * chore(test): Remove private key from config * chore: Test CI * chore: Update rainkit version (#146) * feat: Query Lock Fee API (#147) * feat: Query Lock Fee API * Create green-avocados-jump.md * chore: [ci] release (alpha) (#148) Co-authored-by: github-actions[bot] * Update bucket.ts (#149) * Update bucket.ts throw error * Create hot-countries-begin.md --------- Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#150) Co-authored-by: github-actions[bot] * fix: Return real statuscode when call metaservice (#164) * fix: Return real statuscode when call metaservice * Create kind-eyes-brake.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#166) Co-authored-by: github-actions[bot] * feat: Upgrade types version (#167) * chore: [ci] release (alpha) (#168) Co-authored-by: github-actions[bot] * Feat/sp exit (#169) * feat: Add Virtual Group API * feat: Compatibility createBukcet and createObject API * feat: Add Migrate bucket API * Feat/batch upload (#171) * feat: Feegrant * feat: Feegrant * Create angry-horses-enjoy.md * Feat/batch upload (#174) * feat: Feegrant * feat: Feegrant * feat: Feegrant grantAllowance API * feat: CreateObject example * feat: CreateBucket example * feat: Transfer example * feat: AuthInfoBytes add feePayer and feeGranter * feat: Add Two Apis (#179) * feat: Add Two Apis * Create mean-wombats-remain.md * chore: [ci] release (alpha) (#170) Co-authored-by: github-actions[bot] * feat AuthV1 (#182) * chore: Update example * chore: Update Example * feat: V1Auth * feat: V1Auth generate * feat: V1Auth createObject Approval * Create shaggy-experts-approve.md * Feat/com new (#186) * feat: Remove GetUserBuckets API Auth * feat: Update BucketProps type * feat: Remove listObjects api auth and update response type * feat: Remove listGroup api auth * feat: Update Types * chore: [ci] release (alpha) (#183) Co-authored-by: github-actions[bot] * feat: Offchainauth timeout reduced to 2s (#187) * feat: Offchainauth timeout reduced to 2s * Create warm-planets-exercise.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#188) Co-authored-by: github-actions[bot] * Feat/auth v1 (#189) * feat: Upgrade types * chore: Update Example Account config * feat: Object create update * Create empty-pens-sing.md * chore: [ci] release (alpha) (#190) Co-authored-by: github-actions[bot] * Feat/auth v1 (#191) * feat: Upgrade types * chore: Update Example Account config * feat: Object create update * feat: API getStorageProviderInfo params update * chore: Upgrade types * feat: GetSpURLfrom bucket * feat: Remove Sp param when create object and bucket * chore: [ci] release (alpha) (#192) Co-authored-by: github-actions[bot] * feat: Change Allwance value type (#193) * chore: Test config update * feat: Change Allowance Type * chore: [ci] release (alpha) (#194) Co-authored-by: github-actions[bot] * feat: MultiTx support private key (#195) * fix: Throw sp error code and message (#197) * fix: Throw sp error code and message * Create good-bobcats-hang.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#196) Co-authored-by: github-actions[bot] * fix: No sp available error (#200) * fix: No sp available error * Create khaki-ducks-brake.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * Opt (#198) * chore: Update Example * refactor: Replace @ethereumjs/util with @ethersproject/bytes * feat: Upload Object V1 auth * fix: CreateObjectTx content-type msg * chore: [ci] release (alpha) (#201) Co-authored-by: github-actions[bot] * feat: Extend response time to 3s (#202) * feat: Extend response time to 3s * Create orange-spiders-add.md --------- Co-authored-by: devinxl Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#203) Co-authored-by: github-actions[bot] --------- Co-authored-by: github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: randomx999 <84435529+randomx999@users.noreply.github.com> Co-authored-by: devinxl Co-authored-by: aiden-cao <104969608+aiden-cao@users.noreply.github.com> * chore: Pre exit (#205) * chore: [ci] release (#206) Co-authored-by: github-actions[bot] * chore: Rename package (#207) * chore: [ci] release (#208) Co-authored-by: github-actions[bot] --------- Co-authored-by: github-actions[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: randomx999 <84435529+randomx999@users.noreply.github.com> Co-authored-by: devinxl Co-authored-by: aiden-cao <104969608+aiden-cao@users.noreply.github.com> * Feat/payment (#210) * feat: Add Payment query API * fix: Create Payment Account * fix: Payment disableRefund * chore: Update Example * chore: [ci] release (alpha) (#211) Co-authored-by: github-actions[bot] * chore: Update README link (#214) * fix: Return Types (#213) * chore: Update withdraw example params (#212) * chore: Update withdraw example params * feat: Zk crypto wasm package * chore: Nodejs example update package * chore: Add comment * chore: Update UMD name * feat: Upgrade file handle package * chore: Update OffchainAuth example * feat: New Zk package * chore: Changeset (#215) * chore: [ci] release (alpha) (#216) Co-authored-by: github-actions[bot] * Feat/group api (#217) * fix: Dynamic add and delete members string array * chore: Release zk crypto * chore: [ci] release (alpha) (#218) Co-authored-by: github-actions[bot] * chore: Release zk crypto (#219) * chore: [ci] release (alpha) (#220) Co-authored-by: github-actions[bot] * fix: Zk version bump (#221) * chore: [ci] release (alpha) (#222) Co-authored-by: github-actions[bot] * fix: DeepClone EIP712 (#223) * chore: [ci] release (alpha) (#224) Co-authored-by: github-actions[bot] * fix: Error try catch (#230) * chore: [ci] release (alpha) (#231) Co-authored-by: github-actions[bot] * Feat/auth (#232) * feat: Compatibility new payment api * feat: Compatibility updateGroupMember api * chore: Update example * feat: Feegrant api add timestamp * feat: EDDSA Sign * feat: Remove log (#234) * chore: [ci] release (alpha) (#233) Co-authored-by: github-actions[bot] * fix: Feegrant add expiration time (#235) * fix: Feegrant add expiration time * chore(example): GetAllowence support pagination * refactor (#236) * refactor: Tx * fix: Type * feat: Add Group API * feat: Update Sp API * feat: Bucket add authType * feat: and add params * fix: Types * feat: Change type * chore: [ci] release (alpha) (#237) Co-authored-by: github-actions[bot] * Fix/read quota (#238) * fix: CreateBucketApproval * feat: ReadQuota * chore(example): Update Example * chore: [ci] release (alpha) (#239) Co-authored-by: github-actions[bot] * XML response (#240) * feat: Return XML type * feat: CreateBucket Add payment address * chore: [ci] release (alpha) (#241) Co-authored-by: github-actions[bot] * fix: XMLParser force array not object (#242) * Feat/export req (#243) * fix: XMLParser force array not object * fix: XMLParser force array not object * chore: [ci] release (alpha) (#244) Co-authored-by: github-actions[bot] * feat: Export types (#245) * Export types (#247) * feat: Export types * fix: Hex number convert to string not big number * chore: [ci] release (alpha) (#246) Co-authored-by: github-actions[bot] * Feat/up and down (#248) * feat: Upload Object add AuthType * feat: Download s3 object * feat: Migrate Bucket add authType * feat: SpClient expose makeHeaders method * chore: Update constant pathj * chore: [ci] release (alpha) (#249) Co-authored-by: github-actions[bot] * Feat/xml null (#250) * feat: Add default XML value * feat: Add default XML value * chore: [ci] release (alpha) (#251) Co-authored-by: github-actions[bot] * Fix/gap time (#252) * fix: Gap time * fix: Gap time * Feat/meta (#254) * feat: GetBucketMeta * feat: Object Meta * Create curly-fishes-bow.md * chore: [ci] release (alpha) (#253) Co-authored-by: github-actions[bot] * Refactor/sp client (#255) * chore: Exact parseError * feat: Remove deps * chore: Structor * feat: Refeactor Sp Client * chore: [ci] release (alpha) (#256) Co-authored-by: github-actions[bot] * feat: Custom HTTP method (#257) * feat: Custom HTTP method * chore(example): Update * chore: [ci] release (alpha) (#258) Co-authored-by: github-actions[bot] * chore(docs): Update README (#259) * chore: Add comment (#260) * fix: Sp types (#261) * Feat/upload progress (#263) * fix: GfSpGetUserBucketsResponse Bucket types * feat: Cross fetch * chore: [ci] release (alpha) (#262) Co-authored-by: github-actions[bot] * fix: EncodePath (#264) * chore: [ci] release (alpha) (#265) Co-authored-by: github-actions[bot] * fix: Download http method (#266) * fix: Download http method (#267) * chore: [ci] release (alpha) (#268) Co-authored-by: github-actions[bot] * feat: New API getObjectPreviewUrl (#270) * chore: [ci] release (alpha) (#271) Co-authored-by: github-actions[bot] * fix: XML type align to go struct (#272) * feat: Optional endpoint param (#273) * chore: [ci] release (alpha) (#274) Co-authored-by: github-actions[bot] * fix: XML parse boolean (#275) * chore: [ci] release (alpha) (#276) Co-authored-by: github-actions[bot] * fix: Common Prefix parse as array (#277) * chore: [ci] release (alpha) (#278) Co-authored-by: github-actions[bot] * test: Parse XML test case (#279) * feat: Migrate bucket (#280) * fix: Create bucket quota params (#282) * chore: [ci] release (alpha) (#281) Co-authored-by: github-actions[bot] * feat: Replace xml2js to fast-xml-parse (#283) * Feat/update bucket info (#284) * feat: Update Bucket Info API * chore(example): Update * chore: [ci] release (alpha) (#285) Co-authored-by: github-actions[bot] * fix: EncodePath function (#286) * fix: Convert enum to number (#287) * chore: [ci] release (alpha) (#288) Co-authored-by: github-actions[bot] * feat: Add listReadRecords api * feat: ListGroups API * feat: ListObjectsByIds API * feat: ListBucketsByIds api * feat: Add verifyPermission api * feat: ListGroupsMembers * feat: ListUserGroups api * feat: Add listUserOwnedGroups api * chore: [ci] release (alpha) * feat: Sort query (#292) * feat: Sort query * Create healthy-chicken-beam.md * chore: [ci] release (alpha) (#293) Co-authored-by: github-actions[bot] * chore(exmaple): Group (#294) * docs: Update API (#295) * chore: Pre Exit (#296) * Pre exit (#297) * chore: Pre Exit * chore: Pre Exit * chore: [ci] release (#298) Co-authored-by: github-actions[bot] * chore: Pre Enter (#299) * Refactor/sp (#302) * feat: Auth expiry timestamp add default value * refactor: Sp types * fix: Expire time * feat: Upgrade TinyGo version * Refactor/sp (#305) * feat: Auth expiry timestamp add default value * refactor: Sp types * fix: Expire time * feat: Upgrade TinyGo version * refactor: Sp metainfo * chore: Update Example * chore: [ci] release (alpha) (#303) Co-authored-by: github-actions[bot] * fix: Build (#306) * chore: Update Deps (#308) * chore: [ci] release (alpha) (#307) Co-authored-by: github-actions[bot] * docs: Update README (#309) * Feat/validator (#310) * feat: EditValidator * feat: Add proposal api * refactor: TxClient * feat: Bucket listBucketsByPaymentAccount api * fix: Proposal and Validator API * feat: ListUserPaymentAccount api * chore: [ci] release (alpha) (#311) Co-authored-by: github-actions[bot] * chore: Nodejs example update * test: Test case update * chore: README update * feat: ListBuckets * fix: QueryClient and TxClient is not singleton * chore: Upgrade types * fix: PutPolicy * feat: ListObjectPolicies api * chore: [ci] release (alpha) * fix: IOC (#314) fix: All class use injectable * chore: [ci] release (alpha) (#315) Co-authored-by: github-actions[bot] * chore: Update exmaple (#316) * feat: Distribution API (#317) * chore: [ci] release (alpha) (#318) Co-authored-by: github-actions[bot] * feat: MsgSettle (#319) * feat: MsgSettle * Create fast-houses-do.md * chore: [ci] release (alpha) (#320) Co-authored-by: github-actions[bot] * chore(example): Update custom tx (#321) * chore: [ci] release (alpha) (#322) Co-authored-by: github-actions[bot] * chore: Github Action issue close (#323) * feat: Bucket headBucketExtra api (#324) * chore: [ci] release (alpha) (#325) Co-authored-by: github-actions[bot] * chore: Nodejs Example update (#326) * chore: Example Update (#327) * Chore/example (#328) * chore: Example Update * chore: Example Update * chore: Update (#329) * feat: Custom Tx (#330) * chore: [ci] release (alpha) (#331) Co-authored-by: github-actions[bot] * fix: Delete Policy (#332) * chore: [ci] release (alpha) (#333) Co-authored-by: github-actions[bot] * Feat/create app (#334) * feat: Template Init * feat: Template Init * feat: Create App Commander * chore: [ci] release (alpha) (#335) Co-authored-by: github-actions[bot] * feat: Create App Commander (#336) * chore: [ci] release (alpha) (#337) Co-authored-by: github-actions[bot] * chore: Update README (#338) * feat: Add vite template (#339) * chore: [ci] release (alpha) (#340) Co-authored-by: github-actions[bot] * release 0.2.5 (#341) chore: Pre Exit * chore: [ci] release (#342) Co-authored-by: github-actions[bot] * chore: Enter pre (#343) * chore(docs): Update README (#344) * Chore/package (#346) * chore: Update package.json * chore: Update package.json * Chore/package js sdk (#347) * chore: Update deps * chore: Update deps * chore: [ci] release (alpha) (#348) Co-authored-by: github-actions[bot] * Chore/update deps (#349) * chore: Update deps * chore: Update deps * Docs site ! (#350) * feat: Docs init * feat: Docs init * chore: Update README * docs: Update Docs * chore: Update deps * chore: Update docs * chore: Update docs * chore: Update * docs: Update * docs: Update * docs: Update * docs: Update Crosschain doc * chore: Update docs * chore: Pre exit (#351) * chore: [ci] release (#352) Co-authored-by: github-actions[bot] * feat: Custom Tx support any type! (#355) * chore: Pre enter (#357) * chore: [ci] release (alpha) (#356) Co-authored-by: github-actions[bot] * fix: Offchain auth ei.data undefined (#358) * fix: Offchain auth ei.data undefined * Create witty-bikes-flash.md --------- Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#359) Co-authored-by: github-actions[bot] * fix: Offchain auth ei.data undefined (#360) * fix: Offchain auth ei.data undefined * Create ten-maps-travel.md --------- Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: [ci] release (alpha) (#361) Co-authored-by: github-actions[bot] * chore: Release 1.0.0 (#365) * chore: [ci] release (alpha) (#366) Co-authored-by: github-actions[bot] * chore: Pre exit (#367) * chore: [ci] release (#368) Co-authored-by: github-actions[bot] * chore: Pre enter * fix(types): Payment listUserPaymentAccounts return response (#370) * fix(types): Payment listUserPaymentAccounts return response * fix(types): Payment listUserPaymentAccounts return response * Create chilly-pens-listen.md * chore: [ci] release (alpha) (#371) Co-authored-by: github-actions[bot] * chore: Update doc url (#372) * chore: Pre exit (#377) * chore: [ci] release (#378) Co-authored-by: github-actions[bot] * fix: Replace legacy method (#381) * fix: Replace legacy method * Create cool-shoes-visit.md --------- Co-authored-by: rrr523 <59029880+rrr523@users.noreply.github.com> * chore: Update Deps (#382) * docs: Update README (#384) * chore: [ci] release (#383) Co-authored-by: github-actions[bot] * Feat/new msg tag (#413) * feat: Upgrade types to 0.4.0-alpha-25 * feat: Create Group with tags * feat: SetTag tx * chore(example): Update Group Tag * feat: Create Bucket with tags * chore(example): Create bucket with tags * refactor: Rename Object class name * feat: Create Object with tags * chore(example): Create Object with tags * chore: Enter pre changeset * chore: Minor Changeset * chore: [ci] release (alpha) (#414) Co-authored-by: github-actions[bot] * Chore/update create tags (#415) * chore(example): Nodejs example update new create tx * docs: Update Docs - new create tx * chore: Remove engines filed (#418) * Feat/js reed solomon (#422) * feat: Js implement reed solomon * docs: Update README * docs: Update README * Create beige-beds-lay.md * feat: Empty buffer * chore: Update params * feat: Nodejs support worker * feat: Nodejs support worker * feat: Add types * chore: Update Nodejs example * chore: Update docs and example * chore: [ci] release (alpha) (#419) Co-authored-by: github-actions[bot] * chore: Update example (#423) * feat: Add SP Api types (#424) * chore: [ci] release (alpha) (#425) Co-authored-by: github-actions[bot] * feat: Add bucket meta type (#426) * feat: Add bucket meta type (#427) * chore: [ci] release (alpha) (#428) Co-authored-by: github-actions[bot] * Feat/rs webworker (#429) * chore: Update example, using reed solomon * chore: Update Rollup config * chore: Benchmark * docs: Update README * feat: Support WebWorker * chore: [ci] release (alpha) (#430) Co-authored-by: github-actions[bot] * Feat/rs webworker (#431) * chore: Update example, using reed solomon * chore: Update Rollup config * chore: Benchmark * docs: Update README * feat: Support WebWorker * feat: Add types * chore: Add benchmark * Merge branch 'alpha' into feat/rs_webworker * chore: [ci] release (alpha) (#432) Co-authored-by: github-actions[bot] * chore: Exit pre * chore: [ci] release (#433) Co-authored-by: github-actions[bot] * chore: Enter alpha * Feat/new tag (#461) * Fix/sp tag type (#444) * fix: Sp types * fix: Sp types (cherry picked from commit eb75e4d2716d97249bc9f57f20861368ca73204c) * fix: Tag compatibility (#443) (cherry picked from commit 7a2e9d263648c1032f3422235518eb748d99eeab) * feat: Upgrade cosmos type to 0.4.0 alpha 30 * chore: Update feegranet example * feat: Add SetTag API * chore: [ci] release (alpha) (#462) Co-authored-by: github-actions[bot] * chore: Pnpm install --no-frozen-lockfile * chore: [ci] release (alpha) (#463) Co-authored-by: github-actions[bot] * feat: Sp Api types (#464) * chore: [ci] release (alpha) (#465) Co-authored-by: github-actions[bot] * chore: Pre Exit (#468) * chore: [ci] release (#469) Co-authored-by: github-actions[bot] * chore: Pnpm install --no-frozen-lockfile --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: aiden-cao <104969608+aiden-cao@users.noreply.github.com> Co-authored-by: randomx999 <84435529+randomx999@users.noreply.github.com> Co-authored-by: devinxl --- pnpm-lock.yaml | 245 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 244 insertions(+), 1 deletion(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index db71b048..9659929a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,5 @@ lockfileVersion: '6.0' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -116,6 +117,7 @@ importers: '@docusaurus/preset-classic': specifier: 3.0.1 version: 3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) + version: 3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) '@mdx-js/react': specifier: ^3.0.0 version: 3.0.0(@types/react@18.2.21)(react@18.2.0) @@ -180,6 +182,8 @@ importers: '@bnb-chain/greenfield-cosmos-types': specifier: 0.4.0-alpha.30 version: 0.4.0-alpha.30 + specifier: 0.4.0-alpha.30 + version: 0.4.0-alpha.30 '@bnb-chain/greenfield-js-sdk': specifier: workspace:* version: link:../../packages/js-sdk @@ -290,7 +294,7 @@ importers: examples/nodejs-file-management: dependencies: '@bnb-chain/greenfield-js-sdk': - specifier: ^1.2.0-alpha.0 + specifier: ^1.2.0 version: link:../../packages/js-sdk '@bnb-chain/reed-solomon': specifier: ^1.1.1 @@ -378,6 +382,8 @@ importers: '@bnb-chain/greenfield-cosmos-types': specifier: 0.4.0-alpha.30 version: 0.4.0-alpha.30 + specifier: 0.4.0-alpha.30 + version: 0.4.0-alpha.30 '@bnb-chain/greenfield-zk-crypto': specifier: workspace:* version: link:../zk-crypto @@ -487,6 +493,7 @@ importers: ts-jest: specifier: ^29.1.0 version: 29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5) + version: 29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5) ts-node: specifier: ^10.9.1 version: 10.9.1(@types/node@18.16.18)(typescript@4.9.5) @@ -545,17 +552,21 @@ packages: resolution: {integrity: sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==} dev: false + /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: false + /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: @@ -563,28 +574,35 @@ packages: dependencies: '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) search-insights: 2.13.0 + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) + search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: false + /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: + '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) + '@algolia/client-search': 4.22.0 '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) '@algolia/client-search': 4.22.0 algoliasearch: 4.20.0 dev: false + /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: + '@algolia/client-search': 4.22.0 '@algolia/client-search': 4.22.0 algoliasearch: 4.20.0 dev: false @@ -603,6 +621,10 @@ packages: resolution: {integrity: sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==} dev: false + /@algolia/cache-common@4.22.0: + resolution: {integrity: sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==} + dev: false + /@algolia/cache-in-memory@4.20.0: resolution: {integrity: sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==} dependencies: @@ -640,6 +662,13 @@ packages: '@algolia/transporter': 4.22.0 dev: false + /@algolia/client-common@4.22.0: + resolution: {integrity: sha512-BlbkF4qXVWuwTmYxVWvqtatCR3lzXwxx628p1wj1Q7QP2+LsTmGt1DiUYRuy9jG7iMsnlExby6kRMOOlbhv2Ag==} + dependencies: + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + /@algolia/client-personalization@4.20.0: resolution: {integrity: sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==} dependencies: @@ -664,6 +693,14 @@ packages: '@algolia/transporter': 4.22.0 dev: false + /@algolia/client-search@4.22.0: + resolution: {integrity: sha512-bn4qQiIdRPBGCwsNuuqB8rdHhGKKWIij9OqidM1UkQxnSG8yzxHdb7CujM30pvp5EnV7jTqDZRbxacbjYVW20Q==} + dependencies: + '@algolia/client-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + '@algolia/transporter': 4.22.0 + dev: false + /@algolia/events@4.0.1: resolution: {integrity: sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==} dev: false @@ -676,6 +713,10 @@ packages: resolution: {integrity: sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==} dev: false + /@algolia/logger-common@4.22.0: + resolution: {integrity: sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==} + dev: false + /@algolia/logger-console@4.20.0: resolution: {integrity: sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==} dependencies: @@ -696,6 +737,10 @@ packages: resolution: {integrity: sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==} dev: false + /@algolia/requester-common@4.22.0: + resolution: {integrity: sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==} + dev: false + /@algolia/requester-node-http@4.20.0: resolution: {integrity: sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==} dependencies: @@ -718,6 +763,14 @@ packages: '@algolia/requester-common': 4.22.0 dev: false + /@algolia/transporter@4.22.0: + resolution: {integrity: sha512-ieO1k8x2o77GNvOoC+vAkFKppydQSVfbjM3YrSjLmgywiBejPTvU1R1nEvG59JIIUvtSLrZsLGPkd6vL14zopA==} + dependencies: + '@algolia/cache-common': 4.22.0 + '@algolia/logger-common': 4.22.0 + '@algolia/requester-common': 4.22.0 + dev: false + /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -753,6 +806,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@babel/compat-data@7.23.5: + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/core@7.23.3: resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} engines: {node: '>=6.9.0'} @@ -820,6 +878,29 @@ packages: - supports-color dev: true + /@babel/core@7.23.6: + resolution: {integrity: sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6) + '@babel/helpers': 7.23.6 + '@babel/parser': 7.23.6 + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.6 + '@babel/types': 7.23.6 + convert-source-map: 2.0.0 + debug: 4.3.4(supports-color@8.1.1) + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/eslint-parser@7.21.8(@babel/core@7.23.3)(eslint@8.48.0): resolution: {integrity: sha512-HLhI+2q+BP3sf78mFUZNCGc10KEmoUqtUT1OCdMZsN+qr4qFeLUod62/zAnF3jNQstwyasDkZnVXwfK2Bml7MQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -872,6 +953,16 @@ packages: jsesc: 2.5.2 dev: true + /@babel/generator@7.23.6: + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.6 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.20 + jsesc: 2.5.2 + dev: true + /@babel/helper-annotate-as-pure@7.22.5: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} @@ -913,6 +1004,17 @@ packages: semver: 6.3.1 dev: true + /@babel/helper-compilation-targets@7.23.6: + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.23.5 + '@babel/helper-validator-option': 7.23.5 + browserslist: 4.22.2 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: true + /@babel/helper-create-class-features-plugin@7.22.1(@babel/core@7.23.3): resolution: {integrity: sha512-SowrZ9BWzYFgzUMwUmowbPSGu6CXL5MSuuCkG3bejahSpSymioPmuLdhPxNOc9MjuNGjy7M/HaXvJ8G82Lywlw==} engines: {node: '>=6.9.0'} @@ -1122,6 +1224,20 @@ packages: '@babel/helper-validator-identifier': 7.22.20 dev: true + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.6): + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.6 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: true + /@babel/helper-optimise-call-expression@7.18.6: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} @@ -1244,6 +1360,11 @@ packages: engines: {node: '>=6.9.0'} dev: true + /@babel/helper-validator-option@7.23.5: + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-wrap-function@7.20.5: resolution: {integrity: sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==} engines: {node: '>=6.9.0'} @@ -1296,6 +1417,17 @@ packages: - supports-color dev: true + /@babel/helpers@7.23.6: + resolution: {integrity: sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.22.15 + '@babel/traverse': 7.23.6 + '@babel/types': 7.23.6 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/highlight@7.22.13: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} @@ -1342,6 +1474,14 @@ packages: '@babel/types': 7.23.6 dev: true + /@babel/parser@7.23.6: + resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.6 + dev: true + /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.23.3): resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==} engines: {node: '>=6.9.0'} @@ -3558,6 +3698,24 @@ packages: - supports-color dev: true + /@babel/traverse@7.23.6: + resolution: {integrity: sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.6 + '@babel/types': 7.23.6 + debug: 4.3.4(supports-color@8.1.1) + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/types@7.22.15: resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} engines: {node: '>=6.9.0'} @@ -3591,10 +3749,21 @@ packages: to-fast-properties: 2.0.0 dev: true + /@babel/types@7.23.6: + resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true + /@bnb-chain/greenfield-cosmos-types@0.4.0-alpha.30: + resolution: {integrity: sha512-nYThWPZHfq/bDMEu+Sw9cMMqgTk4NEg+PH9GkvN2OMgpo8QuCDy3Eh4C1g6lJy0BFv+ilethoPmKjSeEwa1m8g==} /@bnb-chain/greenfield-cosmos-types@0.4.0-alpha.30: resolution: {integrity: sha512-nYThWPZHfq/bDMEu+Sw9cMMqgTk4NEg+PH9GkvN2OMgpo8QuCDy3Eh4C1g6lJy0BFv+ilethoPmKjSeEwa1m8g==} dependencies: @@ -4212,6 +4381,7 @@ packages: resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} dev: false + /@docsearch/react@3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): /@docsearch/react@3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} peerDependencies: @@ -4229,6 +4399,8 @@ packages: search-insights: optional: true dependencies: + '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) + '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) '@docsearch/css': 3.5.2 @@ -4237,6 +4409,7 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) search-insights: 2.13.0 + search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' dev: false @@ -4787,6 +4960,7 @@ packages: - webpack-cli dev: false + /@docusaurus/preset-classic@3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): /@docusaurus/preset-classic@3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): resolution: {integrity: sha512-il9m9xZKKjoXn6h0cRcdnt6wce0Pv1y5t4xk2Wx7zBGhKG1idu4IFHtikHlD0QPuZ9fizpXspXcTzjL5FXc1Gw==} engines: {node: '>=18.0'} @@ -4806,6 +4980,7 @@ packages: '@docusaurus/theme-classic': 3.0.1(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5) '@docusaurus/theme-common': 3.0.1(@docusaurus/types@3.0.1)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5) '@docusaurus/theme-search-algolia': 3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) + '@docusaurus/theme-search-algolia': 3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) '@docusaurus/types': 3.0.1(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -4951,6 +5126,7 @@ packages: - webpack-cli dev: false + /@docusaurus/theme-search-algolia@3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): /@docusaurus/theme-search-algolia@3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): resolution: {integrity: sha512-DDiPc0/xmKSEdwFkXNf1/vH1SzJPzuJBar8kMcBbDAZk/SAmo/4lf6GU2drou4Ae60lN2waix+jYWTWcJRahSA==} engines: {node: '>=18.0'} @@ -4958,6 +5134,7 @@ packages: react: ^18.0.0 react-dom: ^18.0.0 dependencies: + '@docsearch/react': 3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) '@docsearch/react': 3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) '@docusaurus/core': 3.0.1(@docusaurus/types@3.0.1)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5) '@docusaurus/logger': 3.0.1 @@ -5859,6 +6036,7 @@ packages: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 '@types/node': 20.10.5 + '@types/node': 20.10.5 '@types/yargs': 17.0.31 chalk: 4.1.2 @@ -7282,12 +7460,14 @@ packages: dependencies: '@types/connect': 3.4.38 '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/bonjour@3.5.11: resolution: {integrity: sha512-isGhjmBtLIxdHBDl2xGwUzEM8AOyOvWsADWq7rqirdi/ZQoHnLWErHvsThcEzTX8juDRiZtzp2Qkv5bgNh6mAg==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/chai@4.3.5: @@ -7299,12 +7479,14 @@ packages: dependencies: '@types/express-serve-static-core': 4.17.36 '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/cross-spawn@6.0.3: @@ -7365,6 +7547,7 @@ packages: /@types/express-serve-static-core@4.17.36: resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: + '@types/node': 20.10.5 '@types/node': 20.10.5 '@types/qs': 6.9.8 '@types/range-parser': 1.2.4 @@ -7392,6 +7575,7 @@ packages: dependencies: '@types/minimatch': 5.1.2 '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: true /@types/graceful-fs@4.1.6: @@ -7429,6 +7613,7 @@ packages: resolution: {integrity: sha512-kQtujO08dVtQ2wXAuSFfk9ASy3sug4+ogFR8Kd8UgP8PEuc1/G/8yjYRmp//PcDNJEUKOza/MrQu15bouEUCiw==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/is-ci@3.0.0: @@ -7492,6 +7677,7 @@ packages: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/lodash.clonedeep@4.5.7: @@ -7573,6 +7759,7 @@ packages: resolution: {integrity: sha512-0yQLzYhCqGz7CQPE3iDmYjhb7KMBFOP+tBkyw+/Y2YyDI5wpS7itXXxneN1zSsUwWx3Ji6YiVYrhAnpQGS/vkw==} dependencies: '@types/node': 20.6.0 + '@types/node': 20.6.0 dev: false /@types/node@12.20.55: @@ -7590,6 +7777,11 @@ packages: dependencies: undici-types: 5.26.5 + /@types/node@20.10.5: + resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==} + dependencies: + undici-types: 5.26.5 + /@types/node@20.6.0: resolution: {integrity: sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==} dev: false @@ -7700,6 +7892,7 @@ packages: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/retry@0.12.0: @@ -7710,6 +7903,7 @@ packages: resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} dependencies: '@types/node': 17.0.45 + '@types/node': 17.0.45 dev: false /@types/scheduler@0.16.3: @@ -7741,6 +7935,7 @@ packages: dependencies: '@types/mime': 1.3.2 '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/serve-index@1.9.1: @@ -7755,12 +7950,14 @@ packages: '@types/http-errors': 2.0.2 '@types/mime': 3.0.1 '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/sockjs@0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/stack-utils@2.0.1: @@ -7797,6 +7994,7 @@ packages: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: '@types/node': 20.10.5 + '@types/node': 20.10.5 dev: false /@types/xml2js@0.4.11: @@ -9963,6 +10161,17 @@ packages: update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true + /browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001571 + electron-to-chromium: 1.4.616 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.2) + dev: true + /bs-logger@0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} engines: {node: '>= 6'} @@ -10165,6 +10374,10 @@ packages: resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} dev: true + /caniuse-lite@1.0.30001571: + resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} + dev: true + /case@1.6.3: resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} engines: {node: '>= 0.8.0'} @@ -11721,6 +11934,10 @@ packages: resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} dev: true + /electron-to-chromium@1.4.616: + resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} + dev: true + /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: @@ -12472,6 +12689,7 @@ packages: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} dependencies: + '@types/node': 20.10.5 '@types/node': 20.10.5 require-like: 0.1.2 dev: false @@ -14849,6 +15067,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/node': 20.10.5 + '@types/node': 20.10.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -14884,6 +15103,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: + '@types/node': 20.10.5 '@types/node': 20.10.5 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -14902,6 +15122,7 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: + '@types/node': 20.10.5 '@types/node': 20.10.5 jest-util: 29.7.0 merge-stream: 2.0.0 @@ -16595,6 +16816,10 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + dev: true + /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -18816,6 +19041,8 @@ packages: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} dev: false + /search-insights@2.13.0: + resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} /search-insights@2.13.0: resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} dev: false @@ -19925,6 +20152,7 @@ packages: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: false + /ts-jest@29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5): /ts-jest@29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5): resolution: {integrity: sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -19946,6 +20174,7 @@ packages: esbuild: optional: true dependencies: + '@babel/core': 7.23.6 '@babel/core': 7.23.6 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -20176,6 +20405,9 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /unenv@1.8.0: resolution: {integrity: sha512-uIGbdCWZfhRRmyKj1UioCepQ0jpq638j/Cf0xFTn4zD1nGJ2lSdzYHLzfdXN791oo/0juUiSWW1fBklXMTsuqg==} dependencies: @@ -20391,6 +20623,17 @@ packages: picocolors: 1.0.0 dev: true + /update-browserslist-db@1.0.13(browserslist@4.22.2): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.2 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /update-notifier@6.0.2: resolution: {integrity: sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==} engines: {node: '>=14.16'} From fa2ca10a07712440789d6eb4a5b676e23e1bce26 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:30:14 +0800 Subject: [PATCH 02/10] docs: Update docs (#480) --- doc-site/docs/client/greenfield.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc-site/docs/client/greenfield.mdx b/doc-site/docs/client/greenfield.mdx index cbb03c7b..3ff0c924 100644 --- a/doc-site/docs/client/greenfield.mdx +++ b/doc-site/docs/client/greenfield.mdx @@ -20,7 +20,7 @@ const client = Client.create(GRPC_URL, GREEN_CHAIN_ID); // Browser const client = Client.create(GRPC_URL, String(GREEN_CHAIN_ID), { zkCryptoUrl: - 'https://unpkg.com/@bnb-chain/greenfield-zk-crypto/dist/node/zk-crypto.wasm', + 'https://unpkg.com/@bnb-chain/greenfield-zk-crypto@0.0.3/dist/node/zk-crypto.wasm', }); ``` From 1a99e129c60a47df8fb78be0f0a2b0ce1c29b983 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Wed, 31 Jan 2024 10:37:39 +0800 Subject: [PATCH 03/10] chore: Update pnpm lock file (#481) --- pnpm-lock.yaml | 243 ------------------------------------------------- 1 file changed, 243 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9659929a..49d424bc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,5 +1,4 @@ lockfileVersion: '6.0' -lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -117,7 +116,6 @@ importers: '@docusaurus/preset-classic': specifier: 3.0.1 version: 3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) - version: 3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) '@mdx-js/react': specifier: ^3.0.0 version: 3.0.0(@types/react@18.2.21)(react@18.2.0) @@ -182,8 +180,6 @@ importers: '@bnb-chain/greenfield-cosmos-types': specifier: 0.4.0-alpha.30 version: 0.4.0-alpha.30 - specifier: 0.4.0-alpha.30 - version: 0.4.0-alpha.30 '@bnb-chain/greenfield-js-sdk': specifier: workspace:* version: link:../../packages/js-sdk @@ -382,8 +378,6 @@ importers: '@bnb-chain/greenfield-cosmos-types': specifier: 0.4.0-alpha.30 version: 0.4.0-alpha.30 - specifier: 0.4.0-alpha.30 - version: 0.4.0-alpha.30 '@bnb-chain/greenfield-zk-crypto': specifier: workspace:* version: link:../zk-crypto @@ -493,7 +487,6 @@ importers: ts-jest: specifier: ^29.1.0 version: 29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5) - version: 29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5) ts-node: specifier: ^10.9.1 version: 10.9.1(@types/node@18.16.18)(typescript@4.9.5) @@ -552,21 +545,17 @@ packages: resolution: {integrity: sha512-iowxq3U30sghZotgl4s/oJRci6WPBfNO5YYgk2cIOMCHr3LeGPcsZjCEr+33Q4N+oV3OABDAtA+pyvWjbvBifQ==} dev: false - /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): /@algolia/autocomplete-core@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): resolution: {integrity: sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==} dependencies: '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) - '@algolia/autocomplete-plugin-algolia-insights': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) transitivePeerDependencies: - '@algolia/client-search' - algoliasearch - search-insights dev: false - /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): /@algolia/autocomplete-plugin-algolia-insights@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0): resolution: {integrity: sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==} peerDependencies: @@ -574,35 +563,28 @@ packages: dependencies: '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) search-insights: 2.13.0 - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) - search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch dev: false - /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): /@algolia/autocomplete-preset-algolia@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): resolution: {integrity: sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) - '@algolia/client-search': 4.22.0 '@algolia/autocomplete-shared': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) '@algolia/client-search': 4.22.0 algoliasearch: 4.20.0 dev: false - /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): /@algolia/autocomplete-shared@1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0): resolution: {integrity: sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==} peerDependencies: '@algolia/client-search': '>= 4.9.1 < 6' algoliasearch: '>= 4.9.1 < 6' dependencies: - '@algolia/client-search': 4.22.0 '@algolia/client-search': 4.22.0 algoliasearch: 4.20.0 dev: false @@ -621,10 +603,6 @@ packages: resolution: {integrity: sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==} dev: false - /@algolia/cache-common@4.22.0: - resolution: {integrity: sha512-TPwUMlIGPN16eW67qamNQUmxNiGHg/WBqWcrOoCddhqNTqGDPVqmgfaM85LPbt24t3r1z0zEz/tdsmuq3Q6oaA==} - dev: false - /@algolia/cache-in-memory@4.20.0: resolution: {integrity: sha512-Wm9ak/IaacAZXS4mB3+qF/KCoVSBV6aLgIGFEtQtJwjv64g4ePMapORGmCyulCFwfePaRAtcaTbMcJF+voc/bg==} dependencies: @@ -662,13 +640,6 @@ packages: '@algolia/transporter': 4.22.0 dev: false - /@algolia/client-common@4.22.0: - resolution: {integrity: sha512-BlbkF4qXVWuwTmYxVWvqtatCR3lzXwxx628p1wj1Q7QP2+LsTmGt1DiUYRuy9jG7iMsnlExby6kRMOOlbhv2Ag==} - dependencies: - '@algolia/requester-common': 4.22.0 - '@algolia/transporter': 4.22.0 - dev: false - /@algolia/client-personalization@4.20.0: resolution: {integrity: sha512-N9+zx0tWOQsLc3K4PVRDV8GUeOLAY0i445En79Pr3zWB+m67V+n/8w4Kw1C5LlbHDDJcyhMMIlqezh6BEk7xAQ==} dependencies: @@ -693,14 +664,6 @@ packages: '@algolia/transporter': 4.22.0 dev: false - /@algolia/client-search@4.22.0: - resolution: {integrity: sha512-bn4qQiIdRPBGCwsNuuqB8rdHhGKKWIij9OqidM1UkQxnSG8yzxHdb7CujM30pvp5EnV7jTqDZRbxacbjYVW20Q==} - dependencies: - '@algolia/client-common': 4.22.0 - '@algolia/requester-common': 4.22.0 - '@algolia/transporter': 4.22.0 - dev: false - /@algolia/events@4.0.1: resolution: {integrity: sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ==} dev: false @@ -713,10 +676,6 @@ packages: resolution: {integrity: sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==} dev: false - /@algolia/logger-common@4.22.0: - resolution: {integrity: sha512-HMUQTID0ucxNCXs5d1eBJ5q/HuKg8rFVE/vOiLaM4Abfeq1YnTtGV3+rFEhOPWhRQxNDd+YHa4q864IMc0zHpQ==} - dev: false - /@algolia/logger-console@4.20.0: resolution: {integrity: sha512-THlIGG1g/FS63z0StQqDhT6bprUczBI8wnLT3JWvfAQDZX5P6fCg7dG+pIrUBpDIHGszgkqYEqECaKKsdNKOUA==} dependencies: @@ -737,10 +696,6 @@ packages: resolution: {integrity: sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==} dev: false - /@algolia/requester-common@4.22.0: - resolution: {integrity: sha512-Y9cEH/cKjIIZgzvI1aI0ARdtR/xRrOR13g5psCxkdhpgRN0Vcorx+zePhmAa4jdQNqexpxtkUdcKYugBzMZJgQ==} - dev: false - /@algolia/requester-node-http@4.20.0: resolution: {integrity: sha512-ocJ66L60ABSSTRFnCHIEZpNHv6qTxsBwJEPfYaSBsLQodm0F9ptvalFkHMpvj5DfE22oZrcrLbOYM2bdPJRHng==} dependencies: @@ -763,14 +718,6 @@ packages: '@algolia/requester-common': 4.22.0 dev: false - /@algolia/transporter@4.22.0: - resolution: {integrity: sha512-ieO1k8x2o77GNvOoC+vAkFKppydQSVfbjM3YrSjLmgywiBejPTvU1R1nEvG59JIIUvtSLrZsLGPkd6vL14zopA==} - dependencies: - '@algolia/cache-common': 4.22.0 - '@algolia/logger-common': 4.22.0 - '@algolia/requester-common': 4.22.0 - dev: false - /@ampproject/remapping@2.2.1: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} @@ -806,11 +753,6 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/compat-data@7.23.5: - resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/core@7.23.3: resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} engines: {node: '>=6.9.0'} @@ -878,29 +820,6 @@ packages: - supports-color dev: true - /@babel/core@7.23.6: - resolution: {integrity: sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.23.5 - '@babel/generator': 7.23.6 - '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6) - '@babel/helpers': 7.23.6 - '@babel/parser': 7.23.6 - '@babel/template': 7.22.15 - '@babel/traverse': 7.23.6 - '@babel/types': 7.23.6 - convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/eslint-parser@7.21.8(@babel/core@7.23.3)(eslint@8.48.0): resolution: {integrity: sha512-HLhI+2q+BP3sf78mFUZNCGc10KEmoUqtUT1OCdMZsN+qr4qFeLUod62/zAnF3jNQstwyasDkZnVXwfK2Bml7MQ==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} @@ -953,16 +872,6 @@ packages: jsesc: 2.5.2 dev: true - /@babel/generator@7.23.6: - resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.23.6 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 - jsesc: 2.5.2 - dev: true - /@babel/helper-annotate-as-pure@7.22.5: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} @@ -1004,17 +913,6 @@ packages: semver: 6.3.1 dev: true - /@babel/helper-compilation-targets@7.23.6: - resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.23.5 - '@babel/helper-validator-option': 7.23.5 - browserslist: 4.22.2 - lru-cache: 5.1.1 - semver: 6.3.1 - dev: true - /@babel/helper-create-class-features-plugin@7.22.1(@babel/core@7.23.3): resolution: {integrity: sha512-SowrZ9BWzYFgzUMwUmowbPSGu6CXL5MSuuCkG3bejahSpSymioPmuLdhPxNOc9MjuNGjy7M/HaXvJ8G82Lywlw==} engines: {node: '>=6.9.0'} @@ -1224,20 +1122,6 @@ packages: '@babel/helper-validator-identifier': 7.22.20 dev: true - /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.6): - resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.23.6 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.22.15 - '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 - dev: true - /@babel/helper-optimise-call-expression@7.18.6: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} @@ -1360,11 +1244,6 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option@7.23.5: - resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} - engines: {node: '>=6.9.0'} - dev: true - /@babel/helper-wrap-function@7.20.5: resolution: {integrity: sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==} engines: {node: '>=6.9.0'} @@ -1417,17 +1296,6 @@ packages: - supports-color dev: true - /@babel/helpers@7.23.6: - resolution: {integrity: sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.22.15 - '@babel/traverse': 7.23.6 - '@babel/types': 7.23.6 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/highlight@7.22.13: resolution: {integrity: sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==} engines: {node: '>=6.9.0'} @@ -1474,14 +1342,6 @@ packages: '@babel/types': 7.23.6 dev: true - /@babel/parser@7.23.6: - resolution: {integrity: sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.23.6 - dev: true - /@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.18.6(@babel/core@7.23.3): resolution: {integrity: sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==} engines: {node: '>=6.9.0'} @@ -3698,24 +3558,6 @@ packages: - supports-color dev: true - /@babel/traverse@7.23.6: - resolution: {integrity: sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.23.5 - '@babel/generator': 7.23.6 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.23.6 - '@babel/types': 7.23.6 - debug: 4.3.4(supports-color@8.1.1) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: true - /@babel/types@7.22.15: resolution: {integrity: sha512-X+NLXr0N8XXmN5ZsaQdm9U2SSC3UbIYq/doL++sueHOTisgZHoKaQtZxGuV2cUPQHMfjKEfg/g6oy7Hm6SKFtA==} engines: {node: '>=6.9.0'} @@ -3749,21 +3591,10 @@ packages: to-fast-properties: 2.0.0 dev: true - /@babel/types@7.23.6: - resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.23.4 - '@babel/helper-validator-identifier': 7.22.20 - to-fast-properties: 2.0.0 - dev: true - /@bcoe/v8-coverage@0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@bnb-chain/greenfield-cosmos-types@0.4.0-alpha.30: - resolution: {integrity: sha512-nYThWPZHfq/bDMEu+Sw9cMMqgTk4NEg+PH9GkvN2OMgpo8QuCDy3Eh4C1g6lJy0BFv+ilethoPmKjSeEwa1m8g==} /@bnb-chain/greenfield-cosmos-types@0.4.0-alpha.30: resolution: {integrity: sha512-nYThWPZHfq/bDMEu+Sw9cMMqgTk4NEg+PH9GkvN2OMgpo8QuCDy3Eh4C1g6lJy0BFv+ilethoPmKjSeEwa1m8g==} dependencies: @@ -4381,7 +4212,6 @@ packages: resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} dev: false - /@docsearch/react@3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): /@docsearch/react@3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0): resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} peerDependencies: @@ -4399,8 +4229,6 @@ packages: search-insights: optional: true dependencies: - '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) - '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0)(search-insights@2.13.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.0)(algoliasearch@4.20.0) '@docsearch/css': 3.5.2 @@ -4409,7 +4237,6 @@ packages: react: 18.2.0 react-dom: 18.2.0(react@18.2.0) search-insights: 2.13.0 - search-insights: 2.13.0 transitivePeerDependencies: - '@algolia/client-search' dev: false @@ -4960,7 +4787,6 @@ packages: - webpack-cli dev: false - /@docusaurus/preset-classic@3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): /@docusaurus/preset-classic@3.0.1(@algolia/client-search@4.22.0)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): resolution: {integrity: sha512-il9m9xZKKjoXn6h0cRcdnt6wce0Pv1y5t4xk2Wx7zBGhKG1idu4IFHtikHlD0QPuZ9fizpXspXcTzjL5FXc1Gw==} engines: {node: '>=18.0'} @@ -4980,7 +4806,6 @@ packages: '@docusaurus/theme-classic': 3.0.1(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5) '@docusaurus/theme-common': 3.0.1(@docusaurus/types@3.0.1)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5) '@docusaurus/theme-search-algolia': 3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) - '@docusaurus/theme-search-algolia': 3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5) '@docusaurus/types': 3.0.1(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -5126,7 +4951,6 @@ packages: - webpack-cli dev: false - /@docusaurus/theme-search-algolia@3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): /@docusaurus/theme-search-algolia@3.0.1(@algolia/client-search@4.22.0)(@docusaurus/types@3.0.1)(@types/react@18.2.21)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@4.9.5): resolution: {integrity: sha512-DDiPc0/xmKSEdwFkXNf1/vH1SzJPzuJBar8kMcBbDAZk/SAmo/4lf6GU2drou4Ae60lN2waix+jYWTWcJRahSA==} engines: {node: '>=18.0'} @@ -5134,7 +4958,6 @@ packages: react: ^18.0.0 react-dom: ^18.0.0 dependencies: - '@docsearch/react': 3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) '@docsearch/react': 3.5.2(@algolia/client-search@4.22.0)(@types/react@18.2.21)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0) '@docusaurus/core': 3.0.1(@docusaurus/types@3.0.1)(eslint@8.48.0)(react-dom@18.2.0)(react@18.2.0)(typescript@4.9.5) '@docusaurus/logger': 3.0.1 @@ -6036,7 +5859,6 @@ packages: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 '@types/node': 20.10.5 - '@types/node': 20.10.5 '@types/yargs': 17.0.31 chalk: 4.1.2 @@ -7460,14 +7282,12 @@ packages: dependencies: '@types/connect': 3.4.38 '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/bonjour@3.5.11: resolution: {integrity: sha512-isGhjmBtLIxdHBDl2xGwUzEM8AOyOvWsADWq7rqirdi/ZQoHnLWErHvsThcEzTX8juDRiZtzp2Qkv5bgNh6mAg==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/chai@4.3.5: @@ -7479,14 +7299,12 @@ packages: dependencies: '@types/express-serve-static-core': 4.17.36 '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/cross-spawn@6.0.3: @@ -7547,7 +7365,6 @@ packages: /@types/express-serve-static-core@4.17.36: resolution: {integrity: sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==} dependencies: - '@types/node': 20.10.5 '@types/node': 20.10.5 '@types/qs': 6.9.8 '@types/range-parser': 1.2.4 @@ -7575,7 +7392,6 @@ packages: dependencies: '@types/minimatch': 5.1.2 '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: true /@types/graceful-fs@4.1.6: @@ -7613,7 +7429,6 @@ packages: resolution: {integrity: sha512-kQtujO08dVtQ2wXAuSFfk9ASy3sug4+ogFR8Kd8UgP8PEuc1/G/8yjYRmp//PcDNJEUKOza/MrQu15bouEUCiw==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/is-ci@3.0.0: @@ -7677,7 +7492,6 @@ packages: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/lodash.clonedeep@4.5.7: @@ -7759,7 +7573,6 @@ packages: resolution: {integrity: sha512-0yQLzYhCqGz7CQPE3iDmYjhb7KMBFOP+tBkyw+/Y2YyDI5wpS7itXXxneN1zSsUwWx3Ji6YiVYrhAnpQGS/vkw==} dependencies: '@types/node': 20.6.0 - '@types/node': 20.6.0 dev: false /@types/node@12.20.55: @@ -7777,11 +7590,6 @@ packages: dependencies: undici-types: 5.26.5 - /@types/node@20.10.5: - resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==} - dependencies: - undici-types: 5.26.5 - /@types/node@20.6.0: resolution: {integrity: sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==} dev: false @@ -7892,7 +7700,6 @@ packages: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/retry@0.12.0: @@ -7903,7 +7710,6 @@ packages: resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} dependencies: '@types/node': 17.0.45 - '@types/node': 17.0.45 dev: false /@types/scheduler@0.16.3: @@ -7935,7 +7741,6 @@ packages: dependencies: '@types/mime': 1.3.2 '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/serve-index@1.9.1: @@ -7950,14 +7755,12 @@ packages: '@types/http-errors': 2.0.2 '@types/mime': 3.0.1 '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/sockjs@0.3.33: resolution: {integrity: sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/stack-utils@2.0.1: @@ -7994,7 +7797,6 @@ packages: resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} dependencies: '@types/node': 20.10.5 - '@types/node': 20.10.5 dev: false /@types/xml2js@0.4.11: @@ -10161,17 +9963,6 @@ packages: update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true - /browserslist@4.22.2: - resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001571 - electron-to-chromium: 1.4.616 - node-releases: 2.0.14 - update-browserslist-db: 1.0.13(browserslist@4.22.2) - dev: true - /bs-logger@0.2.6: resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} engines: {node: '>= 6'} @@ -10374,10 +10165,6 @@ packages: resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} dev: true - /caniuse-lite@1.0.30001571: - resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} - dev: true - /case@1.6.3: resolution: {integrity: sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ==} engines: {node: '>= 0.8.0'} @@ -11934,10 +11721,6 @@ packages: resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} dev: true - /electron-to-chromium@1.4.616: - resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} - dev: true - /elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} dependencies: @@ -12689,7 +12472,6 @@ packages: resolution: {integrity: sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw==} engines: {node: '>= 0.8'} dependencies: - '@types/node': 20.10.5 '@types/node': 20.10.5 require-like: 0.1.2 dev: false @@ -15067,7 +14849,6 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/node': 20.10.5 - '@types/node': 20.10.5 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -15103,7 +14884,6 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.10.5 '@types/node': 20.10.5 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -15122,7 +14902,6 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.10.5 '@types/node': 20.10.5 jest-util: 29.7.0 merge-stream: 2.0.0 @@ -16816,10 +16595,6 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true - /node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} - dev: true - /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -19041,8 +18816,6 @@ packages: resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} dev: false - /search-insights@2.13.0: - resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} /search-insights@2.13.0: resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} dev: false @@ -20152,7 +19925,6 @@ packages: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} dev: false - /ts-jest@29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5): /ts-jest@29.1.0(@babel/core@7.23.6)(jest@29.5.0)(typescript@4.9.5): resolution: {integrity: sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -20174,7 +19946,6 @@ packages: esbuild: optional: true dependencies: - '@babel/core': 7.23.6 '@babel/core': 7.23.6 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 @@ -20405,9 +20176,6 @@ packages: /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} - /unenv@1.8.0: resolution: {integrity: sha512-uIGbdCWZfhRRmyKj1UioCepQ0jpq638j/Cf0xFTn4zD1nGJ2lSdzYHLzfdXN791oo/0juUiSWW1fBklXMTsuqg==} dependencies: @@ -20623,17 +20391,6 @@ packages: picocolors: 1.0.0 dev: true - /update-browserslist-db@1.0.13(browserslist@4.22.2): - resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.22.2 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - /update-notifier@6.0.2: resolution: {integrity: sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==} engines: {node: '>=14.16'} From 927556e9843e49a4e40ebe0a1d0a3948ac892b97 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:08:42 +0800 Subject: [PATCH 04/10] docs: Update baseUrl (#483) --- doc-site/docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc-site/docusaurus.config.js b/doc-site/docusaurus.config.js index cd265e5a..d0d627b9 100644 --- a/doc-site/docusaurus.config.js +++ b/doc-site/docusaurus.config.js @@ -14,7 +14,7 @@ const config = { staticDirectories: ['static'], // Set the production url of your site here - url: 'https://greenfield-js-sdk.netlify.app', + url: 'https://docs.bnbchain.org', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/greenfield-js-sdk/', From ec70921011c5b08ea97fb7bd8712de6aa00431a0 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Tue, 20 Feb 2024 15:59:35 +0800 Subject: [PATCH 05/10] feat: Verfify params (#485) --- .changeset/little-jobs-sort.md | 5 + packages/js-sdk/src/api/bucket.ts | 38 ++--- packages/js-sdk/src/api/objects.ts | 133 ++++++++---------- packages/js-sdk/src/api/payment.ts | 2 + .../src/clients/spclient/spApis/getObject.ts | 2 +- .../clients/spclient/spApis/getObjectMeta.ts | 2 +- .../src/clients/spclient/spApis/putObject.ts | 2 +- .../spclient/spApis/queryBucketReadQuota.ts | 2 +- packages/js-sdk/src/clients/txClient.ts | 3 + packages/js-sdk/src/utils/asserts/index.ts | 2 + packages/js-sdk/src/utils/asserts/params.ts | 23 +++ packages/js-sdk/src/utils/{ => asserts}/s3.ts | 26 ++-- packages/js-sdk/src/utils/index.ts | 4 +- 13 files changed, 128 insertions(+), 116 deletions(-) create mode 100644 .changeset/little-jobs-sort.md create mode 100644 packages/js-sdk/src/utils/asserts/index.ts create mode 100644 packages/js-sdk/src/utils/asserts/params.ts rename packages/js-sdk/src/utils/{ => asserts}/s3.ts (89%) diff --git a/.changeset/little-jobs-sort.md b/.changeset/little-jobs-sort.md new file mode 100644 index 00000000..eb738b33 --- /dev/null +++ b/.changeset/little-jobs-sort.md @@ -0,0 +1,5 @@ +--- +'@bnb-chain/greenfield-js-sdk': patch +--- + +feat: Verify and Assert params diff --git a/packages/js-sdk/src/api/bucket.ts b/packages/js-sdk/src/api/bucket.ts index 71c23769..43f3094b 100644 --- a/packages/js-sdk/src/api/bucket.ts +++ b/packages/js-sdk/src/api/bucket.ts @@ -1,3 +1,4 @@ +import { assertAuthType, assertStringRequire } from '@/utils/asserts/params'; import { UInt64Value } from '@bnb-chain/greenfield-cosmos-types/greenfield/common/wrapper'; import { ActionType, @@ -92,8 +93,8 @@ import type { ReadQuotaRequest, SpResponse, } from '../types/sp'; +import { isValidAddress, verifyBucketName, verifyUrl } from '../utils/asserts/s3'; import { decodeObjectFromHexString } from '../utils/encoding'; -import { isValidAddress, isValidBucketName, isValidUrl } from '../utils/s3'; import { Sp } from './sp'; import { Storage } from './storage'; @@ -216,15 +217,10 @@ export class Bucket implements IBucket { } = params; try { - if (!spInfo.primarySpAddress) { - throw new Error('Primary sp address is missing'); - } - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!creator) { - throw new Error('Empty creator address'); - } + assertAuthType(authType); + assertStringRequire(spInfo.primarySpAddress, 'Primary sp address is missing'); + assertStringRequire(creator, 'Empty creator address'); + verifyBucketName(bucketName); const endpoint = await this.sp.getSPUrlByPrimaryAddr(spInfo.primarySpAddress); @@ -288,6 +284,7 @@ export class Bucket implements IBucket { } public async createBucket(params: CreateBucketApprovalRequest, authType: AuthType) { + assertAuthType(authType); const { body } = await this.getCreateBucketApproval(params, authType); if (!body) { @@ -365,7 +362,7 @@ export class Bucket implements IBucket { if (!isValidAddress(address)) { throw new Error('Error address'); } - if (!isValidUrl(endpoint)) { + if (!verifyUrl(endpoint)) { throw new Error('Invalid endpoint'); } const { url } = getUserBucketMetaInfo(endpoint); @@ -417,9 +414,10 @@ export class Bucket implements IBucket { ): Promise> { try { const { bucketName, duration = 30000 } = params; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } + + verifyBucketName(bucketName); + assertAuthType(authType); + let endpoint = params.endpoint; if (!endpoint) { endpoint = await this.sp.getSPUrlByBucket(bucketName); @@ -528,6 +526,7 @@ export class Bucket implements IBucket { } public async getMigrateBucketApproval(params: MigrateBucketApprovalRequest, authType: AuthType) { + assertAuthType(authType); const { bucketName, operator, dstPrimarySpId } = params; try { @@ -579,8 +578,9 @@ export class Bucket implements IBucket { } public async migrateBucket(params: MigrateBucketApprovalRequest, authType: AuthType) { - const { signedMsg } = await this.getMigrateBucketApproval(params, authType); + assertAuthType(authType); + const { signedMsg } = await this.getMigrateBucketApproval(params, authType); if (!signedMsg) { throw new Error('Get migrate bucket approval error'); } @@ -621,9 +621,7 @@ export class Bucket implements IBucket { public async getBucketMeta(params: GetBucketMetaRequest) { const { bucketName } = params; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } + verifyBucketName(bucketName); let endpoint = params.endpoint; if (!endpoint) { @@ -649,12 +647,14 @@ export class Bucket implements IBucket { public async listBucketReadRecords(params: ListBucketReadRecordRequest, authType: AuthType) { try { + assertAuthType(authType); + const { bucketName } = params; let endpoint = params.endpoint; if (!endpoint) { endpoint = await this.sp.getSPUrlByBucket(bucketName); } - if (!isValidUrl(endpoint)) { + if (!verifyUrl(endpoint)) { throw new Error('Invalid endpoint'); } diff --git a/packages/js-sdk/src/api/objects.ts b/packages/js-sdk/src/api/objects.ts index 316f47ae..04b5fcf8 100644 --- a/packages/js-sdk/src/api/objects.ts +++ b/packages/js-sdk/src/api/objects.ts @@ -1,32 +1,4 @@ -import { encodePath, getMsgToSign, getSortQuery, secpSign } from '../clients/spclient/auth'; -import { getApprovalMetaInfo } from '../clients/spclient/spApis/approval'; -import { getGetObjectMetaInfo } from '../clients/spclient/spApis/getObject'; -import { - getObjectMetaInfo, - parseGetObjectMetaResponse, -} from '../clients/spclient/spApis/getObjectMeta'; -import { - getListObjectPoliciesMetaInfo, - parseGetListObjectPoliciesResponse, -} from '../clients/spclient/spApis/listObjectPolicies'; -import { parseListObjectsByBucketNameResponse } from '../clients/spclient/spApis/listObjectsByBucket'; -import { - getListObjectsByIDsMetaInfo, - parseListObjectsByIdsResponse, -} from '../clients/spclient/spApis/listObjectsByIds'; -import { parseError } from '../clients/spclient/spApis/parseError'; -import { getPutObjectMetaInfo } from '../clients/spclient/spApis/putObject'; -import { TxClient } from '../clients/txClient'; -import { METHOD_GET, NORMAL_ERROR_CODE } from '../constants/http'; -import { MsgCancelCreateObjectSDKTypeEIP712 } from '../messages/greenfield/storage/MsgCancelCreateObject'; -import { MsgCreateObjectSDKTypeEIP712 } from '../messages/greenfield/storage/MsgCreateObject'; -import { MsgDeleteObjectSDKTypeEIP712 } from '../messages/greenfield/storage/MsgDeleteObject'; -import { MsgUpdateObjectInfoSDKTypeEIP712 } from '../messages/greenfield/storage/MsgUpdateObjectInfo'; -import { signSignatureByEddsa } from '../offchainauth'; -import { GetObjectRequest } from '../types/sp/GetObject'; -import { GetObjectMetaRequest, GetObjectMetaResponse } from '../types/sp/GetObjectMeta'; -import { ListObjectsByBucketNameResponse } from '../types/sp/ListObjectsByBucketName'; -import { PutObjectRequest } from '../types/sp/PutObject'; +import { assertAuthType, assertStringRequire } from '@/utils/asserts/params'; import { ActionType, Principal, @@ -66,7 +38,32 @@ import { newObjectGRN, } from '..'; import { RpcQueryClient } from '../clients/queryclient'; +import { encodePath, getMsgToSign, getSortQuery, secpSign } from '../clients/spclient/auth'; +import { getApprovalMetaInfo } from '../clients/spclient/spApis/approval'; +import { getGetObjectMetaInfo } from '../clients/spclient/spApis/getObject'; +import { + getObjectMetaInfo, + parseGetObjectMetaResponse, +} from '../clients/spclient/spApis/getObjectMeta'; +import { + getListObjectPoliciesMetaInfo, + parseGetListObjectPoliciesResponse, +} from '../clients/spclient/spApis/listObjectPolicies'; +import { parseListObjectsByBucketNameResponse } from '../clients/spclient/spApis/listObjectsByBucket'; +import { + getListObjectsByIDsMetaInfo, + parseListObjectsByIdsResponse, +} from '../clients/spclient/spApis/listObjectsByIds'; +import { parseError } from '../clients/spclient/spApis/parseError'; +import { getPutObjectMetaInfo } from '../clients/spclient/spApis/putObject'; import { SpClient } from '../clients/spclient/spClient'; +import { TxClient } from '../clients/txClient'; +import { METHOD_GET, NORMAL_ERROR_CODE } from '../constants/http'; +import { MsgCancelCreateObjectSDKTypeEIP712 } from '../messages/greenfield/storage/MsgCancelCreateObject'; +import { MsgCreateObjectSDKTypeEIP712 } from '../messages/greenfield/storage/MsgCreateObject'; +import { MsgDeleteObjectSDKTypeEIP712 } from '../messages/greenfield/storage/MsgDeleteObject'; +import { MsgUpdateObjectInfoSDKTypeEIP712 } from '../messages/greenfield/storage/MsgUpdateObjectInfo'; +import { signSignatureByEddsa } from '../offchainauth'; import { AuthType, CreateObjectApprovalRequest, @@ -81,12 +78,16 @@ import { SpResponse, TxResponse, } from '../types'; +import { GetObjectRequest } from '../types/sp/GetObject'; +import { GetObjectMetaRequest, GetObjectMetaResponse } from '../types/sp/GetObjectMeta'; +import { ListObjectsByBucketNameResponse } from '../types/sp/ListObjectsByBucketName'; +import { PutObjectRequest } from '../types/sp/PutObject'; import { generateUrlByBucketName, - isValidBucketName, - isValidObjectName, - isValidUrl, -} from '../utils/s3'; + verifyBucketName, + verifyObjectName, + verifyUrl, +} from '../utils/asserts/s3'; import { Sp } from './sp'; import { Storage } from './storage'; @@ -201,15 +202,10 @@ export class Objects implements IObject { } = params; try { - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!isValidObjectName(objectName)) { - throw new Error('Error object name'); - } - if (!creator) { - throw new Error('empty creator address'); - } + assertAuthType(authType); + verifyBucketName(bucketName); + verifyObjectName(objectName); + assertStringRequire(creator, 'empty creator address'); let endpoint = params.endpoint; if (!endpoint) { @@ -288,6 +284,8 @@ export class Objects implements IObject { } public async createObject(getApprovalParams: CreateObjectApprovalRequest, authType: AuthType) { + assertAuthType(authType); + const { signedMsg } = await this.getCreateObjectApproval(getApprovalParams, authType); if (!signedMsg) { throw new Error('Get create object approval error'); @@ -316,16 +314,11 @@ export class Objects implements IObject { params: PutObjectRequest, authType: AuthType, ): Promise> { + assertAuthType(authType); const { bucketName, objectName, txnHash, body, duration = 30000 } = params; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!isValidObjectName(objectName)) { - throw new Error('Error object name'); - } - if (!txnHash) { - throw new Error('Transaction hash is empty, please check.'); - } + verifyBucketName(bucketName); + verifyObjectName(objectName); + assertStringRequire(txnHash, 'Transaction hash is empty, please check.'); let endpoint = params.endpoint; if (!endpoint) { @@ -415,13 +408,11 @@ export class Objects implements IObject { public async getObject(params: GetObjectRequest, authType: AuthType) { try { + assertAuthType(authType); const { bucketName, objectName, duration = 30000 } = params; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!isValidObjectName(objectName)) { - throw new Error('Error object name'); - } + verifyBucketName(bucketName); + verifyObjectName(objectName); + let endpoint = params.endpoint; if (!endpoint) { endpoint = await this.sp.getSPUrlByBucket(bucketName); @@ -471,13 +462,10 @@ export class Objects implements IObject { } public async getObjectPreviewUrl(params: GetPrivewObject, authType: AuthType) { + assertAuthType(authType); const { bucketName, objectName, queryMap } = params; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!isValidObjectName(objectName)) { - throw new Error('Error object name'); - } + verifyBucketName(bucketName); + verifyObjectName(objectName); let endpoint = params.endpoint; if (!endpoint) { endpoint = await this.sp.getSPUrlByBucket(bucketName); @@ -539,12 +527,10 @@ export class Objects implements IObject { public async listObjects(configParam: ListObjectsByBucketNameRequest) { try { const { bucketName, endpoint, duration = 30000, query = new URLSearchParams() } = configParam; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!isValidUrl(endpoint)) { - throw new Error('Invalid endpoint'); - } + + verifyBucketName(bucketName); + verifyUrl(endpoint); + const url = `${generateUrlByBucketName(endpoint, bucketName)}?${query?.toString()}`; const headers = new Headers(); @@ -592,6 +578,7 @@ export class Objects implements IObject { >, authType: AuthType, ) { + assertAuthType(authType); if (!getApprovalParams.objectName.endsWith('/')) { throw new Error( 'failed to create folder. Folder names must end with a forward slash (/) character', @@ -691,12 +678,8 @@ export class Objects implements IObject { public async getObjectMeta(params: GetObjectMetaRequest) { const { bucketName, objectName, endpoint } = params; - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } - if (!isValidObjectName(objectName)) { - throw new Error('Error object name'); - } + verifyBucketName(bucketName); + verifyObjectName(objectName); const { url } = getObjectMetaInfo(endpoint, params); diff --git a/packages/js-sdk/src/api/payment.ts b/packages/js-sdk/src/api/payment.ts index 77e062c5..d2e6a854 100644 --- a/packages/js-sdk/src/api/payment.ts +++ b/packages/js-sdk/src/api/payment.ts @@ -1,3 +1,4 @@ +import { assertAuthType } from '@/utils/asserts/params'; import { QueryAutoSettleRecordsRequest, QueryAutoSettleRecordsResponse, @@ -226,6 +227,7 @@ export class Payment implements IPayment { config?: SpConfig, ) { try { + assertAuthType(authType); let endpoint = ''; if (config && config.endpoint) { endpoint = config.endpoint; diff --git a/packages/js-sdk/src/clients/spclient/spApis/getObject.ts b/packages/js-sdk/src/clients/spclient/spApis/getObject.ts index 5c3a4785..fc5efcea 100644 --- a/packages/js-sdk/src/clients/spclient/spApis/getObject.ts +++ b/packages/js-sdk/src/clients/spclient/spApis/getObject.ts @@ -1,6 +1,6 @@ import { EMPTY_STRING_SHA256, METHOD_GET } from '@/constants'; import { ReqMeta } from '@/types'; -import { generateUrlByBucketName } from '@/utils/s3'; +import { generateUrlByBucketName } from '@/utils/asserts/s3'; import { encodePath } from '../auth'; // https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/get_object diff --git a/packages/js-sdk/src/clients/spclient/spApis/getObjectMeta.ts b/packages/js-sdk/src/clients/spclient/spApis/getObjectMeta.ts index ec8dfca6..0b348a35 100644 --- a/packages/js-sdk/src/clients/spclient/spApis/getObjectMeta.ts +++ b/packages/js-sdk/src/clients/spclient/spApis/getObjectMeta.ts @@ -1,6 +1,6 @@ import { convertStrToBool, formatObjectInfo } from '@/types/sp/Common'; import { GetObjectMetaRequest, GetObjectMetaResponse } from '@/types/sp/GetObjectMeta'; -import { generateUrlByBucketName } from '@/utils/s3'; +import { generateUrlByBucketName } from '@/utils/asserts/s3'; import { XMLParser } from 'fast-xml-parser'; import { encodePath, getSortQueryParams } from '../auth'; import type { SPMetaInfo } from './metaInfos'; diff --git a/packages/js-sdk/src/clients/spclient/spApis/putObject.ts b/packages/js-sdk/src/clients/spclient/spApis/putObject.ts index d9551207..bd79c972 100644 --- a/packages/js-sdk/src/clients/spclient/spApis/putObject.ts +++ b/packages/js-sdk/src/clients/spclient/spApis/putObject.ts @@ -1,6 +1,6 @@ import { EMPTY_STRING_SHA256, METHOD_PUT } from '@/constants'; import { ReqMeta } from '@/types'; -import { generateUrlByBucketName } from '@/utils/s3'; +import { generateUrlByBucketName } from '@/utils/asserts/s3'; import { encodePath } from '../auth'; // https://docs.bnbchain.org/greenfield-docs/docs/api/storage-provider-rest/put_object diff --git a/packages/js-sdk/src/clients/spclient/spApis/queryBucketReadQuota.ts b/packages/js-sdk/src/clients/spclient/spApis/queryBucketReadQuota.ts index 048ece2c..045d96d8 100644 --- a/packages/js-sdk/src/clients/spclient/spApis/queryBucketReadQuota.ts +++ b/packages/js-sdk/src/clients/spclient/spApis/queryBucketReadQuota.ts @@ -1,7 +1,7 @@ import { EMPTY_STRING_SHA256, METHOD_GET } from '@/constants'; import { ReqMeta, ReadQuotaRequest } from '@/types'; import { ReadQuotaResponse } from '@/types/sp'; -import { generateUrlByBucketName } from '@/utils/s3'; +import { generateUrlByBucketName } from '@/utils/asserts/s3'; import { XMLParser } from 'fast-xml-parser'; import { getSortQuery } from '../auth'; diff --git a/packages/js-sdk/src/clients/txClient.ts b/packages/js-sdk/src/clients/txClient.ts index 9edba598..cf39972f 100644 --- a/packages/js-sdk/src/clients/txClient.ts +++ b/packages/js-sdk/src/clients/txClient.ts @@ -21,6 +21,7 @@ import { arrayify, hexlify } from '@ethersproject/bytes'; import { signTypedData, SignTypedDataVersion } from '@metamask/eth-sig-util'; import { container, inject, injectable } from 'tsyringe'; import { + assertPrivateKey, BroadcastOptions, CustomTx, ISimulateGasFee, @@ -228,6 +229,8 @@ export class TxClient implements ITxClient { eip712: ReturnType, privateKey: SignOptions['privateKey'], ) { + assertPrivateKey(privateKey); + const pubKey = getPubKeyByPriKey(privateKey); const signature = signTypedData({ // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/packages/js-sdk/src/utils/asserts/index.ts b/packages/js-sdk/src/utils/asserts/index.ts new file mode 100644 index 00000000..a7228192 --- /dev/null +++ b/packages/js-sdk/src/utils/asserts/index.ts @@ -0,0 +1,2 @@ +export * from './params'; +export * from './s3'; diff --git a/packages/js-sdk/src/utils/asserts/params.ts b/packages/js-sdk/src/utils/asserts/params.ts new file mode 100644 index 00000000..cdae6b49 --- /dev/null +++ b/packages/js-sdk/src/utils/asserts/params.ts @@ -0,0 +1,23 @@ +import { AuthType } from '../..'; + +export const assertStringRequire = (s: string, errMsg: string) => { + if (!s) throw new Error(errMsg); +}; + +export const assertPrivateKey = (privateKey: string) => { + if (!privateKey.startsWith('0x')) throw new Error('private key should start with 0x'); +}; + +export const assertAuthType = (authType: AuthType) => { + if (!authType) throw new Error('authType is required'); + + if (authType.type === 'ECDSA') { + assertPrivateKey(authType.privateKey); + } + + if (authType.type === 'EDDSA') { + assertStringRequire(authType.address, 'address param is required'); + assertStringRequire(authType.seed, 'seed param is required'); + assertStringRequire(authType.domain, 'domain param is required'); + } +}; diff --git a/packages/js-sdk/src/utils/s3.ts b/packages/js-sdk/src/utils/asserts/s3.ts similarity index 89% rename from packages/js-sdk/src/utils/s3.ts rename to packages/js-sdk/src/utils/asserts/s3.ts index 3a464851..471b8e20 100644 --- a/packages/js-sdk/src/utils/s3.ts +++ b/packages/js-sdk/src/utils/asserts/s3.ts @@ -4,7 +4,7 @@ const dotdotComponent = '..'; const dotComponent = '.'; const slashSeparator = '/'; -const isValidBucketName = (bucketName?: string) => { +const verifyBucketName = (bucketName?: string) => { if (!bucketName) { throw new Error('Bucket name is empty, please check.'); } @@ -33,7 +33,6 @@ const isValidBucketName = (bucketName?: string) => { 'Bucket name %must start and end with a lowercase letter or number, please check.', ); } - return true; }; const hasBadPathComponent = (path: string): boolean => { @@ -57,7 +56,7 @@ const isUTF8 = (str: string): boolean => { } }; -const isValidObjectName = (objectName?: string) => { +const verifyObjectName = (objectName?: string) => { if (!objectName) { throw new Error('Object name is empty, please check.'); } @@ -73,8 +72,6 @@ const isValidObjectName = (objectName?: string) => { if (objectName.includes(`//`)) { throw new Error(`Object name that contains a "//" is not supported`); } - - return true; }; const isValidAddress = (address?: string) => { @@ -87,7 +84,7 @@ const isValidAddress = (address?: string) => { return true; }; -const isValidUrl = (url?: string) => { +const verifyUrl = (url?: string) => { if (!url || url.length === 0) return false; const pattern = new RegExp( '^(https?:\\/\\/)?' + // 协议 @@ -99,7 +96,8 @@ const isValidUrl = (url?: string) => { '(\\#[-a-zA-Z\\d_]*)?$', 'i', ); // 锚点 - return pattern.test(url); + + if (!pattern.test(url)) throw new Error('Invalid endpoint'); }; // remove specified from prefix and suffix of a string @@ -115,21 +113,17 @@ const trimString = (originString: string, deleteString: string) => { }; const generateUrlByBucketName = (endpoint = '', bucketName: string) => { - if (!isValidUrl(endpoint)) { - throw new Error('Invalid endpoint'); - } - if (!isValidBucketName(bucketName)) { - throw new Error('Error bucket name'); - } + verifyBucketName(bucketName); + verifyUrl(endpoint); const { protocol } = new URL(endpoint); return endpoint.replace(`${protocol}//`, `${protocol}//${bucketName}.`); }; export { - isValidBucketName, - isValidObjectName, + verifyBucketName, + verifyObjectName, isValidAddress, trimString, - isValidUrl, + verifyUrl, generateUrlByBucketName, }; diff --git a/packages/js-sdk/src/utils/index.ts b/packages/js-sdk/src/utils/index.ts index 6758d309..9abdfc6b 100644 --- a/packages/js-sdk/src/utils/index.ts +++ b/packages/js-sdk/src/utils/index.ts @@ -1,7 +1,7 @@ export * from './allowance'; +export * from './asserts'; export * from './encoding'; export * from './grn'; -export * from './s3'; +export * from './helpers'; export * from './time'; export * from './units'; -export * from './helpers'; From a467c26f6991a2f482c969235252f548c90c9827 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:48:37 +0800 Subject: [PATCH 06/10] Fix/cross fetch (#484) * fix: Cross Fetch * chore: Add changeset --- .changeset/bright-melons-think.md | 5 +++++ packages/js-sdk/src/clients/spclient/spClient.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/bright-melons-think.md diff --git a/.changeset/bright-melons-think.md b/.changeset/bright-melons-think.md new file mode 100644 index 00000000..107f4433 --- /dev/null +++ b/.changeset/bright-melons-think.md @@ -0,0 +1,5 @@ +--- +'@bnb-chain/greenfield-js-sdk': patch +--- + +fix: Using Cross Fetch replace native fetch (occurs on Nodejs 18-) diff --git a/packages/js-sdk/src/clients/spclient/spClient.ts b/packages/js-sdk/src/clients/spclient/spClient.ts index 9f748199..e6b3ecfd 100644 --- a/packages/js-sdk/src/clients/spclient/spClient.ts +++ b/packages/js-sdk/src/clients/spclient/spClient.ts @@ -8,6 +8,7 @@ import { import { parseError } from '@/clients/spclient/spApis/parseError'; import { SP_NOT_AVAILABLE_ERROR_CODE, SP_NOT_AVAILABLE_ERROR_MSG } from '@/constants/http'; import { AuthType, ReqMeta } from '@/types/auth'; +import { fetchWithTimeout } from '@/utils/http'; import { injectable } from 'tsyringe'; import { getGetObjectMetaInfo } from './spApis/getObject'; import { getPutObjectMetaInfo } from './spApis/putObject'; @@ -55,7 +56,7 @@ export class SpClient implements ISpClient { try { const controller = new AbortController(); const _id = setTimeout(() => controller.abort(), timeout); - const response = await fetch(url, { + const response = await fetchWithTimeout(url, { ...options, signal: controller.signal, }); From 8601ee692a85d44bb84cafcab98e90f1eea51af5 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:50:53 +0800 Subject: [PATCH 07/10] chore: TestCase Env Update (#475) --- .../src/components/feegrant/createObj.tsx | 20 +++++++++++++++++-- packages/js-sdk/tests/.env.simple | 4 ++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/examples/nextjs/src/components/feegrant/createObj.tsx b/examples/nextjs/src/components/feegrant/createObj.tsx index 42f84e2f..094d90a6 100644 --- a/examples/nextjs/src/components/feegrant/createObj.tsx +++ b/examples/nextjs/src/components/feegrant/createObj.tsx @@ -4,6 +4,7 @@ import { GRNToString, MsgCreateObjectTypeUrl, newBucketGRN, + newObjectGRN, PermissionTypes, toTimestamp, } from '@bnb-chain/greenfield-js-sdk'; @@ -146,13 +147,28 @@ export const CreateObj = () => { }, ); - const simulateInfo = await createObjectTx.simulate({ + const setTagTx = await client.storage.setTag({ + operator: granteeAddr, + resource: GRNToString(newObjectGRN(bucketName, objectName)), + tags: { + tags: [ + { + key: 'x', + value: 'xx', + }, + ], + }, + }); + + const multiTx = await client.txClient.multiTx([createObjectTx, setTagTx]); + + const simulateInfo = await multiTx.simulate({ denom: 'BNB', }); console.log('simulateInfo', simulateInfo); - const res = await createObjectTx.broadcast({ + const res = await multiTx.broadcast({ denom: 'BNB', gasLimit: Number(simulateInfo?.gasLimit), gasPrice: simulateInfo?.gasPrice || '5000000000', diff --git a/packages/js-sdk/tests/.env.simple b/packages/js-sdk/tests/.env.simple index 7af35f11..6dfbd432 100644 --- a/packages/js-sdk/tests/.env.simple +++ b/packages/js-sdk/tests/.env.simple @@ -1,4 +1,4 @@ ACCOUNT_ADDRESS='0x...' ACCOUNT_PRIVATEKEY='0x...' -NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-fullnode-tendermint-ap.bnbchain.org -NEXT_PUBLIC_GREEN_CHAIN_ID=5600 +GREENFIELD_URL=https://gnfd-testnet-fullnode-tendermint-ap.bnbchain.org +GREENFIELD_CHAIN_ID=5600 From 523f1a5dfb0b186745d0c7807bda6f72eaa6679d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:52:06 +0800 Subject: [PATCH 08/10] chore: [ci] release (#486) Co-authored-by: github-actions[bot] --- .changeset/bright-melons-think.md | 5 ----- .changeset/little-jobs-sort.md | 5 ----- examples/nextjs/CHANGELOG.md | 20 ++++++++++++++------ examples/nextjs/package.json | 2 +- packages/js-sdk/CHANGELOG.md | 13 +++++++++++++ packages/js-sdk/package.json | 2 +- 6 files changed, 29 insertions(+), 18 deletions(-) delete mode 100644 .changeset/bright-melons-think.md delete mode 100644 .changeset/little-jobs-sort.md diff --git a/.changeset/bright-melons-think.md b/.changeset/bright-melons-think.md deleted file mode 100644 index 107f4433..00000000 --- a/.changeset/bright-melons-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bnb-chain/greenfield-js-sdk': patch ---- - -fix: Using Cross Fetch replace native fetch (occurs on Nodejs 18-) diff --git a/.changeset/little-jobs-sort.md b/.changeset/little-jobs-sort.md deleted file mode 100644 index eb738b33..00000000 --- a/.changeset/little-jobs-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bnb-chain/greenfield-js-sdk': patch ---- - -feat: Verify and Assert params diff --git a/examples/nextjs/CHANGELOG.md b/examples/nextjs/CHANGELOG.md index 7b478585..c03d8225 100644 --- a/examples/nextjs/CHANGELOG.md +++ b/examples/nextjs/CHANGELOG.md @@ -1,5 +1,14 @@ # @demo/wallet +## 0.0.26 + +### Patch Changes + +- Updated dependencies + [[`a467c26`](https://github.com/bnb-chain/greenfield-js-sdk/commit/a467c26f6991a2f482c969235252f548c90c9827), + [`ec70921`](https://github.com/bnb-chain/greenfield-js-sdk/commit/ec70921011c5b08ea97fb7bd8712de6aa00431a0)]: + - @bnb-chain/greenfield-js-sdk@1.2.1 + ## 0.0.25 ### Patch Changes @@ -11,12 +20,12 @@ ## 0.0.24 ### Patch Changes - + - Updated dependencies -[[`24ec472`](https://github.com/bnb-chain/greenfield-js-sdk/commit/24ec472b4507d0f3cba3c8fc55b4e9f924d5b1c7), -[`b41fdf0`](https://github.com/bnb-chain/greenfield-js-sdk/commit/b41fdf057b7b4b0f416a74fb04ed0793c52c51f7), -[`865be47`](https://github.com/bnb-chain/greenfield-js-sdk/commit/865be476dfd78f86b9d0a7dba3074fbf7ae32bb7), -[`865be47`](https://github.com/bnb-chain/greenfield-js-sdk/commit/865be476dfd78f86b9d0a7dba3074fbf7ae32bb7)]: + [[`24ec472`](https://github.com/bnb-chain/greenfield-js-sdk/commit/24ec472b4507d0f3cba3c8fc55b4e9f924d5b1c7), + [`b41fdf0`](https://github.com/bnb-chain/greenfield-js-sdk/commit/b41fdf057b7b4b0f416a74fb04ed0793c52c51f7), + [`865be47`](https://github.com/bnb-chain/greenfield-js-sdk/commit/865be476dfd78f86b9d0a7dba3074fbf7ae32bb7), + [`865be47`](https://github.com/bnb-chain/greenfield-js-sdk/commit/865be476dfd78f86b9d0a7dba3074fbf7ae32bb7)]: - @bnb-chain/greenfield-js-sdk@1.2.0 ## 0.0.24-alpha.2 @@ -44,7 +53,6 @@ [`865be47`](https://github.com/bnb-chain/greenfield-js-sdk/commit/865be476dfd78f86b9d0a7dba3074fbf7ae32bb7)]: - @bnb-chain/greenfield-js-sdk@1.2.0-alpha.0 - ## 0.0.23 ### Patch Changes diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index ab73cfc9..ecc2f5f5 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@demo/wallet", - "version": "0.0.25", + "version": "0.0.26", "private": true, "scripts": { "dev": "cross-env NODE_ENV=development next dev", diff --git a/packages/js-sdk/CHANGELOG.md b/packages/js-sdk/CHANGELOG.md index a2e29482..68a2a1a8 100644 --- a/packages/js-sdk/CHANGELOG.md +++ b/packages/js-sdk/CHANGELOG.md @@ -1,5 +1,18 @@ # @bnb-chain/greenfield-js-sdk +## 1.2.1 + +### Patch Changes + +- [#484](https://github.com/bnb-chain/greenfield-js-sdk/pull/484) + [`a467c26`](https://github.com/bnb-chain/greenfield-js-sdk/commit/a467c26f6991a2f482c969235252f548c90c9827) + Thanks [@rrr523](https://github.com/rrr523)! - fix: Using Cross Fetch replace native fetch (occurs + on Nodejs 18-) + +- [#485](https://github.com/bnb-chain/greenfield-js-sdk/pull/485) + [`ec70921`](https://github.com/bnb-chain/greenfield-js-sdk/commit/ec70921011c5b08ea97fb7bd8712de6aa00431a0) + Thanks [@rrr523](https://github.com/rrr523)! - feat: Verify and Assert params + ## 1.2.0 ### Minor Changes diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index 8691f578..db67a79e 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bnb-chain/greenfield-js-sdk", - "version": "1.2.0", + "version": "1.2.1", "description": "greenfield js chain and sp sdk", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", From 389119ea489441d90b0e1d1f8a3946bc97ca6228 Mon Sep 17 00:00:00 2001 From: rk <59029880+rrr523@users.noreply.github.com> Date: Wed, 21 Feb 2024 00:21:32 +0800 Subject: [PATCH 09/10] Support Source Map (#487) * feat: Verify Address * feat: Support Source Map --- .changeset/cold-sloths-arrive.md | 5 +++++ .changeset/eight-comics-wait.md | 5 +++++ packages/js-sdk/rollup.config.js | 2 ++ packages/js-sdk/src/api/bucket.ts | 15 +++++---------- packages/js-sdk/src/utils/asserts/s3.ts | 17 ++++++----------- 5 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 .changeset/cold-sloths-arrive.md create mode 100644 .changeset/eight-comics-wait.md diff --git a/.changeset/cold-sloths-arrive.md b/.changeset/cold-sloths-arrive.md new file mode 100644 index 00000000..e3d57f7c --- /dev/null +++ b/.changeset/cold-sloths-arrive.md @@ -0,0 +1,5 @@ +--- +'@bnb-chain/greenfield-js-sdk': patch +--- + +feat: Support source map diff --git a/.changeset/eight-comics-wait.md b/.changeset/eight-comics-wait.md new file mode 100644 index 00000000..9c4c3b89 --- /dev/null +++ b/.changeset/eight-comics-wait.md @@ -0,0 +1,5 @@ +--- +'@bnb-chain/greenfield-js-sdk': patch +--- + +feat: Verify Address diff --git a/packages/js-sdk/rollup.config.js b/packages/js-sdk/rollup.config.js index 6df2b29f..9c6c0651 100644 --- a/packages/js-sdk/rollup.config.js +++ b/packages/js-sdk/rollup.config.js @@ -21,6 +21,7 @@ export default async () => { output: { dir: './dist/esm', format: 'esm', + sourcemap: true, }, external: resolveExternal(), context: 'window', @@ -55,6 +56,7 @@ export default async () => { output: { dir: './dist/cjs', format: 'cjs', + sourcemap: true, }, external: resolveExternal(), plugins: [ diff --git a/packages/js-sdk/src/api/bucket.ts b/packages/js-sdk/src/api/bucket.ts index 43f3094b..dba8b0ce 100644 --- a/packages/js-sdk/src/api/bucket.ts +++ b/packages/js-sdk/src/api/bucket.ts @@ -93,7 +93,7 @@ import type { ReadQuotaRequest, SpResponse, } from '../types/sp'; -import { isValidAddress, verifyBucketName, verifyUrl } from '../utils/asserts/s3'; +import { verifyAddress, verifyBucketName, verifyUrl } from '../utils/asserts/s3'; import { decodeObjectFromHexString } from '../utils/encoding'; import { Sp } from './sp'; import { Storage } from './storage'; @@ -359,12 +359,9 @@ export class Bucket implements IBucket { public async listBuckets(configParam: GetUserBucketsRequest) { try { const { address, duration = 30000, endpoint } = configParam; - if (!isValidAddress(address)) { - throw new Error('Error address'); - } - if (!verifyUrl(endpoint)) { - throw new Error('Invalid endpoint'); - } + verifyAddress(address); + verifyUrl(endpoint); + const { url } = getUserBucketMetaInfo(endpoint); const headers = new Headers({ @@ -654,9 +651,7 @@ export class Bucket implements IBucket { if (!endpoint) { endpoint = await this.sp.getSPUrlByBucket(bucketName); } - if (!verifyUrl(endpoint)) { - throw new Error('Invalid endpoint'); - } + verifyUrl(endpoint); const { url, optionsWithOutHeaders, reqMeta } = getListBucketReadRecordMetaInfo( endpoint, diff --git a/packages/js-sdk/src/utils/asserts/s3.ts b/packages/js-sdk/src/utils/asserts/s3.ts index 471b8e20..536c1069 100644 --- a/packages/js-sdk/src/utils/asserts/s3.ts +++ b/packages/js-sdk/src/utils/asserts/s3.ts @@ -74,14 +74,9 @@ const verifyObjectName = (objectName?: string) => { } }; -const isValidAddress = (address?: string) => { - if (!address) { - throw new Error('Address is empty, please check.'); - } - if (address.length > 1024) { - throw new Error('Address is limited to 1024 at most, please check.'); - } - return true; +const verifyAddress = (address?: string) => { + if (!address) throw new Error('Address is empty, please check.'); + if (address.length > 1024) throw new Error('Address is limited to 1024 at most, please check.'); }; const verifyUrl = (url?: string) => { @@ -93,9 +88,9 @@ const verifyUrl = (url?: string) => { '(\\:\\d{1,5})?' + // 端口号 '(\\/[-a-zA-Z\\d%_.~+]*)*' + // 路径 '(\\?[;&a-zA-Z\\d%_.~+=-]*)?' + // 查询字符串 - '(\\#[-a-zA-Z\\d_]*)?$', + '(\\#[-a-zA-Z\\d_]*)?$', // 锚点 'i', - ); // 锚点 + ); if (!pattern.test(url)) throw new Error('Invalid endpoint'); }; @@ -122,7 +117,7 @@ const generateUrlByBucketName = (endpoint = '', bucketName: string) => { export { verifyBucketName, verifyObjectName, - isValidAddress, + verifyAddress, trimString, verifyUrl, generateUrlByBucketName, From a63777dea429069fd36131a12c6945a441fdf60f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:57:26 +0800 Subject: [PATCH 10/10] chore: [ci] release (#488) Co-authored-by: github-actions[bot] --- .changeset/cold-sloths-arrive.md | 5 ----- .changeset/eight-comics-wait.md | 5 ----- examples/nextjs/CHANGELOG.md | 9 +++++++++ examples/nextjs/package.json | 2 +- packages/js-sdk/CHANGELOG.md | 12 ++++++++++++ packages/js-sdk/package.json | 2 +- 6 files changed, 23 insertions(+), 12 deletions(-) delete mode 100644 .changeset/cold-sloths-arrive.md delete mode 100644 .changeset/eight-comics-wait.md diff --git a/.changeset/cold-sloths-arrive.md b/.changeset/cold-sloths-arrive.md deleted file mode 100644 index e3d57f7c..00000000 --- a/.changeset/cold-sloths-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bnb-chain/greenfield-js-sdk': patch ---- - -feat: Support source map diff --git a/.changeset/eight-comics-wait.md b/.changeset/eight-comics-wait.md deleted file mode 100644 index 9c4c3b89..00000000 --- a/.changeset/eight-comics-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@bnb-chain/greenfield-js-sdk': patch ---- - -feat: Verify Address diff --git a/examples/nextjs/CHANGELOG.md b/examples/nextjs/CHANGELOG.md index c03d8225..5134e6a9 100644 --- a/examples/nextjs/CHANGELOG.md +++ b/examples/nextjs/CHANGELOG.md @@ -1,5 +1,14 @@ # @demo/wallet +## 0.0.27 + +### Patch Changes + +- Updated dependencies + [[`389119e`](https://github.com/bnb-chain/greenfield-js-sdk/commit/389119ea489441d90b0e1d1f8a3946bc97ca6228), + [`389119e`](https://github.com/bnb-chain/greenfield-js-sdk/commit/389119ea489441d90b0e1d1f8a3946bc97ca6228)]: + - @bnb-chain/greenfield-js-sdk@1.2.2 + ## 0.0.26 ### Patch Changes diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index ecc2f5f5..d17183a9 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -1,6 +1,6 @@ { "name": "@demo/wallet", - "version": "0.0.26", + "version": "0.0.27", "private": true, "scripts": { "dev": "cross-env NODE_ENV=development next dev", diff --git a/packages/js-sdk/CHANGELOG.md b/packages/js-sdk/CHANGELOG.md index 68a2a1a8..6fd232f2 100644 --- a/packages/js-sdk/CHANGELOG.md +++ b/packages/js-sdk/CHANGELOG.md @@ -1,5 +1,17 @@ # @bnb-chain/greenfield-js-sdk +## 1.2.2 + +### Patch Changes + +- [#487](https://github.com/bnb-chain/greenfield-js-sdk/pull/487) + [`389119e`](https://github.com/bnb-chain/greenfield-js-sdk/commit/389119ea489441d90b0e1d1f8a3946bc97ca6228) + Thanks [@rrr523](https://github.com/rrr523)! - feat: Support source map + +- [#487](https://github.com/bnb-chain/greenfield-js-sdk/pull/487) + [`389119e`](https://github.com/bnb-chain/greenfield-js-sdk/commit/389119ea489441d90b0e1d1f8a3946bc97ca6228) + Thanks [@rrr523](https://github.com/rrr523)! - feat: Verify Address + ## 1.2.1 ### Patch Changes diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index db67a79e..6d15f00e 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@bnb-chain/greenfield-js-sdk", - "version": "1.2.1", + "version": "1.2.2", "description": "greenfield js chain and sp sdk", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js",