PylonsWallet class abstract
The PylonsWallet class is the main endpoint developers use for structured, high-level interactions with the Pylons wallet.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
exists(
) → Future< bool> - Async: Returns true if an IPC target exists. False otherwise.
-
getCookbook(
String id) → Future< SDKIPCResponse< Cookbook> > -
Async: Retrieves the cookbook with provided ID
id
. -
getExecutionBasedOnId(
{required String id}) → Future< SDKIPCResponse< Execution> > -
This method returns the execution based on id
Input :
id
the id of the execution Output: Execution contains the execution -
getExecutionBasedOnRecipe(
{required String cookbookId, required String recipeId}) → Future< SDKIPCResponse< ExecutionListByRecipeResponse> > -
This method returns the execution list based on the recipe
Input :
cookbookId
the id of the cookbook which contains the recipe,recipeId
the id of the recipe Output:ExecutionListByRecipeResponse
contains execution list by recipe -
getItemById(
{required String cookbookId, required String itemId}) → Future< SDKIPCResponse< Item> > -
This method returns the get item by id
Input :
cookbookId
the id of the cookbook which contains the item,itemId
the id of the item Output: Item contains the item based on the id -
getItemListByOwner(
{required String owner}) → Future< SDKIPCResponse< List< >Item> > -
This method returns the list by owner
Input :
owner
the id of the whose id you want to fetch Output: Item contains the list of the items by the owner -
getProfile(
) → Future< SDKIPCResponse< Profile> > - Async: Retrieves current state of profile with given address if provided, or current state of attached wallet's own profile if null.
-
getRecipe(
String cookbookId, String recipeId) → Future< SDKIPCResponse< Recipe> > -
This method gets the recipe based on the cookbookId and the recipeId
Input :
cookbookId
the id of the cookbook which contains the recipe,recipeId
the id of the recipe Output: Recipe the recipe that we need. -
getRecipes(
String cookbook) → Future< SDKIPCResponse< List< >Recipe> > -
Async: Retrieves a list of recipes on the Pylons chain in the cookbook with ID
cookbook
. -
getTrades(
String creator) → Future< SDKIPCResponse< List< >Trade> > -
Async: Retrieves all current trades that exist on the Pylons chain based on the given
creator
. -
goToInstall(
) → Future< bool> - Redirects user to the Pylons Wallet page on the Store.
-
goToPylons(
{bool requestResponse}) → Future< SDKIPCResponse> - Redirects user to the Pylons Wallet app.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendMessage(
SDKIPCMessage sdkipcMessage, Completer< SDKIPCResponse> completer) → Future<SDKIPCResponse> - Async: Send the provided message over the IPC channel, then retrieve a response.
-
showStripe(
) → Future< SDKIPCResponse> - This method moves the user to stripe screen in order to create an account
-
toString(
) → String -
A string representation of this object.
inherited
-
txBuyItem(
String tradeId, String paymentId) → Future< SDKIPCResponse> - Async: Creates a transaction to buy an item using either Pylons or a third-party payment processor.
-
txBuyPylons(
int pylons, String paymentId, {bool requestResponse}) → Future< SDKIPCResponse> - Async: Creates a transaction to buy the provided number of Pylons using a third-party payment processor.
-
txCreateCookbook(
Cookbook cookbook, {bool requestResponse = true}) → Future< SDKIPCResponse< Cookbook> > - Async: Creates a transaction to create the provided Cookbook on the Pylons chain against the current profile.
-
txCreateRecipe(
Recipe recipe, {bool requestResponse}) → Future< SDKIPCResponse< Recipe> > - Async: Creates a transaction to create the provided Recipe on the Pylons chain against the current profile.
-
txExecuteRecipe(
{required String cookbookId, required String recipeName, required List< String> itemIds, required int coinInputIndex, required List<PaymentInfo> paymentInfo, required String sender, bool requestResponse}) → Future<SDKIPCResponse< Execution> > -
Async: Creates a transaction to execute the recipe with coordinates
cookbookId
:recipeName
against the current profile. -
txPlaceForSale(
ItemRef item, int price) → Future< SDKIPCResponse> - Async: Creates a transaction to post a trade of the provided Item for a price in pylons against the current profile.
-
txUpdateCookbook(
Cookbook cookbook, {bool requestResponse}) → Future< SDKIPCResponse> - Async: Creates a transaction to updates the provided Cookbook on the Pylons chain to match that provided against the current profile.
-
txUpdateRecipe(
Recipe recipe, {bool requestResponse}) → Future< SDKIPCResponse> - Async: Creates a transaction to updates the provided Recipe on the Pylons chain to match that provided against the current profile.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → PylonsWallet
-
no setter
Static Methods
-
setup(
{required PylonsMode mode, required String host}) → void - Initializes the wallet model.