-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More pools are needed
- Loading branch information
Showing
43 changed files
with
6,537 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare var JSBigInt : any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
interface CnUtilClass{ | ||
generate_key_derivation(tx_pub_key:string, priv_view_key:string) : string; | ||
|
||
decode_rct_ecdh(ecdh : string, key : string) : { | ||
mask: string, | ||
amount: string | ||
}; | ||
|
||
derivation_to_scalar(derivation : string, output_index : number) : string; | ||
|
||
derive_public_key(derivation : string, out_index : number, pub : string) : string; | ||
|
||
derive_secret_key(derivation : string, out_index : number, sec : string) : string; | ||
|
||
generate_key_image_2(pub : string, sec : string) : string; | ||
pubkeys_to_string(spend : string, view : string) : string; | ||
sec_key_to_pub(sec : string) : string; | ||
encode_varint(i : number) : string; | ||
cn_fast_hash(input : string) : string; | ||
|
||
decode_address(address : string) : {spend:string, view:string, intPaymentId?:string}; | ||
|
||
zeroCommit(string : string) : string; | ||
d2s(str : number) : string; | ||
|
||
estimateRctSize(inputs:number, mixin:number, outputs:number) : number; | ||
formatMoney(amount : number) : string; | ||
formatMoneySymbol(amount : number) : string; | ||
formatMoneyFull(amount : number) : string; | ||
formatMoneyFullSymbol(amount : number) : string; | ||
|
||
create_address(seed : string) : { | ||
spend:{ | ||
sec:string, | ||
pub:string | ||
}, | ||
view:{ | ||
sec:string, | ||
pub:string | ||
}, | ||
public_addr:string | ||
}; | ||
random_scalar() : string; | ||
printDsts(data : any) : void; | ||
|
||
decompose_tx_destinations(dest : {address:string,amount:number}[], rct : boolean) : {address:string,amount:number}[]; | ||
|
||
create_transaction( | ||
pub_keys:{spend:string,view:string}, | ||
sec_keys:{spend:string,view:string}, | ||
dsts : {address:string,amount:number}[], | ||
outputs : { | ||
amount:number, | ||
public_key:string, | ||
index:number, | ||
global_index:number, | ||
rct:string, | ||
tx_pub_key:string, | ||
}[], | ||
mix_outs:{ | ||
outputs:{ | ||
rct: string, | ||
public_key:string, | ||
global_index:number | ||
}[], | ||
amount:0 | ||
}[], | ||
fake_outputs_count:number, | ||
fee_amount : any/*JSBigInt*/, | ||
payment_id : string, | ||
pid_encrypt : boolean, | ||
realDestViewKey : string|undefined, | ||
unlock_time : number, | ||
rct:boolean | ||
) : { | ||
extra:string, | ||
prvkey:string, | ||
rct_signatures:{ | ||
type:number, | ||
message:string, | ||
outPk:any, | ||
p:any, | ||
ecdhInfo:any | ||
}, | ||
unlock_time:number, | ||
version:number, | ||
vin:any, | ||
vout:any, | ||
}; | ||
|
||
serialize_rct_tx_with_hash(signed : any) : { | ||
hash:string, | ||
prvKey:string, | ||
raw:string | ||
} | ||
|
||
random_keypair() : {sec:any,pub:any} | ||
|
||
sc_reduce32(seed : string) : string; | ||
generate_keys(seed : string) : {sec:string,pub:string}; | ||
rand_32() : string; | ||
|
||
decrypt_payment_id(payment_id8 : string, tx_public_key : string, acc_prv_view_key : string) : string; | ||
|
||
get_account_integrated_address(address : string, paymentId8 : string) : string; | ||
|
||
} | ||
|
||
declare var cnUtil : CnUtilClass; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
declare var config : { | ||
apiUrl:string, | ||
mainnetExplorerUrl: string, | ||
testnetExplorerUrl: string, | ||
testnet: boolean, | ||
coinUnitPlaces: number, | ||
txMinConfirms: number, // corresponds to CRYPTONOTE_DEFAULT_TX_SPENDABLE_AGE in Monero | ||
txCoinbaseMinConfirms: number, // corresponds to CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW in Monero | ||
coinSymbol: string, | ||
openAliasPrefix: string, | ||
coinName: string, | ||
coinUriPrefix: string, | ||
addressPrefix: number, | ||
integratedAddressPrefix: number, | ||
addressPrefixTestnet: number, | ||
integratedAddressPrefixTestnet: number, | ||
subAddressPrefix: number, | ||
subAddressPrefixTestnet: number, | ||
feePerKB: any, | ||
dustThreshold: any, | ||
defaultMixin: number, // default mixin | ||
txChargeAddress: string, | ||
idleTimeout: number, | ||
idleWarningDuration: number, | ||
maxBlockNumber: number, | ||
avgBlockTime: number, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare var $ : any; | ||
declare var jQuery : any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
declare function swal(params : { | ||
type?:'success'|'error'|'info'|'warning', | ||
title:string, | ||
text?:string, | ||
input?:'text'|'password'|'email'|'select', | ||
html?:string, | ||
showCancelButton?:boolean, | ||
confirmButtonText?:string, | ||
focusConfirm?:boolean, | ||
preConfirm?:Function | ||
onOpen?:Function, | ||
onClose?:Function, | ||
inputOptions?:Map<string,string>|any, | ||
reverseButtons?:boolean, | ||
cancelButtonText?:string, | ||
}) : Promise<any>; | ||
|
||
declare namespace swal{ | ||
function showLoading() : void; | ||
function hideLoading() : void; | ||
function close() : void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
type VueConstructObject = {el:string,data:any, watch?:any, computed?:any, updated?:any, mounted?:any, methods?:any}; | ||
type VueComponentObject = { | ||
template:string, | ||
props?:Array<string>, | ||
data?:Function, | ||
watch?:any, | ||
computed:any | ||
} | ||
|
||
// declare var Vue : any; | ||
declare class Vue{ | ||
constructor(any : VueConstructObject|string|null); | ||
|
||
$nextTick(callback : Function) : void; | ||
$forceUpdate() : void; | ||
|
||
static component(componentName : string, data : VueComponentObject) : void; | ||
static filter(name : string, callback : Function) : void; | ||
|
||
static options : { | ||
components:any, | ||
filters:any | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare var workbox : any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
declare function postMessage(data : any) : void; | ||
declare function importScripts(path : string) : void; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Modules to control application life and create native browser window | ||
// const {app, BrowserWindow} = require('electron'); | ||
|
||
import {app, BrowserWindow} from "electron"; | ||
let open = require("open"); | ||
|
||
let mainWindow : any; | ||
|
||
function createWindow () { | ||
// Create the browser window. | ||
mainWindow = new BrowserWindow( | ||
{ | ||
width: 500, | ||
height: 900, | ||
center:true, | ||
resizable:false, | ||
title:'Masari OneClick Miner', | ||
icon:'views/imgs/icon-128x128.png', | ||
autoHideMenuBar:true, | ||
}); | ||
|
||
mainWindow.loadFile('views/index.html'); | ||
|
||
mainWindow.on('closed', function () { | ||
mainWindow = null; | ||
}); | ||
|
||
mainWindow.on('new-window', function(event : any, url : string){ | ||
event.preventDefault(); | ||
alert('open '+url); | ||
open(url); | ||
}); | ||
} | ||
|
||
app.on('ready', createWindow); | ||
|
||
// Quit when all windows are closed. | ||
app.on('window-all-closed', function () { | ||
// On OS X it is common for applications and their menu bar | ||
// to stay active until the user quits explicitly with Cmd + Q | ||
if (process.platform !== 'darwin') { | ||
app.quit() | ||
} | ||
}); | ||
|
||
app.on('activate', function () { | ||
// On OS X it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open. | ||
if (mainWindow === null) { | ||
createWindow(); | ||
} | ||
}); |
Oops, something went wrong.