
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Use JsonProvider to process api calls to NEAR rpc node
rpc_url
varies by network:
from async_near.providers import JsonProvider
jp = JsonProvider(rpc_url)
res = jp.view_call(account_id, method_name, args, finality="optimistic")
Use Signer to sign or request to rpc node
from async_near.signer import Signer, KeyPair
key = KeyPair(private_key) # create key pair (private-publish)
signer = Signer(
signer_account_id,
key,
)
signer.sign(message)
Use Account to create and execute transactions
from async_near.signer import Signer, KeyPair
from async_near.providers import JsonProvider
from async_near.account import Account
acc = Account(
JsonProvider("https://rpc.testnet.near.org"),
Signer(
"example.testnet",
KeyPair("ed25519:5sn12Kwd2TZn4A3...7979"),
),
)
await acc.startup()
Make contract calls
btc_amount = (await acc.view_function("btc_contract_id", "available_btc", {})).result
await acc.function_call(
"btc_contract_id",
"ft_transfer_call",
{"target_btc_address": "..."},
)
This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE and LICENSE-APACHE for details.
FAQs
Near async rpc client
We found that async-near demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.