Skip to content

Commit

Permalink
fix: sdk imports in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HadiKhai committed May 20, 2024
1 parent 1dd4ff6 commit 000cf7c
Show file tree
Hide file tree
Showing 93 changed files with 395 additions and 380 deletions.
14 changes: 7 additions & 7 deletions docs/docs/sdk/core/classes/JustaName.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The main class for the JustaName SDK.
**`Example`**

```typescript
import { JustaName } from 'justaname-sdk';
import { JustaName } from '@justaname.id/sdk';

const configuration = {
apiKey: 'your-api-key'
Expand All @@ -27,7 +27,7 @@ const configuration = {
chainId: 1,
origin: 'http://localhost:3333',
address: '0x59c44836630760F97b74b569B379ca94c37B93ca',
domain: 'justaname.id',
domain: 'localhost',
ttl?: 120000,
});

Expand All @@ -52,7 +52,7 @@ const configuration = {

#### Defined in

[lib/justaname/index.ts:41](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L41)
[lib/justaname/index.ts:41](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L41)

## Properties

Expand All @@ -62,7 +62,7 @@ const configuration = {

#### Defined in

[lib/justaname/index.ts:31](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L31)
[lib/justaname/index.ts:31](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L31)

___

Expand All @@ -78,7 +78,7 @@ JustaName

#### Defined in

[lib/justaname/index.ts:39](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L39)
[lib/justaname/index.ts:39](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L39)

## Methods

Expand Down Expand Up @@ -106,7 +106,7 @@ Checks if the API key is present.

#### Defined in

[lib/justaname/index.ts:74](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L74)
[lib/justaname/index.ts:74](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L74)

___

Expand Down Expand Up @@ -136,4 +136,4 @@ Initializes the JustaName SDK.

#### Defined in

[lib/justaname/index.ts:57](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L57)
[lib/justaname/index.ts:57](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/justaname/index.ts#L57)
18 changes: 11 additions & 7 deletions docs/docs/sdk/core/classes/Siwe.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ to initiate and verify challenges.
**`Example`**

```typescript
import { JustaName } from 'justaname-sdk';
import { JustaName } from '@justaname.id/sdk';

const configuration = {
apiKey: 'your-api-key'
};

const justaName = await JustaName.init(configuration);
const justaName = JustaName.init(configuration);

const challenge = await justaName.siwe.requestChallenge({
address: "0x1234567890123456789012345678901234567890",
});
const requestChallengeResponse = await justaName.siwe.requestChallenge({
chainId: 1,
origin: 'http://localhost:3333',
address: '0x59c44836630760F97b74b569B379ca94c37B93ca',
domain: 'localhost',
ttl?: 120000,
});

```

Expand Down Expand Up @@ -58,7 +62,7 @@ Sends a request to initiate a challenge.

#### Defined in

[lib/features/siwe/index.ts:39](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/siwe/index.ts#L39)
[lib/features/siwe/index.ts:43](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/siwe/index.ts#L43)

___

Expand All @@ -82,4 +86,4 @@ Sends a request to verify a specific address using SIWE.

#### Defined in

[lib/features/siwe/index.ts:52](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/siwe/index.ts#L52)
[lib/features/siwe/index.ts:56](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/siwe/index.ts#L56)
47 changes: 26 additions & 21 deletions docs/docs/sdk/core/classes/Subnames.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,24 @@ Represents the Subnames class for interacting with the Subnames API.
**`Example`**

```typescript
import { JustaName } from 'justaname-sdk';
import { JustaName } from '@justaname.id/sdk';

const configuration = {
apiKey: 'your-api-key'
};

const justaName = await JustaName.init(configuration);
const justaName = JustaName.init(configuration);

const addedUser = await justaName.subnames.addSubname({
username: 'test',
ensDomain: 'justaname.id',
ensDomain: 'test.eth',
chainId: 1,
});
},
{
xAddress: '0x59c44836630760F97b74b569B379ca94c37B93ca',
xMessage: '...',
xSignature: '...',
});

```

Expand All @@ -51,7 +56,7 @@ Constructs a new instance of the Subnames class, optionally with an API key for

#### Defined in

[lib/features/subnames/index.ts:62](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L62)
[lib/features/subnames/index.ts:67](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L67)

## Properties

Expand All @@ -61,7 +66,7 @@ Constructs a new instance of the Subnames class, optionally with an API key for

#### Defined in

[lib/features/subnames/index.ts:56](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L56)
[lib/features/subnames/index.ts:61](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L61)

## Methods

Expand All @@ -86,7 +91,7 @@ The result of the claim operation.

#### Defined in

[lib/features/subnames/index.ts:72](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L72)
[lib/features/subnames/index.ts:77](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L77)

___

Expand All @@ -112,7 +117,7 @@ The result of the add operation.

#### Defined in

[lib/features/subnames/index.ts:105](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L105)
[lib/features/subnames/index.ts:110](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L110)

___

Expand All @@ -137,7 +142,7 @@ Information about the subname's availability.

#### Defined in

[lib/features/subnames/index.ts:250](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L250)
[lib/features/subnames/index.ts:255](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L255)

___

Expand All @@ -163,7 +168,7 @@ A list of subnames associated with the address.

#### Defined in

[lib/features/subnames/index.ts:214](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L214)
[lib/features/subnames/index.ts:219](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L219)

___

Expand All @@ -188,7 +193,7 @@ The details of the subname, if found.

#### Defined in

[lib/features/subnames/index.ts:189](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L189)
[lib/features/subnames/index.ts:194](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L194)

___

Expand All @@ -213,7 +218,7 @@ The details of the subname, if found.

#### Defined in

[lib/features/subnames/index.ts:201](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L201)
[lib/features/subnames/index.ts:206](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L206)

___

Expand All @@ -233,7 +238,7 @@ ___

#### Defined in

[lib/features/subnames/index.ts:220](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L220)
[lib/features/subnames/index.ts:225](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L225)

___

Expand All @@ -258,7 +263,7 @@ A list of subname invitations.

#### Defined in

[lib/features/subnames/index.ts:238](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L238)
[lib/features/subnames/index.ts:243](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L243)

___

Expand All @@ -283,7 +288,7 @@ The records associated with the subname.

#### Defined in

[lib/features/subnames/index.ts:262](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L262)
[lib/features/subnames/index.ts:267](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L267)

___

Expand Down Expand Up @@ -317,7 +322,7 @@ If called in read-only mode without an API key.

#### Defined in

[lib/features/subnames/index.ts:275](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L275)
[lib/features/subnames/index.ts:280](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L280)

___

Expand All @@ -342,7 +347,7 @@ The result of the revoke operation.

#### Defined in

[lib/features/subnames/index.ts:174](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L174)
[lib/features/subnames/index.ts:179](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L179)

___

Expand All @@ -367,7 +372,7 @@ The result of the reservation operation.

#### Defined in

[lib/features/subnames/index.ts:88](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L88)
[lib/features/subnames/index.ts:93](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L93)

___

Expand All @@ -393,7 +398,7 @@ The result of the revoke operation.

#### Defined in

[lib/features/subnames/index.ts:156](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L156)
[lib/features/subnames/index.ts:161](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L161)

___

Expand All @@ -413,7 +418,7 @@ ___

#### Defined in

[lib/features/subnames/index.ts:226](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L226)
[lib/features/subnames/index.ts:231](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L231)

___

Expand All @@ -439,4 +444,4 @@ The result of the update operation.

#### Defined in

[lib/features/subnames/index.ts:139](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L139)
[lib/features/subnames/index.ts:144](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/features/subnames/index.ts#L144)
10 changes: 8 additions & 2 deletions docs/docs/sdk/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { JustaName } from '@justaname.id/sdk';

async function main() {
const apiKey = 'your-api-key';
const justaName = await JustaName.init({ apiKey });
const justaName = JustaName.init({ apiKey });
// Your SDK is now ready to be used!
}

Expand All @@ -47,7 +47,7 @@ const requestChallengeResponse = await justaName.siwe.requestChallenge({
chainId: 1,
origin: 'http://localhost:3333',
address: '0x59c44836630760F97b74b569B379ca94c37B93ca',
domain: 'justaname.id',
domain: 'localhost',
});
```

Expand All @@ -58,6 +58,10 @@ const addedUser = await justaName.subnames.addSubname({
username: 'testuser',
ensDomain: 'justaname.id',
chainId: 1,
}, {
xAddress: '0x59c44836630760F97b74b569B379ca94c37B93ca',
xSignature: '...',
xMessage: '...'
});
```

Expand Down Expand Up @@ -94,9 +98,11 @@ A key functionality aspect of the SDK revolves around its methods. Below is a li
- addSubname
- updateSubname
- revokeSubname
- rejectSubname
- getByDomainNameChainId
- getBySubname
- getAllByAddress
- getRecordsByFullName
- getInvitations
- checkSubnameAvailable

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/sdk/core/interfaces/Address.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The cryptocurrency address.

#### Defined in

[lib/types/subnames/accept.ts:13](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/subnames/accept.ts#L13)
[lib/types/subnames/accept.ts:13](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/subnames/accept.ts#L13)

___

Expand All @@ -32,4 +32,4 @@ The coin type number, typically following the BIP-0044 standard.

#### Defined in

[lib/types/subnames/accept.ts:15](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/subnames/accept.ts#L15)
[lib/types/subnames/accept.ts:15](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/subnames/accept.ts#L15)
8 changes: 4 additions & 4 deletions docs/docs/sdk/core/interfaces/AddressResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The actual cryptocurrency address.

#### Defined in

[lib/types/subnames/get-by-domain-name-chainId.ts:19](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L19)
[lib/types/subnames/get-by-domain-name-chainId.ts:19](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L19)

___

Expand All @@ -33,7 +33,7 @@ The cryptocurrency coin type number, typically following a standard like BIP-44.

#### Defined in

[lib/types/subnames/get-by-domain-name-chainId.ts:17](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L17)
[lib/types/subnames/get-by-domain-name-chainId.ts:17](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L17)

___

Expand All @@ -45,7 +45,7 @@ A reference to the metadata associated with this address.

#### Defined in

[lib/types/subnames/get-by-domain-name-chainId.ts:21](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L21)
[lib/types/subnames/get-by-domain-name-chainId.ts:21](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L21)

___

Expand All @@ -57,4 +57,4 @@ The unique identifier of the address record.

#### Defined in

[lib/types/subnames/get-by-domain-name-chainId.ts:15](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L15)
[lib/types/subnames/get-by-domain-name-chainId.ts:15](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/subnames/get-by-domain-name-chainId.ts#L15)
2 changes: 1 addition & 1 deletion docs/docs/sdk/core/interfaces/ApiKeyHeaders.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ The API key provided to the client. This key should be included in API

#### Defined in

[lib/types/headers/index.ts:30](https://github.com/JustaName-id/JustaName-sdk/blob/610ce53/packages/@justaname.id/sdk/src/lib/types/headers/index.ts#L30)
[lib/types/headers/index.ts:30](https://github.com/JustaName-id/JustaName-sdk/blob/1dd4ff6/packages/@justaname.id/sdk/src/lib/types/headers/index.ts#L30)
Loading

0 comments on commit 000cf7c

Please sign in to comment.