Skip to content

Commit

Permalink
docs: update js-sdk based on platform pr
Browse files Browse the repository at this point in the history
  • Loading branch information
thephez committed Aug 13, 2024
1 parent 293e0bc commit eb1aaea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions docs/sdk-js/platform/names/register.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ Parameters:
| -------------------------------- | -------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **name** | String | yes | An alphanumeric (1-63 character) value used for human-identification (can contain `-` but not as the first or last character). If a name with no parent domain is entered, '.dash' is used. |
| **records** | Object | yes | records object having only one of the following items |
| **records.dashUniqueIdentityId** | String | no | Unique Identity ID for this name record |
| **records.dashAliasIdentityId** | String | no | Used to signify that this name is the alias for another id |
| **records.identity** | String | yes | Identity ID for this name record |
| **identity** | Identity | yes | A valid [registered identity](../identities/register.md) |

**Example**: `await client.platform.names.register('alice', { dashUniqueIdentityId: identity.getId() }, identity)`
**Example**: `await client.platform.names.register('alice', { identity: identity.getId() }, identity)`

Returns: the created domain document
6 changes: 3 additions & 3 deletions docs/sdk-js/platform/names/resolvebyrecord.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Parameters:

| Parameters | Type | Required | Description |
| ---------- | ------ | -------- | -------------------------------------------------------------------- |
| **record** | String | yes | Type of the record (`dashUniqueIdentityId` or `dashAliasIdentityId`) |
| **record** | String | yes | Type of the record (`identity`) |
| **value** | String | yes | Identifier value for the record |

**Example**:

This example will describe how to resolve names by the dash unique identity id.
This example will describe how to resolve names by the dash unique identity id.

```js
const identityId = '3ge4yjGinQDhxh2aVpyLTQaoka45BkijkoybfAkDepoN';
const document = await client.platform.names.resolveByRecord('dashUniqueIdentityId', identityId);
const document = await client.platform.names.resolveByRecord('identity', identityId);
```

Returns: array of ExtendedDocument.

0 comments on commit eb1aaea

Please sign in to comment.