solana-go
Go SDK library and RPC client for the Solana Blockchain
파일 탐색기
- commit-lint.yml
- lint.yml
- release.yml
- semver-check.yml
- tests.yml
- avx2_amd64.go
- avx2_amd64.s
- avx2_amd64_test.go
- avx2_amd64_v1.go
- avx2_amd64_v3.go
- avx2_other.go
- base58_test.go
- decode.go
- encode.go
- fuzz_test.go
- matmul_amd64.go
- matmul_amd64.s
- matmul_arm64.go
- matmul_arm64.s
- matmul_other.go
- tables.go
- cli.go
- getpass.go
- common.go
- decoding.go
- get.go
- get_account.go
- get_balance.go
- get_block.go
- get_latest_blockhash.go
- get_program_accounts.go
- get_slot.go
- get_spl_token.go
- get_transactions.go
- is_blockhash_valid.go
- logging.go
- request_airdrop.go
- root.go
- system.go
- system_transfer.go
- token.go
- token_get.go
- token_get_mint.go
- token_list.go
- token_list_mints.go
- token_registry.go
- token_registry_get.go
- token_registry_list.go
- token_registry_register.go
- token_transfer.go
- vault.go
- vault_add.go
- vault_create.go
- vault_export.go
- vault_list.go
- main.go
- diff.go
- diff_test.go
- init_test.go
- logging.go
- address-lookup.go
- address-lookup_test.go
- CloseLookupTable.go
- CreateLookupTable.go
- DeactivateLookupTable.go
- ExtendLookupTable.go
- FreezeLookupTable.go
- instruction_test.go
- instructions.go
- resolve.go
- resolve_test.go
- Create.go
- CreateIdempotent.go
- instruction_test.go
- instructions.go
- RecoverNested.go
- loader.go
- instruction.go
- instruction_test.go
- RequestHeapFrame.go
- RequestHeapFrame_test.go
- RequestUnitsDeprecated.go
- RequestUnitsDeprecated_test.go
- SetComputeUnitLimit.go
- SetComputeUnitLimit_test.go
- SetComputeUnitPrice.go
- SetComputeUnitPrice_test.go
- SetLoadedAccountsDataSizeLimit.go
- SetLoadedAccountsDataSizeLimit_test.go
- Create.go
- Create_test.go
- instructions.go
- Authorize.go
- Authorize_test.go
- AuthorizeChecked.go
- AuthorizeChecked_test.go
- AuthorizeCheckedWithSeed.go
- Authorized.go
- AuthorizeWithSeed.go
- Deactivate.go
- Deactivate_test.go
- DeactivateDelinquent.go
- DeactivateDelinquent_test.go
- DelegateStake.go
- DelegateStake_test.go
- GetMinimumDelegation.go
- GetMinimumDelegation_test.go
- Initialize.go
- Initialize_test.go
- InitializeChecked.go
- InitializeChecked_test.go
- instructions.go
- instructions_test.go
- Lockup.go
- Merge.go
- Merge_test.go
- MoveLamports.go
- MoveLamports_test.go
- MoveStake.go
- MoveStake_test.go
- Redelegate.go
- SetLockup.go
- SetLockup_test.go
- SetLockupChecked.go
- Split.go
- Split_test.go
- state.go
- state_test.go
- testing_utils_test.go
- types.go
- Withdraw.go
- Withdraw_test.go
- accounts.go
- accounts_test.go
- AdvanceNonceAccount.go
- AdvanceNonceAccount_test.go
- Allocate.go
- Allocate_test.go
- AllocateWithSeed.go
- AllocateWithSeed_test.go
- Assign.go
- Assign_test.go
- AssignWithSeed.go
- AssignWithSeed_test.go
- AuthorizeNonceAccount.go
- AuthorizeNonceAccount_test.go
- CreateAccount.go
- CreateAccount_test.go
- CreateAccountWithSeed.go
- CreateAccountWithSeed_test.go
- init_test.go
- InitializeNonceAccount.go
- InitializeNonceAccount_test.go
- instructions.go
- logging.go
- testing_utils.go
- Transfer.go
- Transfer_test.go
- TransferWithSeed.go
- TransferWithSeed_test.go
- types.go
- UpgradeNonceAccount.go
- UpgradeNonceAccount_test.go
- WithdrawNonceAccount.go
- WithdrawNonceAccount_test.go
- accounts.go
- accounts_test.go
- Approve.go
- Approve_test.go
- ApproveChecked.go
- ApproveChecked_test.go
- Burn.go
- Burn_test.go
- BurnChecked.go
- BurnChecked_test.go
- CloseAccount.go
- CloseAccount_test.go
- FreezeAccount.go
- FreezeAccount_test.go
- impl_pointer_consistency_test.go
- InitializeAccount.go
- InitializeAccount2.go
- InitializeAccount2_test.go
- InitializeAccount3.go
- InitializeAccount3_test.go
- InitializeAccount_test.go
- InitializeMint.go
- InitializeMint2.go
- InitializeMint2_test.go
- InitializeMint_test.go
- InitializeMultisig.go
- InitializeMultisig2.go
- InitializeMultisig2_test.go
- InitializeMultisig_flags_test.go
- InitializeMultisig_test.go
- instructions.go
- json.go
- MintTo.go
- MintTo_test.go
- MintToChecked.go
- MintToChecked_test.go
- program_id_override_test.go
- Revoke.go
- Revoke_test.go
- rpc.go
- SetAuthority.go
- SetAuthority_test.go
- SyncNative.go
- SyncNative_test.go
- testing_utils.go
- ThawAccount.go
- ThawAccount_test.go
- Transfer.go
- Transfer_test.go
- TransferChecked.go
- TransferChecked_test.go
- types.go
- deriveKeys.go
- kdf_vectors.json
- README.md
- ae_key.go
- doc.go
- elgamal_secret.go
- errors.go
- kdf_test.go
- signer.go
- accounts.go
- AmountToUiAmount.go
- Approve.go
- ApproveChecked.go
- Burn.go
- BurnChecked.go
- CloseAccount.go
- ConfidentialMintBurnExtension.go
- ConfidentialTransferExtension.go
- ConfidentialTransferFeeExtension.go
- CpiGuardExtension.go
- CreateNativeMint.go
- DefaultAccountStateExtension.go
- example_test.go
- extension_account.go
- extension_account_test.go
- extension_codecs.go
- extension_codecs_test.go
- extension_fuzz_test.go
- extension_math.go
- extension_math_test.go
- extension_rust_parity_test.go
- extension_states.go
- extension_test.go
- extension_types.go
- FreezeAccount.go
- GetAccountDataSize.go
- GroupMemberPointerExtension.go
- GroupPointerExtension.go
- impl_pointer_consistency_test.go
- InitializeAccount.go
- InitializeAccount2.go
- InitializeAccount3.go
- InitializeImmutableOwner.go
- InitializeMint.go
- InitializeMint2.go
- InitializeMintCloseAuthority.go
- InitializeMultisig.go
- InitializeMultisig2.go
- InitializeMultisig_flags_test.go
- InitializeNonTransferableMint.go
- InitializePermanentDelegate.go
- instruction_test.go
- instructions.go
- InterestBearingMintExtension.go
- json.go
- MemoTransferExtension.go
- MetadataPointerExtension.go
- MintTo.go
- MintToChecked.go
- PausableExtension.go
- PermissionedBurnExtension.go
- program_id_override_test.go
- Reallocate.go
- Revoke.go
- rpc.go
- ScaledUiAmountExtension.go
- SetAuthority.go
- SyncNative.go
- testing_utils.go
- ThawAccount.go
- Transfer.go
- TransferChecked.go
- TransferFeeExtension.go
- TransferHookExtension.go
- types.go
- UiAmountToAmount.go
- UnwrapLamports.go
- WithdrawExcessLamports.go
- instruction.go
- logging.go
- program.go
- rpc.go
- types.go
- types_test.go
- Authorize.go
- Authorize_test.go
- AuthorizeChecked.go
- AuthorizeChecked_test.go
- AuthorizeWithSeed.go
- AuthorizeWithSeed_test.go
- compact.go
- compact_test.go
- InitializeAccount.go
- InitializeAccount_test.go
- InitializeAccountV2.go
- InitializeAccountV2_test.go
- instructions.go
- instructions_test.go
- state.go
- state_test.go
- testing_utils_test.go
- TowerSync.go
- TowerSync_test.go
- types.go
- UpdateCommission.go
- UpdateCommission_test.go
- UpdateCommissionCollector.go
- UpdateCommissionCollector_test.go
- UpdateValidatorIdentity.go
- UpdateValidatorIdentity_test.go
- UpdateVoteState.go
- UpdateVoteState_test.go
- Vote.go
- Vote_test.go
- VoteSwitch.go
- VoteSwitch_test.go
- Withdraw.go
- Withdraw_test.go
- createMint.go
- getAccountInfo.go
- getBalance.go
- getBlock.go
- getBlockCommitment.go
- getBlockHeight.go
- getBlockProduction.go
- getBlocks.go
- getBlocksWithLimit.go
- getBlockTime.go
- getClusterNodes.go
- getEpochInfo.go
- getEpochSchedule.go
- getFeeForMessage.go
- getFirstAvailableBlock.go
- getGenesisHash.go
- getHealth.go
- getHighestSnapshotSlot.go
- getIdentity.go
- getInflationGovernor.go
- getInflationRate.go
- getInflationReward.go
- getLargestAccounts.go
- getLatestBlockhash.go
- getLeaderSchedule.go
- getMaxRetransmitSlot.go
- getMaxShredInsertSlot.go
- getMinimumBalanceForRentExemption.go
- getMultipleAccounts.go
- getProgramAccounts.go
- getRecentPerformanceSamples.go
- getSignaturesForAddress.go
- getSignatureStatuses.go
- getSlot.go
- getSlotLeader.go
- getSlotLeaders.go
- getSupply.go
- getTokenAccountBalance.go
- getTokenAccountsByDelegate.go
- getTokenAccountsByOwner.go
- getTokenLargestAccounts.go
- getTokenSupply.go
- getTransaction.go
- getTransactionCount.go
- getVersion.go
- getVoteAccounts.go
- isValidBlockhash.go
- minimumLedgerSlot.go
- requestAirdrop.go
- sendEncodedTransaction.go
- sendRawTransaction.go
- sendTransaction.go
- simulateTransaction.go
- jsonrpc.go
- jsonrpc_test.go
- LICENSE
- README.md
- sendAndConfirmTransaction.go
- .gitignore
- accountSubscribe.go
- logsSubscribe.go
- programSubscribe.go
- rootSubscribe.go
- signatureSubscribe.go
- slotSubscribe.go
- voteSubscribe.go
- accountSubscribe.go
- accountSubscribe_test.go
- blockSubscribe.go
- blockSubscribe_rewards_test.go
- blockSubscribe_test.go
- client.go
- client_test.go
- example_test.go
- fixes_test.go
- json.go
- logging.go
- logsSubscribe.go
- parsedBlockSubscribe.go
- programSubscribe.go
- programSubscribe_test.go
- rootSubscribe.go
- signatureSubscribe.go
- signatureSubscribe_test.go
- slotSubscribe.go
- slotsUpdatesSubscribe.go
- subscription.go
- types.go
- types_test.go
- voteSubscribe.go
- client-with-ratelimit.go
- client-with-ratelimit2.go
- client.go
- client_constructors_test.go
- client_test.go
- endpoints.go
- errors.go
- example_test.go
- getAccountInfo.go
- getAccountInfoWithRpcContext.go
- getBalance.go
- getBlock.go
- getBlockCommitment.go
- getBlockHeight.go
- getBlockProduction.go
- getBlocks.go
- getBlocksWithLimit.go
- getBlockTime.go
- getClusterNodes.go
- getEpochInfo.go
- getEpochSchedule.go
- getFeeForMessage.go
- getFirstAvailableBlock.go
- getGenesisHash.go
- getHealth.go
- getHighestSnapshotSlot.go
- getIdentity.go
- getInflationGovernor.go
- getInflationRate.go
- getInflationReward.go
- getLargestAccounts.go
- getLatestBlockhash.go
- getLeaderSchedule.go
- getMaxRetransmitSlot.go
- getMaxShredInsertSlot.go
- getMinContextSlot_test.go
- getMinimumBalanceForRentExemption.go
- getMultipleAccounts.go
- getParsedTransaction.go
- getProgramAccounts.go
- getRecentPerformanceSamples.go
- getRecentPrioritizationFees.go
- getSignaturesForAddress.go
- getSignatureStatuses.go
- getSlot.go
- getSlotLeader.go
- getSlotLeaders.go
- getStakeMinimumDelegation.go
- getSupply.go
- getTokenAccountBalance.go
- getTokenAccountsByDelegate.go
- getTokenAccountsByOwner.go
- getTokenLargestAccounts.go
- getTokenSupply.go
- getTransaction.go
- getTransactionCount.go
- getTransactionsForAddress.go
- getTransactionsForAddress_test.go
- getVersion.go
- getVoteAccounts.go
- isBlockhashValid.go
- json.go
- json_bench_test.go
- logging.go
- minimumLedgerSlot.go
- requestAirdrop.go
- rpc_test.go
- sendEncodedTransaction.go
- sendRawTransaction.go
- sendTransaction.go
- simulateTransaction.go
- simulateTransaction_test.go
- transaction_version.go
- types.go
- types_test.go
- util.go
- util_bench_test.go
- util_test.go
- clock.go
- epoch_rewards.go
- epoch_schedule.go
- fees.go
- ids.go
- last_restart_slot.go
- recent_blockhashes.go
- rent.go
- slot_hashes.go
- slot_history.go
- stake_history.go
- sysvar_codec.go
- sysvars_test.go
- standard.solana-keygen.json
- format.go
- codes.go
- encoder.go
- encoder_test.go
- interface.go
- rgbterm.go
- tag.go
- tools.go
- tools_test.go
- tree.go
- types.go
- json.go
- kmsgcp.go
- kmsmanager.go
- passphrase.go
- passphrase_test.go
- secretboxer.go
- vault.go
- encoder.go
- utils.go
- .envrc
- .gitignore
- .golangci.yml
- .goreleaser.yml
- account.go
- account_test.go
- base58_bench_test.go
- CHANGELOG.md
- constants.go
- CONTRIBUTING.md
- fee_calculator.go
- generic_instruction.go
- generic_instruction_test.go
- go.mod
- go.sum
- init_test.go
- interface.go
- json.go
- keys.go
- keys_test.go
- LICENSE
- logging.go
- message.go
- message_bench_test.go
- message_test.go
- message_v0_test.go
- mnemonic.go
- mnemonic_test.go
- nativetype_test.go
- nativetypes.go
- nonce.go
- nonce_test.go
- program_ids.go
- README.md
- registry.go
- registry_test.go
- sanitize.go
- sanitize_test.go
- sysvar.go
- transaction.go
- transaction_bench_test.go
- transaction_test.go
- transaction_v0_test.go
- types.go
- types_test.go
- util.go
# CDN으로 사용하기
jsDelivrjsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.
명령어 용어집
이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.
fmt
설명 보기 ▼
fmt
단락을 결합하고 줄 너비를 문자 수 (기본적으로 75자)로 제한하여 텍스트 파일의 서식을 다시 지정.
더 많은 정보: <https://www.gnu.org/software/coreutils/manual/html_node/fmt-invocation.html>.
fmt {{path/to/file}}
파일 재포맷:
fmt {{[-w|--width]}} {{n}} {{path/to/file}}
(최대) `n` 문자의 출력 줄을 생성하는 파일 형식을 다시 지정:
fmt {{[-s|--split-only]}} {{path/to/file}}
주어진 너비보다 짧은 줄을 결합하지 않고, 파일 형식을 다시 지정:
go get
설명 보기 ▼
go get
Add a dependency package, or download packages in legacy GOPATH mode.
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.
go get {{example.com/pkg}}
Add a specified package to `go.mod` in module-mode or install the package in GOPATH-mode:
go get {{example.com/pkg}}@{{v1.2.3}}
Modify the package with a given version in module-aware mode:
go get {{example.com/pkg}}@{{none}}
Remove a specified package:
go test
설명 보기 ▼
go test
Test Go packages (files have to end with `_test.go`).
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.
go test
Test the package found in the current directory:
go test -v
[v]erbosely test the package in the current directory:
go test -v ./...
Test the packages in the current directory and all subdirectories:
golangci-lint
설명 보기 ▼
golangci-lint
병렬 처리, 스마트하고 빠른 Go 린터 실행 도구로 주요 IDE와 통합되며 YAML 구성을 지원합니다.
더 많은 정보: <https://golangci-lint.run/welcome/quick-start/>.
golangci-lint run
현재 폴더에서 린터 실행:
golangci-lint linters
활성화 및 비활성화된 린터 목록 표시 (참고: 비활성화된 린터는 마지막에 표시되며, 활성화된 린터로 착각하지 마세요):
golangci-lint run {{[-E|--enable]}} {{linter}}
특정 린터를 이 실행에서 [E]nable:
time
설명 보기 ▼
time
명령어 실행 시간을 측정.
참고: `time`은 셸 내장 명령어이거나 독립 실행형 프로그램이거나 둘 다일 수 있습니다.
관련 항목: `times`.
더 많은 정보: <https://manned.org/time>.
time {{command}}
`command`를 실행하고 시간 측정 결과를 `stdout`에 출력:
time
현재 시스템 시간 표시 및 새 시간 입력 요청 (비워두면 변경되지 않음):
time read
매우 간단한 스톱워치 생성 (Bash에서만 작동):
timeout
설명 보기 ▼
timeout
명령을 일정 시간 제한 내에서 실행.
더 많은 정보: <https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html>.
timeout 3s sleep 10
`sleep 10`을 실행하고 3초 후 종료:
timeout {{[-s|--signal]}} {{INT|HUP|KILL|...}} {{5s}} {{sleep 10}}
시간 제한이 만료되면 명령에 [s]ignal을 전송 (`TERM`이 기본, 모든 신호 목록은 `kill -l`):
timeout {{[-v|--verbose]}} {{0.5s|1m|1h|1d|...}} {{command}}
시간 초과 시 전송된 신호를 `stderr`에 [v]erbose 출력으로 표시:
rpcClient
설명 보기 ▼
rpcClient
MS-RPC 클라이언트 도구 (samba 모음의 일부).
더 많은 정보: <https://www.samba.org/samba/docs/current/man-html/rpcclient.1.html>.
rpcclient {{[-U|--user]}} {{domain}}\{{username}}%{{password}} {{ip_address}}
원격 호스트에 연결:
rpcclient {{[-U|--user]}} {{username}} {{[-W|--workgroup]}} {{domain}} {{[-N|--no-pass]}} {{ip_address}}
비밀번호 없이 도메인에 있는 원격 호스트에 연결:
rpcclient {{[-U|--user]}} {{domain}}\{{username}} --pw-nt-hash {{ip_address}}
비밀번호 해시를 전달하여 원격 호스트에 연결:
net
설명 보기 ▼
net
네트워크 관련 설정을 보고 수정하는 시스템 유틸리티입니다.
더 많은 정보: <https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/gg651155(v=ws.11)>.
net {{start|stop}} {{service}}
동기적으로 Windows 서비스 시작 또는 중지:
net use {{\\smb_shared_folder}} /USER:{{username}}
현재 콘솔에서 SMB 공유 가능한지 확인:
net share
현재 SMB로 공유되는 폴더 표시:
