| { | |
| "ast": { | |
| "items": [ | |
| { | |
| "use": { | |
| "tree": { | |
| "path": { | |
| "ident": "std", | |
| "tree": { | |
| "path": { | |
| "ident": "str", | |
| "tree": { | |
| "ident": "FromStr" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "use": { | |
| "tree": { | |
| "path": { | |
| "ident": "dioxus", | |
| "tree": { | |
| "path": { | |
| "ident": "prelude", | |
| "tree": "*" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "use": { | |
| "tree": { | |
| "path": { | |
| "ident": "solana_sdk", | |
| "tree": { | |
| "group": [ | |
| { | |
| "path": { | |
| "ident": "native_token", | |
| "tree": { | |
| "ident": "LAMPORTS_PER_SOL" | |
| } | |
| } | |
| }, | |
| { | |
| "path": { | |
| "ident": "pubkey", | |
| "tree": { | |
| "ident": "Pubkey" | |
| } | |
| } | |
| }, | |
| { | |
| "path": { | |
| "ident": "system_instruction", | |
| "tree": { | |
| "ident": "transfer" | |
| } | |
| } | |
| }, | |
| { | |
| "path": { | |
| "ident": "transaction", | |
| "tree": { | |
| "ident": "Transaction" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "use": { | |
| "tree": { | |
| "path": { | |
| "ident": "wallet_adapter", | |
| "tree": { | |
| "group": [ | |
| { | |
| "path": { | |
| "ident": "web_sys", | |
| "tree": { | |
| "group": [ | |
| { | |
| "path": { | |
| "ident": "js_sys", | |
| "tree": { | |
| "ident": "Date" | |
| } | |
| } | |
| }, | |
| { | |
| "path": { | |
| "ident": "wasm_bindgen", | |
| "tree": { | |
| "ident": "JsValue" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| { | |
| "ident": "SendOptions" | |
| }, | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "WalletResult" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "use": { | |
| "tree": { | |
| "path": { | |
| "ident": "crate", | |
| "tree": { | |
| "group": [ | |
| { | |
| "path": { | |
| "ident": "model", | |
| "tree": { | |
| "group": [ | |
| { | |
| "path": { | |
| "ident": "storage", | |
| "tree": { | |
| "group": [ | |
| { | |
| "ident": "ACCOUNT_STATE" | |
| }, | |
| { | |
| "ident": "WALLET_ADAPTER" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| { | |
| "ident": "use_connections" | |
| }, | |
| { | |
| "ident": "AccountState" | |
| }, | |
| { | |
| "ident": "BlockHashResponseValue" | |
| }, | |
| { | |
| "ident": "ResponseWithContext" | |
| }, | |
| { | |
| "ident": "RpcResponse" | |
| }, | |
| { | |
| "ident": "SignaturesResponse" | |
| }, | |
| { | |
| "ident": "TokenAccountResponse" | |
| } | |
| ] | |
| } | |
| } | |
| }, | |
| { | |
| "ident": "FetchReq" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "fn": { | |
| "ident": "format_timestamp", | |
| "inputs": [ | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "unix_timestamp" | |
| } | |
| }, | |
| "ty": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "i64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "output": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "String" | |
| } | |
| ] | |
| } | |
| }, | |
| "stmts": [ | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "binary": { | |
| "left": { | |
| "cast": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "unix_timestamp" | |
| } | |
| ] | |
| } | |
| }, | |
| "ty": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "f64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "op": "*", | |
| "right": { | |
| "lit": { | |
| "float": "1000.0" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "timestamp_ms" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "timestamp_ms" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "JsValue" | |
| }, | |
| { | |
| "ident": "from_f64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Date" | |
| }, | |
| { | |
| "ident": "new" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "js_date" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "lit": { | |
| "str": "\"Invalid Timestamp\"" | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "unwrap_or", | |
| "receiver": { | |
| "method_call": { | |
| "args": [], | |
| "method": "as_string", | |
| "receiver": { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "js_date" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| false | |
| ] | |
| } | |
| ], | |
| "vis": "pub" | |
| } | |
| }, | |
| { | |
| "fn": { | |
| "async": true, | |
| "ident": "get_blockhash", | |
| "inputs": [], | |
| "output": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "solana_sdk" | |
| }, | |
| { | |
| "ident": "hash" | |
| }, | |
| { | |
| "ident": "Hash" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "WalletResult" | |
| } | |
| ] | |
| } | |
| }, | |
| "stmts": [ | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "macro": { | |
| "delimiter": "brace", | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "jzon" | |
| }, | |
| { | |
| "ident": "object" | |
| } | |
| ] | |
| }, | |
| "tokens": [ | |
| { | |
| "lit": "\"id\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "1" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"jsonrpc\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"2.0\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"method\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"getLatestBlockhash\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"params\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "bracket", | |
| "stream": [] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "options" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "method_call": { | |
| "args": [], | |
| "method": "send", | |
| "receiver": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "options" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "set_body", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "lit": { | |
| "str": "\"Accept\"" | |
| } | |
| }, | |
| { | |
| "lit": { | |
| "str": "\"application/json\"" | |
| } | |
| } | |
| ], | |
| "method": "add_header", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "lit": { | |
| "str": "\"content-type\"" | |
| } | |
| }, | |
| { | |
| "lit": { | |
| "str": "\"application/json\"" | |
| } | |
| } | |
| ], | |
| "method": "add_header", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "lit": { | |
| "str": "\"POST\"" | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "FetchReq" | |
| }, | |
| { | |
| "ident": "new" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "response_body" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "unwrap", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "response_body" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "serde_json" | |
| }, | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "BlockHashResponseValue" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "ResponseWithContext" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "RpcResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ], | |
| "colon2_token": true | |
| } | |
| }, | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "deser" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "closure": { | |
| "body": { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "error" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "inputs": [ | |
| { | |
| "ident": { | |
| "ident": "error" | |
| } | |
| } | |
| ], | |
| "output": null | |
| } | |
| } | |
| ], | |
| "method": "map_err", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "field": { | |
| "base": { | |
| "field": { | |
| "base": { | |
| "field": { | |
| "base": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "deser" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "result" | |
| } | |
| }, | |
| "ident": "value" | |
| } | |
| }, | |
| "ident": "blockhash" | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "solana_sdk" | |
| }, | |
| { | |
| "ident": "hash" | |
| }, | |
| { | |
| "ident": "Hash" | |
| }, | |
| { | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| false | |
| ] | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "fn": { | |
| "async": true, | |
| "ident": "get_balance", | |
| "inputs": [ | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "address" | |
| } | |
| }, | |
| "ty": { | |
| "reference": { | |
| "elem": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "output": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "String" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "WalletResult" | |
| } | |
| ] | |
| } | |
| }, | |
| "stmts": [ | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "macro": { | |
| "delimiter": "brace", | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "jzon" | |
| }, | |
| { | |
| "ident": "object" | |
| } | |
| ] | |
| }, | |
| "tokens": [ | |
| { | |
| "lit": "\"id\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "1" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"jsonrpc\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"2.0\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"method\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"getBalance\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"params\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "bracket", | |
| "stream": [ | |
| { | |
| "ident": "address" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "balance_options" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "method_call": { | |
| "args": [], | |
| "method": "send", | |
| "receiver": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "balance_options" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "set_body", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "call": { | |
| "args": [], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "FetchReq" | |
| }, | |
| { | |
| "ident": "new_for_rpc" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "balance_response" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "closure": { | |
| "body": { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "error" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "inputs": [ | |
| { | |
| "ident": { | |
| "ident": "error" | |
| } | |
| } | |
| ], | |
| "output": null | |
| } | |
| } | |
| ], | |
| "method": "map_err", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "balance_response" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "serde_json" | |
| }, | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "u64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "ResponseWithContext" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "RpcResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ], | |
| "colon2_token": true | |
| } | |
| }, | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "parsed_balance" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "paren": { | |
| "expr": { | |
| "binary": { | |
| "left": { | |
| "cast": { | |
| "expr": { | |
| "field": { | |
| "base": { | |
| "field": { | |
| "base": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "parsed_balance" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "result" | |
| } | |
| }, | |
| "ident": "value" | |
| } | |
| }, | |
| "ty": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "f64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "op": "/", | |
| "right": { | |
| "cast": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "LAMPORTS_PER_SOL" | |
| } | |
| ] | |
| } | |
| }, | |
| "ty": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "f64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Ok" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| false | |
| ] | |
| } | |
| ], | |
| "vis": "pub" | |
| } | |
| }, | |
| { | |
| "fn": { | |
| "async": true, | |
| "ident": "send_sol_req", | |
| "inputs": [ | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "recipient" | |
| } | |
| }, | |
| "ty": { | |
| "reference": { | |
| "elem": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "lamports" | |
| } | |
| }, | |
| "ty": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "u64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "public_key_bytes" | |
| } | |
| }, | |
| "ty": { | |
| "array": { | |
| "elem": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "u8" | |
| } | |
| ] | |
| } | |
| }, | |
| "len": { | |
| "lit": { | |
| "int": "32" | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "output": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "tuple": { | |
| "elems": [] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "WalletResult" | |
| } | |
| ] | |
| } | |
| }, | |
| "stmts": [ | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "lit": { | |
| "str": "\"solana_wallet\"" | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "use_connections" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "connections" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "active_entry_object", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "connections" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "cluster" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "public_key_bytes" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Pubkey" | |
| }, | |
| { | |
| "ident": "new_from_array" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "pubkey" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "lit": { | |
| "str": "\"Invalid Recipient Address\"" | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Err" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "or", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "recipient" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Pubkey" | |
| }, | |
| { | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "recipient" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "pubkey" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "recipient" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "lamports" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "transfer" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "send_sol_instruction" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "array": { | |
| "elems": [ | |
| { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "send_sol_instruction" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "pubkey" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Some" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Transaction" | |
| }, | |
| { | |
| "ident": "new_with_payer" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "tx", | |
| "mut": true | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "call": { | |
| "args": [], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "get_blockhash" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "blockhash" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "assign": { | |
| "left": { | |
| "field": { | |
| "base": { | |
| "field": { | |
| "base": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "tx" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "message" | |
| } | |
| }, | |
| "ident": "recent_blockhash" | |
| } | |
| }, | |
| "right": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "blockhash" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| true | |
| ] | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "closure": { | |
| "body": { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "error" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "inputs": [ | |
| { | |
| "ident": { | |
| "ident": "error" | |
| } | |
| } | |
| ], | |
| "output": null | |
| } | |
| } | |
| ], | |
| "method": "map_err", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "tx" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "bincode" | |
| }, | |
| { | |
| "ident": "serialize" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "tx_bytes" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "tx_bytes" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "cluster", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "cluster" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "call": { | |
| "args": [], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "SendOptions" | |
| }, | |
| { | |
| "ident": "default" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "sign_and_send_transaction", | |
| "receiver": { | |
| "method_call": { | |
| "args": [], | |
| "method": "read", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WALLET_ADAPTER" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| true | |
| ] | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "tuple": { | |
| "elems": [] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Ok" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| false | |
| ] | |
| } | |
| ], | |
| "vis": "pub" | |
| } | |
| }, | |
| { | |
| "fn": { | |
| "async": true, | |
| "ident": "request_airdrop", | |
| "inputs": [ | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "lamports" | |
| } | |
| }, | |
| "ty": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "u64" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "address" | |
| } | |
| }, | |
| "ty": { | |
| "reference": { | |
| "elem": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "output": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "tuple": { | |
| "elems": [] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "WalletResult" | |
| } | |
| ] | |
| } | |
| }, | |
| "stmts": [ | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "macro": { | |
| "delimiter": "brace", | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "jzon" | |
| }, | |
| { | |
| "ident": "object" | |
| } | |
| ] | |
| }, | |
| "tokens": [ | |
| { | |
| "lit": "\"id\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "1" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"jsonrpc\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"2.0\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"method\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"requestAirdrop\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"params\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "bracket", | |
| "stream": [ | |
| { | |
| "ident": "address" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "ident": "lamports" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "options" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "method_call": { | |
| "args": [], | |
| "method": "send", | |
| "receiver": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "options" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "set_body", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "call": { | |
| "args": [], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "FetchReq" | |
| }, | |
| { | |
| "ident": "new_for_rpc" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "response" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "closure": { | |
| "body": { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "error" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "inputs": [ | |
| { | |
| "ident": { | |
| "ident": "error" | |
| } | |
| } | |
| ], | |
| "output": null | |
| } | |
| } | |
| ], | |
| "method": "map_err", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "response" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "serde_json" | |
| }, | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "String" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "RpcResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ], | |
| "colon2_token": true | |
| } | |
| }, | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| true | |
| ] | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "tuple": { | |
| "elems": [] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Ok" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| false | |
| ] | |
| } | |
| ], | |
| "vis": "pub" | |
| } | |
| }, | |
| { | |
| "fn": { | |
| "async": true, | |
| "ident": "accounts_runner", | |
| "inputs": [ | |
| { | |
| "typed": { | |
| "pat": { | |
| "ident": { | |
| "ident": "address" | |
| } | |
| }, | |
| "ty": { | |
| "reference": { | |
| "elem": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "output": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "AccountState" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "WalletResult" | |
| } | |
| ] | |
| } | |
| }, | |
| "stmts": [ | |
| { | |
| "expr": [ | |
| { | |
| "assign": { | |
| "left": { | |
| "unary": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "write", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "ACCOUNT_STATE" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "op": "*" | |
| } | |
| }, | |
| "right": { | |
| "call": { | |
| "args": [], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "AccountState" | |
| }, | |
| { | |
| "ident": "default" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| true | |
| ] | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "call": { | |
| "args": [ | |
| { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "address" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "crate" | |
| }, | |
| { | |
| "ident": "get_balance" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "balance" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "macro": { | |
| "delimiter": "brace", | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "jzon" | |
| }, | |
| { | |
| "ident": "object" | |
| } | |
| ] | |
| }, | |
| "tokens": [ | |
| { | |
| "lit": "\"id\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "1" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"jsonrpc\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"2.0\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"method\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"getTokenAccountsByOwner\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"params\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "bracket", | |
| "stream": [ | |
| { | |
| "ident": "address" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "brace", | |
| "stream": [ | |
| { | |
| "lit": "\"programId\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"" | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "brace", | |
| "stream": [ | |
| { | |
| "lit": "\"encoding\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"jsonParsed\"" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "token_accounts_options" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "method_call": { | |
| "args": [], | |
| "method": "send", | |
| "receiver": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "token_accounts_options" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "set_body", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "call": { | |
| "args": [], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "FetchReq" | |
| }, | |
| { | |
| "ident": "new_for_rpc" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "fetched_token_accounts" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "closure": { | |
| "body": { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "error" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "inputs": [ | |
| { | |
| "ident": { | |
| "ident": "error" | |
| } | |
| } | |
| ], | |
| "output": null | |
| } | |
| } | |
| ], | |
| "method": "map_err", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "fetched_token_accounts" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "serde_json" | |
| }, | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "TokenAccountResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "Vec" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "ResponseWithContext" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "RpcResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ], | |
| "colon2_token": true | |
| } | |
| }, | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "parsed_token_accounts" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "field": { | |
| "base": { | |
| "field": { | |
| "base": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "parsed_token_accounts" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "result" | |
| } | |
| }, | |
| "ident": "value" | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "token_accounts" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "macro": { | |
| "delimiter": "brace", | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "jzon" | |
| }, | |
| { | |
| "ident": "object" | |
| } | |
| ] | |
| }, | |
| "tokens": [ | |
| { | |
| "lit": "\"jsonrpc\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"2.0\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"id\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "1" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"method\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"getSignaturesForAddress\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ",", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "lit": "\"params\"" | |
| }, | |
| { | |
| "punct": { | |
| "op": ":", | |
| "spacing": "alone" | |
| } | |
| }, | |
| { | |
| "group": { | |
| "delimiter": "bracket", | |
| "stream": [ | |
| { | |
| "ident": "address" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "get_signatures_options" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "await": { | |
| "base": { | |
| "method_call": { | |
| "args": [], | |
| "method": "send", | |
| "receiver": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "get_signatures_options" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "method": "set_body", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "lit": { | |
| "str": "\"Content-Type\"" | |
| } | |
| }, | |
| { | |
| "lit": { | |
| "str": "\"application/json\"" | |
| } | |
| } | |
| ], | |
| "method": "add_header", | |
| "receiver": { | |
| "try": { | |
| "expr": { | |
| "call": { | |
| "args": [ | |
| { | |
| "lit": { | |
| "str": "\"POST\"" | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "FetchReq" | |
| }, | |
| { | |
| "ident": "new" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "fetched_signatures" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "try": { | |
| "expr": { | |
| "method_call": { | |
| "args": [ | |
| { | |
| "closure": { | |
| "body": { | |
| "call": { | |
| "args": [ | |
| { | |
| "method_call": { | |
| "args": [], | |
| "method": "to_string", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "error" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "WalletError" | |
| }, | |
| { | |
| "ident": "Op" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "inputs": [ | |
| { | |
| "ident": { | |
| "ident": "error" | |
| } | |
| } | |
| ], | |
| "output": null | |
| } | |
| } | |
| ], | |
| "method": "map_err", | |
| "receiver": { | |
| "call": { | |
| "args": [ | |
| { | |
| "reference": { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "fetched_signatures" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "serde_json" | |
| }, | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "arguments": { | |
| "angle_bracketed": { | |
| "args": [ | |
| { | |
| "type": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "SignaturesResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "Vec" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "RpcResponse" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ], | |
| "colon2_token": true | |
| } | |
| }, | |
| "ident": "from_str" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "parsed_signatures_response" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "let": { | |
| "init": { | |
| "expr": { | |
| "field": { | |
| "base": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "parsed_signatures_response" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "result" | |
| } | |
| } | |
| }, | |
| "pat": { | |
| "ident": { | |
| "ident": "signatures" | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "expr": [ | |
| { | |
| "call": { | |
| "args": [ | |
| { | |
| "struct": { | |
| "fields": [ | |
| { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "balance" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "balance" | |
| }, | |
| { | |
| "expr": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "token_accounts" | |
| } | |
| ] | |
| } | |
| }, | |
| "ident": "token_accounts" | |
| }, | |
| { | |
| "colon_token": true, | |
| "expr": { | |
| "method_call": { | |
| "args": [], | |
| "method": "clone", | |
| "receiver": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "signatures" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| "ident": "transactions" | |
| } | |
| ], | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "AccountState" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| ], | |
| "func": { | |
| "path": { | |
| "segments": [ | |
| { | |
| "ident": "Ok" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| false | |
| ] | |
| } | |
| ], | |
| "vis": "pub" | |
| } | |
| } | |
| ] | |
| }, | |
| "file_path": "src\\fetch_parser.rs", | |
| "summary": { | |
| "emoji_counts_in_strings": {}, | |
| "string_literals": [ | |
| "\"Invalid Timestamp\"", | |
| "\"id\"", | |
| "1", | |
| "\"jsonrpc\"", | |
| "\"2.0\"", | |
| "\"method\"", | |
| "\"getLatestBlockhash\"", | |
| "\"params\"", | |
| "\"Accept\"", | |
| "\"application/json\"", | |
| "\"content-type\"", | |
| "\"application/json\"", | |
| "\"POST\"", | |
| "\"id\"", | |
| "1", | |
| "\"jsonrpc\"", | |
| "\"2.0\"", | |
| "\"method\"", | |
| "\"getBalance\"", | |
| "\"params\"", | |
| "\"solana_wallet\"", | |
| "\"Invalid Recipient Address\"", | |
| "\"id\"", | |
| "1", | |
| "\"jsonrpc\"", | |
| "\"2.0\"", | |
| "\"method\"", | |
| "\"requestAirdrop\"", | |
| "\"params\"", | |
| "\"id\"", | |
| "1", | |
| "\"jsonrpc\"", | |
| "\"2.0\"", | |
| "\"method\"", | |
| "\"getTokenAccountsByOwner\"", | |
| "\"params\"", | |
| "\"programId\"", | |
| "\"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA\"", | |
| "\"encoding\"", | |
| "\"jsonParsed\"", | |
| "\"jsonrpc\"", | |
| "\"2.0\"", | |
| "\"id\"", | |
| "1", | |
| "\"method\"", | |
| "\"getSignaturesForAddress\"", | |
| "\"params\"", | |
| "\"Content-Type\"", | |
| "\"application/json\"", | |
| "\"POST\"" | |
| ], | |
| "top_level_nodes": 1, | |
| "total_nodes": 1223, | |
| "type_counts": { | |
| "angle_bracketed": 20, | |
| "args": 100, | |
| "arguments": 20, | |
| "array": 2, | |
| "assign": 2, | |
| "async": 5, | |
| "await": 8, | |
| "base": 18, | |
| "binary": 2, | |
| "body": 6, | |
| "call": 36, | |
| "cast": 3, | |
| "closure": 6, | |
| "colon2_token": 5, | |
| "colon_token": 1, | |
| "delimiter": 12, | |
| "elem": 5, | |
| "elems": 5, | |
| "expr": 84, | |
| "field": 10, | |
| "fields": 1, | |
| "float": 1, | |
| "fn": 6, | |
| "func": 36, | |
| "group": 13, | |
| "ident": 298, | |
| "init": 27, | |
| "inputs": 12, | |
| "int": 1, | |
| "items": 1, | |
| "left": 4, | |
| "len": 1, | |
| "let": 27, | |
| "lit": 52, | |
| "macro": 5, | |
| "method": 44, | |
| "method_call": 44, | |
| "mut": 1, | |
| "op": 43, | |
| "output": 12, | |
| "paren": 1, | |
| "pat": 35, | |
| "path": 136, | |
| "punct": 40, | |
| "receiver": 44, | |
| "reference": 21, | |
| "right": 4, | |
| "segments": 120, | |
| "spacing": 40, | |
| "stmts": 6, | |
| "str": 11, | |
| "stream": 7, | |
| "struct": 1, | |
| "tokens": 5, | |
| "tree": 21, | |
| "try": 22, | |
| "tuple": 4, | |
| "ty": 11, | |
| "type": 20, | |
| "typed": 8, | |
| "unary": 1, | |
| "use": 5, | |
| "vis": 5 | |
| }, | |
| "word_counts": { | |
| "0": 5, | |
| "1": 5, | |
| "2": 5, | |
| "accept": 1, | |
| "accounts": 1, | |
| "address": 2, | |
| "airdrop": 1, | |
| "ajb": 1, | |
| "application": 3, | |
| "balance": 1, | |
| "blockhash": 1, | |
| "bvf9ss623vq5da": 1, | |
| "by": 1, | |
| "content": 2, | |
| "encoding": 1, | |
| "for": 1, | |
| "get": 4, | |
| "gkpfxcwu": 1, | |
| "id": 6, | |
| "invalid": 2, | |
| "json": 4, | |
| "jsonrpc": 5, | |
| "latest": 1, | |
| "method": 5, | |
| "nb": 1, | |
| "nw": 1, | |
| "owner": 1, | |
| "params": 5, | |
| "parsed": 1, | |
| "post": 2, | |
| "program": 1, | |
| "qfe": 1, | |
| "recipient": 1, | |
| "request": 1, | |
| "signatures": 1, | |
| "solana_wallet": 1, | |
| "timestamp": 1, | |
| "token": 1, | |
| "tokenkeg": 1, | |
| "type": 2, | |
| "zyi": 1 | |
| }, | |
| "word_emoji_counts": { | |
| "0️⃣": 5, | |
| "1️⃣": 5, | |
| "2️⃣": 5, | |
| "⚙️": 5, | |
| "🎟️": 1, | |
| "🏷️": 2, | |
| "👥": 1, | |
| "📦": 2, | |
| "🔧": 5 | |
| } | |
| }, | |
| "timestamp": 1751588258 | |
| } |