-
-
Notifications
You must be signed in to change notification settings - Fork 946
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
Add Starknet API docs #1516
Comments
Questions:
|
I think this document explains it https://starknetjs.com/docs/guides/walletAccount In a nutshell : A dev will instantiate a wallet with get-starknet like this : import { connect } from 'get-starknet'; // v4.0.0 min
import { WalletAccount } from 'starknet'; // v6.10.0 min
const myFrontendProviderUrl = 'https://free-rpc.nethermind.io/sepolia-juno/v0_7';
// standard UI to select a wallet :
const selectedWalletSWO = await connect({ modalMode: 'alwaysAsk', modalTheme: 'light' });
const myWalletAccount = new WalletAccount({ nodeUrl: myFrontendProviderUrl }, selectedWalletSWO); Once they get their
So generally speaking any action that writes to the blockchain has to be implemented on our side. Then user can use the For example if they need to sign a transaction they can simply do something like
Behind the scene this will trigger the snap to show up by calling the starkNet_signTransaction method. Other methods are related to the management of the wallet itself, like adding a new account, adding a new network, adding a new token, ... |
Regarding this specific questions :
Generally I agree, but specifically
|
Thanks for the info. Do you have any information on my first question?
Also, regarding this:
The first few methods of the Starknet API allow you to submit Starknet transactions (e.g. |
@alexandratran, the feeder_gateway/gateway has been deprecated and replaced by RPC endpoints. For some calls made by the StarkNet Snap, the response is simply the value returned by the RPC call to the StarkNet network (without any modifications). In those cases, the return value will follow the specifications of the corresponding RPC endpoint. I will clarify this in a new review of PR #1509 by adding links to the appropriate sections of the StarkNet.js API documentation for those cases. |
To add Starknet methods mentioned in this notion doc:
https://www.notion.so/consensys/Starknet-Snap-User-Guide-9d95a3863b4145c8a3bad6455e35e0e4
FYI, the methods that are rolled up in
get-starknet
include:The text was updated successfully, but these errors were encountered: