///
This page demonstrates the fundamental operations for managing accounts and handling transactions using the Quicksilver SDK's fluent API. It showcases how the SDK transforms generic API interactions i
39 views
~39 views from guests
Guest views are estimated from total page views. These include anonymous visitors and users who weren't logged in when they viewed the page.
This page demonstrates the fundamental operations for managing accounts and handling transactions using the Quicksilver SDK's fluent API. It showcases how the SDK transforms generic API interactions into expressive, type-safe, and object-oriented operations, leveraging the active record pattern.
Before running these examples, ensure you have the [Getting Started with Quicksilver SDK] prerequisites met, including SDK installation and client initialization, preferably pointing to a local sandbox environment.
This example illustrates the creation of primary accounts and the delegation of sub-agents, a core concept for agent commerce. It highlights the Account model's active methods for managing account hierarchies and properties.
Key Takeaways:
client.accounts.create() directly returns a rich Account object, not just raw data.Account model provides fluent methods like delegate(), getChildren(), updateLimits(), and getBalance() for intuitive interaction.This example focuses on creating and managing various types of transactions (Payment, Scheduled, Stream) using the SDK's fluent Transaction model. It demonstrates how transactions are treated as dynamic objects with methods for execution, status checks, and lifecycle management.
Key Takeaways:
account.transaction() initiates a new Transaction object, automatically linking it to the sender account.execute().Transaction model offers methods like execute(), cancel(), refresh(), getCost(), and getStatus() for comprehensive control and introspection.These examples provide a foundation for interacting with the Quicksilver Engine. You can delve deeper into more advanced functionalities:
when().then().otherwise() conditional flows with the ConditionBuilder.Product objects, complete with pricing, guarantees, and multi-agent stages.StreamConnection.Account model's verification methods.For comprehensive details on the Account and Transaction models and their methods, refer to the [API Reference - Core Models] page. Additional examples are available in the examples/ directory of the SDK's repository.