Skip to content

Commit

Permalink
latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jansenmarc committed Mar 22, 2018
1 parent 8c58de2 commit e72075e
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ __pywaves.Order(orderId, assetPair, address='')__ Creates a new Order object

`pywaves.setOnline()` switch to online mode; sign tx locally a broadcast to network

`pywaves.validateAddress(address)` checks if the provided address is valid or not

`pywaves.setMatcher(node)` set matcher URL ('http://ip-address:port')

`pywaves.setDatafeed(node)` set datafeed URL ('http://ip-address:port')
Expand Down Expand Up @@ -189,9 +191,8 @@ myAddress = pw.Address(privateKey='CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S'
# get an existing address from a publicKey
address = pw.Address(publicKey=“EYNuSmW4Adtcc6AMCZyxkiHMPmF2BZ2XxvjpBip3UFZL”)

# get an address from a seed with a different nonce
# get an address from a seed with a different nonce (This is especially useful for accessing addresses generated by nodes)
myAddress = pw.Address(seed='seven wrist bargain hope pattern banner plastic maple student chaos grit next space visa answer', nonce=1)
This is especially useful for accessing addresses generated by nodes.
```

#### Balances:
Expand Down Expand Up @@ -263,11 +264,39 @@ for address in recipients:
myAddress.sendWaves(pw.Address(address), 1000000)
```

#### Mass transfer of Waves (feature 11)
```python
import pywaves as pw

transfers = [
{ 'recipient': '3N1xca2DY8AEwqRDAJpzUgY99eq8J9h4rB3', 'amount': 1 },
{ 'recipient': '3N3YWbQ27NnK7tek6ASFh38Bj93guLxxSi1', 'amount': 2 },
{ 'recipient': '3MwiB5UkWxt4X1qJ8DQpP2LpM3m48V1z5rC', 'amount': 3 }
]

address = pw.Address(privateKey = "CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S")
address.massTransferWaves(transfers)
```

#### Mass transfer of Assets (feature 11)
```python
import pywaves as pw

transfers = [
{ 'recipient': '3N1xca2DY8AEwqRDAJpzUgY99eq8J9h4rB3', 'amount': 1 },
{ 'recipient': '3N3YWbQ27NnK7tek6ASFh38Bj93guLxxSi1', 'amount': 2 },
{ 'recipient': '3MwiB5UkWxt4X1qJ8DQpP2LpM3m48V1z5rC', 'amount': 3 }
]

address = pw.Address(privateKey = "CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S")
address.massTransferAssets(transfers, pw.Asset('9DtBNdyBCyViLZHptyF1HbQk73F6s7nQ5dXhNHubtBhd'))
```

#### Token airdrop:
```python
import pywaves as pw

myAddress = pw.Address(privateKey = 'CtMQWJZqfc7PRzSWiMKaGmWFm4q2VN5fMcYyKDBPDx6S')
myAddress = pw.Address(privateKey = '`')
myToken = pw.Asset('4ZzED8WJXsvuo2MEm2BmZ87Azw8Sx7TVC6ufSUA5LyTV')
amount = 1000

Expand Down

0 comments on commit e72075e

Please sign in to comment.