Documentation

AkashicChain
in package

Table of Contents

Constants

NITR0GEN_NATIVE_COIN  = "#native"

Properties

$contracts  : mixed
$dbIndex  : int

Methods

__construct()  : mixed
buildPayoutTransaction()  : array<string|int, mixed>
Builds an L1 payout transaction that still needs to be signed and can then be sent directly to AC.
checkForAkashicChainError()  : string|null
Check for errors in the AkashicChain response
differentialConsensusTransaction()  : IBaseTransaction
Create a differential consensus transaction
keyCreateTransaction()  : IBaseTransaction
Create a key creation transaction
l2Transaction()  : array<string|int, mixed>
onboardOtkTransaction()  : array<string|int, mixed>
Create an onboard OTK transaction
signTransaction()  : array<string|int, mixed>
addExpireToTxBody()  : array<string|int, mixed>
Adds expiry time to the transaction body.
convertChainErrorToAkashicError()  : string
Converts chain error to Akashic error based on predefined conditions.
getACNetwork()  : string
Get the AC Network for the given coin symbol
getACSymbol()  : string
Get the AC Symbol for the given coin symbol
isChainErrorSavingsExceeded()  : bool
Checks if the error is related to savings exceeded.

Constants

NITR0GEN_NATIVE_COIN

public mixed NITR0GEN_NATIVE_COIN = "#native"

Properties

Methods

__construct()

public __construct(mixed $env) : mixed
Parameters
$env : mixed

buildPayoutTransaction()

Builds an L1 payout transaction that still needs to be signed and can then be sent directly to AC.

public buildPayoutTransaction(array<string|int, mixed> $params) : array<string|int, mixed>
APIYes

For use only when the backend is unavailable.

Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

checkForAkashicChainError()

Check for errors in the AkashicChain response

public checkForAkashicChainError(array<string|int, mixed> $response) : string|null
Parameters
$response : array<string|int, mixed>
Tags
throws
Exception
Return values
string|null

differentialConsensusTransaction()

Create a differential consensus transaction

public differentialConsensusTransaction(array<string|int, mixed> $otk, array<string|int, mixed> $key, string $identifier) : IBaseTransaction
Parameters
$otk : array<string|int, mixed>
$key : array<string|int, mixed>
$identifier : string
Return values
IBaseTransaction

keyCreateTransaction()

Create a key creation transaction

public keyCreateTransaction(string $coinSymbol, array<string|int, mixed> $otk) : IBaseTransaction
Parameters
$coinSymbol : string

(i.e. a NetworkSymbol)

$otk : array<string|int, mixed>
Return values
IBaseTransaction

l2Transaction()

public l2Transaction(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Return values
array<string|int, mixed>

onboardOtkTransaction()

Create an onboard OTK transaction

public onboardOtkTransaction(array<string|int, mixed> $otk) : array<string|int, mixed>
Parameters
$otk : array<string|int, mixed>
Return values
array<string|int, mixed>

the shape of an

signTransaction()

public signTransaction(mixed $txBody, array<string|int, mixed> $otk) : array<string|int, mixed>
Parameters
$txBody : mixed
$otk : array<string|int, mixed>
Return values
array<string|int, mixed>

addExpireToTxBody()

Adds expiry time to the transaction body.

private addExpireToTxBody(array<string|int, mixed> &$txBody) : array<string|int, mixed>
Parameters
$txBody : array<string|int, mixed>
Return values
array<string|int, mixed>

convertChainErrorToAkashicError()

Converts chain error to Akashic error based on predefined conditions.

private convertChainErrorToAkashicError(string $error) : string
Parameters
$error : string
Return values
string

getACSymbol()

Get the AC Symbol for the given coin symbol

private getACSymbol(string $coinSymbol) : string
Parameters
$coinSymbol : string

(i.e. a NetworkSymbol)

Return values
string

isChainErrorSavingsExceeded()

Checks if the error is related to savings exceeded.

private isChainErrorSavingsExceeded(string $error) : bool
Parameters
$error : string
Return values
bool

        
On this page

Search results