Versions in this module Expand all Collapse all v1 v1.0.1 Jan 7, 2025 Changes in this version type Connection + func (c *Connection) GetChunkByID(chunkID string) (map[string]interface{}, error) v1.0.0 Jan 6, 2025 Changes in this version + var ErrNotObject = errors.New("near: JSON-RPC result is not an object") + var ErrNotString = errors.New("near: JSON-RPC result is not a string") + func GetTransactionLastResult(txResult map[string]interface{}) (interface{}, error) + type AccessKey struct + Nonce uint64 + Permission AccessKeyPermission + type AccessKeyPermission struct + Enum borsh.Enum + FullAccess borsh.Enum + FunctionCall FunctionCallPermission + type Account struct + func LoadAccount(c *Connection, cfg *Config, accountID string) (*Account, error) + func LoadAccountWithKeyPair(c *Connection, keyPair *keystore.Ed25519KeyPair) *Account + func LoadAccountWithPrivateKey(c *Connection, accountID string, privateKey ed25519.PrivateKey) *Account + func (a *Account) AccountID() string + func (a *Account) AddKeys(publicKeys ...utils.PublicKey) (map[string]interface{}, error) + func (a *Account) CreateAccount(newAccountID string, publicKey utils.PublicKey, amount big.Int) (map[string]interface{}, error) + func (a *Account) DeleteAccount(beneficiaryID string) (map[string]interface{}, error) + func (a *Account) DeleteKeys(publicKeys ...utils.PublicKey) (map[string]interface{}, error) + func (a *Account) FunctionCall(contractID, methodName string, args []byte, gas uint64, amount big.Int) (map[string]interface{}, error) + func (a *Account) FunctionCallAsync(contractID, methodName string, args []byte, gas uint64, amount big.Int) (string, error) + func (a *Account) FunctionCallAsyncWithMultiActionAndKey(contractID string, methodName string, publicKey string, argsSlice [][]byte, ...) (string, error) + func (a *Account) FunctionCallWithMultiActionAndKey(contractID string, methodName string, publicKey string, argsSlice [][]byte, ...) (map[string]interface{}, error) + func (a *Account) FunctionCallWithMultiActionAndKeyAndNonce(contractID string, methodName string, publicKey string, argsSlice [][]byte, ...) (map[string]interface{}, error) + func (a *Account) GetVerifiedAccessKeys() []string + func (a *Account) SendMoney(receiverID string, amount big.Int) (map[string]interface{}, error) + func (a *Account) SignAndSendTransaction(receiverID string, actions []Action) (map[string]interface{}, error) + func (a *Account) SignAndSendTransactionAsync(receiverID string, actions []Action) (string, error) + func (a *Account) SignAndSendTransactionAsyncWithKey(receiverID string, publicKey string, actions []Action) (string, error) + func (a *Account) SignAndSendTransactionWithKey(receiverID string, publicKey string, actions []Action) (map[string]interface{}, error) + func (a *Account) SignAndSendTransactionWithKeyAndNonce(receiverID string, publicKey string, nonce uint64, actions []Action) (map[string]interface{}, error) + func (a *Account) ViewAccessKey(publicKey string) (map[string]interface{}, error) + func (a *Account) ViewFunction(accountId, methodName string, argsBuf []byte, options *int64) (interface{}, error) + func (a *Account) ViewNonce(publicKey string) (uint64, error) + type Action struct + AddKey AddKey + CreateAccount borsh.Enum + DeleteAccount DeleteAccount + DeleteKey DeleteKey + DeployContract DeployContract + Enum borsh.Enum + FunctionCall FunctionCall + Stake Stake + Transfer Transfer + type AddKey struct + AccessKey AccessKey + PublicKey utils.PublicKey + type Config struct + FunctionKeyPrefixPattern string + KeyPath string + NetworkID string + NodeURL string + func GetConfig() *Config + type Connection struct + func NewConnection(nodeURL string) *Connection + func NewConnectionWithTimeout(nodeURL string, timeout time.Duration) *Connection + func (c *Connection) Block() (map[string]interface{}, error) + func (c *Connection) Call(method string, params ...interface{}) (interface{}, error) + func (c *Connection) GetAccountState(accountID string) (map[string]interface{}, error) + func (c *Connection) GetBlockByHash(blockHash string) (map[string]interface{}, error) + func (c *Connection) GetBlockByID(blockID uint64) (map[string]interface{}, error) + func (c *Connection) GetContractCode(accountID string) (map[string]interface{}, error) + func (c *Connection) GetNodeStatus() (map[string]interface{}, error) + func (c *Connection) GetTransactionDetails(txHash, senderAccountId string) (map[string]interface{}, error) + func (c *Connection) GetTransactionDetailsWithReceipts(txHash, senderAccountId string) (map[string]interface{}, error) + func (c *Connection) GetTransactionDetailsWithWait(txHash, senderAccountId string, waitUntil TxExecutionStatus) (map[string]interface{}, error) + func (c *Connection) SendTransaction(signedTransaction []byte) (map[string]interface{}, error) + func (c *Connection) SendTransactionAsync(signedTransaction []byte) (string, error) + func (c *Connection) ViewAccessKey(accountID, publicKey string) (map[string]interface{}, error) + func (c *Connection) ViewAccessKeyList(accountID string) (map[string]interface{}, error) + type DeleteAccount struct + BeneficiaryID string + type DeleteKey struct + PublicKey utils.PublicKey + type DeployContract struct + Code []byte + type FunctionCall struct + Args []byte + Deposit big.Int + Gas uint64 + MethodName string + type FunctionCallPermission struct + Allowance *big.Int + MethodNames []string + ReceiverId string + type Signature struct + Data [64]byte + KeyType uint8 + type SignedTransaction struct + Signature Signature + Transaction Transaction + type Stake struct + PublicKey utils.PublicKey + Stake big.Int + type Transaction struct + Actions []Action + BlockHash [32]byte + Nonce uint64 + PublicKey utils.PublicKey + ReceiverID string + SignerID string + type Transfer struct + Deposit big.Int + type TxExecutionStatus string + const TxExecutionStatus_Default + const TxExecutionStatus_Executed + const TxExecutionStatus_ExecutedOptimistic + const TxExecutionStatus_Final + const TxExecutionStatus_Included + const TxExecutionStatus_IncludedFinal + const TxExecutionStatus_None