索拉纳 Web3.js SDK 浏览器预建
一个网络包浏览器预建,可用作UMD和无害环境管理.
yarn add "@depay/solana-web3.js"
import {
AddressLookupTableProgram,
Connection,
Transaction,
TransactionMessage,
VersionedTransaction,
TransactionInstruction,
SystemProgram,
LAMPORTS_PER_SOL,
ACCOUNT_LAYOUT,
PublicKey,
u8,
i8,
u16,
i16,
u32,
i32,
u64,
i64,
nu64,
u128,
i128,
publicKey,
struct,
option,
offset,
bool,
vec,
vecU8,
tagged,
str,
rustEnum,
array,
map,
seq,
blob,
Buffer,
BN,
Keypair,
transact,
Web3MobileWallet,
bs58,
ComputeBudgetProgram,
deserializeUnchecked,
BinaryReader,
BinaryWriter,
} from "@depay/solana-web3.js"
圆柱体
缺少多填充物的船舶:
XMLHttpRequestlocationcrypto
多填充获取
如果看到以下错误:
Please polyfill .fetch | See: https://github.com/DePayFi/solana-web3.js#polyfill-fetch
您需要添加 node-fetch 进入你的环境,确保 global.fetch 执行此库前的多填充 :
https://github.com/node-fatch/node-fatch (英语)
示例 https://github.com/DePayFi/web3-mock/blob/main/tests/setup.js 互联网档案馆的存檔,存档日期2013-12-21
发展
yarn build
npm publish --access public