Add order expiration support to NIP-69 (#2118)

This commit is contained in:
Francisco Calderón
2025-11-13 15:41:04 -03:00
committed by GitHub
parent a47c460415
commit f63c00213f

8
69.md
View File

@@ -41,7 +41,8 @@ Events are [addressable events](01.md#kinds) and use `38383` as event kind, a p2
["name", "Nakamoto"], ["name", "Nakamoto"],
["g", "<geohash>"], ["g", "<geohash>"],
["bond", "0"], ["bond", "0"],
["expiration", "1719391096"], ["expires_at", "1719391096"],
["expiration", "1719995896"],
["y", "lnp2pbot"], ["y", "lnp2pbot"],
["z", "order"] ["z", "order"]
], ],
@@ -55,7 +56,7 @@ Events are [addressable events](01.md#kinds) and use `38383` as event kind, a p2
- `d` < Order ID >: A unique identifier for the order. - `d` < Order ID >: A unique identifier for the order.
- `k` < Order type >: `sell` or `buy`. - `k` < Order type >: `sell` or `buy`.
- `f` < Currency >: The asset being traded, using the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) standard. - `f` < Currency >: The asset being traded, using the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) standard.
- `s` < Status >: `pending`, `canceled`, `in-progress`, `success`. - `s` < Status >: `pending`, `canceled`, `in-progress`, `success`, `expired`.
- `amt` < Amount >: The amount of Bitcoin to be traded, the amount is defined in satoshis, if `0` means that the amount of satoshis will be obtained from a public API after the taker accepts the order. - `amt` < Amount >: The amount of Bitcoin to be traded, the amount is defined in satoshis, if `0` means that the amount of satoshis will be obtained from a public API after the taker accepts the order.
- `fa` < Fiat amount >: The fiat amount being traded, for range orders two values are expected, the minimum and maximum amount. - `fa` < Fiat amount >: The fiat amount being traded, for range orders two values are expected, the minimum and maximum amount.
- `pm` < Payment method >: The payment method used for the trade, if the order has multiple payment methods, they should be separated by a comma. - `pm` < Payment method >: The payment method used for the trade, if the order has multiple payment methods, they should be separated by a comma.
@@ -67,7 +68,8 @@ Events are [addressable events](01.md#kinds) and use `38383` as event kind, a p2
- `name` [Name]: The name of the maker. - `name` [Name]: The name of the maker.
- `g` [Geohash]: The geohash of the operation, it can be useful in a face to face trade. - `g` [Geohash]: The geohash of the operation, it can be useful in a face to face trade.
- `bond` [Bond]: The bond amount, the bond is a security deposit that both parties must pay. - `bond` [Bond]: The bond amount, the bond is a security deposit that both parties must pay.
- `expiration` < Expiration\>: The expiration date of the order ([NIP-40](40.md)). - `expires_at` < Expires At\>: The expiration date of the event being published in `pending` status, after this time the event status SHOULD be changed to `expired`.
- `expiration` < Expiration\>: The expiration date of the event, after this time the relay SHOULD delete it ([NIP-40](40.md)).
- `y` < Platform >: The platform that created the order. - `y` < Platform >: The platform that created the order.
- `z` < Document >: `order`. - `z` < Document >: `order`.