Skip to content

Commit 74fd5f8

Browse files
Merge pull request #5 from blockfrost/update-for-v0.1.32
Updated for API version v0.1.32
2 parents 9db5113 + d18f49e commit 74fd5f8

File tree

7 files changed

+20
-8
lines changed

7 files changed

+20
-8
lines changed

blockfrost/api/cardano/addresses.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ class AddressesTransactionResponse:
198198
tx_hash: str
199199
tx_index: int
200200
block_height: int
201+
block_time: int
201202

202203

203204
@object_list_request_wrapper(AddressesTransactionResponse)

blockfrost/api/cardano/assets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ class AssetTransactionResponse:
149149
tx_hash: str
150150
tx_index: int
151151
block_height: int
152+
block_time: int
152153

153154

154155
@object_list_request_wrapper(AssetTransactionResponse)

blockfrost/api/cardano/transactions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Amount:
1313
hash: str
1414
block: str
1515
block_height: int
16+
block_time: int
1617
slot: int
1718
index: int
1819
output_amount: [Amount]
@@ -36,6 +37,7 @@ def __init__(self,
3637
hash: str,
3738
block: str,
3839
block_height: int,
40+
block_time: int,
3941
slot: int,
4042
index: int,
4143
output_amount: [Amount],
@@ -58,6 +60,7 @@ def __init__(self,
5860
self.hash = hash
5961
self.block = block
6062
self.block_height = block_height
63+
self.block_time = block_time
6164
self.slot = slot
6265
self.index = index
6366
self.output_amount = [self.Amount(**o) for o in output_amount]

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
setup(
1010
name='blockfrost-python',
11-
version='0.3.0',
12-
description='The official Python SDK for Blockfrost API v0.1.30',
11+
version='0.3.1',
12+
description='The official Python SDK for Blockfrost API v0.1.32',
1313
long_description=long_description,
1414
long_description_content_type='text/markdown',
1515
url='https://github.com/blockfrost/blockfrost-python',

tests/test_cardano_addresses.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,20 @@ def test_address_transactions(requests_mock):
169169
{
170170
"tx_hash": "8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b",
171171
"tx_index": 6,
172-
"block_height": 69
172+
"block_height": 69,
173+
"block_time": 1635505891
173174
},
174175
{
175176
"tx_hash": "52e748c4dec58b687b90b0b40d383b9fe1f24c1a833b7395cdf07dd67859f46f",
176177
"tx_index": 9,
177-
"block_height": 4547
178+
"block_height": 4547,
179+
"block_time": 1635505987
178180
},
179181
{
180182
"tx_hash": "e8073fd5318ff43eca18a852527166aa8008bee9ee9e891f585612b7e4ba700b",
181183
"tx_index": 0,
182-
"block_height": 564654
184+
"block_height": 564654,
185+
"block_time": 1834505492
183186
}
184187
]
185188
requests_mock.get(f"{api.url}/addresses/{address}/transactions", json=mock_data)

tests/test_cardano_assets.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,20 @@ def test_asset_transactions(requests_mock):
9090
{
9191
"tx_hash": "8788591983aa73981fc92d6cddbbe643959f5a784e84b8bee0db15823f575a5b",
9292
"tx_index": 6,
93-
"block_height": 69
93+
"block_height": 69,
94+
"block_time": 1635505891
9495
},
9596
{
9697
"tx_hash": "52e748c4dec58b687b90b0b40d383b9fe1f24c1a833b7395cdf07dd67859f46f",
9798
"tx_index": 9,
98-
"block_height": 4547
99+
"block_height": 4547,
100+
"block_time": 1635505987
99101
},
100102
{
101103
"tx_hash": "e8073fd5318ff43eca18a852527166aa8008bee9ee9e891f585612b7e4ba700b",
102104
"tx_index": 0,
103-
"block_height": 564654
105+
"block_height": 564654,
106+
"block_time": 1834505492
104107
}
105108
]
106109
requests_mock.get(f"{api.url}/assets/{asset}/transactions", json=mock_data)

tests/test_cardano_transactions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def test_transaction(requests_mock):
2121
"hash": hash,
2222
"block": "356b7d7dbb696ccd12775c016941057a9dc70898d87a63fc752271bb46856940",
2323
"block_height": 123456,
24+
"block_time": 1635505891,
2425
"slot": 42000000,
2526
"index": 1,
2627
"output_amount": [

0 commit comments

Comments
 (0)