mirror of
https://github.com/logos-storage/nim-nitro.git
synced 2026-01-03 14:13:09 +00:00
21 lines
517 B
Nim
21 lines
517 B
Nim
import ./basics
|
|
import ./channelupdate
|
|
import ./protocol
|
|
|
|
func startLedger*(me: EthAddress,
|
|
hub: EthAddress,
|
|
chainId: UInt256,
|
|
nonce: UInt48,
|
|
asset: EthAddress,
|
|
amount: UInt256): ChannelUpdate =
|
|
ChannelUpdate(
|
|
state: State(
|
|
channel: ChannelDefinition(
|
|
chainId: chainId,
|
|
participants: @[me, hub],
|
|
nonce: nonce
|
|
),
|
|
outcome: Outcome.init(asset, {me.toDestination: amount})
|
|
)
|
|
)
|