Skip to content

Commit 32a28d1

Browse files
authored
Merge pull request #189 from xdamman/fix188
update docs for getRecords
2 parents 3716abb + 523195f commit 32a28d1

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

docs/index/function.createEnsPublicClient.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,9 @@ const client = createPublicClient({
473473
}).extend(ensPublicActions)
474474
const result = await client.getRecords({
475475
name: 'ens.eth',
476-
records: {
477-
texts: ['com.twitter', 'com.github'],
478-
coins: ['ETH'],
479-
contentHash: true,
480-
},
476+
texts: ['com.twitter', 'com.github'],
477+
coins: ['ETH'],
478+
contentHash: true,
481479
})
482480
// { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
483481
```

docs/public/function.getRecords.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ const client = createPublicClient({
2424
})
2525
const result = await getRecords(client, {
2626
name: 'ens.eth',
27-
records: {
28-
texts: ['com.twitter', 'com.github'],
29-
coins: ['ETH'],
30-
contentHash: true,
31-
},
27+
texts: ['com.twitter', 'com.github'],
28+
coins: ['ETH'],
29+
contentHash: true,
3230
})
3331
// { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
3432
```

packages/ensjs/src/clients/decorators/public.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,9 @@ export type EnsPublicActions = {
272272
* }).extend(ensPublicActions)
273273
* const result = await client.getRecords({
274274
* name: 'ens.eth',
275-
* records: {
276-
* texts: ['com.twitter', 'com.github'],
277-
* coins: ['ETH'],
278-
* contentHash: true,
279-
* },
275+
* texts: ['com.twitter', 'com.github'],
276+
* coins: ['ETH'],
277+
* contentHash: true,
280278
* })
281279
* // { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
282280
*/

packages/ensjs/src/functions/public/getRecords.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,9 @@ type BatchableFunctionObject = {
469469
* })
470470
* const result = await getRecords(client, {
471471
* name: 'ens.eth',
472-
* records: {
473-
* texts: ['com.twitter', 'com.github'],
474-
* coins: ['ETH'],
475-
* contentHash: true,
476-
* },
472+
* texts: ['com.twitter', 'com.github'],
473+
* coins: ['ETH'],
474+
* contentHash: true,
477475
* })
478476
* // { texts: [{ key: 'com.twitter', value: 'ensdomains' }, { key: 'com.github', value: 'ensdomains' }], coins: [{ id: 60, name: 'ETH', value: '0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7' }], contentHash: { protocolType: 'ipns', decoded: 'k51qzi5uqu5djdczd6zw0grmo23j2vkj9uzvujencg15s5rlkq0ss4ivll8wqw' } }
479477
*/

0 commit comments

Comments
 (0)