일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- html5웹디자인예제
- NFT솔라나
- html5포트폴리오예제
- 포트폴리오
- NFT
- 서버
- solanaNFT
- nft예제
- 솔라나cookbook
- 이중화
- HTML5
- grpc
- html5디자인예제
- html5popup
- 솔라나NFT
- 솔라나
- 웹디자인예제
- pgpool
- 솔라나개발
- html5예제
- NFT개발
- 포트폴리오예제
- html5웹디자인
- html5배경만들기
- 웹디자인
- html5글자효과
- html5기초
- PostgresSQL
- 웹예제
- html5기초예제
- Today
- Total
Scikit Web
Solana Wallets 솔라나 지갑 생성 예제 본문
Solana Public Key(Wallets) 을 만들기 위한 사전 준비
솔라나 지갑을 만들기 위한 방법은 크게 세가지로 보인다.
1. 팬텀 플러그인 사용 https://phantom.app/
Phantom - A friendly Solana wallet built for DeFi & NFTs
A crypto wallet reimagined for DeFi & NFTs
phantom.app
2. Solana Cli https://docs.solana.com/wallet-guide
Solana Wallet Guide | Solana Docs
This document describes the different wallet options that are available to users
docs.solana.com
3. Nodejs TypeScript
여기서는 1번 방법과 3번 방법으로 솔라나 지갑을 생성하는 예제 이다
1번 방법은 https://phantom.app/ 사이트에서 크롬 확장 플러그인을 설치하고 생성하는 방법이다. 대단히 간편하고 쉽다.
3번 방법은 nodejs 설치 + ts-node 설치가 필요하다
npm i -g ts-node
빈 폴더를 생성하고 yarn init 하여 nodejs 프로젝트 환경을 만든다.
추가적으로 솔라나 web3 라이브러리와 솔라나 wallets 관련 라이브러리도 설치한다
yarn add @solana/web3.js
yarn add @solana/spl-token
yarn add @solana/wallet-adapter-wallets @solana/wallet-adapter-base
createWallets.ts 파일을 만들고 아래 예제의 내용을 채운다.
import { Keypair } from "@solana/web3.js";
async function main() {
(async () => {
let keypair = Keypair.generate();
console.log(keypair);
console.log(keypair.publicKey.toBase58());
})();
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
생성된 Keypair의 SecretKey 와 public Key.toBase58() 하면 실제로 사용 가능한 주소값을 확인할 수 있다.
Solscan - The most intuitive Solana explorer
The user-friendly and real-time update Scanning Tool for the Solana Ecosystem. Track your $SOL and Solana-related tokens to get information on transactions, blocks and token details.
solscan.io
생성된 publicKey.toBase58() 로 얻어진 주소를 솔스캔 사이트에서 검색해보면 wallets 이 생성된 것을 확인 할 수 있다.
'NFT > Solana(솔라나)' 카테고리의 다른 글
Solana NFT Create Collection - 솔라나 NFT Collection 생성 (0) | 2022.06.20 |
---|---|
Solana NFT Metaplex js Metadata Create 솔라나 NFT JS 라이브러리 메타데이터 생성 과 information to the bundler: 400 Invalid tx 해결 (0) | 2022.06.19 |
Solana Airdrop Test Sol API 솔라나 테스트 Sol API (0) | 2022.06.18 |
Solana Phantom Wallets KeyPair.json - 솔라나 지갑 키페어 파일 만들기 (0) | 2022.06.17 |
솔라나 solang 이더리움 솔리디티 컴파일러 사용하기 (0) | 2022.06.15 |