View Code? Open in Web Editor
NEW
clarity is a POC - the first healthcare prevention software that allows for physicians and insurance providers to see what their patients consume in real-time.
Home Page: https://morganbergen.github.io/clarity/
JavaScript 64.85%
Makefile 1.36%
C++ 10.88%
HTML 7.75%
TypeScript 6.27%
CSS 8.89%
clarity's Issues
output upon compilation
-rw-r--r-- 1 owner staff 471B Jan 23 20:54 test.js
❯ open .
❯ make
g++ -Wall -std=c++11 -c test.cpp
g++ -Wall -std=c++11 -o my_program test.o -lcurl
❯ ./my_program
0x1de088508curl_easy_perform () failed
URL using bad/illegal format or missing URL%
❯ make
g++ -Wall -std=c++11 -c test.cpp
g++ -Wall -std=c++11 -o my_program test.o -lcurl
❯ ./my_program
0x1de088508curl_easy_perform () failed
Unsupported protocol%
❯ node main . js
Connecting to Testnet . . .
/ Users / owner / node_modules / xrpl / dist / npm / client / connection . js :334
this . connectionManager . rejectAllAwaiting ( new errors_1 . NotConnectedError ( errorOrCode . message , errorOrCode ) ) ;
^
NotConnectedError: read ECONNRESET
at Connection . onConnectionFailed ( / Users/ owner/ node_modules / xrpl / dist / npm / client / connection . js :334 :54 )
at WebSocket . < anonymous > ( / Users/ owner/ node_modules / xrpl / dist / npm / client / connection . js :155 :49 )
at WebSocket . emit ( node :events :539 :35 )
at emitErrorAndClose ( / Users/ owner/ node_modules / ws / lib / websocket . js :1033 :13 )
at ClientRequest . < anonymous > ( / Users/ owner/ node_modules / ws / lib / websocket . js :880 :5 )
at ClientRequest . emit ( node :events :527 :28 )
at TLSSocket . socketErrorListener ( node :_http_client :454 :9 )
at TLSSocket . emit ( node :events :527 :28 )
at emitErrorNT ( node :internal / streams / destroy :164 :8 )
at emitErrorCloseNT ( node :internal / streams / destroy :129 :3 ) {
data: Error: read ECONNRESET
at TLSWrap . onStreamRead ( node :internal / stream_base_commons :217 :20 ) {
errno : - 54 ,
code : 'ECONNRESET' ,
syscall : 'read'
}
}
Node . js v17 .9 .1
prepping for hsc
CODES
module3.py
I need something like this to have the same behavior as main.js
import xrpl
testnet_url = "https://s.altnet.rippletest.net:51234/"
def get_account (seed ):
"""get_account"""
client = xrpl .clients .JsonRpcClient (testnet_url )
if (seed == '' ):
new_wallet = xrpl .wallet .generate_faucet_wallet (client )
else :
new_wallet = xrpl .wallet .Wallet .from_seed (seed )
return new_wallet
def get_account_info (accountId ):
"""get_account_info"""
client = xrpl .clients .JsonRpcClient (testnet_url )
acct_info = xrpl .models .requests .account_info .AccountInfo (
account = accountId ,
ledger_index = "validated"
)
response = client .request (acct_info )
return response .result ['account_data' ]
def send_xrp (seed , amount , destination ):
sending_wallet = xrpl .wallet .Wallet .from_seed (seed )
client = xrpl .clients .JsonRpcClient (testnet_url )
payment = xrpl .models .transactions .Payment (
account = sending_wallet .address ,
amount = xrpl .utils .xrp_to_drops (int (amount )),
destination = destination ,
)
try :
response = xrpl .transaction .submit_and_wait (payment , client , sending_wallet )
except xrpl .transaction .XRPLReliableSubmissionException as e :
response = f"Submit failed: { e } "
return response