Skip to content

Commit

Permalink
2.0.0-ALPHA7
Browse files Browse the repository at this point in the history
  • Loading branch information
apetersson committed Sep 18, 2014
1 parent 1a94d8f commit 569b3fe
Show file tree
Hide file tree
Showing 200 changed files with 6,457 additions and 3,888 deletions.
2 changes: 1 addition & 1 deletion ext_settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ext {
// Use this switch to select which IDE you are using
// buildFor='idea' or buildFor='androidStudio'
buildFor='androidStudio'
buildFor='idea'

guavaArtifact = 'com.google.guava:guava-jdk5:14.0.1'

Expand Down
120 changes: 118 additions & 2 deletions public/lt-api/src/main/java/com/mycelium/lt/api/LtApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,36 @@ public interface LtApi {
public static final String TRADE_FINAL_NOTIFICATION_TYPE = "trade_final";
public static final String AD_TIME_OUT_NOTIFICATION_TYPE = "ad_time_out";

/**
*
* @param apiVersion
* @param locale
* @param bitcoinDenomination
* @return
*
* Example HTTP POST:
* curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/createSession?v=9&locale=de&bitcoinDenomination=mBTC
*/
public LtResponse<LtSession> createSession(int apiVersion, String locale, String bitcoinDenomination);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/getCaptcha?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<Captcha> getCaptcha(UUID sessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/solveCaptcha?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&solution=65966
*/
public LtResponse<Boolean> solveCaptcha(UUID sessionId, String captchaSolution);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json"
-d '{"nickname":"Jan","address":"mispsmBU3CWL1uVAb12NvyEzwiTYfQyy3f","publicKey":"020509fbed4d484207997982cb2654834c6e4177024b89aa26dd3df2227906deb4","sigSessionId":"IF3II8BhDOBxT271CV0IgJay07N0V2N/nb4pd5H3DihVLmnEmxEVSRRnntgLfqoDi9UfAe5o1Dh3fVX7iiNMz/U="}'
https://node3.mycelium.com/lttestnet/createTrader?sessionId=59110bc6-58b7-40c9-b1ef-8279379a4aad
*/
public LtResponse<Void> createTrader(UUID sessionId, TraderParameters params);

/**
Expand All @@ -91,12 +115,20 @@ public interface LtApi {
* session Id obtained from createSession
* @param params
* @return
* Example HTTP POST:
* curl -k -X POST -H "Content-Type: application/json"
* -d '{"address":"mispsmBU3CWL1uVAb12NvyEzwiTYfQyy3f","signature":"IEmxnw2URW4n6QgpCkADRk9oU2aMnDwkQ4DJDV+xy0RuD9u0mlBC40wFVsKfVTBV6sJZ8crkNu9PSF6HJBmOiBc=","gcmId":null,"lastTradeSessionChange":0}'
* https://node3.mycelium.com/lttestnet/traderLogin?sessionId=59110bc6-58b7-40c9-b1ef-8279379a4aad
*/
public LtResponse<String> traderLogin(UUID sessionId, LoginParameters params);

@Deprecated
public LtResponse<Collection<SellOrder>> listSellOrders(UUID sessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/listAds?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<Collection<Ad>> listAds(UUID sessionId);

public LtResponse<List<PriceFormula>> getSupportedPriceFormulas(UUID sessionId);
Expand Down Expand Up @@ -134,40 +166,109 @@ public interface LtApi {
@Deprecated
public LtResponse<List<SellOrderSearchItem>> sellOrderSearch(UUID sessionId, SearchParameters params);

/**
*
* @param sessionId the id obtained via a prvious call of create session
* @param params the params specifying for which ads to search
* @return list of matching AdSearchItems
*
* Example HTTP POST:
* curl -k -X POST -H "Content-Type: application/json"
* -d '{"location":{"name":"Penzing, Vienna","longitude":16.248472213745117,"latitude":48.216285705566406,"countryCode":"Penzing, Vienna"},"limit":30,"type":"SELL_BTC"}'
* https://node3.mycelium.com/lttestnet/adSearch?sessionId=07a7d2cc-61ca-4b78-aa31-1f77f938edd3
*/
public LtResponse<List<AdSearchItem>> adSearch(UUID sessionId, SearchParameters params);

public LtResponse<List<AdSearchItem>> getActiveAds();

public LtResponse<UUID> createInstantBuyOrder(UUID sessionId, InstantBuyOrderParameters params);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json"
-d '{"adId":"2efdf8f1-6ede-44a6-969c-84c8d3f28d6b","fiatOffered":10}'
https://node3.mycelium.com/lttestnet/createTrade?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<UUID> createTrade(UUID sessionId, CreateTradeParameters params);

public LtResponse<LinkedList<TradeSession>> getActiveTradeSessions(UUID sessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/getFinalTradeSessions?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&limit=10&offset=0
*/
public LtResponse<LinkedList<TradeSession>> getFinalTradeSessions(UUID sessionId, int limit, int offset);

public LtResponse<LinkedList<TradeSession>> getTradeSessions(UUID sessionId, int limit, int offset);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/getTradeSession?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&tradeSessionId=d4bd5ae2-cf46-413d-87a1-943800da97aa
*/
public LtResponse<TradeSession> getTradeSession(UUID sessionId, UUID tradeSessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json"
-d '{"tradeSessionId":"d4bd5ae2-cf46-413d-87a1-943800da97aa","address":"mmPDZpf4evpHXkqoqFcuGEPkqng1E79r3g"}'
https://node3.mycelium.com/lttestnet/setTradeReceivingAddress?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<Void> setTradeReceivingAddress(UUID sessionId, SetTradeReceivingAddressParameters params);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/acceptTrade?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&tradeSessionId=7162cb84-eafc-4878-8e41-71a0da4b7eaa&timestamp=1411038853491
*/
public LtResponse<Void> acceptTrade(UUID sessionId, UUID tradeSessionId, long tradeSessionTimestamp);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/abortTrade?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&tradeSessionId=d4bd5ae2-cf46-413d-87a1-943800da97aa
*/
public LtResponse<Void> abortTrade(UUID sessionId, UUID tradeSessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json"
-d '{"tradeSessionId":"ecbc6352-6674-4737-9fc3-e354057f4c95","encryptedMessage":"ve2N4HV7PTSbOiN6XGE3khJmcYmqSxzuhBudd5E+HTs"}'
https://node3.mycelium.com/lttestnet/sendChatMessage?sessionId=a9bb2982-704a-4cba-837e-9015315a6257
*/
public LtResponse<Void> sendEncryptedChatMessage(UUID sessionId, EncryptedChatMessageParameters params);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/requestMarketRateRefresh?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&tradeSessionId=cc39c7a0-50ed-4fb8-bac6-e692f06dcf54
*/
public LtResponse<Void> requestMarketRateRefresh(UUID sessionId, UUID tradeSessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json"
-d '{"ownerId":"mivtBy3ahEJTekcjRvXR2WDe6BRUtFYUpD","peerId":"mispsmBU3CWL1uVAb12NvyEzwiTYfQyy3f","currency":"USD","fiatTraded":17,"priceFormulaId":"BITSTAMP","premium":5.2}'
https://node3.mycelium.com/lttestnet/assessBtcPrice?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<BtcSellPrice> assessBtcSellPrice(UUID sessionId, BtcSellPriceParameters params);

public LtResponse<Void> changeTradeSessionPrice(UUID sessionId, TradeChangeParameters params);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json"
-d '{"tradeSessionId":"0b49935a-1394-4eab-83ca-cb41fdebdcb1","rawHexTransaction":"01000000014620575c9612bd17c03c22b509647fc41587fd7fe60cc5390fe8a43f1ccf248b000000006b483045022100e3166c7cd39f42e15eaf88659cde64d489850cd96a7ca600dcc884af357776cf022075fc4f9879d6386dfd2d21d7d071d3bf1699751eee107c8d05bf3d4f643b4a460121021519a76942ec355e7d65ca4232701660a86c12b38cf22dba073fc268099c5c59ffffffff03e8ca0f00000000001976a9143b3d2e9b59ba5332fb54967cfa6bbb4ad60bd4fe88ac2c7b2000000000001976a9144d290d204a913bc6cfa178eccbb5684454f86f0288ac64210000000000001976a91443dc321b6600511fe0a96a97c2593a90542974d688ac00000000"}'
https://node3.mycelium.com/lttestnet/releaseBtc?sessionId=a9bb2982-704a-4cba-837e-9015315a6257
*/
public LtResponse<Boolean> releaseBtc(UUID sessionId, ReleaseBtcParameters params);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/getTraderInfo?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<TraderInfo> getTraderInfo(UUID sessionId);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/getPublicTraderInfo?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&traderId=mivtBy3ahEJTekcjRvXR2WDe6BRUtFYUpD
*/
public LtResponse<PublicTraderInfo> getPublicTraderInfo(UUID sessionId, Address traderIdentity);

/**
Expand All @@ -176,13 +277,28 @@ public interface LtApi {
*/
public LtResponse<Long> getLastTradeSessionChange(Address traderIdentity);

public LtResponse<TradeSession> waitForTradeSessionChange(UUID sessionId, UUID tradeSessionId,
long tradeSessionTimestamp);
/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/waitForTradeSessionChange?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891&tradeSessionId=d4bd5ae2-cf46-413d-87a1-943800da97aa&timestamp=1411038153102
*/
public LtResponse<TradeSession> waitForTradeSessionChange(UUID sessionId, UUID tradeSessionId, long tradeSessionTimestamp);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/stopWaitingForTradeSessionChange?sessionId=1ecc892f-249f-4e3a-bde8-cb06bb3cf891
*/
public LtResponse<Void> stopWaitingForTradeSessionChange(UUID token);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/waitForTraderChange?traderId=mispsmBU3CWL1uVAb12NvyEzwiTYfQyy3f&token=d68a13cc-0f63-43d8-a152-e196778e8026&timestamp=0
*/
public LtResponse<Long> waitForTraderChange(Address traderId, UUID token, long traderTimestamp);

/*
Example HTTP POST:
curl -k -X POST -H "Content-Type: application/json" https://node3.mycelium.com/lttestnet/stopWaitingForTraderChange?token=31a0ff0b-949a-4748-9a07-7b58dae45abd
*/
public LtResponse<Void> stopWaitingForTraderChange(UUID token);

public LtResponse<Void> setTraderNotificationEmail(UUID sessionId, String email);
Expand Down
4 changes: 2 additions & 2 deletions public/mbw/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ android {
minSdkVersion 8
targetSdkVersion 19

versionCode 20008
versionName '2.0.0-ALPHA6'
versionCode 20009
versionName '2.0.0-ALPHA7'
}

signingConfigs {
Expand Down
Loading

0 comments on commit 569b3fe

Please sign in to comment.