Metadata-Version: 2.1
Name: bantupay-sdk
Version: 0.0.6
Summary: BantuPay SDK
Home-page: https://github.com/bantublockchain/bantupay-sdk-python
Author: Bantu Blockchain Foundation
Author-email: adevops@bantufoundation.org
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/bantublockchain/bantupay-sdk-python/issues
Description: # BantuPay SDK
        
        ## Installation
        
        Using pip to include bantupay-sdk in your own project:
        
        ```shell
         $ pip install bantupay-sdk
        
        ```
        
        ## Getting started
        
        ### Use the following code to create key pair.
        
        ```python
        from bantupay_sdk import account
        
        keyPair = account() # keyPair will now contain this structure {secret: '', publicKey: ''}
        ```
        
        ### Use the folowing code to sign http data
        
        ```python
        from bantupay_sdk import signHttp
        
        httpSign = signHttp(
          '/v2/user/',
          '{username: "proxie"}',
          'SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI'
        ); # Secret key gotten from the create account method.
        ```
        
        ### Use this to Sign a transaction
        
        ```python
        from bantupay_sdk import signTxn
        
        signTxn = bantuSDK.signTxn(
          "SDBG73M4LPCPCQ6NQ4CP4LCF7MOOQGUFJRRBD26P6QKIHW2ESP5R7DDN",
          "AAAAAOKtdgWGQ02FzacmAD1WhAhI5Dp7kPRojOGjNQj3FBWvAAAAZAAcmBgAAAAEAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAANQmFudHUuTmV0d29yawAAAAAAAAAAAAAAAAAAAA==",
          "Bantu Testnet"
        );
        ```
        
        # To make payment
        
        > The expressPay method is designed for making payments from bots or any other API like bulk payment engines, that does not need any userfeedback
        
        ---
        
        ```python
        from bantupay_sdk import expressPay
        
        # Example for making XBN payment
        # Please NOTE: - if you are making payment to Bantu's naitive assest you  MUST leave assetCode and assetIssuer empty, your request will look like this.
        
        expressPay(
                "proxie",
                "long",
                "Test 0",
                "1",
                "SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI",
            )
        
        
        # Let's make a BNR payment
        # for mainnet, BNR issuer is GARO4SCJCPO4QPW27EZQBDV5KY4GXXBH6FOLUQ73K73VC4NP5PGBANTU,
        # for testnet BNR issuer is GBNRQ56XX4JA3HKXP7EACLLXYPHCYCWBWOQZYSPGUIJSR5JSAD22EZXG
        # Please ensure that you use the right issuer
        expressPay(
                "proxie",
                "long",
                "Test 0",
                "1",
                "SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI",
                assetIssuer="GARO4SCJCPO4QPW27EZQBDV5KY4GXXBH6FOLUQ73K73VC4NP5PGBANTU"
                assetCode="BNR"
            )
        ```
        
        ### Another way to make payment
        
        ```python
        from bantupay_sdk import confirmPaymentDetail, makePayment
        
        firstCall = confirmPaymentDetail(
            "proxie",
            {"destination": "amyliana1", "memo": "Test 1", "amount": "1"},
            "SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI",
        )
        ```
        
        ## Note!
        
        > Pass the response of the first call in to the makePayment function.
        
        > confirmPayment will return a dict with status_code and data which is the response gotten from the server, this contains, firstName, lastName, destinationThumbnail, which can be used in stuff like your mobile apps and the likes, networkPhrase, transaction which will be returned in the makePayment and lastly message with will contain info like extra fees or charges that may acrue.
        
        ---
        
        ```python
        
        if firstCall['statusCode'] == 202: # all is right, you can move on to the next step
        
          payment = makePayment(
              "proxie",
              firstCall,
              "SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI",
          )
        else:
          # handle payment here.
          pass
        
        # Let's make a BNR payment
        # for mainnet, BNR issuer is GARO4SCJCPO4QPW27EZQBDV5KY4GXXBH6FOLUQ73K73VC4NP5PGBANTU,
        # for testnet BNR issuer is GBNRQ56XX4JA3HKXP7EACLLXYPHCYCWBWOQZYSPGUIJSR5JSAD22EZXG
        # Please ensure that you use the right issuer
        
        firstCall = confirmPaymentDetail(
            "proxie",
            {
              "destination": "amyliana1",
              "memo": "Test 1",
              "amount": "1",
              "assetIssuer": "GARO4SCJCPO4QPW27EZQBDV5KY4GXXBH6FOLUQ73K73VC4NP5PGBANTU",
              "assetCode": "BNR"
            },
            "SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI",
        )
        
        # If all is well, your status code will 200, then pass the response of the first call in to the makePayment function
        if firstCall['statusCode'] == 200:
          payment = makePayment(
              "proxie",
              firstCall,
              "SBVNK4S2NU2QSBDZBKQCGR7DX5FTQFDJVKGWVCZLIEOV4QMANLQYSLNI",
          )
        else:
          # handle your errors here
          print(firstCall['data'])
        
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
