Skip to content

Commit

Permalink
inc feedback from Aurel/CAI
Browse files Browse the repository at this point in the history
  • Loading branch information
jhaaaa committed Apr 13, 2024
1 parent 82422cd commit c3af4dc
Showing 1 changed file with 5 additions and 5 deletions.
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;
/**
* The networkId for the transaction, in decimal or hexidecimal format
*/
networkId: number | string;
/**
* 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.

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

Expand Down

0 comments on commit c3af4dc

Please sign in to comment.