X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=application%2Fdex%2Fcommon%2Ftype.go;fp=application%2Fdex%2Fcommon%2Ftype.go;h=63baf2b8f3996d418348d527bf9868e9d479c896;hp=0000000000000000000000000000000000000000;hb=3f89eeb07b7d9d8e8657487e1d6ec49e6f53e2d1;hpb=3f53de9ec5cce160d620d98bf5b5b706e0ded743 diff --git a/application/dex/common/type.go b/application/dex/common/type.go new file mode 100644 index 00000000..63baf2b8 --- /dev/null +++ b/application/dex/common/type.go @@ -0,0 +1,28 @@ +package common + +import "github.com/vapor/protocol/bc" + +type DexUtxo struct { + SourceID *bc.Hash + SourcePos uint64 + Amount uint64 + ControlProgram []byte +} + +type Order struct { + FromAssetID *bc.AssetID + ToAssetID *bc.AssetID + Utxo *DexUtxo + Rate float64 +} + +type TradePair struct { + FromAssetID *bc.AssetID + ToAssetID *bc.AssetID + Count uint64 +} + +type DexDatabaseState struct { + Height uint64 + Hash *bc.Hash +}