我试图从solana-cli命令行发送USDC,但在文档中找不到任何示例。在导入这两个库的javascript中,所有内容都是对如何实现的引用。
import * as web3 from "@solana/web3.js"; import * as splToken from "@solana/spl-token";
第一个用于转移SOL硬币,第二个用于其余的令牌。可以做吗?有人知道命令吗?
我正在使用@solana/spl-token库来创建和创建标记。createMint()函数正在抛出一个错误。
TypeError: x.pubkey.toBase58 is not a function
at /home/denimcodes/Projects/solpay/node_modules/.pnpm/@solana+web3.js@1.66.2/node_modules/@solana/web3.js/lib/index.cjs.js:1565:23
at Array.sort (<anonymous>)
at Transaction.comp
我正在尝试编写一个node.js程序,将一个SOL空投到我的devnet帐户中(我知道我可以使用命令行界面,但在我设法处理空投之后,我想继续执行该程序)。 在许多在线示例中,他们首先使用let account = Keypair.generate();. This worked for me too, but I want to use my existing file system wallet / account with the pubkey: DNuqHBGxzm96VLkLWCUctjYW9CX68DBY6jQ1cVuYP2Ai`.为此生成一个新的密钥对/帐户首先,我尝试通过运行以
我正在尝试连接到ubuntu终端中的一个rinkeby完整节点,并且在控制台nodejs应用程序获取连接错误时,部署了一个节点js应用程序,试图使用web3进行连接。
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
// set the provider you want from Web3.providers
web3 = new Web3(new Web3.providers.HttpProvide
我正在尝试访问SOLANA API,特别是通过所有这些操作访问GitHub:https://github.com/solana-labs/solana-web3.js:https://solana-labs.github.io/solana-web3.js/,并在此处阅读Solana文档:https://docs.solana.com/developing/clients/jsonrpc-api和我还成功安装了Solana CLI,如下所示:https://docs.solana.com/cli/install-solana-cli-tools这是我在Linux环境中的代码: sudo ap
我一直试图使用solana.py框架在Python中编写Solana程序。但是,我在试图查找指定给特定钱包的USDC令牌数量时遇到了一些问题。我在里已经酝酿了几个小时了,但仍然没有找到任何东西。我的代码可以在下面找到。
# This is the public key of the Solana USDC token
usdc_key = PublicKey('4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU')
# This function is supposed to mimick the one presented in TS