Search
Preparing search index...
The search index is not available
Celer Light Client API Docs
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"data/payment_channel"
PaymentChannel
Class PaymentChannel
Hierarchy
PaymentChannel
Index
Constructors
constructor
Properties
channel
Id
deposit
Withdrawal
peer
Address
self
Address
status
token
Address
token
Type
Methods
calculate
Balance
get
Incoming
Signed
Simplex
State
get
Outgoing
Signed
Simplex
State
set
Incoming
Signed
Simplex
State
set
Outgoing
Signed
Simplex
State
deserialize
Signed
Simplex
State
sign
Updated
Simplex
State
verify
Incoming
Channel
Existence
verify
Incoming
Common
Simplex
States
Constructors
constructor
new
Payment
Channel
(
channelId
:
string
, selfAddress
:
string
, peerAddress
:
string
, tokenType
:
0
|
2
|
1
, tokenAddress
:
string
)
:
PaymentChannel
Parameters
channelId:
string
selfAddress:
string
peerAddress:
string
tokenType:
0
|
2
|
1
tokenAddress:
string
Returns
PaymentChannel
Properties
channel
Id
channel
Id
:
string
deposit
Withdrawal
deposit
Withdrawal
:
DepositWithdrawal
peer
Address
peer
Address
:
string
self
Address
self
Address
:
string
status
status
:
PaymentChannelStatus
token
Address
token
Address
:
string
token
Type
token
Type
:
0
|
2
|
1
Methods
calculate
Balance
calculate
Balance
(
)
:
Balance
Returns
Balance
get
Incoming
Signed
Simplex
State
get
Incoming
Signed
Simplex
State
(
)
:
SignedSimplexState
Returns
SignedSimplexState
get
Outgoing
Signed
Simplex
State
get
Outgoing
Signed
Simplex
State
(
)
:
SignedSimplexState
Returns
SignedSimplexState
set
Incoming
Signed
Simplex
State
set
Incoming
Signed
Simplex
State
(
state
:
SignedSimplexState
)
:
void
Parameters
state:
SignedSimplexState
Returns
void
set
Outgoing
Signed
Simplex
State
set
Outgoing
Signed
Simplex
State
(
state
:
SignedSimplexState
)
:
void
Parameters
state:
SignedSimplexState
Returns
void
Static
deserialize
Signed
Simplex
State
deserialize
Signed
Simplex
State
(
signedSimplexState
:
SignedSimplexState
)
:
[
SimplexPaymentChannel
,
Uint8Array
]
Parameters
signedSimplexState:
SignedSimplexState
Returns
[
SimplexPaymentChannel
,
Uint8Array
]
Static
sign
Updated
Simplex
State
sign
Updated
Simplex
State
(
cryptoManager
:
CryptoManager
, signedSimplexState
:
SignedSimplexState
, simplexState
:
SimplexPaymentChannel
)
:
Promise
<
void
>
Parameters
cryptoManager:
CryptoManager
signedSimplexState:
SignedSimplexState
simplexState:
SimplexPaymentChannel
Returns
Promise
<
void
>
Static
verify
Incoming
Channel
Existence
verify
Incoming
Channel
Existence
(
db
:
Database
, receivedChannelId
:
string
)
:
Promise
<
object
>
Parameters
db:
Database
receivedChannelId:
string
Returns
Promise
<
object
>
Static
verify
Incoming
Common
Simplex
States
verify
Incoming
Common
Simplex
States
(
channel
:
PaymentChannel
, peerAddress
:
string
, receivedChannelId
:
string
, receivedBaseSeqNum
:
number
, receivedSignedSimplexState
:
SignedSimplexState
, receivedSimplexState
:
SimplexPaymentChannel
, receivedSimplexStateBytes
:
Uint8Array
, storedSimplexState
:
SimplexPaymentChannel
)
:
VerificationResult
Parameters
channel:
PaymentChannel
peerAddress:
string
receivedChannelId:
string
receivedBaseSeqNum:
number
receivedSignedSimplexState:
SignedSimplexState
receivedSimplexState:
SimplexPaymentChannel
receivedSimplexStateBytes:
Uint8Array
storedSimplexState:
SimplexPaymentChannel
Returns
VerificationResult
Globals
"data/payment_
channel"
Payment
Channel
Status
Payment
Channel
constructor
channel
Id
deposit
Withdrawal
peer
Address
self
Address
status
token
Address
token
Type
calculate
Balance
get
Incoming
Signed
Simplex
State
get
Outgoing
Signed
Simplex
State
set
Incoming
Signed
Simplex
State
set
Outgoing
Signed
Simplex
State
deserialize
Signed
Simplex
State
sign
Updated
Simplex
State
verify
Incoming
Channel
Existence
verify
Incoming
Common
Simplex
States
Made by
Horyus
. Documentation generated by
TypeDoc.