Skip to content

Commit e087939

Browse files
committed
Updated Readme
1 parent 2b0a376 commit e087939

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,25 @@ print(balance)
7979
#### Get Transaction History
8080

8181
```python
82-
transactions = manager.get_transaction_history()
82+
page = 1
83+
limit = 10
84+
transactions = manager.get_transaction_history(page, limit)
8385
print(transactions)
8486

8587
```
8688

8789
#### Withdraw from chains
8890

8991
```python
90-
swap_params = {
92+
withdraw_params = {
9193
"amount": 100,
9294
"address": "0x1234...",
9395
"network": Network.BSC,
9496
"shouldSaveAddress": True
9597
}
9698

97-
swap_result = manager.withdraw(swap_params)
98-
print(swap_result)
99+
withdraw_result = manager.withdraw(withdraw_params)
100+
print(withdraw_result)
99101

100102
```
101103

@@ -120,14 +122,30 @@ NOTE: to get bank codes please use the getBanks method to fetch the list of bank
120122

121123
```python
122124
mint_params = {
123-
"provider": ProviderType.KORAPAY
125+
"provider": ProviderType.KORAPAY,
126+
"bank_code": '011'
124127
}
125128

126129
virtual_account = manager.create_virtual_account(mint_params)
127130
print(virtual_account)
128131

129132
```
133+
NOTE: before creating the virtual account you need to have updated your BVN on the dashboard
134+
135+
#### Swap Asset
130136

137+
```python
138+
swap_data = {
139+
"destinationNetwork": Network.BSC,
140+
"destinationAddress": '0x123...',
141+
"originNetwork": Network.ETH,
142+
"callbackUrl": 'https://your-callback-url.com' // optional
143+
}
144+
145+
swap_result = manager.swap_asset(swap_data)
146+
print(swap_result)
147+
148+
```
131149
NOTE: before creating the virtual account you need to have updated your BVN on the dashboard
132150

133151

cngn_manager/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
__title__ = "cngn_manager"
1111
__description__ = "Python HTTP for Humans."
1212
__url__ = "https://docs.cngn.co"
13-
__version__ = "1.0.1"
13+
__version__ = "1.0.2"
1414
__author__ = "Emmanuel Onyo"
1515
__author_email__ = "[email protected]"
1616
__license__ = "MIT License"

0 commit comments

Comments
 (0)