Skip to content

Commit

Permalink
Merge branch 'main' into fix/sign-tx-list
Browse files Browse the repository at this point in the history
  • Loading branch information
web3max committed Feb 2, 2024
2 parents 8666711 + 5f10061 commit a6e394d
Show file tree
Hide file tree
Showing 8 changed files with 9,828 additions and 47 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ package/
lib/
lib.esm/
example/browser/dist/
*.tgz
pnpm-lock.yaml
*.tgz
42 changes: 13 additions & 29 deletions docs/api/dotbit.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ List all .bit accounts (including SubDID accounts) of a given blockchain owner a
- key: `string`. The address on a certain blockchain
- (Optional) coin_type: `string`. (60: ETH, 195: TRX, 714: BNB, 966: Matic). See [What is coin_type?](../../README.md#what-is-coin_type) in FAQ for more details.
### Return Value
Promise<BitAccount[]>
Promise<BitAccountListItem[]>
### Example
```javascript
// To get all BitAccount instances of Ethereum addresss '0x1d643fac9a463c9d544506006a6348c234da485f'
Expand All @@ -291,19 +291,11 @@ dotbit.accountsOfOwner({
// The printed result would be like:
[
...,
BitAccount {
account: 'cz-vs-sbf.bit',
bitIndexer: BitIndexer { rpc: [JSONRPC] },
bitBuilder: RemoteTxBuilder {},
signer: // Your signer instance
},
BitSubAccount {
account: 'jeff.makeafriend.bit',
bitIndexer: BitIndexer { rpc: [JSONRPC] },
bitBuilder: RemoteTxBuilder {},
signer: // Your signer instance
isSubAccount: true,
mainAccount: 'makeafriend.bit'
{
"account": "gaoyuanyuan.bit",
"display_name": "gaoyuanyuan.bit",
"registered_at": 1626962335,
"expired_at": 1721570335
}
]
```
Expand All @@ -315,7 +307,7 @@ List all .bit accounts (including SubDID accounts) of a given blockchain manager
- key: `string`. The address on a certain blockchain
- (Optional) coin_type: `string`. (60: ETH, 195: TRX, 714: BNB, 966: Matic). See [What is coin_type?](../../README.md#what-is-coin_type) in FAQ for more details.
### Return Value
Promise<BitAccount[]>
Promise<BitAccountListItem[]>
### Example
```javascript
// To get all BitAccount instances of Ethereum addresss '0x1d643fac9a463c9d544506006a6348c234da485f'
Expand All @@ -328,20 +320,12 @@ dotbit.accountsOfManager({
// The printed result would be like:
[
...,
BitAccount {
account: 'cz-vs-sbf.bit',
bitIndexer: BitIndexer { rpc: [JSONRPC] },
bitBuilder: RemoteTxBuilder {},
signer: // Your signer instance
},
BitSubAccount {
account: 'jeff.makeafriend.bit',
bitIndexer: BitIndexer { rpc: [JSONRPC] },
bitBuilder: RemoteTxBuilder {},
signer: // Your signer instance
isSubAccount: true,
mainAccount: 'makeafriend.bit'
}
{
"account": "gaoyuanyuan.bit",
"display_name": "gaoyuanyuan.bit",
"registered_at": 1626962335,
"expired_at": 1721570335
}
]
```

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dotbit",
"version": "0.4.26",
"version": "0.4.28",
"description": "A complete .bit SDK and utilities in TypeScript",
"author": "Jeff Jing <https://github.com/zgayjjf>",
"license": "MIT",
Expand Down Expand Up @@ -66,7 +66,7 @@
"@ethersproject/providers": "^5.7.2",
"@metamask/eth-sig-util": "^5.0.2",
"blake2b": "^2.1.4",
"cross-fetch": "^3.1.5",
"cross-fetch": "^4.0.0",
"ethers": "^5.6.9",
"grapheme-splitter": "^1.0.4",
"jest-environment-jsdom": "^29.3.1",
Expand Down
Loading

0 comments on commit a6e394d

Please sign in to comment.