python FileCoin JSON RPC1 FileCoin(FIL) JSON-RPC로 통신하기 기본 구문 import requests import json import cbor # Filecoin 노드 RPC endpoint URL node_url = 'https://api.node.glif.io' def json_request(method,cid): # JSON RPC 요청 메시지 구성 rpc_request = { "jsonrpc": "2.0", "id": 0, "method": f"Filecoin.{method}", "params": [{"/":cid},] } return rpc_request def get_response(method,cid): # JSON RPC 요청 보내기 response = requests.post(node_url, json=json_request(method,cid)).. 2023. 3. 13. 이전 1 다음