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

Account ownership testaments #8

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Where message `type` must be one of:
- `4`: `Transact`
- `5`: `RelayTo`
- `6`: `RelayedFrom`
- `7`: `AccountClaim`

Within XCM, there is an internal datatype `Order`, which encodes an operation on the holding account. It is defined as:

Expand Down Expand Up @@ -173,6 +174,16 @@ Kind: *Trusted Indication*.

Errors:

### `AccountClaim`
Sends a claim verified to be from the `source` to the `destination` on the parachain. It has an `expiration` timestamp and a `scope` used to define the scope under which such a `claim` is made. A chain should only send such a claim if it is verified to have been intended to be sent by the `source`. It facilitates authentication across parachains.

- `source: MultiLocation`
lucasvo marked this conversation as resolved.
Show resolved Hide resolved
- `destination: MultiLocation`
- `expiration: Compact<u48>`: Timestamp of the claim expiration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when exactly would this be used?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any certificate or claim should have an expiration IMO. Just looking at how signed statements would be used when working in different contexts. For aanything from SSL to meta-transactions in crypto, most often you do need some sort of expiry or nonce but nonces wouldn't make sense in this instance.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gavofyork are you ok with leaving this in?

- `scope: Vec<u8>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this defined?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example if a claim was used to authorize another account to trade you would create a claim to the dex as destination and set the scope to the assets you would authorize a transfer for.


Errors:

## `Order` Types

### `Null`
Expand Down Expand Up @@ -222,7 +233,6 @@ Remove the asset(s) (`assets`) from holding and send a `WithdrawAsset` XCM messa
be executed on them. There will typically be only one valid location on any given asset/chain combination.
- `effects: Vec<Order>`: The orders to execute on the assets once withdrawn *on the reserve location*.

Errors:

### `InitiateTeleport`

Expand Down