questionnaires;
21 | }
22 |
--------------------------------------------------------------------------------
/operators_sample_website/website/app/Exceptions/SellTransactionException.php:
--------------------------------------------------------------------------------
1 | getMessage());
20 | }
21 |
22 | /**
23 | * @param Request $request
24 | * @param Exception $e
25 | * @return RedirectResponse
26 | */
27 | public function render(Request $request, Exception $e)
28 | {
29 | return Redirect::back()->withErrors(['error' => $e->getMessage()]);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/solana/SolanaDefinition.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.solana;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.CryptoCurrencyDefinition;
5 | import com.generalbytes.batm.server.extensions.payment.IPaymentSupport;
6 |
7 | public class SolanaDefinition extends CryptoCurrencyDefinition {
8 | private final SolanaPaymentSupport solanaPaymentSupport = new SolanaPaymentSupport();
9 |
10 | public SolanaDefinition() {
11 | super(CryptoCurrency.SOL.getCode(), "Solana", "solana", "https://solana.com");
12 | }
13 |
14 | @Override
15 | public IPaymentSupport getPaymentSupport() {
16 | return solanaPaymentSupport;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/gtr/handler/GtrWebhookHandler.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.gtr.handler;
2 |
3 | import com.generalbytes.batm.server.extensions.travelrule.gtr.dto.GtrWebhookMessage;
4 | import com.generalbytes.batm.server.extensions.travelrule.gtr.dto.GtrWebhookMessageResponse;
5 |
6 | /**
7 | * Represents a handler responsible for handling webhooks from Global Travel Rule.
8 | */
9 | public interface GtrWebhookHandler {
10 |
11 | /**
12 | * Handler a webhook message.
13 | *
14 | * @param message The webhook message to handle.
15 | * @return A {@link GtrWebhookMessageResponse} as the response to the webhook message.
16 | */
17 | GtrWebhookMessageResponse handle(GtrWebhookMessage message);
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/ethereum/erc20/bizz/BizzDefinition.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.ethereum.erc20.bizz;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.CryptoCurrencyDefinition;
5 | import com.generalbytes.batm.server.extensions.payment.IPaymentSupport;
6 |
7 | public class BizzDefinition extends CryptoCurrencyDefinition{
8 | private IPaymentSupport paymentSupport = new BizzPaymentSupport();
9 |
10 | public BizzDefinition() {
11 | super(CryptoCurrency.BIZZ.getCode(), "BIZZ ERC20 Token", "ethereum","https://bizzcoin.com/");
12 | }
13 |
14 | @Override
15 | public IPaymentSupport getPaymentSupport() {
16 | return paymentSupport;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/ethereumclassic/EtcDefinition.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.ethereumclassic;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.CryptoCurrencyDefinition;
5 | import com.generalbytes.batm.server.extensions.payment.IPaymentSupport;
6 |
7 | public class EtcDefinition extends CryptoCurrencyDefinition{
8 | private final IPaymentSupport paymentSupport = new EtcPaymentSupport();
9 |
10 | public EtcDefinition() {
11 | super(CryptoCurrency.ETC.getCode(), "Ethereum Classic", "ethclassic", "http://ethereumclassic.org/");
12 | }
13 |
14 | @Override
15 | public IPaymentSupport getPaymentSupport() {
16 | return paymentSupport;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneNameIdentifier.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonInclude;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 |
8 | /**
9 | * Full name separated into primary and secondary identifier.
10 | */
11 | @Getter
12 | @Setter
13 | @NoArgsConstructor
14 | @JsonInclude(JsonInclude.Include.NON_DEFAULT)
15 | public class NotabeneNameIdentifier {
16 |
17 | private String primaryIdentifier;
18 | private String secondaryIdentifier;
19 | /**
20 | * A single value corresponding to the nature of name being adopted.
21 | */
22 | private NotabeneNameIdentifierType nameIdentifierType;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/bitcoin/exchanges/bitpandapro/dto/OrderState.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.bitcoin.exchanges.bitpandapro.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 |
5 | /**
6 | * Active or Inactive order with status __FILLED__, __FILLED_FULLY__, __FILLED_CLOSED__ and __FILLED_REJECTED__.
7 | **/
8 | public class OrderState {
9 |
10 | @JsonProperty("order")
11 | private Order order;
12 |
13 | public Order getOrder() {
14 | return order;
15 | }
16 |
17 | public void setOrder(Order order) {
18 | this.order = order;
19 | }
20 |
21 | @Override public String toString() {
22 | return "OrderState{" +
23 | "order=" + order +
24 | '}';
25 | }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/identityverification/onfido/verificationsite/dto/ServerAPIResponse.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.identityverification.onfido.verificationsite.dto;
2 |
3 | public class ServerAPIResponse {
4 | public boolean success;
5 | public String message;
6 |
7 | public static ServerAPIResponse success(String message) {
8 | ServerAPIResponse result = new ServerAPIResponse();
9 | result.message = message;
10 | result.success = true;
11 | return result;
12 | }
13 |
14 | public static ServerAPIResponse failure(String message) {
15 | ServerAPIResponse result = new ServerAPIResponse();
16 | result.message = message;
17 | result.success = false;
18 | return result;
19 | }
20 | }
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/tron/UsdttronDefinition.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.tron;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.CryptoCurrencyDefinition;
5 | import com.generalbytes.batm.server.extensions.payment.IPaymentSupport;
6 |
7 | public class UsdttronDefinition extends CryptoCurrencyDefinition {
8 | private final IPaymentSupport paymentSupport = new UsdttronPaymentSupport();
9 |
10 | public UsdttronDefinition() {
11 | super(CryptoCurrency.USDTTRON.getCode(), "Tether USDT TRC-20 (TRON)", "tron", "https://tron.network/usdt");
12 | }
13 |
14 | @Override
15 | public IPaymentSupport getPaymentSupport() {
16 | return paymentSupport;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneUnregisterWebhookRequest.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonInclude;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import lombok.Getter;
6 | import lombok.NoArgsConstructor;
7 | import lombok.Setter;
8 |
9 | /**
10 | * Request to unregister the multi-message Webhook URL for a given VASP.
11 | *
12 | * @see Notabene Documentation
13 | */
14 | @Getter
15 | @Setter
16 | @NoArgsConstructor
17 | @JsonInclude(JsonInclude.Include.NON_DEFAULT)
18 | public class NotabeneUnregisterWebhookRequest {
19 |
20 | @JsonProperty("vaspDID")
21 | private String vaspDid;
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/ethereum/erc20/dai/DaiDefinition.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.ethereum.erc20.dai;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.CryptoCurrencyDefinition;
5 | import com.generalbytes.batm.server.extensions.payment.IPaymentSupport;
6 |
7 | public class DaiDefinition extends CryptoCurrencyDefinition{
8 | private IPaymentSupport paymentSupport = new DaiPaymentSupport();
9 |
10 | public DaiDefinition() {
11 | super(CryptoCurrency.DAI.getCode(), "DAI Stablecoin ERC20 Token", "ethereum","https://makerdao.com/en/dai/");
12 | }
13 |
14 | @Override
15 | public IPaymentSupport getPaymentSupport() {
16 | return paymentSupport;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/sumsub/api/dto/updatetransactionhash/SumsubUpdateTransactionHashRequest.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.sumsub.api.dto.updatetransactionhash;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import com.generalbytes.batm.server.extensions.travelrule.sumsub.api.SumsubTravelRuleApi;
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | /**
9 | * Request object for update blockchain transaction hash.
10 | * Used in {@link SumsubTravelRuleApi#updateTransactionHash}.
11 | */
12 | @Getter
13 | @Setter
14 | @JsonIgnoreProperties(ignoreUnknown = true)
15 | public class SumsubUpdateTransactionHashRequest {
16 | /**
17 | * Blockchain transaction hash.
18 | */
19 | private String paymentTxnId;
20 | }
21 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/cardano/wallets/dto/Balance.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.cardano.wallets.dto;
2 |
3 | public class Balance {
4 | private Amount available;
5 | private Amount reward;
6 | private Amount total;
7 |
8 | public Amount getAvailable() {
9 | return available;
10 | }
11 |
12 | public void setAvailable(Amount available) {
13 | this.available = available;
14 | }
15 |
16 | public Amount getReward() {
17 | return reward;
18 | }
19 |
20 | public void setReward(Amount reward) {
21 | this.reward = reward;
22 | }
23 |
24 | public Amount getTotal() {
25 | return total;
26 | }
27 |
28 | public void setTotal(Amount total) {
29 | this.total = total;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/batm_ssh_tunnel/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("application")
3 | }
4 |
5 | version = "1.0.0"
6 |
7 | application {
8 | mainClass = "com.generalbytes.batm.sshtunnel.Main"
9 | }
10 |
11 | distributions {
12 | main {
13 | contents {
14 | eachFile {
15 | // place the files in the archive root - out of the top level directory
16 | it.path = it.path.replaceFirst(/^$project.archivesBaseName-$version\//, '')
17 | }
18 | }
19 | }
20 | }
21 |
22 | configurations.configureEach {
23 | exclude group: "org.eclipse.ee4j"
24 | }
25 |
26 | dependencies {
27 | implementation("org.apache.sshd:sshd-core:2.3.0")
28 | implementation("org.apache.sshd:sshd-common:2.3.0")
29 | implementation("ch.qos.logback:logback-classic:1.2.9")
30 | implementation("org.bouncycastle:bcpkix-jdk15on:1.63")
31 | }
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/bitcoin/exchanges/bitbuy/dto/QuoteRequest.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.bitcoin.exchanges.bitbuy.dto;
2 |
3 | import java.math.BigDecimal;
4 |
5 | public class QuoteRequest {
6 | public CurrencySide currencySide;
7 | public String quantity;
8 | public OrderSide side;
9 | public String quote; // CAD
10 | public String base; // crypto
11 |
12 | public QuoteRequest() {
13 | }
14 |
15 | public QuoteRequest(OrderSide orderSide, String cryptoCurrency, String fiatCurrency, BigDecimal cryptoAmount) {
16 | this.currencySide = CurrencySide.BASE;
17 | this.quantity = cryptoAmount.toPlainString();
18 | this.side = orderSide;
19 | this.quote = fiatCurrency;
20 | this.base = cryptoCurrency;
21 | }
22 | }
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/ethereum/erc20/generated/ERC20Interface.sol:
--------------------------------------------------------------------------------
1 | pragma solidity ^0.4.24;
2 |
3 | contract ERC20Interface {
4 | function totalSupply() public constant returns (uint);
5 | function balanceOf(address tokenOwner) public constant returns (uint balance);
6 | function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
7 | function transfer(address to, uint tokens) public returns (bool success);
8 | function approve(address spender, uint tokens) public returns (bool success);
9 | function transferFrom(address from, address to, uint tokens) public returns (bool success);
10 |
11 | event Transfer(address indexed from, address indexed to, uint tokens);
12 | event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
13 | }
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneRegisterWebhookRequest.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonInclude;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import lombok.Getter;
6 | import lombok.NoArgsConstructor;
7 | import lombok.Setter;
8 |
9 | /**
10 | * Request to register the multi-message Webhook URL for a given VASP.
11 | *
12 | * @see Notabene Documentation
13 | */
14 | @Getter
15 | @Setter
16 | @NoArgsConstructor
17 | @JsonInclude(JsonInclude.Include.NON_DEFAULT)
18 | public class NotabeneRegisterWebhookRequest {
19 |
20 | @JsonProperty("vaspDID")
21 | private String vaspDid;
22 | private String url;
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/operators_sample_website/website/app/Exceptions/TerminalsWithAvailableCashException.php:
--------------------------------------------------------------------------------
1 | getMessage());
20 | }
21 |
22 | /**
23 | * @param Request $request
24 | * @param Exception $e
25 | * @return RedirectResponse
26 | */
27 | public function render(Request $request, Exception $e): RedirectResponse
28 | {
29 | return Redirect::back()->withErrors(['error' => $e->getMessage()]);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/solana/SolanaPaymentSupport.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.solana;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.extra.common.QueryableWalletPaymentSupport;
5 |
6 | import java.util.concurrent.TimeUnit;
7 |
8 | public class SolanaPaymentSupport extends QueryableWalletPaymentSupport {
9 | @Override
10 | protected String getCryptoCurrency() {
11 | return CryptoCurrency.SOL.getCode();
12 | }
13 |
14 | @Override
15 | protected long getPollingPeriodMillis() {
16 | return TimeUnit.SECONDS.toMillis(30);
17 | }
18 |
19 | @Override
20 | protected long getPollingInitialDelayMillis() {
21 | return TimeUnit.SECONDS.toMillis(60);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/solana/UsdcSolanaDefinition.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.solana;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.CryptoCurrencyDefinition;
5 | import com.generalbytes.batm.server.extensions.payment.IPaymentSupport;
6 |
7 | public class UsdcSolanaDefinition extends CryptoCurrencyDefinition {
8 | private final UsdcSolanaPaymentSupport usdcSolanaPaymentSupport = new UsdcSolanaPaymentSupport();
9 |
10 | public UsdcSolanaDefinition() {
11 | super(CryptoCurrency.USDCSOL.getCode(), "USDC (Solana SPL)", "solana", "https://usdc.com");
12 | }
13 |
14 | @Override
15 | public IPaymentSupport getPaymentSupport() {
16 | return usdcSolanaPaymentSupport;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/operators_sample_website/website/app/Providers/EventServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/customfields/value/FileCustomFieldValue.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.customfields.value;
2 |
3 | import com.generalbytes.batm.server.extensions.customfields.CustomFieldDefinitionType;
4 |
5 | /**
6 | * used with {@link CustomFieldDefinitionType#IMAGE} and {@link CustomFieldDefinitionType#DOCUMENT}
7 | */
8 | public class FileCustomFieldValue implements CustomFieldValue {
9 | private final String fileName;
10 | private final String mimeType;
11 |
12 | public FileCustomFieldValue(String fileName, String mimeType) {
13 | this.fileName = fileName;
14 | this.mimeType = mimeType;
15 | }
16 |
17 | public String getFileName() {
18 | return fileName;
19 | }
20 |
21 | public String getMimeType() {
22 | return mimeType;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/solana/UsdcSolanaPaymentSupport.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.solana;
2 |
3 | import com.generalbytes.batm.common.currencies.CryptoCurrency;
4 | import com.generalbytes.batm.server.extensions.extra.common.QueryableWalletPaymentSupport;
5 |
6 | import java.util.concurrent.TimeUnit;
7 |
8 | public class UsdcSolanaPaymentSupport extends QueryableWalletPaymentSupport {
9 | @Override
10 | protected String getCryptoCurrency() {
11 | return CryptoCurrency.USDCSOL.getCode();
12 | }
13 |
14 | @Override
15 | protected long getPollingPeriodMillis() {
16 | return TimeUnit.SECONDS.toMillis(30);
17 | }
18 |
19 | @Override
20 | protected long getPollingInitialDelayMillis() {
21 | return TimeUnit.SECONDS.toMillis(60);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/operators_sample_website/website/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Your password has been reset!',
17 | 'sent' => 'We have emailed your password reset link!',
18 | 'throttled' => 'Please wait before retrying.',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that email address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/country/src/main/java/com/generalbytes/batm/server/extensions/CountryAustralia.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | /**
7 | * Australia province identifiers.
8 | *
9 | * Usage e.g.:
10 | * CountryAustralia.NSW.getProvinceName()
11 | * CountryAustralia.valueOf("NSW").getProvinceName()
12 | */
13 | @Getter
14 | @AllArgsConstructor
15 | public enum CountryAustralia implements CountryRegion {
16 |
17 | NSW("NSW", "New South Wales"),
18 | QLD("QLD", "Queensland"),
19 | SA("SA", "South Australia"),
20 | TAS("TAS", "Tasmania"),
21 | VIC("VIC", "Victoria"),
22 | WA("WA", "Western Australia"),
23 | ACT("ACT", "Australian Capital Territory"),
24 | NT("NT", "Northern Territory");
25 |
26 | private final String iso;
27 | private final String provinceName;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/customfields/CustomField.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.customfields;
2 |
3 | import com.generalbytes.batm.server.extensions.customfields.value.CustomFieldValue;
4 |
5 | import java.util.Objects;
6 |
7 | public class CustomField {
8 | private final CustomFieldDefinition definition;
9 | private final CustomFieldValue value;
10 |
11 | public CustomField(CustomFieldDefinition definition, CustomFieldValue value) {
12 | this.definition = Objects.requireNonNull(definition, "definition cannot be null");
13 | this.value = Objects.requireNonNull(value, "value cannot be null");
14 | }
15 |
16 | public CustomFieldDefinition getDefinition() {
17 | return definition;
18 | }
19 |
20 | public CustomFieldValue getValue() {
21 | return value;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/ethereum/sources/stasis/StasisTickerResponse.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.ethereum.sources.stasis;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 |
5 | import java.util.HashMap;
6 |
7 | public class StasisTickerResponse {
8 | @JsonProperty("rates")
9 | private HashMap rates;
10 |
11 | public HashMap getRates() {
12 | return rates;
13 | }
14 |
15 | public void setRates(HashMap rates) {
16 | this.rates = rates;
17 | }
18 |
19 | public StasisRateDescription getEUR() {
20 | return rates.get("EUR:EURS");
21 | }
22 |
23 | public StasisRateDescription getEURS() {
24 | return rates.get("EURS:EUR");
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneGenerateAccessTokenResponse.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonProperty;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 |
8 | /**
9 | * Response to generating a new access token.
10 | *
11 | * @see Notabene Documentation
12 | * @see NotabeneGenerateAccessTokenRequest
13 | */
14 | @Getter
15 | @Setter
16 | @NoArgsConstructor
17 | public class NotabeneGenerateAccessTokenResponse {
18 |
19 | @JsonProperty("access_token")
20 | private String accessToken;
21 | @JsonProperty("expires_in")
22 | private int expiresInMillis;
23 | @JsonProperty("token_type")
24 | private String tokenType;
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/operators_sample_website/website/database/migrations/2014_10_12_100000_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
18 | $table->string('token');
19 | $table->timestamp('created_at')->nullable();
20 | });
21 | }
22 |
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('password_resets');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/gtr/dto/GtrLoginResponse.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.gtr.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import com.generalbytes.batm.server.extensions.travelrule.gtr.api.GtrApi;
5 | import lombok.Getter;
6 | import lombok.Setter;
7 |
8 | /**
9 | * Response object containing JWT access token.
10 | * Used in {@link GtrApi#login(GtrLoginRequest)}.
11 | */
12 | @Setter
13 | @JsonIgnoreProperties(ignoreUnknown = true)
14 | public class GtrLoginResponse {
15 | /**
16 | * Data object containing JWT access token.
17 | */
18 | private LoginData data;
19 |
20 | public String getJwtToken() {
21 | return data.getJwt();
22 | }
23 |
24 | @Getter
25 | private static class LoginData {
26 | private String jwt;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/customfields/value/ChoiceCustomFieldValue.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.customfields.value;
2 |
3 | import com.generalbytes.batm.server.extensions.customfields.CustomFieldDefinition;
4 | import com.generalbytes.batm.server.extensions.customfields.CustomFieldDefinitionType;
5 |
6 | /**
7 | * used with {@link CustomFieldDefinitionType#DROPDOWN} and {@link CustomFieldDefinitionType#RADIO_BTN}
8 | */
9 | public class ChoiceCustomFieldValue implements CustomFieldValue{
10 | private final long choiceId;
11 |
12 | /**
13 | * @param choiceId id of a choice from {@link CustomFieldDefinition.Element#getId()}
14 | */
15 |
16 | public ChoiceCustomFieldValue(long choiceId) {
17 | this.choiceId = choiceId;
18 | }
19 |
20 | public long getChoiceId() {
21 | return choiceId;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneApiError.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 |
8 | /**
9 | * General Notabene Api error response.
10 | */
11 | @Getter
12 | @Setter
13 | @NoArgsConstructor
14 | @JsonIgnoreProperties(ignoreUnknown = true)
15 | public class NotabeneApiError {
16 |
17 | /**
18 | * The name of the error.
19 | */
20 | private String name;
21 | /**
22 | * The HTTP status code.
23 | */
24 | private int code;
25 | /**
26 | * The error message.
27 | */
28 | private String message;
29 | /**
30 | * The error stack message.
31 | */
32 | private String stack;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/sumsub/api/dto/transactionownershipresolution/SumsubTransactionOwnershipResolutionResponse.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.sumsub.api.dto.transactionownershipresolution;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import com.generalbytes.batm.server.extensions.travelrule.sumsub.api.SumsubTravelRuleApi;
5 | import lombok.Getter;
6 |
7 | /**
8 | * Response object from Sumsub containing data about transaction resolution.
9 | * Used in {@link SumsubTravelRuleApi#confirmTransactionOwnership} and {@link SumsubTravelRuleApi#rejectTransactionOwnership}.
10 | */
11 | @Getter
12 | @JsonIgnoreProperties(ignoreUnknown = true)
13 | public class SumsubTransactionOwnershipResolutionResponse {
14 | /**
15 | * Sumsub transaction ID.
16 | */
17 | private String id;
18 | }
19 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/sumsub/api/dto/transactioninfo/SumsubPaymentMethod.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.sumsub.api.dto.transactioninfo;
2 |
3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 | import lombok.Getter;
5 | import lombok.Setter;
6 |
7 | /**
8 | * Object containing info about Sumsub payment method.
9 | * Used in {@link SumsubCounterparty}.
10 | */
11 | @Getter
12 | @Setter
13 | @JsonIgnoreProperties(ignoreUnknown = true)
14 | public class SumsubPaymentMethod {
15 | private String type;
16 | /**
17 | * The crypto address.
18 | */
19 | private String accountId;
20 | /**
21 | * Destination tag used in some cryptocurrencies to identify a specific address, for example XRP (Ripple) or XLM (Stellar).
22 | * Optional parameter.
23 | */
24 | private String memo;
25 | }
26 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneTransactionBlockchainInfo.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonInclude;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 | import lombok.ToString;
8 |
9 | /**
10 | * Information about a transaction on the blockchain
11 | */
12 | @Getter
13 | @Setter
14 | @NoArgsConstructor
15 | @JsonInclude(JsonInclude.Include.NON_DEFAULT)
16 | @ToString
17 | public class NotabeneTransactionBlockchainInfo {
18 |
19 | /**
20 | * Transaction txHash.
21 | */
22 | private String txHash;
23 | /**
24 | * Originator crypto address.
25 | */
26 | private String origin;
27 | /**
28 | * Destination crypto address.
29 | */
30 | private String destination;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IdentityFilter.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions;
2 |
3 | import java.time.LocalDate;
4 |
5 | /**
6 | * Filter for searching for identities. Null values are ignored.
7 | *
8 | * @param givenName First name of the identity. Case in-sensitive match
9 | * @param surname Last name of the identity. Case in-sensitive match.
10 | * @param dateOfBirth Date of birth of the identity.
11 | * @param documentNumber Document number. e.g., passport number or ID card number. Case-sensitive match.
12 | * @param ssn Social Security Number. Case-sensitive match.
13 | */
14 | public record IdentityFilter(String givenName,
15 | String surname,
16 | LocalDate dateOfBirth,
17 | String documentNumber,
18 | String ssn) {
19 | }
20 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/test/java/com/generalbytes/batm/server/extensions/extra/communication/sozurinet/SozuriNetFactoryTest.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.communication.sozurinet;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.mockito.MockedStatic;
5 | import si.mazi.rescu.RestProxyFactory;
6 |
7 | import static org.junit.jupiter.api.Assertions.assertNotNull;
8 | import static org.mockito.Mockito.mockStatic;
9 |
10 | class SozuriNetFactoryTest {
11 | @Test
12 | void testCreateProvider_withCorrectParameters() {
13 | try (MockedStatic factoryMock = mockStatic(RestProxyFactory.class)) {
14 | SozuriNetProvider provider = SozuriNetFactory.createProvider();
15 | assertNotNull(provider);
16 |
17 | factoryMock.verify(() -> RestProxyFactory.createProxy(ISozuriNetAPI.class, "https://sozuri.net/api"));
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/server_extensions_template/src/main/java/com/mygreatcompany/batm/server/extensions/myfirstextension/MyFirstExtension.java:
--------------------------------------------------------------------------------
1 | package com.mygreatcompany.batm.server.extensions.myfirstextension;
2 |
3 | import com.generalbytes.batm.server.extensions.AbstractExtension;
4 | import com.generalbytes.batm.server.extensions.IExtensionContext;
5 | import org.slf4j.Logger;
6 | import org.slf4j.LoggerFactory;
7 |
8 | public class MyFirstExtension extends AbstractExtension {
9 |
10 | protected final Logger log = LoggerFactory.getLogger("batm.master.myextension");
11 |
12 |
13 | @Override
14 | public String getName() {
15 | return "My first extension";
16 | }
17 |
18 |
19 | @Override
20 | public void init(IExtensionContext ctx) {
21 | super.init(ctx);
22 | log.debug("MyFirst extension initialized. Adding listener");
23 | ctx.addTransactionListener(new MyTransactionListener(ctx));
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/operators_sample_website/website/app/Http/Middleware/RedirectIfAuthenticated.php:
--------------------------------------------------------------------------------
1 | check()) {
26 | return redirect(RouteServiceProvider::HOME);
27 | }
28 | }
29 |
30 | return $next($request);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneTransferUpdateRequest.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonInclude;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 |
8 | /**
9 | * Request to update an existing transfer.
10 | *
11 | * @see Notabene Documentation
12 | * @see NotabeneTransferInfo
13 | */
14 | @Getter
15 | @Setter
16 | @NoArgsConstructor
17 | @JsonInclude(JsonInclude.Include.NON_DEFAULT)
18 | public class NotabeneTransferUpdateRequest {
19 |
20 | /**
21 | * Identifier of the transfer. Returned by Notabene on create.
22 | */
23 | private String id;
24 | /**
25 | * The blockchain transaction hash.
26 | */
27 | private String txHash;
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/extra/lightningbitcoin/lnurl/LnurlRestServiceException.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.extra.lightningbitcoin.lnurl;
2 |
3 | import java.util.Objects;
4 |
5 | public class LnurlRestServiceException extends Exception {
6 |
7 | private final String clientMessage;
8 |
9 | /**
10 | * @param clientMessage a message displayed to the end user in their wallet
11 | */
12 | public LnurlRestServiceException(String clientMessage) {
13 | this.clientMessage = Objects.requireNonNull(clientMessage);
14 | }
15 |
16 | public LnurlRestServiceException() {
17 | this("Error processing LNURL");
18 | }
19 |
20 | public String getClientMessage() {
21 | return clientMessage;
22 | }
23 |
24 | @Override
25 | public String getMessage() {
26 | return "Client message: " + clientMessage;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/travelrule/notabene/dto/NotabeneNationalIdentification.java:
--------------------------------------------------------------------------------
1 | package com.generalbytes.batm.server.extensions.travelrule.notabene.dto;
2 |
3 | import com.fasterxml.jackson.annotation.JsonInclude;
4 | import lombok.Getter;
5 | import lombok.NoArgsConstructor;
6 | import lombok.Setter;
7 |
8 | @Getter
9 | @Setter
10 | @NoArgsConstructor
11 | @JsonInclude(JsonInclude.Include.NON_DEFAULT)
12 | public class NotabeneNationalIdentification {
13 |
14 | private String nationalIdentifier;
15 | private NotabeneNationalIdentifierType nationalIdentifierType;
16 | /**
17 | * Two alphabetic characters representing an ISO-3166 Alpha-2 country,
18 | * including the code ‘XX’ to represent an indicator for unknown States,
19 | * other entities or organisations
20 | */
21 | private String countryOfIssue;
22 | private String registrationAuthority;
23 |
24 | }
25 |
--------------------------------------------------------------------------------