# Identity | Stacks.js 1.0.0 Library Reference
Documentation for Stacks.js 1.0.0 Library Reference

### Hierarchy

- Identity

## Index

### Constructors

- constructor

### Properties

- address
- defaultUsername
- keyPair
- profile
- usernames

### Methods

- appPrivateKey
- fetchNames
- makeAuthResponse
- profileUrl
- refresh

## Constructors

### constructor

- new Identity(__namedParameters: { address: string; defaultUsername: undefined | string; keyPair: IdentityKeyPair ; profile: undefined | Profile ; usernames: undefined | string[] }): Identity

- - Defined in packages/keychain/src/identity.ts:34

  #### Parameters

  - ##### __namedParameters: { address: string; defaultUsername: undefined | string; keyPair: IdentityKeyPair ; profile: undefined | Profile ; usernames: undefined | string[] }

    - ##### address: string

    - ##### defaultUsername: undefined | string

    - ##### keyPair: IdentityKeyPair

    - ##### profile: undefined | Profile

    - ##### usernames: undefined | string[]

  #### Returns Identity

## Properties

### address

address: string

- Defined in packages/keychain/src/identity.ts:31

### Optional defaultUsername

defaultUsername: undefined | string

- Defined in packages/keychain/src/identity.ts:32

### keyPair

keyPair: IdentityKeyPair

- Defined in packages/keychain/src/identity.ts:30

### Optional profile

profile: Profile

- Defined in packages/keychain/src/identity.ts:34

### usernames

usernames: string[]

- Defined in packages/keychain/src/identity.ts:33

## Methods

### appPrivateKey

- appPrivateKey(appDomain: string): string

- - Defined in packages/keychain/src/identity.ts:114

  #### Parameters

  - ##### appDomain: string

  #### Returns string

### fetchNames

- fetchNames(): Promise<string[]>

- - Defined in packages/keychain/src/identity.ts:134

  #### Returns Promise<string[]>

### makeAuthResponse

- makeAuthResponse(__namedParameters: { appDomain: string; gaiaUrl: string; scopes: string[]; stxAddress: undefined | string; transitPublicKey: string }): Promise<string>

- - Defined in packages/keychain/src/identity.ts:50

  #### Parameters

  - ##### __namedParameters: { appDomain: string; gaiaUrl: string; scopes: string[]; stxAddress: undefined | string; transitPublicKey: string }

    - ##### appDomain: string

    - ##### gaiaUrl: string

    - ##### scopes: string[]

    - ##### stxAddress: undefined | string

    - ##### transitPublicKey: string

  #### Returns Promise<string>

### profileUrl

- profileUrl(gaiaUrl: string): Promise<string>

- - Defined in packages/keychain/src/identity.ts:120

  #### Parameters

  - ##### gaiaUrl: string

  #### Returns Promise<string>

### refresh

- refresh(opts?: RefreshOptions ): Promise<void>

- - Defined in packages/keychain/src/identity.ts:145

  Fetch existing information related to this identity, like username and profile information

  #### Parameters

  - ##### Default value opts: RefreshOptions = { gaiaUrl: DEFAULT_GAIA_HUB }

  #### Returns Promise<void>

Generated using TypeDoc