From 1c88e6882139817dfef354d0b3fb4e872479ead9 Mon Sep 17 00:00:00 2001 From: Guillermo Orellana Date: Thu, 21 Mar 2024 17:15:31 +0100 Subject: [PATCH] add getAccountInfo, getNonce RPCs and decoder for NonceAccountData --- .idea/gradle.xml | 2 +- solana-kotlin/build.gradle.kts | 12 ++-- .../avianlabs/solana/client/RpcKtorClient.kt | 4 +- .../solana/domain/core/FeeCalculator.kt | 15 +++++ .../solana/domain/core/NonceAccountData.kt | 29 ++++++++++ .../avianlabs/solana/domain/core/PublicKey.kt | 8 +++ .../solana/methods/getAccountInfo.kt | 54 ++++++++++++++++++ .../avianlabs/solana/methods/getBalance.kt | 24 ++++---- .../solana/methods/getFeeForMessage.kt | 26 ++++----- .../getMinimumBalanceForRentExemption.kt | 22 ++++---- .../net/avianlabs/solana/methods/getNonce.kt | 28 ++++++++++ .../solana/methods/getRecentBlockhash.kt | 29 ++++------ .../solana/methods/getSignaturesForAddress.kt | 23 +++----- .../solana/methods/getTokenAccountBalance.kt | 23 ++++---- .../solana/methods/getTransaction.kt | 21 +++---- .../solana/methods/isBlockHashValid.kt | 26 ++++----- .../solana/methods/requestAirdrop.kt | 26 ++++----- .../solana/methods/sendTransaction.kt | 42 ++++++++++++++ .../domain/program/SystemProgramTest.kt | 55 +++++++++++++++---- 19 files changed, 328 insertions(+), 141 deletions(-) create mode 100644 solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/domain/core/FeeCalculator.kt create mode 100644 solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/domain/core/NonceAccountData.kt create mode 100644 solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/domain/core/PublicKey.kt create mode 100644 solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/methods/getAccountInfo.kt create mode 100644 solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/methods/getNonce.kt create mode 100644 solana-kotlin/src/commonMain/kotlin/net/avianlabs/solana/methods/sendTransaction.kt diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 5a40dfe..0d7501a 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -5,7 +5,7 @@