-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Nearlib #39
Comments
setItem for localstorage tokens/secretket is kinda inbetween nearwallet and nearlib. The secretket is set in nearlib and the account id and tokens are set in nearwallet. Should these be all set in nearlib, or shipping to wallet? |
@vans163 it's perfectly valid use case not not use wallet at all. From our POV wallet is basically a special type of |
Yea I am thinking that thin API in wallet repo should be moved into nearlib |
Could "Create various types of transactions functions that support creating and signing transactions (without having connection)" be made into an issue alone? I can do it if you want (basically we really need the ability to sign a tx, then send it on a different machine) |
@DanielRX feel free to do it |
After thinking about it, "Create various types of transactions functions that support creating and signing transactions (without having connection)" is impossible, so I'm not sure what you want to do about that? Do you want to scrap the idea of doing so without a connection? |
This actually have been mostly done back in June/July. Closing this. |
There are few things we want to improve:
Configuration search:
.near/
folder with config and keys. Main uses cases:node_modules
/package.json
and check for.near
). This can be official TestNet and custom network.~/.near/
for configs). Want to use it, but need to use contract helper for account creation.~/.near/
for configs). Want to use local key pair for account creation.ConnectProvider
interface that various providers like RPC, RPCv2, Network, WebSockets can implement (e.g. current NearClient is RPC provider). ProvidessendTransaction(txBytes, [timeout]) -> Promise<FinalTransactionResult>
andquery(path, data) -> Promise<QueryResult>
interfaces.AccountCreatorProvider
- interface, that either uses helper or given keys to create accounts.connect
that is configured / or searches for configuration and uses givenConnectProvider
,AccountCreatorProvider
andKeyStore
.Account
abstraction, that provides accessors to account state (balance, etc), access keys (with permissions per key), etc. Allows to initializeContract
with it to send Tx from it.Contract
handles itself sending to Wallet if currently signed Tx is not allowed by access key or access key is missing.KeyStore
should have some form ofWallet
to provide what are current accounts available for given network, and allow to change accounts and networks. Also this should use Wallet API to "login" to retrieve current account id if unavailable.The text was updated successfully, but these errors were encountered: