Skip to content

Commit

Permalink
Merge pull request #189 from xdamman/fix188
Browse files Browse the repository at this point in the history
update docs for getRecords
  • Loading branch information
LeonmanRolls authored Sep 6, 2024
2 parents 3716abb + 523195f commit 32a28d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
8 changes: 3 additions & 5 deletions docs/index/function.createEnsPublicClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,9 @@ const client = createPublicClient({
}).extend(ensPublicActions)
const result = await client.getRecords({
name: 'ens.eth',
records: {
texts: ['com.twitter', 'com.github'],
coins: ['ETH'],
contentHash: true,
},
texts: ['com.twitter', 'com.github'],
coins: ['ETH'],
contentHash: true,
})
// { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
```
Expand Down
8 changes: 3 additions & 5 deletions docs/public/function.getRecords.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ const client = createPublicClient({
})
const result = await getRecords(client, {
name: 'ens.eth',
records: {
texts: ['com.twitter', 'com.github'],
coins: ['ETH'],
contentHash: true,
},
texts: ['com.twitter', 'com.github'],
coins: ['ETH'],
contentHash: true,
})
// { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
```
Expand Down
8 changes: 3 additions & 5 deletions packages/ensjs/src/clients/decorators/public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,9 @@ export type EnsPublicActions = {
* }).extend(ensPublicActions)
* const result = await client.getRecords({
* name: 'ens.eth',
* records: {
* texts: ['com.twitter', 'com.github'],
* coins: ['ETH'],
* contentHash: true,
* },
* texts: ['com.twitter', 'com.github'],
* coins: ['ETH'],
* contentHash: true,
* })
* // { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
*/
Expand Down
8 changes: 3 additions & 5 deletions packages/ensjs/src/functions/public/getRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,9 @@ type BatchableFunctionObject = {
* })
* const result = await getRecords(client, {
* name: 'ens.eth',
* records: {
* texts: ['com.twitter', 'com.github'],
* coins: ['ETH'],
* contentHash: true,
* },
* texts: ['com.twitter', 'com.github'],
* coins: ['ETH'],
* contentHash: true,
* })
* // { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
*/
Expand Down

0 comments on commit 32a28d1

Please sign in to comment.