Skip to content

Latest commit

 

History

History
583 lines (432 loc) · 19.9 KB

API.md

File metadata and controls

583 lines (432 loc) · 19.9 KB

Classes

CardanocliJs

Typedefs

lovelace
path
paymentAddr
stakeAddr
TxIn : Object
TxOut : Object
MintAction : Object
Mint : Object
Certificate : Object
Withdrawal : Object

CardanocliJs

Kind: global class

new CardanocliJs(options)

Param Type Description
options Object
[options.shelleyGenesisPath] path
[options.socketPath] path Default: Env Variable
[options.cliPath] path Default: Env Variable
[options.dir] path Default: Working Dir
[options.era] string
[options.network] string Default: mainnet
[options.httpProvider] string Optional - Useful when using cli at different location than node or in browser

cardanocliJs.queryProtocolParameters() ⇒ object

Kind: instance method of CardanocliJs

cardanocliJs.queryTip() ⇒ object

Kind: instance method of CardanocliJs

cardanocliJs.queryStakeAddressInfo(address) ⇒ object

Kind: instance method of CardanocliJs

Param Type
address stakeAddr

cardanocliJs.queryUtxo(address) ⇒ object

Kind: instance method of CardanocliJs

Param Type
address paymentAddr

cardanocliJs.addressKeyGen(account)

Kind: instance method of CardanocliJs

Param Type Description
account string Name of account

cardanocliJs.stakeAddressKeyGen(account)

Kind: instance method of CardanocliJs

Param Type Description
account string Name of account

cardanocliJs.stakeAddressBuild(account) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
account string Name of account

cardanocliJs.addressBuild(account, options)

Kind: instance method of CardanocliJs

Param Type Description
account string Name of account
options Object
[options.paymentVkey] path
[options.stakeVkey] path
[options.paymentScript] object
[options.stakeScript] object

cardanocliJs.addressKeyHash(account)

Kind: instance method of CardanocliJs

Param Type Description
account string Name of account

cardanocliJs.addressInfo(address) ⇒ object

Kind: instance method of CardanocliJs

Param Type
address paymentAddr

cardanocliJs.addressBuildScript(script) ⇒ paymentAddr

Kind: instance method of CardanocliJs

Param Type
script object

cardanocliJs.wallet(account)

Kind: instance method of CardanocliJs

Param Type Description
account string Name of the account

cardanocliJs.pool(poolName)

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool

cardanocliJs.stakeAddressRegistrationCertificate(account) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
account string Name of the account

cardanocliJs.stakeAddressDeregistrationCertificate(account) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
account string Name of the account

cardanocliJs.stakeAddressDelegationCertificate(account, poolId) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
account string Name of the account
poolId string Stake pool verification key (Bech32 or hex-encoded)

cardanocliJs.stakeAddressKeyHash(account) ⇒ string

Kind: instance method of CardanocliJs

Param Type Description
account string Name of the account

cardanocliJs.nodeKeyGenKES(poolName)

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool

cardanocliJs.nodeKeyGen(poolName)

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool

cardanocliJs.nodeIssueOpCert(poolName, [kesPeriod]) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool
[kesPeriod] number Optional (Offline mode)

cardanocliJs.nodeKeyGenVRF(poolName)

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool

cardanocliJs.stakePoolId(poolName) ⇒ string

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool

cardanocliJs.stakePoolMetadataHash(metadata) ⇒ string

Kind: instance method of CardanocliJs

Param Type Description
metadata string Raw File

cardanocliJs.stakePoolRegistrationCertificate(poolName, options) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool
options Object
options.pledge lovelace
options.margin number
options.cost lovelace
options.url string
options.metaHash string
options.rewardAccount path
options.owners Array.<path>
options.relays Array.<Object>

cardanocliJs.stakePoolDeregistrationCertificate(poolName, epoch) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
poolName string Name of the pool
epoch number Retirement Epoch

cardanocliJs.transactionBuildRaw(options) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
options Object
options.txIn Array.<TxIn>
options.txOut Array.<TxOut>
[options.withdrawals] Array.<Withdrawal>
[options.certs] Array.<Certificate>
[options.fee] lovelace
[options.mint] Mint
[options.auxScript] Array.<object>
[options.metadata] object
[options.invalidBefore] number Default: 0
[options.invalidAfter] number Default: current+10000

cardanocliJs.transactionCalculateMinFee(options) ⇒ lovelace

Kind: instance method of CardanocliJs

Param Type
options Object
options.txBody path
options.txIn Array.<object>
options.txOut Array.<object>
options.witnessCount number

cardanocliJs.transactionPolicyid(script) ⇒ string

Kind: instance method of CardanocliJs
Returns: string - - Policy Id

Param Type
script object

cardanocliJs.transactionSign(options) ⇒ path

Kind: instance method of CardanocliJs

Param Type Description
options Object
options.signingKeys Array.<path> One ore more signing keys
options.txBody path

cardanocliJs.transactionWitness(options) ⇒ path

Kind: instance method of CardanocliJs

Param Type
options Object
options.txBody path
options.signingKey path

cardanocliJs.transactionAssemble(options) ⇒ path

Kind: instance method of CardanocliJs

Param Type
options Object
options.txBody path
options.witnessFiles Array.<path>

cardanocliJs.transactionCalculateMinValue(value) ⇒ lovelace

Kind: instance method of CardanocliJs

Param Type
value object

cardanocliJs.transactionSubmit(tx) ⇒ string

Kind: instance method of CardanocliJs
Returns: string - - Transaction Hash

Param Type Description
tx path | string Path or Signed Tx File

cardanocliJs.transactionTxid(options) ⇒ path

Kind: instance method of CardanocliJs

Param Type
options Object
[options.txBody] path
[options.txFile] path

cardanocliJs.transactionView(options) ⇒ path

Kind: instance method of CardanocliJs

Param Type
options Object
[options.txBody] path
[options.txFile] path

cardanocliJs.KESPeriod() ⇒ number

Kind: instance method of CardanocliJs

cardanocliJs.getDownloadUrl(filePath) ⇒ path

Kind: instance method of CardanocliJs
Returns: path - - Download link for the file

Param Type
filePath path

cardanocliJs.toLovelace(ada) ⇒ lovelace

Kind: instance method of CardanocliJs

Param Type
ada number

cardanocliJs.toAda(lovelace) ⇒ number

Kind: instance method of CardanocliJs

Param Type
lovelace lovelace

lovelace

Kind: global typedef
Properties

Type
number

path

Kind: global typedef
Properties

Type
string

paymentAddr

Kind: global typedef
Properties

Type
string

stakeAddr

Kind: global typedef
Properties

Type
string

TxIn : Object

Kind: global typedef
Properties

Name Type
txHash string
txId string
[script] object

TxOut : Object

Kind: global typedef
Properties

Name Type
address string
value object

MintAction : Object

Kind: global typedef
Properties

Name Type
action string
quantity number
asset string

Mint : Object

Kind: global typedef
Properties

Name Type
mintAction Array.<MintAction>
script Array.<object>

Certificate : Object

Kind: global typedef
Properties

Name Type
cert path
[script] object

Withdrawal : Object

Kind: global typedef
Properties

Name Type
stakingAddress string
reward lovelace
[script] object