Skip to content
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 Response model #28

Open
2 tasks
LimpidCrypto opened this issue Sep 2, 2022 · 0 comments
Open
2 tasks

Add Response model #28

LimpidCrypto opened this issue Sep 2, 2022 · 0 comments
Labels
1st month Planned to be worked on in the first month. Estimate budget: 13,333 $ 2nd month Planned to be worked on in the second month. Estimate budget: 6,666 $ enhancement New feature or request XRPL Grants This issue is planned to get resoled as part of the XRPL Grants program (within 8 months)
Milestone

Comments

@LimpidCrypto
Copy link
Collaborator

LimpidCrypto commented Sep 2, 2022

  1. A model that represents a clients response.

fields type explanation
status ResponseStatus An enum containing all possible response statuses.
result Result An enum containing each request methods responses.
id Option<&str> The requests id.
type Option<ResponseType> An enum containing all possible response types.

Methods

  • contains_partial_payment
  • is_successful

Account methods

AccountChannelsResponse

fields type explanation
account &str The address of the source/owner of the payment channels. This corresponds to the account field of the request.
channels Vec<Channel> Payment channels owned by this account.
ledger_hash Option<&str> The identifying Hash of the ledger version used to generate this response.
ledger_index Option<u32> The Ledger Index of the ledger version used to generate this response.
validated Option<bool> If true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change.
limit Option<u32> The limit to how many channel objects were actually returned by this request.
marker Option<&str> Server-defined value for pagination. Pass this to the next call to resume getting results where this call left off. Omitted when there are no additional pages after this one.

Channel

fields type explanation
account &str The owner of the channel, as an Address.
amount &str The total amount of XRP, in drops allocated to this channel.
balance &str The total amount of XRP, in drops, paid out from this channel, as of the ledger version used. (You can calculate the amount of XRP left in the channel by subtracting balance from amount.)
channel_id &str A unique ID for this channel, as a 64-character hexadecimal string. This is also the ID of the channel object in the ledger's state data.
destination_account &str The destination account of the channel, as an Address. Only this account can receive the XRP in the channel while it is open
settle_delay u32 The number of seconds the payment channel must stay open after the owner of the channel requests to close it.
public_key Option<&str> The public key for the payment channel in the XRP Ledger's base58 format. Signed claims against this channel must be redeemed with the matching key pair.
public_key_hex Option<&str> The public key for the payment channel in hexadecimal format, if one was specified at channel creation. Signed claims against this channel must be redeemed with the matching key pair.
expiration Option<u32> Time, in seconds since the Ripple Epoch, when this channel is set to expire. This expiration date is mutable. If this is before the close time of the most recent validated ledger, the channel is expired.
cancel_after Option<u32> Time, in seconds since the Ripple Epoch, of this channel's immutable expiration, if one was specified at channel creation. If this is before the close time of the most recent validated ledger, the channel is expired.
source_tag Option<u32> A 32-bit unsigned integer to use as a source tag for payments through this payment channel, if one was specified at channel creation. This indicates the payment channel's originator or other purpose at the source account. Conventionally, if you bounce payments from this channel, you should specify this value in the DestinationTag of the return payment.
destination_tag Option<u32> A 32-bit unsigned integer to use as a destination tag for payments through this channel, if one was specified at channel creation. This indicates the payment channel's beneficiary or other purpose at the destination account.

Sources:

@LimpidCrypto LimpidCrypto added this to the Month 2 milestone Sep 2, 2022
@LimpidCrypto LimpidCrypto self-assigned this Sep 2, 2022
@LimpidCrypto LimpidCrypto modified the milestones: Month 2, Month 3, Add clients Sep 2, 2022
@LimpidCrypto LimpidCrypto added 1st month Planned to be worked on in the first month. Estimate budget: 13,333 $ 2nd month Planned to be worked on in the second month. Estimate budget: 6,666 $ XRPL Grants This issue is planned to get resoled as part of the XRPL Grants program (within 8 months) labels Sep 2, 2022
@LimpidCrypto LimpidCrypto removed their assignment Sep 6, 2022
@LimpidCrypto LimpidCrypto modified the milestones: Add clients, Add models Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1st month Planned to be worked on in the first month. Estimate budget: 13,333 $ 2nd month Planned to be worked on in the second month. Estimate budget: 6,666 $ enhancement New feature or request XRPL Grants This issue is planned to get resoled as part of the XRPL Grants program (within 8 months)
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant