Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Fork off https://github.com/jaddek/fireblocks-sdk-php

Fireblocks api (11.2021)
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jaddek/fireblocks-sdk-php",
"description": "Fireblocks http api client",
"name": "decrypted/fireblocks-sdk-php",
"description": "Fork - Fireblocks http api client - from jaddek",
"keywords": [
"fireblocks",
"sdk",
Expand Down
8 changes: 4 additions & 4 deletions src/Endpoint/ExchangeAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function getAccounts(): ResponseInterface
public function retrieveAccount(string $exchangeAccountId): ResponseInterface
{
$url = strtr('/v1/exchange_accounts/{exchangeAccountId}', [
'{exchangeAccountId}' => $exchangeAccountId,
'{exchangeAccountId}' => urlencode($exchangeAccountId),
]);

return $this->request('GET', $url);
Expand All @@ -26,8 +26,8 @@ public function retrieveAccount(string $exchangeAccountId): ResponseInterface
public function retrieveAsset(string $exchangeAccountId, string $assetId): ResponseInterface
{
$url = strtr('/v1/exchange_accounts/{exchangeAccountId}/{assetId}', [
'{exchangeAccountId}' => $exchangeAccountId,
'{assetId}' => $assetId,
'{exchangeAccountId}' => urlencode($exchangeAccountId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('GET', $url);
Expand All @@ -36,7 +36,7 @@ public function retrieveAsset(string $exchangeAccountId, string $assetId): Respo
public function exchangeInternalTransfer(string $exchangeAccountId, ExchangeInternalTransfer $transfer): ResponseInterface
{
$url = strtr('/v1/exchange_accounts/{exchangeAccountId}/internal_transfer', [
'{exchangeAccountId}' => $exchangeAccountId,
'{exchangeAccountId}' => urlencode($exchangeAccountId),
]);

return $this->request('POST', $url, [
Expand Down
18 changes: 9 additions & 9 deletions src/Endpoint/ExternalWallets.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function createWallet(Wallet $wallet): ResponseInterface
public function retrieveWallet(string $walletId): ResponseInterface
{
$url = strtr('/v1/external_wallets/{walletId}', [
'{walletId}' => $walletId,
'{walletId}' => urlencode($walletId),
]);

return $this->request('GET', $url);
Expand All @@ -34,7 +34,7 @@ public function retrieveWallet(string $walletId): ResponseInterface
public function deleteWallet(string $walletId): ResponseInterface
{
$url = strtr('/v1/external_wallets/{walletId}', [
'{walletId}' => $walletId,
'{walletId}' => urlencode($walletId),
]);

return $this->request('DELETE', $url);
Expand All @@ -43,8 +43,8 @@ public function deleteWallet(string $walletId): ResponseInterface
public function retrieveAsset(string $walletId, string $assetId): ResponseInterface
{
$url = strtr('/v1/external_wallets/{walletId}/{assetId}', [
'{walletId}' => $walletId,
'{assetId}' => $assetId,
'{walletId}' => urlencode($walletId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('GET', $url);
Expand All @@ -53,8 +53,8 @@ public function retrieveAsset(string $walletId, string $assetId): ResponseInterf
public function addAsset(string $walletId, string $assetId, Asset $asset): ResponseInterface
{
$url = strtr('/v1/external_wallets/{walletId}/{assetId}', [
'{walletId}' => $walletId,
'{assetId}' => $assetId,
'{walletId}' => urlencode($walletId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('POST', $url, [
Expand All @@ -65,8 +65,8 @@ public function addAsset(string $walletId, string $assetId, Asset $asset): Respo
public function deleteAsset(string $walletId, string $assetId): ResponseInterface
{
$url = strtr('/v1/external_wallets/{walletId}/{assetId}', [
'{walletId}' => $walletId,
'{assetId}' => $assetId,
'{walletId}' => urlencode($walletId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('DELETE', $url);
Expand All @@ -75,7 +75,7 @@ public function deleteAsset(string $walletId, string $assetId): ResponseInterfac
public function setAmlCustomerRefId(string $walletId, string $customerRefId): ResponseInterface
{
$url = strtr('/v1/external_wallets/{walletId}/set_customer_ref_id', [
'{walletId}' => $walletId,
'{walletId}' => urlencode($walletId),
]);

return $this->request('POST', $url, [
Expand Down
6 changes: 3 additions & 3 deletions src/Endpoint/FiatAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getAccounts(): ResponseInterface
public function retrieveAccount(string $accountId): ResponseInterface
{
$url = strtr('/v1/fiat_accounts/{accountId}', [
'{accountId}' => $accountId,
'{accountId}' => urlencode($accountId),
]);

return $this->request('GET', $url);
Expand All @@ -27,7 +27,7 @@ public function retrieveAccount(string $accountId): ResponseInterface
public function redeemFundsToLinkedDDA(string $accountId, string $amount): ResponseInterface
{
$url = strtr('/v1/fiat_accounts/{accountId}/redeem_to_linked_dda', [
'{accountId}' => $accountId,
'{accountId}' => urlencode($accountId),
]);

return $this->request('POST', $url, [
Expand All @@ -38,7 +38,7 @@ public function redeemFundsToLinkedDDA(string $accountId, string $amount): Respo
public function depositFundsFromLinkedDDA(string $accountId, string $amount): ResponseInterface
{
$url = strtr('/v1/fiat_accounts/{accountId}/deposit_from_linked_dda', [
'{accountId}' => $accountId,
'{accountId}' => urlencode($accountId),
]);

return $this->request('POST', $url, [
Expand Down
18 changes: 9 additions & 9 deletions src/Endpoint/InternalWallets.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function createWallet(Wallet $wallet): ResponseInterface
public function retrieveWallet(string $walletId): ResponseInterface
{
$url = strtr('/v1/internal_wallets/{walletId}', [
'{walletId}' => $walletId,
'{walletId}' => urlencode($walletId),
]);

return $this->request('GET', $url);
Expand All @@ -38,7 +38,7 @@ public function retrieveWallet(string $walletId): ResponseInterface
public function deleteWallet(string $walletId): ResponseInterface
{
$url = strtr('/v1/internal_wallets/{walletId}', [
'{walletId}' => $walletId,
'{walletId}' => urlencode($walletId),
]);

return $this->request('DELETE', $url);
Expand All @@ -47,8 +47,8 @@ public function deleteWallet(string $walletId): ResponseInterface
public function retrieveAsset(string $walletId, string $assetId): ResponseInterface
{
$url = strtr('/v1/internal_wallets/{walletId}/{assetId}', [
'{walletId}' => $walletId,
'{assetId}' => $assetId,
'{walletId}' => urlencode($walletId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('GET', $url);
Expand All @@ -57,8 +57,8 @@ public function retrieveAsset(string $walletId, string $assetId): ResponseInterf
public function addAsset(string $walletId, string $assetId, Asset $asset): ResponseInterface
{
$url = strtr('/v1/internal_wallets/{walletId}/{assetId}', [
'{walletId}' => $walletId,
'{assetId}' => $assetId,
'{walletId}' => urlencode($walletId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('POST', $url, [
Expand All @@ -69,8 +69,8 @@ public function addAsset(string $walletId, string $assetId, Asset $asset): Respo
public function deleteAsset(string $walletId, string $assetId): ResponseInterface
{
$url = strtr('/v1/internal_wallets/{walletId}/{assetId}', [
'{walletId}' => $walletId,
'{assetId}' => $assetId,
'{walletId}' => urlencode($walletId),
'{assetId}' => urlencode($assetId),
]);

return $this->request('DELETE', $url);
Expand All @@ -79,7 +79,7 @@ public function deleteAsset(string $walletId, string $assetId): ResponseInterfac
public function setAmlCustomerRefId(string $walletId, string $customerRefId): ResponseInterface
{
$url = strtr('/v1/internal_wallets/{walletId}/set_customer_ref_id', [
'{walletId}' => $walletId,
'{walletId}' => urlencode($walletId),
]);

return $this->request('POST', $url, [
Expand Down
2 changes: 1 addition & 1 deletion src/Endpoint/NetworkConnections.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getNetworkConnections(): ResponseInterface
public function retrieveNetworkConnection(string $connectionId): ResponseInterface
{
$url = strtr('/v1/network_connections/{connectionId}', [
'{connectionId}' => $connectionId,
'{connectionId}' => urlencode($connectionId),
]);

return $this->request('GET', $url);
Expand Down
12 changes: 6 additions & 6 deletions src/Endpoint/SmartTransfers.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function createTransferTicket(Ticket $ticket): ResponseInterface
public function retrieveTransferTicket(string $ticketId): ResponseInterface
{
$url = strtr('/v1/transfer_tickets/{ticketId}', [
'{ticketId}' => $ticketId
'{ticketId}' => urlencode($ticketId)
]);

return $this->request('GET', $url);
Expand All @@ -38,8 +38,8 @@ public function retrieveTransferTicket(string $ticketId): ResponseInterface
public function retrieveTermOfTransactionTicket(string $ticketId, string $termId): ResponseInterface
{
$url = strtr('/v1/transfer_tickets/{ticketId}/{termId}', [
'{ticketId}' => $ticketId,
'{termId}' => $termId,
'{ticketId}' => urlencode($ticketId),
'{termId}' => urlencode($termId),
]);

return $this->request('GET', $url);
Expand All @@ -48,7 +48,7 @@ public function retrieveTermOfTransactionTicket(string $ticketId, string $termId
public function cancelTransferRequest(string $ticketId): ResponseInterface
{
$url = strtr('/v1/transfer_tickets/{ticketId}/cancel', [
'{ticketId}' => $ticketId
'{ticketId}' => urlencode($ticketId)
]);

return $this->request('POST', $url);
Expand All @@ -57,8 +57,8 @@ public function cancelTransferRequest(string $ticketId): ResponseInterface
public function makeTransferFromTransferTermContext(string $ticketId, string $termId, TransferPeerPath $path): ResponseInterface
{
$url = strtr('/v1/transfer_tickets/{ticketId}/{termId}/transfer', [
'{ticketId}' => $ticketId,
'{termId}' => $termId,
'{ticketId}' => urlencode($ticketId),
'{termId}' => urlencode($termId),
]);

return $this->request('POST', $url, [
Expand Down
20 changes: 10 additions & 10 deletions src/Endpoint/Transactions.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function createTransaction(CreateTransactionRequest $transaction): Respon
public function retrieveTransaction(string $txId): ResponseInterface
{
$url = strtr('/v1/transactions/{txId}', [
'{txId}' => $txId,
'{txId}' => urlencode($txId),
]);

return $this->request('GET', $url);
Expand All @@ -44,7 +44,7 @@ public function retrieveTransaction(string $txId): ResponseInterface
public function retrieveTransactionByExternalId(string $externalTxId): ResponseInterface
{
$url = strtr('/v1/transactions/external_tx_id/{externalTxId}', [
'externalTxId' => $externalTxId,
'externalTxId' => urlencode($externalTxId),
]);

return $this->request('GET', $url);
Expand All @@ -53,7 +53,7 @@ public function retrieveTransactionByExternalId(string $externalTxId): ResponseI
public function cancelTransaction(string $txId): ResponseInterface
{
$url = strtr('/v1/transactions/{txId}/cancel', [
'{txId}' => $txId,
'{txId}' => urlencode($txId),
]);

return $this->request('POST', $url);
Expand All @@ -62,7 +62,7 @@ public function cancelTransaction(string $txId): ResponseInterface
public function dropTransaction(string $txId, ?string $feeLevel = null): ResponseInterface
{
$url = strtr('/v1/transactions/{txId}/drop', [
'{txId}' => $txId,
'{txId}' => urlencode($txId),
]);

$options = [];
Expand All @@ -79,7 +79,7 @@ public function dropTransaction(string $txId, ?string $feeLevel = null): Respons
public function freezeTransaction(string $txId): ResponseInterface
{
$url = strtr('/v1/transactions/{txId}/freeze', [
'{txId}' => $txId,
'{txId}' => urlencode($txId),
]);

return $this->request('POST', $url);
Expand All @@ -88,7 +88,7 @@ public function freezeTransaction(string $txId): ResponseInterface
public function unFreezeTransaction(string $txId): ResponseInterface
{
$url = strtr('/v1/transactions/{txId}/unfreeze', [
'{txId}' => $txId,
'{txId}' => urlencode($txId),
]);

return $this->request('POST', $url);
Expand All @@ -97,8 +97,8 @@ public function unFreezeTransaction(string $txId): ResponseInterface
public function validateDestinationAddress(string $assetId, string $address): ResponseInterface
{
$url = strtr('/v1/transactions/validate_address/{assetId}/{address}', [
'{assetId}' => $assetId,
'{address}' => $address
'{assetId}' => urlencode($assetId),
'{address}' => urlencode($address)
]);

return $this->request('GET', $url);
Expand All @@ -123,7 +123,7 @@ public function estimateTransactionFee(): ResponseInterface
public function setConfirmationThresholdByTxId(string $txId): ResponseInterface
{
$url = strtr('/v1/transactions/{txId}/set_confirmation_threshold', [
'{txId}' => $txId,
'{txId}' => urlencode($txId),
]);

return $this->request('POST', $url);
Expand All @@ -132,7 +132,7 @@ public function setConfirmationThresholdByTxId(string $txId): ResponseInterface
public function setConfirmationThresholdByTxHash(string $txHash): ResponseInterface
{
$url = strtr('/v1/txHash/{txHash}/set_confirmation_threshold', [
'{txHash}' => $txHash,
'{txHash}' => urlencode($txHash),
]);

return $this->request('POST', $url);
Expand Down
Loading