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

XIP-21: Incorporate suggestion from Aurel/Chain Agnostic Initiative #55

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions XIPs/xip-21-transaction-reference-content-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: On-chain transaction reference content type
description: Provides an on-chain transaction hash or ID sent as a message.
author: @rygine (Ry Racherbaumer), @lourou (Louis Rouffineau), @nmalzieu (Noé Malzieu), @galligan (Matt Galligan), @nakajima (Pat Nakajima), @yash-luna (Yash Lunagaria)
discussions-to: https://community.xmtp.org/t/xip-21-on-chain-transaction-reference-content-type/532
status: Draft
status: Review
type: Standards Track
category: XRC
created: 2024-01-26
Expand Down Expand Up @@ -35,17 +35,17 @@ The goal of the transaction reference content type is to provide transaction det
```ts
type TransactionReference = {
/**
* The namespace for the networkId
* The CAIP-2 chain ID where the transaction happened in the format `<namespace>:<reference>`
*/
namespace?: string;
chainId?: string;
jhaaaa marked this conversation as resolved.
Show resolved Hide resolved
/**
* The networkId for the transaction, in decimal or hexidecimal format
*/
networkId: number | string;
Copy link

@aurelticot aurelticot Apr 13, 2024

Choose a reason for hiding this comment

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

The networkId is no longer necessary as it's the <reference> part of the chainId.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So wonderful to see you here @aurelticot - thank you for your partnership on this! 🤝

cc'ing @neekolas for help with confirming this change to the XIP spec. 🫡

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed to remove networkId. My oversight! Thank you.

/**
* The transaction hash
*/
reference: string;
transactionHash: string;
/**
* Optional metadata object
*/
Expand All @@ -62,7 +62,7 @@ type TransactionReference = {

## Rationale

The `networkId` provides details of the network used for the transaction, while the `reference` field contains the hash of the transaction on the network. These two fields should be enough to display a basic reference to the transaction. An optional `namespace` field can be used for a more human-readable description of the network.
The `chainId` provides details of the network used for the transaction in [CAIP-2 format](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-2.md), while the `transactionHash` field contains the hash of the transaction on the network. These two fields should be enough to display a basic reference to the transaction. An optional `namespace` field can be used for a more human-readable description of the network.
jhaaaa marked this conversation as resolved.
Show resolved Hide resolved

In addition, optional `metadata` can be added to provide more details and a richer display of the transaction.

Expand Down
Loading