Documentation ¶
Index ¶
- Constants
- func CancelTransfer(publicIdentifier string, channelId string, transferId string) error
- func GetChannels(publicIdentifier string) ([]string, error)
- func SetHost(h string)
- type ActiveTransfer
- type CancelTransferResponse
- type Config
- type TransferBalance
- type TransferResolve
- type TransferState
- type VectorChannel
Constants ¶
View Source
const ( AssetETH = "0x0000000000000000000000000000000000000000" AssetUSDT = "0xdac17f958d2ee523a2206206994597c13d831ec7" CurrencyETH = "ETH" CurrencyUSDT = "USDT" )
View Source
const ( ReqHeaderContentType = "Content-Type" ReqHeaderJson = "application/json" )
View Source
const PreImageDelete = "0x0000000000000000000000000000000000000000000000000000000000000000"
Variables ¶
This section is empty.
Functions ¶
func CancelTransfer ¶
func GetChannels ¶
Types ¶
type ActiveTransfer ¶
type ActiveTransfer struct { InDispute bool `json:"inDispute"` ChannelFactoryAddress string `json:"channelFactoryAddress"` AssetID string `json:"assetId"` ChainID int `json:"chainId"` ChannelAddress string `json:"channelAddress"` Balance TransferBalance `json:"balance"` Initiator string `json:"initiator"` Responder string `json:"responder"` InitialStateHash string `json:"initialStateHash"` TransferDefinition string `json:"transferDefinition"` InitiatorIdentifier string `json:"initiatorIdentifier"` ResponderIdentifier string `json:"responderIdentifier"` ChannelNonce int `json:"channelNonce"` TransferEncodings []string `json:"transferEncodings"` TransferID string `json:"transferId"` TransferState TransferState `json:"transferState,omitempty"` TransferTimeout string `json:"transferTimeout,omitempty"` Meta struct { SenderIdentifier string `json:"senderIdentifier,omitempty"` RequireOnline bool `json:"requireOnline,omitempty"` RoutingID string `json:"routingId,omitempty"` Path []struct { Recipient string `json:"recipient,omitempty"` RecipientChainID int `json:"recipientChainId,omitempty"` RecipientAssetID string `json:"recipientAssetId,omitempty"` } `json:"path"` } `json:"meta,omitempty"` }
func GetActiveTransfers ¶
func GetActiveTransfers(publicIdentifier string, channelId string) ([]ActiveTransfer, error)
type CancelTransferResponse ¶
type Config ¶
type Config struct { PublicIdentifier string `json:"publicIdentifier"` SignerAddress string `json:"signerAddress"` ChannelAddress string `json:"channelAddress"` Host string `json:"host"` GraceNonceDiff int `json:"graceNonceDiff"` }
Config struct holds mandatory information how to connect to Connext and configs for operations
type TransferBalance ¶
type TransferResolve ¶
type TransferState ¶
type TransferState struct { Expiry interface{} `json:"expiry,omitempty"` LockHash string `json:"lockHash,omitempty"` }
type VectorChannel ¶
type VectorChannel struct { AssetIds []string `json:"assetIds"` Balances []struct { Amount []string `json:"amount"` To []string `json:"to"` } `json:"balances"` ChannelAddress string `json:"channelAddress"` MerkleRoot string `json:"merkleRoot"` ProcessedDepositsA []string `json:"processedDepositsA"` ProcessedDepositsB []string `json:"processedDepositsB"` DefundNonces []string `json:"defundNonces"` NetworkContext struct { ChainID int `json:"chainId"` ChannelFactoryAddress string `json:"channelFactoryAddress"` TransferRegistryAddress string `json:"transferRegistryAddress"` ProviderURL string `json:"providerUrl"` } `json:"networkContext"` Nonce int `json:"nonce"` Alice string `json:"alice"` AliceIdentifier string `json:"aliceIdentifier"` Bob string `json:"bob"` BobIdentifier string `json:"bobIdentifier"` Timeout string `json:"timeout"` LatestUpdate struct { AssetID string `json:"assetId"` Balance struct { Amount []string `json:"amount"` To []string `json:"to"` } `json:"balance"` ChannelAddress string `json:"channelAddress"` Details struct { Balance struct { To []string `json:"to"` Amount []string `json:"amount"` } `json:"balance"` MerkleProofData []string `json:"merkleProofData"` MerkleRoot string `json:"merkleRoot"` TransferDefinition string `json:"transferDefinition"` TransferTimeout string `json:"transferTimeout"` TransferID string `json:"transferId"` TransferEncodings []string `json:"transferEncodings"` TransferInitialState struct { LockHash string `json:"lockHash"` Expiry string `json:"expiry"` } `json:"transferInitialState"` Meta struct { RoutingID string `json:"routingId"` Hello string `json:"hello"` RequireOnline bool `json:"requireOnline"` } `json:"meta"` } `json:"details"` FromIdentifier string `json:"fromIdentifier"` Nonce int `json:"nonce"` AliceSignature string `json:"aliceSignature"` BobSignature string `json:"bobSignature"` ToIdentifier string `json:"toIdentifier"` Type string `json:"type"` } `json:"latestUpdate"` InDispute bool `json:"inDispute"` }
func GetVectorChannel ¶
func GetVectorChannel(publicIdentifier string, channelId string) (VectorChannel, error)
Click to show internal directories.
Click to hide internal directories.