0.2.0 • Published 4 years ago

cron-wallet-alpha v0.2.0

Weekly downloads
15
License
-
Repository
-
Last release
4 years ago

Wallet

Kind: global class

new Wallet(privateKey)

Import or create instance with new privateKey

Returns: Wallet - class instance

ParamType
privateKeyString

wallet.getPrivateKey() ⇒ String

Getting privateKey

Kind: instance method of Wallet
Returns: String - privateKey

wallet.getPublicKey() ⇒ String

Getting publicKey

Kind: instance method of Wallet
Returns: String - publicKey

wallet.getScriptHash() ⇒ String

Getting scriptHash

Kind: instance method of Wallet
Returns: String - scriptHash

wallet.getAddress() ⇒ String

Getting address of wallet

Kind: instance method of Wallet
Returns: String - address

wallet.sign(data) ⇒ String

Creating signature of data by privateKey

Kind: instance method of Wallet
Returns: String - signature

ParamType
dataString

wallet.verify(data, signature) ⇒ Boolean

Checking signature of data by publicKey

Kind: instance method of Wallet
Returns: Boolean - result of checking

ParamType
dataString
signatureString

Wallet.getPublicKeyFromPrivateKey(privateKey) ⇒ String

staticGenerate publicKey by privateKey

Kind: static method of Wallet
Returns: String - publicKey

ParamType
privateKeyString

Wallet.getScriptHashFromPublicKey(publicKey) ⇒ String

staticGenerate scriptHash by publicKey

Kind: static method of Wallet
Returns: String - scriptHash

ParamType
publicKeyString

Wallet.getAddressFromScriptHash(scriptHash) ⇒ String

staticGenerate address by scriptHash

Kind: static method of Wallet
Returns: String - address

ParamType
scriptHashString

Wallet.getScriptHashFromAddress(address) ⇒ String

staticGenerate scriptHash by address

Kind: static method of Wallet
Returns: String - scriptHash

ParamType
addressString

Wallet.sign(data, privateKey) ⇒ String

staticCreating signature of data by privateKey

Kind: static method of Wallet
Returns: String - signature

ParamType
dataString
privateKeyString

Wallet.verify(data, signature, publicKey) ⇒ Boolean

staticChecking signature of data by publicKey

Kind: static method of Wallet
Returns: Boolean - result of checking

ParamType
dataString
signatureString
publicKeyString
0.2.0

4 years ago

0.1.0

4 years ago

0.1.1

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago