https://yihau.github.io/solana-web3-demo/zh/
https://solscan.io/token/JS3FiJxtv5CYURf7oC9eMPzq21uz1PpsvW9MFfzZDsi?cluster=devnet#holders
npm install --save @solana/web3.js
npm install @solana/spl-token
https://solana-labs.github.io/solana-web3.js/#npm
https://snyk.io/advisor/npm-package/@solana/spl-token
https://solanacookbook.com/references/token.html#how-to-create-a-new-token
https://github.com/mharj/minecraft-ping/issues/5
https://www.quicknode.com/docs/solana/getTokenAccountBalance
{
address: PublicKey {
_bn: <BN: 4772f6e75b5b18a56eb8d6ab630c0d7d66c1202a2d487636ad243af3217a3fd>
}, 16:19:17
mintAuthority: PublicKey {
_bn: <BN: 3231cdeade17bd5f7f24f9e54ac221d75bad2bc585a75093a558ab6b29ad0834>
},
supply: 0n,
decimals: 9,
isInitialized: true,
freezeAuthority: null
}
/mnt/c/Users/PC/Desktop/typechain/src ts-node 7_makeTokenAccount.ts 1 ✘ 5s 16:59:34
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
ata: LarSVMB2UGLkgmHkkjM8jyKeKCRPdJCvvotJtyKMDSp
create ata txhash: hSJYKH9iyayddqt3MGF6cU68G93VXAXjwqjzTAh9kwAY4kmsS2JCpxGPGpDaEF49XtMZdaTYGukTqYZs2j4Xytz
LarSVMB2UGLkgmHkkjM8jyKeKCRPdJCvvotJtyKMDSp
spl-token accounts
를 했을 땐 처음 발행한 토큰의 주소가 나온다{
address: PublicKey {
_bn: <BN: 5044ff9fc56443afe10b383a54e986ab6294e2f8ff7cd4e9920968d6fe89109>
},
mint: PublicKey {
_bn: <BN: 4772f6e75b5b18a56eb8d6ab630c0d7d66c1202a2d487636ad243af3217a3fd>
},
owner: PublicKey {
_bn: <BN: 3231cdeade17bd5f7f24f9e54ac221d75bad2bc585a75093a558ab6b29ad0834>
},
amount: 0n,
delegate: null,
delegatedAmount: 0n,
isInitialized: true,
isFrozen: false,
isNative: false,
rentExemptReserve: null,
closeAuthority: null
}
/mnt/c/Users/PC/Desktop/typechain/src ts-node 9_extraTokenMint.ts ✔ 19s 17:52:21
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
txhash: PwSqLvceZQm8kVNVbHE9Jdw8RCDw6NuMwNn3zmDewznSxcXSfAqu36y2gmGohmFEgaStetER538NxvcdGcHNxG1
txLamport2Sol = round(transfer_parameters.lamports*10**(-9),9)
을 해서 sol 단위로 변경해볼라 했지만, 실패했다 /mnt/c/Users/PC/Desktop/typechain/src ts-node 10_tokenGetBalance.ts 1 ✘ 5s 18:03:19
\bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
decimals: 9, amount: 1000100000100
/mnt/c/Users/PC/Desktop/typechain/src ts-node 11_transferSplToken.ts ✔ 18s 18:15:56
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
txhash: 3MNAww45Ato5rbPRv2czKJyCzRcW4r3KrH7BsoYzsb4bTN1uzmRn3RW8M43riPXEAJostBByjrPb4phZHz8ZRPGk