MCPcopy
hub / github.com/petertodd/python-bitcoinlib / getnewaddress

Method getnewaddress

bitcoin/rpc.py:539–551  ·  view source on GitHub ↗

Return a new Bitcoin address for receiving payments. If account is not None, it is added to the address book so payments received with the address will be credited to account.

(self, account=None)

Source from the content-addressed store, hash-verified

537 return self._call('getmininginfo')
538
539 def getnewaddress(self, account=None):
540 """Return a new Bitcoin address for receiving payments.
541
542 If account is not None, it is added to the address book so payments
543 received with the address will be credited to account.
544 """
545 r = None
546 if account is not None:
547 r = self._call('getnewaddress', account)
548 else:
549 r = self._call('getnewaddress')
550
551 return CBitcoinAddress(r)
552
553 def getrawchangeaddress(self):
554 """Returns a new Bitcoin address, for receiving change.

Callers 3

payment_requestFunction · 0.95

Calls 2

CBitcoinAddressClass · 0.90
_callMethod · 0.45

Tested by

no test coverage detected