Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release 0.2.6 #353

Merged
merged 267 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
267 commits
Select commit Hold shift + click to select a range
ff7427d
feat: add offchainauth method (#64)
randomx999 May 30, 2023
f94983f
chore: [ci] release (alpha) (#66)
github-actions[bot] May 30, 2023
834aa99
feat: Add Sp params (#67)
rrr523 Jun 1, 2023
cda82a4
feat: Optimize get approval types and add throw error (#70)
randomx999 Jun 1, 2023
f8c1cce
chore: [ci] release (alpha) (#68)
github-actions[bot] Jun 1, 2023
4130553
chore: Update example without greenfield-cosmos-types (#71)
rrr523 Jun 1, 2023
dc5f6e2
fix: Return Promise (#72)
rrr523 Jun 2, 2023
9c52686
chore: [ci] release (alpha) (#73)
github-actions[bot] Jun 2, 2023
ac99583
fix: Create Group message (#74)
rrr523 Jun 2, 2023
ab4f64a
feat: Add Storage Params API (#76)
rrr523 Jun 2, 2023
e3fb27e
chore: [ci] release (alpha) (#75)
github-actions[bot] Jun 2, 2023
3710889
Chore/group example (#77)
rrr523 Jun 2, 2023
42df489
chore: [ci] release (alpha) (#78)
github-actions[bot] Jun 2, 2023
15242a5
chore: Update example (#79)
rrr523 Jun 3, 2023
8632c39
feat: Add query param to ListObjects API for display folder. (#80)
randomx999 Jun 5, 2023
8a7f083
Feat/group (#82)
rrr523 Jun 5, 2023
4d0dce2
chore: [ci] release (alpha) (#81)
github-actions[bot] Jun 5, 2023
dc31d06
Update objectt.ts (#83)
aiden-cao Jun 6, 2023
3e47ba0
Feat/policy (#86)
rrr523 Jun 6, 2023
5497148
feat: Migrate out zkbas-js-sdk and upate the sign msg format (#85)
randomx999 Jun 6, 2023
2c1416d
chore: [ci] release (alpha) (#84)
github-actions[bot] Jun 6, 2023
be23cd2
fix: Head Group (#96)
rrr523 Jun 7, 2023
6dc142a
feat: Multi Send Txs (#97)
rrr523 Jun 7, 2023
e3b5568
chore: [ci] release (alpha) (#98)
github-actions[bot] Jun 7, 2023
573528f
feat: Allow to have sp auth fail (#101)
randomx999 Jun 7, 2023
c35e735
chore: TS lib (#104)
rrr523 Jun 8, 2023
4efba33
feat: Sync cosmos types (#106)
rrr523 Jun 8, 2023
b6d558d
chore: [ci] release (alpha) (#102)
github-actions[bot] Jun 8, 2023
7599303
chore: Use rainbowkit simply wallet of example (#107)
rrr523 Jun 8, 2023
a85d900
Feat/update group (#108)
rrr523 Jun 13, 2023
a08baf6
chore: [ci] release (alpha) (#109)
github-actions[bot] Jun 13, 2023
3eebdc3
Feat/sp listgroup (#110)
rrr523 Jun 13, 2023
d88c1f7
chore: [ci] release (alpha) (#111)
github-actions[bot] Jun 13, 2023
8bacce8
chore: Update Example (#112)
rrr523 Jun 13, 2023
d73df25
chore: Update Examples (#114)
rrr523 Jun 15, 2023
3adf8d6
chore(dep): Add cross-env
rrr523 Jun 16, 2023
c2ba16a
chore(dep): Npm script
rrr523 Jun 16, 2023
9876356
chore: Pnpm engines
rrr523 Jun 16, 2023
485e1f3
chore: Codesandbox Example (#115)
rrr523 Jun 16, 2023
e6447b8
chore(docs): Update stackblitz url (#116)
rrr523 Jun 17, 2023
9e79bc2
refactor: CreateFoler API params (#119)
rrr523 Jun 20, 2023
0d0d428
chore: [ci] release (alpha) (#120)
github-actions[bot] Jun 20, 2023
8fa1aa7
feat: TimeStamp format
rrr523 Jun 21, 2023
9341c4e
chore: [ci] release (alpha) (#121)
github-actions[bot] Jun 21, 2023
5161eb3
Refactor/policy (#122)
rrr523 Jun 21, 2023
3fd8f4c
chore: [ci] release (alpha) (#123)
github-actions[bot] Jun 21, 2023
e329393
chore: Alpha 0.2.2
rrr523 Jun 25, 2023
b3daac9
chore(example): BucketPolicy (#127)
rrr523 Jun 26, 2023
27da696
Chore/update policy example (#128)
rrr523 Jun 26, 2023
16d8860
Feat/gashub (#129)
rrr523 Jun 27, 2023
6c6152d
chore: [ci] release (alpha) (#130)
github-actions[bot] Jun 27, 2023
82082a9
feat: Export queryClient (#131)
rrr523 Jun 28, 2023
53e907f
Update README.md
rrr523 Jun 28, 2023
d8361be
fix: Compatiable net error (#133)
randomx999 Jun 29, 2023
db9d4ac
chore: [ci] release (alpha) (#132)
github-actions[bot] Jun 29, 2023
535e9b0
Test/test case (#134)
rrr523 Jun 29, 2023
d471489
feat: Sync Types (#136)
rrr523 Jun 30, 2023
d8bfe65
chore: [ci] release (alpha) (#135)
github-actions[bot] Jun 30, 2023
57a8176
Fix/sort types (#137)
rrr523 Jun 30, 2023
1948198
chore: [ci] release (alpha) (#138)
github-actions[bot] Jun 30, 2023
2b00e73
feat: Bump version (#139)
rrr523 Jun 30, 2023
234efdf
chore: [ci] release (alpha) (#140)
github-actions[bot] Jun 30, 2023
07c143f
feat: Split approval and simulate (#141)
rrr523 Jun 30, 2023
f7a1c54
chore: [ci] release (alpha) (#142)
github-actions[bot] Jun 30, 2023
834b71b
Revert "feat: Split approval and simulate" (#143)
rrr523 Jul 4, 2023
a043595
chore: [ci] release (alpha) (#144)
github-actions[bot] Jul 4, 2023
ff195a8
Chore/test case (#145)
rrr523 Jul 7, 2023
9e0a0e9
chore: Update rainkit version (#146)
rrr523 Jul 7, 2023
d15ef5d
feat: Query Lock Fee API (#147)
rrr523 Jul 7, 2023
e742ca9
chore: [ci] release (alpha) (#148)
github-actions[bot] Jul 7, 2023
b050481
Update bucket.ts (#149)
aiden-cao Jul 10, 2023
e2f37ac
chore: [ci] release (alpha) (#150)
github-actions[bot] Jul 10, 2023
f248937
fix: Return real statuscode when call metaservice (#164)
randomx999 Jul 13, 2023
2a271da
chore: [ci] release (alpha) (#166)
github-actions[bot] Jul 13, 2023
3907fc4
feat: Upgrade types version (#167)
rrr523 Jul 17, 2023
06e254b
chore: [ci] release (alpha) (#168)
github-actions[bot] Jul 17, 2023
d894bad
Feat/sp exit (#169)
rrr523 Jul 19, 2023
e2ebac6
Feat/batch upload (#171)
rrr523 Jul 20, 2023
4d88665
Feat/batch upload (#174)
rrr523 Jul 20, 2023
dc87783
feat: Add Two Apis (#179)
rrr523 Jul 24, 2023
f67dd05
chore: [ci] release (alpha) (#170)
github-actions[bot] Jul 24, 2023
1b803da
feat AuthV1 (#182)
rrr523 Jul 24, 2023
42e323a
Feat/com new (#186)
rrr523 Jul 25, 2023
4568e63
chore: [ci] release (alpha) (#183)
github-actions[bot] Jul 25, 2023
1b75dd2
feat: Offchainauth timeout reduced to 2s (#187)
randomx999 Jul 26, 2023
01fda7b
chore: [ci] release (alpha) (#188)
github-actions[bot] Jul 26, 2023
db5ab13
Feat/auth v1 (#189)
rrr523 Jul 26, 2023
d9d3fd1
chore: [ci] release (alpha) (#190)
github-actions[bot] Jul 26, 2023
1d9808f
Feat/auth v1 (#191)
rrr523 Jul 27, 2023
d176bb0
chore: [ci] release (alpha) (#192)
github-actions[bot] Jul 27, 2023
776003d
feat: Change Allwance value type (#193)
rrr523 Jul 28, 2023
b2ea6ec
chore: [ci] release (alpha) (#194)
github-actions[bot] Jul 28, 2023
1880084
feat: MultiTx support private key (#195)
rrr523 Jul 28, 2023
b483901
fix: Throw sp error code and message (#197)
randomx999 Jul 28, 2023
a5f07a1
chore: [ci] release (alpha) (#196)
github-actions[bot] Jul 28, 2023
61c7a9c
fix: No sp available error (#200)
randomx999 Jul 31, 2023
c3af372
Opt (#198)
rrr523 Jul 31, 2023
b314d50
chore: [ci] release (alpha) (#201)
github-actions[bot] Jul 31, 2023
f790f26
feat: Extend response time to 3s (#202)
randomx999 Aug 1, 2023
dc1df62
chore: [ci] release (alpha) (#203)
github-actions[bot] Aug 1, 2023
5beed30
Chore/conflict (#209)
rrr523 Aug 3, 2023
3e0abf3
Feat/payment (#210)
rrr523 Aug 8, 2023
2ace378
chore: [ci] release (alpha) (#211)
github-actions[bot] Aug 8, 2023
bc6420a
chore: Update README link (#214)
rrr523 Aug 15, 2023
e586e77
fix: Return Types (#213)
rrr523 Aug 15, 2023
ab9d200
chore: Update withdraw example params (#212)
rrr523 Aug 15, 2023
9a5f7d9
chore: Changeset (#215)
rrr523 Aug 15, 2023
9637ef1
chore: [ci] release (alpha) (#216)
github-actions[bot] Aug 15, 2023
8d08848
Feat/group api (#217)
rrr523 Aug 16, 2023
139c30a
chore: [ci] release (alpha) (#218)
github-actions[bot] Aug 16, 2023
2715b17
chore: Release zk crypto (#219)
rrr523 Aug 16, 2023
5423afe
chore: [ci] release (alpha) (#220)
github-actions[bot] Aug 16, 2023
8ba4cc7
fix: Zk version bump (#221)
rrr523 Aug 16, 2023
37e996f
chore: [ci] release (alpha) (#222)
github-actions[bot] Aug 16, 2023
2e44e95
fix: DeepClone EIP712 (#223)
rrr523 Aug 16, 2023
e085339
chore: [ci] release (alpha) (#224)
github-actions[bot] Aug 16, 2023
48521b3
fix: Error try catch (#230)
rrr523 Aug 17, 2023
e05c53c
chore: [ci] release (alpha) (#231)
github-actions[bot] Aug 17, 2023
4b9b4bc
Feat/auth (#232)
rrr523 Aug 17, 2023
d0da019
feat: Remove log (#234)
rrr523 Aug 17, 2023
be5f2e6
chore: [ci] release (alpha) (#233)
github-actions[bot] Aug 17, 2023
53fa253
fix: Feegrant add expiration time (#235)
rrr523 Aug 21, 2023
41581f4
refactor (#236)
rrr523 Aug 21, 2023
aed427c
chore: [ci] release (alpha) (#237)
github-actions[bot] Aug 21, 2023
a823e61
Fix/read quota (#238)
rrr523 Aug 22, 2023
8d912cc
chore: [ci] release (alpha) (#239)
github-actions[bot] Aug 22, 2023
db61ff6
XML response (#240)
rrr523 Aug 23, 2023
e0c3398
chore: [ci] release (alpha) (#241)
github-actions[bot] Aug 23, 2023
f98b8dc
fix: XMLParser force array not object (#242)
rrr523 Aug 23, 2023
cbbb4aa
Feat/export req (#243)
rrr523 Aug 23, 2023
e785132
chore: [ci] release (alpha) (#244)
github-actions[bot] Aug 23, 2023
8782a21
feat: Export types (#245)
rrr523 Aug 23, 2023
d388940
Export types (#247)
rrr523 Aug 23, 2023
c1ef739
chore: [ci] release (alpha) (#246)
github-actions[bot] Aug 23, 2023
a3e2210
Feat/up and down (#248)
rrr523 Aug 23, 2023
8665454
chore: [ci] release (alpha) (#249)
github-actions[bot] Aug 23, 2023
2e86b92
Feat/xml null (#250)
rrr523 Aug 24, 2023
d610ef3
chore: [ci] release (alpha) (#251)
github-actions[bot] Aug 24, 2023
dba9871
Fix/gap time (#252)
rrr523 Aug 24, 2023
1ede2ea
Feat/meta (#254)
rrr523 Aug 24, 2023
a0cc253
chore: [ci] release (alpha) (#253)
github-actions[bot] Aug 24, 2023
ce00ce1
Refactor/sp client (#255)
rrr523 Aug 24, 2023
599100e
chore: [ci] release (alpha) (#256)
github-actions[bot] Aug 24, 2023
569445b
feat: Custom HTTP method (#257)
rrr523 Aug 25, 2023
5548c7b
chore: [ci] release (alpha) (#258)
github-actions[bot] Aug 25, 2023
982a1f7
chore(docs): Update README (#259)
rrr523 Aug 25, 2023
e670f70
chore: Add comment (#260)
rrr523 Aug 25, 2023
21c9f6e
fix: Sp types (#261)
rrr523 Aug 25, 2023
352419e
Feat/upload progress (#263)
rrr523 Aug 25, 2023
b2fff6e
chore: [ci] release (alpha) (#262)
github-actions[bot] Aug 25, 2023
7824130
fix: EncodePath (#264)
rrr523 Aug 25, 2023
293b20e
chore: [ci] release (alpha) (#265)
github-actions[bot] Aug 25, 2023
b6efbaa
fix: Download http method (#266)
rrr523 Aug 27, 2023
a485367
fix: Download http method (#267)
rrr523 Aug 27, 2023
97f43f5
chore: [ci] release (alpha) (#268)
github-actions[bot] Aug 27, 2023
a3e6b47
feat: New API getObjectPreviewUrl (#270)
rrr523 Aug 28, 2023
7924c50
chore: [ci] release (alpha) (#271)
github-actions[bot] Aug 28, 2023
b3683b8
fix: XML type align to go struct (#272)
rrr523 Aug 28, 2023
25ccbb6
feat: Optional endpoint param (#273)
rrr523 Aug 28, 2023
8b6b2c6
chore: [ci] release (alpha) (#274)
github-actions[bot] Aug 28, 2023
55f8851
fix: XML parse boolean (#275)
rrr523 Aug 29, 2023
84e1811
chore: [ci] release (alpha) (#276)
github-actions[bot] Aug 29, 2023
ff112b2
fix: Common Prefix parse as array (#277)
rrr523 Aug 29, 2023
f744807
chore: [ci] release (alpha) (#278)
github-actions[bot] Aug 29, 2023
4929b12
test: Parse XML test case (#279)
rrr523 Aug 29, 2023
c92e07e
feat: Migrate bucket (#280)
rrr523 Aug 29, 2023
8f4e206
fix: Create bucket quota params (#282)
rrr523 Aug 29, 2023
d155b2b
chore: [ci] release (alpha) (#281)
github-actions[bot] Aug 29, 2023
1badb9c
feat: Replace xml2js to fast-xml-parse (#283)
rrr523 Aug 29, 2023
c28ab8b
Feat/update bucket info (#284)
rrr523 Aug 29, 2023
6ebcd9d
chore: [ci] release (alpha) (#285)
github-actions[bot] Aug 29, 2023
c7de1fc
fix: EncodePath function (#286)
rrr523 Aug 30, 2023
402da22
fix: Convert enum to number (#287)
rrr523 Aug 30, 2023
6fb245e
chore: [ci] release (alpha) (#288)
github-actions[bot] Aug 30, 2023
ea31d73
feat: Add listReadRecords api
rrr523 Aug 31, 2023
0084053
feat: ListGroups API
rrr523 Aug 31, 2023
9710b5b
feat: ListObjectsByIds API
rrr523 Aug 31, 2023
faf5d47
feat: ListBucketsByIds api
rrr523 Aug 31, 2023
12bd37c
feat: Add verifyPermission api
rrr523 Aug 31, 2023
7d69f2e
feat: ListGroupsMembers
rrr523 Aug 31, 2023
fcf6283
feat: ListUserGroups api
rrr523 Aug 31, 2023
ad1d7d3
feat: Add listUserOwnedGroups api
rrr523 Aug 31, 2023
1769cb3
chore: [ci] release (alpha)
github-actions[bot] Aug 31, 2023
7869b75
feat: Sort query (#292)
rrr523 Aug 31, 2023
00f363d
chore: [ci] release (alpha) (#293)
github-actions[bot] Aug 31, 2023
c3c2d30
chore(exmaple): Group (#294)
rrr523 Aug 31, 2023
d34e2d2
docs: Update API (#295)
rrr523 Aug 31, 2023
c992a07
chore: Pre Exit (#296)
rrr523 Aug 31, 2023
adee033
Pre exit (#297)
rrr523 Aug 31, 2023
3e5d195
chore: [ci] release (#298)
github-actions[bot] Aug 31, 2023
39492f6
chore: Pre Enter (#299)
rrr523 Aug 31, 2023
f41d8c4
Merge branch 'main' into alpha
rrr523 Sep 1, 2023
f0d69c9
Refactor/sp (#302)
rrr523 Sep 4, 2023
bea0466
Refactor/sp (#305)
rrr523 Sep 5, 2023
a2536eb
chore: [ci] release (alpha) (#303)
github-actions[bot] Sep 5, 2023
57837a5
fix: Build (#306)
rrr523 Sep 5, 2023
4acdb91
chore: Update Deps (#308)
rrr523 Sep 5, 2023
4229477
chore: [ci] release (alpha) (#307)
github-actions[bot] Sep 5, 2023
53b8001
docs: Update README (#309)
rrr523 Sep 6, 2023
695379e
Feat/validator (#310)
rrr523 Sep 7, 2023
c502902
chore: [ci] release (alpha) (#311)
github-actions[bot] Sep 7, 2023
c160b34
chore: Nodejs example update
rrr523 Sep 8, 2023
fb97ef1
test: Test case update
rrr523 Sep 8, 2023
52db094
chore: README update
rrr523 Sep 8, 2023
609f4cd
feat: ListBuckets
rrr523 Sep 8, 2023
b13fba4
fix: QueryClient and TxClient is not singleton
rrr523 Sep 8, 2023
b00e640
chore: Upgrade types
rrr523 Sep 8, 2023
780e2ef
fix: PutPolicy
rrr523 Sep 8, 2023
c7f9ef3
feat: ListObjectPolicies api
rrr523 Sep 8, 2023
77b01cb
chore: [ci] release (alpha)
github-actions[bot] Sep 8, 2023
06b933a
fix: IOC (#314)
rrr523 Sep 8, 2023
a51488f
chore: [ci] release (alpha) (#315)
github-actions[bot] Sep 8, 2023
0bcca80
chore: Update exmaple (#316)
rrr523 Sep 8, 2023
910c0cc
feat: Distribution API (#317)
rrr523 Sep 11, 2023
4ef30b7
chore: [ci] release (alpha) (#318)
github-actions[bot] Sep 11, 2023
ec4297d
feat: MsgSettle (#319)
rrr523 Sep 11, 2023
f1e60a2
chore: [ci] release (alpha) (#320)
github-actions[bot] Sep 11, 2023
b384428
chore(example): Update custom tx (#321)
rrr523 Sep 11, 2023
9cc4d1b
chore: [ci] release (alpha) (#322)
github-actions[bot] Sep 11, 2023
837d8f4
chore: Github Action issue close (#323)
rrr523 Sep 12, 2023
f3a7ce8
feat: Bucket headBucketExtra api (#324)
rrr523 Sep 12, 2023
23cd8af
chore: [ci] release (alpha) (#325)
github-actions[bot] Sep 13, 2023
794cf37
chore: Nodejs Example update (#326)
rrr523 Sep 14, 2023
49c53a7
chore: Example Update (#327)
rrr523 Sep 14, 2023
a2d9b55
Chore/example (#328)
rrr523 Sep 14, 2023
4913d2d
chore: Update (#329)
rrr523 Sep 14, 2023
56a263e
feat: Custom Tx (#330)
rrr523 Sep 14, 2023
2f8e36c
chore: [ci] release (alpha) (#331)
github-actions[bot] Sep 14, 2023
88acc61
fix: Delete Policy (#332)
rrr523 Sep 14, 2023
0c138c7
chore: [ci] release (alpha) (#333)
github-actions[bot] Sep 14, 2023
03be217
Feat/create app (#334)
rrr523 Sep 15, 2023
2eb289c
chore: [ci] release (alpha) (#335)
github-actions[bot] Sep 15, 2023
ef99831
feat: Create App Commander (#336)
rrr523 Sep 15, 2023
66e23fc
chore: [ci] release (alpha) (#337)
github-actions[bot] Sep 15, 2023
5fab330
chore: Update README (#338)
rrr523 Sep 15, 2023
6aaf062
feat: Add vite template (#339)
rrr523 Sep 15, 2023
5bd67ef
chore: [ci] release (alpha) (#340)
github-actions[bot] Sep 15, 2023
e5c74ec
release 0.2.5 (#341)
rrr523 Sep 15, 2023
71f2ded
chore: [ci] release (#342)
github-actions[bot] Sep 15, 2023
cb8d60d
chore: Enter pre (#343)
rrr523 Sep 15, 2023
5143456
chore(docs): Update README (#344)
rrr523 Sep 15, 2023
05ba530
Merge branch 'main' into alpha
rrr523 Sep 18, 2023
00a2cdd
Chore/package (#346)
rrr523 Sep 18, 2023
10c5723
Chore/package js sdk (#347)
rrr523 Sep 18, 2023
f9fbcf3
chore: [ci] release (alpha) (#348)
github-actions[bot] Sep 18, 2023
69f9bd7
Chore/update deps (#349)
rrr523 Sep 19, 2023
1ed0d32
Docs site ! (#350)
rrr523 Sep 25, 2023
07aaf8c
chore: Pre exit (#351)
rrr523 Sep 25, 2023
77b564e
chore: [ci] release (#352)
github-actions[bot] Sep 25, 2023
512181d
Merge branch 'main' into alpha
rrr523 Sep 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .changeset/pre.json

This file was deleted.

11 changes: 0 additions & 11 deletions .codesandbox/ci.json

This file was deleted.

65 changes: 15 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# GreenField JS SDK
# GreenField JS SDK ![License](https://img.shields.io/npm/l/%40bnb-chain%2Fgreenfield-js-sdk) ![version](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-js-sdk?color=blue)

A Greenfield JS SDK is an easy-to-use tool designed to help developers build decentralized applications (DApps) on the Greenfield blockchain using JavaScript. It provides a simple and straightforward starting point for developers to create DApps with the latest technology and best practices, making Dapp development more efficient. This SDK includes features and tools to make interacting with the Greenfield blockchain easy, such as libraries for common functionality, testing tools, and documentation. With a Greenfield JS SDK, developers can create scalable, maintainable, and efficient DApps for a variety of use cases.

## Documentation

You can find some package documentation below:

| Package | Description |
| --- | --- |
| [@bnb-chain/greenfield-js-sdk](./packages/chain-sdk/README.md) | A client library for Greenfield Chain |
| [@bnb-chain/greenfiled-file-handle](./packages/file-handle/README.md) | WASM module that handle file, such as `checksums` |
| [@bnb-chain/greenfield-zk-crypto](./packages/zk-crypto/README.md) | WASM module about sign crypto |
| [@bnb-chain/create-gnfd-app](./packages/create-gnfd-app/README.md) | Create Greenfield App Quickly |
| Package | Description | Version |
| --- | --- | --- |
| [@bnb-chain/greenfield-js-sdk](./packages/js-sdk/README.md) | A client library for Greenfield Chain | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-js-sdk?color=blue)](https://www.npmjs.com/package/@bnb-chain/greenfield-js-sdk) |
| [@bnb-chain/greenfiled-file-handle](./packages/file-handle/README.md) | WASM module that handle file, such as `checksums` | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfiled-file-handle?color=blue)](https://www.npmjs.com/package/@bnb-chain/greenfiled-file-handle) |
| [@bnb-chain/greenfield-zk-crypto](./packages/zk-crypto/README.md) | WASM module about sign crypto | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fgreenfield-zk-crypto?color=blue)](https://www.npmjs.com/package/@bnb-chain/greenfield-zk-crypto) |
| [@bnb-chain/create-gnfd-app](./packages/create-gnfd-app/README.md) | Create Greenfield App Quickly | [![npm](https://img.shields.io/npm/v/%40bnb-chain%2Fcreate-gnfd-app?color=blue)](https://www.npmjs.com/package/@bnb-chain/create-gnfd-app) |

## Online Examples

Expand All @@ -28,63 +29,27 @@ You can use [`create-gnfd-app`](./packages/create-gnfd-app/README.md) to create

![](./packages/create-gnfd-app/example.gif)

## Supported JS environments

<!-- There are runnable examples included in the [examples](./examples/) folder

* [Next.js Example(TypeScript)](./examples/nextjs/README.md)
* [Nodejs](./examples/nodejs/README.md) -->
1. Modern browsers (Chromium, Firefox, Safari)
2. Browser extensions (Chromium, Firefox)
3. Nodejs

## Contribution

<!--
1. Clone the project and install dependencies:
1. install dependencies

```bash
> git clone [email protected]:bnb-chain/greenfield-js-sdk.git
> cd greenfield-js-sdk
> pnpm install
```

2. Build package:
```bash
> pnpm run -F "./packages/**" -r build
```

3. copy env template file:
```bash
> cp .env.simple .env
```

and then enter your own configuration. Take testnet, for example:
```bash
NEXT_PUBLIC_GRPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
NEXT_PUBLIC_GREEN_CHAIN_ID=5600
NEXT_PUBLIC_BSC_RPC_URL=https://gnfd-bsc-testnet-dataseed1.bnbchain.org
NEXT_PUBLIC_BSC_CHAIN_ID=97

# refer to https://docs.bnbchain.org/greenfield-docs/docs/guide/dapp/contract-list
NEXT_PUBLIC_TOKEN_HUB_CONTRACT_ADDRESS=
NEXT_PUBLIC_CROSS_CHAIN_CONTRACT_ADDRESS=
> pnpm run build
```

> The contract address may be outdated due to Greenfield reset, refer to https://docs.bnbchain.org/greenfield-docs/docs/guide/dapp/contract-list get the latest contract address. -->

<!-- abd then run example:
```bash
> npx next dev
``` -->

## Supported JS environments

1. Modern browsers (Chromium, Firefox, Safari)
2. Browser extensions (Chromium, Firefox)
3. Nodejs

## Contribution

Look over [CONTRIBUTING](./CONTRIBUTING.md)


## Disclaimer

Look over [DISCLAIMER](./DISCLAIMER.md)
Expand Down
20 changes: 20 additions & 0 deletions doc-site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions doc-site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions doc-site/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
14 changes: 14 additions & 0 deletions doc-site/docs/api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"position": 3,
"label": "API",
"collapsible": true,
"collapsed": true,
"className": "red",
"link": {
"type": "generated-index",
"title": "apis"
},
"customProps": {
"description": ""
}
}
114 changes: 114 additions & 0 deletions doc-site/docs/api/account.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
id: account
title: 'Account'
---

import Tx from '../../src/components/snippers/tx.mdx';
import ApiTypes from '../../src/components/snippers/api-types.tsx';

## getAccount <ApiTypes type="Query" />

Retrieve on-chain account information for a given address.

| params | description |
| ------- | -------------------------------- |
| address | The given address for retrieving |

```jsx title="example"
await client.getAccount('0x0000000000000000000000000000000000000001');
```

## getAccountBalance <ApiTypes type="Query" />

Get the bank balance for the given address.

| params | description |
| ------- | ------------------------------------ |
| address | the address to query balances for |
| denom | the coin denom to query balances for |

```jsx title="example"
await client.getAccountBalance({
address: '0x0000000000000000000000000000000000000001',
denom: 'BNB',
});
```

## getModuleAccounts <ApiTypes type="Query" />

Get all module accounts.

```jsx title="example"
await client.getModuleAccounts();
```

## getModuleAccountByName <ApiTypes type="Query" />

Get module account by module name.

| params | description |
| ------ | --------------------------------- |
| name | the address to query balances for |

```jsx title="example"
await client.getModuleAccountByName('module_name');
```

## getPaymentAccountsByOwner <ApiTypes type="Query" />

Get all payment accounts owned by the given owner address.

| params | description |
| ------- | ---------------------------------------------- |
| address | The given owner account address for retrieving |

```jsx title="example"
await client.getPaymentAccountsByOwner('0x0000000000000000000000000000000000000001');
```

## createPaymentAccount <ApiTypes type="Tx" />

<Tx />

Create a new payment account for the given address.

The payment account is used to pay for the storage and read quota fee of objects. When you need to
pay for different buckets separately, you can create different payment accounts to do so. Note that
the payment account does not have a private key, and only the owner of the payment account can
withdraw funds from it. Once the owner revokes permission for withdrawal, the funds in the payment
account can only be utilized to cover storage and read quota fees.

| params | description |
| ------- | -------------------------------------------- |
| creator | The owner address of the new payment account |

```jsx title="example"
const tx = await client.account.createPaymentAccount({
creator: address,
});
```

## transfer <ApiTypes type="Tx" />

<Tx />

Transfer BNB from sender to receiver.

| params | description |
| ----------- | ------------------------------------ |
| fromAddress | The address who will send the BNB |
| toAddress | The address who will receive the BNB |
| amount | transfer coin |

```jsx title="example"
const tx = await client.account.transfer({
fromAddress: '0x0000000000000000000000000000000000000000',
toAddress: '0x0000000000000000000000000000000000000001',
amount: [
{
denom: 'BNB',
amount: '1000000000',
},
],
});
```
Loading
Loading