Skip to content

Commit

Permalink
fix: the account method documentation error in the BitAccount class.
Browse files Browse the repository at this point in the history
  • Loading branch information
web3max committed Oct 17, 2023
1 parent 1b78cd7 commit 0427817
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 0.4.14

- add plugin-register [#34](https://github.com/dotbitHQ/dotbit.js/pull/34)
- throw error when init non-legit SubAccount [#36](https://github.com/dotbitHQ/dotbit.js/pull/36)
- throw error when init non-legit SubAccount [#36](https://github.com/dotbitHQ/dotbit.js/pull/36)

## 0.4.26

- fixed the account method documentation error in the BitAccount class [#58](https://github.com/dotbitHQ/dotbit.js/pull/58)
44 changes: 22 additions & 22 deletions docs/api/bit-account.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const { createInstance } = require('dotbit')
const dotbit = createInstance()

// To create a BitAccount instance.
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
console.log(account);

// ...
Expand All @@ -65,7 +65,7 @@ const { createInstance } = require('dotbit')
// create dotbit instance
const dotbit = createInstance()
// To create a BitAccount instance.
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
console.log(account.account);

// ...
Expand All @@ -86,7 +86,7 @@ const { createInstance } = require('dotbit')
// create dotbit instance
const dotbit = createInstance()
// To create a BitAccount instance.
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// To get the indexer of current BitAccount instance
console.log(account.bitIndexer)

Expand All @@ -107,7 +107,7 @@ const { createInstance } = require('dotbit')
// create dotbit instance
const dotbit = createInstance()
// To create a BitAccount instance.
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// To get the builder of current BitAccount instance
console.log(account.bitBuilder)

Expand Down Expand Up @@ -137,7 +137,7 @@ const signer = new EthersSigner(wallet)
const dotbit = createInstance({
signer: signer
})
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')

// To get the signer of current BitAccount instance
console.log(account.signer)
Expand All @@ -157,7 +157,7 @@ const { createInstance } = require('dotbit')
// create dotbit instance
const dotbit = createInstance()
// To create a BitAccount instance.
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// To get the account status of 'west.bit'
console.log(account.status)

Expand Down Expand Up @@ -209,7 +209,7 @@ Promise<`SubAccountListRes`>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// To list the sub-accounts of a main account, with 100 items per page.
const subAccounts = await account.subAccounts()
console.log(subAccounts)
Expand Down Expand Up @@ -244,7 +244,7 @@ Promise<{result: `SubAccountWithStatus[]`}>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')

const subAccounts: SubAccountMintParams[] = [{
account: 'xyz.imac.bit',
Expand Down Expand Up @@ -303,7 +303,7 @@ const signer = new EthersSigner(wallet)
const dotbit = createInstance({
signer: signer
})
const account = dotbit.account({account: 'imac.bit'})
const account = dotbit.account('imac.bit')
const mintParam = [{
account: '006.imac.bit',
keyInfo: {
Expand Down Expand Up @@ -360,7 +360,7 @@ const dotbit = createInstance({
signer: signer
})

const account = dotbit.account({account: 'imac.bit'})
const account = dotbit.account('imac.bit')
const mintParam = {
account: '005.imac.bit',
keyInfo: {
Expand Down Expand Up @@ -403,7 +403,7 @@ const signer = new EthersSigner(wallet)
const dotbit = createInstance({
signer: signer
})
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
const result = await account.changeOwner({
key: '0x1d643fac9a463c9d544506006a6348c234da485f',
coin_type: "60" // The coin type of ETH
Expand Down Expand Up @@ -440,7 +440,7 @@ const signer = new EthersSigner(wallet)
const dotbit = createInstance({
signer: signer
})
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
const result = await account.changeManager({
key: '0x1d643fac9a463c9d544506006a6348c234da485f',
coin_type: "60" // The coin type of ETH
Expand Down Expand Up @@ -480,7 +480,7 @@ const signer = new EthersSigner(wallet)
const dotbit = createInstance({
signer: signer
})
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
const result = await account.updateRecords([{
key: 'profile.email',
value: '[email protected]',
Expand Down Expand Up @@ -518,7 +518,7 @@ const signer = new EthersSigner(wallet)
const dotbit = createInstance({
signer: signer,
})
const account = dotbit.account({account: 'imac.bit'})
const account = dotbit.account('imac.bit')

const editor = await account.editRecords()
editor.delete({
Expand Down Expand Up @@ -564,7 +564,7 @@ Promise\<AccountInfo>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'imac.bit'})
const account = dotbit.account('imac.bit')
// Get the account info of "imac.bit"
account.info().then(console.log)

Expand Down Expand Up @@ -600,7 +600,7 @@ Promise<`RoleKeyInfo`>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// Get the owner of "west.bit"
account.owner().then(console.log)

Expand All @@ -626,7 +626,7 @@ Promise<`RoleKeyInfo`>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// Get the manager of "west.bit"
account.manager().then(console.log)

Expand Down Expand Up @@ -655,7 +655,7 @@ Promise\<BitAccountRecordExtended[]>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// Get all records of "west.bit"
account.records().then(console.log)

Expand Down Expand Up @@ -716,7 +716,7 @@ Promise\<BitAccountRecordAddress[]>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// Get all addresses of "west.bit"
account.addresses().then(console.log)

Expand Down Expand Up @@ -785,7 +785,7 @@ Promise\<BitAccountRecordExtended[]>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'code.bit'})
const account = dotbit.account('code.bit')
// Get all DWebs of "code.bit"
account.dwebs().then(console.log)

Expand Down Expand Up @@ -837,7 +837,7 @@ Promise\<BitAccountRecordExtended>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'code.bit'})
const account = dotbit.account('code.bit')
// Get the first DWeb of "code.bit"
account.dweb().then(console.log)

Expand Down Expand Up @@ -869,7 +869,7 @@ Promise\<`BitAccountRecordExtended[]`>
```javascript
const { createInstance } = require('dotbit')
const dotbit = createInstance()
const account = dotbit.account({account: 'west.bit'})
const account = dotbit.account('west.bit')
// Get all profiles of "west.bit"
account.profiles().then(console.log);

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dotbit",
"version": "0.4.25",
"version": "0.4.26",
"description": "A complete .bit SDK and utilities in TypeScript",
"author": "Jeff Jing <https://github.com/zgayjjf>",
"license": "MIT",
Expand Down

0 comments on commit 0427817

Please sign in to comment.