Orderly network core.LocalStorageStore
Orderly SDKs / Modules / @orderly.network/core / LocalStorageStore
Class: LocalStorageStore
@orderly.network/core.LocalStorageStore
Hierarchy
-
↳
LocalStorageStore
Table of contents
Constructors
Accessors
Methods
- cleanAllKey
- cleanKey
- generateKey
- getAccountId
- getAddress
- getItem
- getOrderlyKey
- setAccountId
- setAddress
- setItem
- setKey
Constructors
constructor
• new LocalStorageStore(networkId?
)
Parameters
Name | Type | Default value |
---|---|---|
networkId | string | "testnet" |
Inherited from
Defined in
packages/core/src/keyStore.ts:16
Accessors
keyPrefix
• Protected
get
keyPrefix(): string
Returns
string
Inherited from
BaseKeyStore.keyPrefix
Defined in
packages/core/src/keyStore.ts:29
Methods
cleanAllKey
▸ cleanAllKey(address
): void
Parameters
Name | Type |
---|---|
address | string |
Returns
void
Overrides
Defined in
packages/core/src/keyStore.ts:83
cleanKey
▸ cleanKey(address
, key
): void
Parameters
Name | Type |
---|---|
address | string |
key | string |
Returns
void
Overrides
Defined in
packages/core/src/keyStore.ts:87
generateKey
▸ generateKey(): OrderlyKeyPair
Returns
Overrides
Defined in
packages/core/src/keyStore.ts:73
getAccountId
▸ getAccountId(address
): undefined
| null
| string
Parameters
Name | Type |
---|---|
address | string |
Returns
undefined
| null
| string
Overrides
Defined in
packages/core/src/keyStore.ts:55
getAddress
▸ getAddress(): undefined
| null
| string
Returns
undefined
| null
| string
Overrides
Defined in
packages/core/src/keyStore.ts:64
getItem
▸ Private
getItem(address
, name?
): any
Parameters
Name | Type |
---|---|
address | string |
name? | string |
Returns
any
Defined in
packages/core/src/keyStore.ts:112
getOrderlyKey
▸ getOrderlyKey(address?
): null
| OrderlyKeyPair
Parameters
Name | Type |
---|---|
address? | string |
Returns
null
| OrderlyKeyPair
Overrides
Defined in
packages/core/src/keyStore.ts:35
setAccountId
▸ setAccountId(address
, accountId
): void
Parameters
Name | Type |
---|---|
address | string |
accountId | string |
Returns
void
Overrides
Defined in
packages/core/src/keyStore.ts:59
setAddress
▸ setAddress(address
): void
Parameters
Name | Type |
---|---|
address | string |
Returns
void
Overrides
Defined in
packages/core/src/keyStore.ts:68
setItem
▸ Private
setItem(address
, value
): void
Parameters
Name | Type |
---|---|
address | string |
value | Record <string , any > |
Returns
void
Defined in
packages/core/src/keyStore.ts:93
setKey
▸ setKey(address
, orderlyKey
): void
Parameters
Name | Type |
---|---|
address | string |
orderlyKey | OrderlyKeyPair |
Returns
void