add monero accounts/addresses, fix rpc auth, fix binary extraction
This commit is contained in:
@@ -1,5 +1,57 @@
|
||||
import { Electroview } from 'electrobun/view'
|
||||
|
||||
export type MoneroBalance = {
|
||||
balance: string
|
||||
unlocked: string
|
||||
address: string
|
||||
height: number
|
||||
daemonHeight: number
|
||||
}
|
||||
|
||||
export type MoneroTxEntry = {
|
||||
hash: string
|
||||
amount: string
|
||||
timestamp: string
|
||||
direction: 'in' | 'out'
|
||||
height: number
|
||||
note?: string
|
||||
}
|
||||
|
||||
export type MoneroBinaryStatus = {
|
||||
installed: boolean
|
||||
downloading: boolean
|
||||
error?: string
|
||||
}
|
||||
|
||||
export type MoneroWalletStatus = {
|
||||
running: boolean
|
||||
walletOpen: boolean
|
||||
walletName?: string
|
||||
connected: boolean
|
||||
}
|
||||
|
||||
export type MoneroSubaddressEntry = {
|
||||
accountIndex: number
|
||||
index: number
|
||||
address: string
|
||||
label: string
|
||||
balance: string
|
||||
unlockedBalance: string
|
||||
numUnspentOutputs: number
|
||||
isUsed: boolean
|
||||
numBlocksToUnlock: number
|
||||
}
|
||||
|
||||
export type MoneroAccountEntry = {
|
||||
index: number
|
||||
primaryAddress: string
|
||||
label: string
|
||||
balance: string
|
||||
unlockedBalance: string
|
||||
tag?: string
|
||||
subaddresses: MoneroSubaddressEntry[]
|
||||
}
|
||||
|
||||
export type TxEntry = {
|
||||
hash: string
|
||||
timeStamp: string
|
||||
@@ -82,6 +134,68 @@ type RPC = {
|
||||
}
|
||||
response: void
|
||||
}
|
||||
moneroBinaryStatus: {
|
||||
params: {}
|
||||
response: MoneroBinaryStatus
|
||||
}
|
||||
moneroDownloadBinary: {
|
||||
params: {}
|
||||
response: void
|
||||
}
|
||||
moneroStart: {
|
||||
params: {
|
||||
daemonAddress?: string
|
||||
}
|
||||
response: MoneroWalletStatus
|
||||
}
|
||||
moneroStop: {
|
||||
params: {}
|
||||
response: void
|
||||
}
|
||||
moneroCreateWallet: {
|
||||
params: {
|
||||
name: string
|
||||
password: string
|
||||
}
|
||||
response: {
|
||||
mnemonic: string
|
||||
address: string
|
||||
}
|
||||
}
|
||||
moneroRestoreWallet: {
|
||||
params: {
|
||||
name: string
|
||||
password: string
|
||||
mnemonic: string
|
||||
restoreHeight?: number
|
||||
}
|
||||
response: {
|
||||
address: string
|
||||
}
|
||||
}
|
||||
moneroOpenWallet: {
|
||||
params: {
|
||||
name: string
|
||||
password: string
|
||||
}
|
||||
response: void
|
||||
}
|
||||
moneroGetBalance: {
|
||||
params: {}
|
||||
response: MoneroBalance
|
||||
}
|
||||
moneroGetTransactions: {
|
||||
params: {}
|
||||
response: MoneroTxEntry[]
|
||||
}
|
||||
moneroWalletStatus: {
|
||||
params: {}
|
||||
response: MoneroWalletStatus
|
||||
}
|
||||
moneroGetAccounts: {
|
||||
params: {}
|
||||
response: MoneroAccountEntry[]
|
||||
}
|
||||
}
|
||||
messages: {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user