///
This example demonstrates the core functionality of account management and delegation using the Quicksilver SDK's fluent API. It showcases how to:
91 views
~91 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 example demonstrates the core functionality of account management and delegation using the Quicksilver SDK's fluent API. It showcases how to:
Account model's methods.All these operations leverage the SDK's Account active model, providing an intuitive and type-safe way to manage your programmable money infrastructure.
examples/1-accounts-and-delegation.tsIn this example:
QuicksilverClient is initialized in sandbox mode.mainAgent account is created using client.accounts.create(). This method directly returns an Account active model instance.researchAgent and writingAgent, are created by calling the delegate() method directly on the mainAgent instance. This illustrates how parent accounts can fluently create and manage child accounts.mainAgent.getChildren() method is used to retrieve all accounts delegated by mainAgent, returning an array of Account instances.mainAgent.updateLimits() demonstrates how to modify an account's financial constraints, such as its daily spending limit.mainAgent.getBalance() fetches the current balance associated with the account, showcasing real-time financial introspection capabilities.This comprehensive example highlights the power of the Account active model in simplifying complex account and delegation logic into readable, object-oriented code.