Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PaymentChannel

Index

Constructors

constructor

  • new PaymentChannel(channelId: string, selfAddress: string, peerAddress: string, tokenType: 0 | 2 | 1, tokenAddress: string): PaymentChannel

Properties

channelId

channelId: string

depositWithdrawal

depositWithdrawal: DepositWithdrawal

peerAddress

peerAddress: string

selfAddress

selfAddress: string

status

tokenAddress

tokenAddress: string

tokenType

tokenType: 0 | 2 | 1

Methods

calculateBalance

getIncomingSignedSimplexState

  • getIncomingSignedSimplexState(): SignedSimplexState

getOutgoingSignedSimplexState

  • getOutgoingSignedSimplexState(): SignedSimplexState

setIncomingSignedSimplexState

  • setIncomingSignedSimplexState(state: SignedSimplexState): void

setOutgoingSignedSimplexState

  • setOutgoingSignedSimplexState(state: SignedSimplexState): void

Static deserializeSignedSimplexState

  • deserializeSignedSimplexState(signedSimplexState: SignedSimplexState): [SimplexPaymentChannel, Uint8Array]

Static signUpdatedSimplexState

  • signUpdatedSimplexState(cryptoManager: CryptoManager, signedSimplexState: SignedSimplexState, simplexState: SimplexPaymentChannel): Promise<void>

Static verifyIncomingChannelExistence

  • verifyIncomingChannelExistence(db: Database, receivedChannelId: string): Promise<object>

Static verifyIncomingCommonSimplexStates

  • verifyIncomingCommonSimplexStates(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

Made by Horyus. Documentation generated by TypeDoc.