Appearance
Types and interfaces
SupportedWallet
typescript
type SupportedWallet = 'peakvault' | 'keychain' | 'metamask'
KeyRole
typescript
type KeyRole = 'posting' | 'active' | 'memo'
DisplayMessage
typescript
type DisplayMessage = string | { title: string; message?: string }
The form with just one string
is equivalent to {title: string}
.
HiveWalletResponse
typescript
interface HiveWalletResponse {
success: boolean
error: string
message?: string
account: string
publicKey?: string
result: any
}
Consider also reading HiveWalletBroadcastResponse
and HiveWalletSignResponse
that further specify the type of the result
field.
HiveWalletBroadcastResponse
An extension of HiveWalletResponse
that further specifies the type of the result
field.
typescript
interface HiveWalletBroadcastResponse extends HiveWalletResponse {
result: {
tx_id: string
status: string
}
}
HiveWalletSignResponse
An extension of HiveWalletResponse
that further specifies the type of the result
field. SignedTrx
refers to a signed transaction.
typescript
interface HiveWalletSignResponse extends HiveWalletResponse {
result: SignedTrx
}
Trx
Hive transaction object.
typescript
interface Trx {
ref_block_num: number
ref_block_prefix: number
expiration: string
operations: Operation[]
extensions: any
}
SignedTrx
An extension of Trx
that includes the signatures.
typescript
interface SignedTrx extends Trx {
singatures: string[]
}
PostJsonMetadata
typescript
interface PostJsonMetadata {
tags?: string[]
app?: string
format?: string
[key: string]: any
}
PostOtherOptions
typescript
interface PostOtherOptions {
max_accepted_payout: string
percent_hbd: number
allow_votes: boolean
allow_curation_rewards: boolean
extensions:
| []
| [[number, { beneficiaries?: { account: string; weight: number }; [key: string]: any }]]
}