Skip to content

Commit a335381

Browse files
Make provision to add destination_muxed_id in the output for the oper… (#5715)
* Make provision to add destination_muxed_id in the output for the operations endpoint. This is partial work. As in, this commit helps to ensure that downstream cli can be made aware of it. The actual work to ensure that destination_muxed_id is parsed from StellarAssetContract and stored in DB as a part of parsing details will be done separately * update changelog for horizon * address code review comments
1 parent b121493 commit a335381

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

protocols/horizon/operations/main.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,15 @@ type RestoreFootprint struct {
401401
//
402402
// Amount - expressed as a signed decimal to 7 digits precision.
403403
// Asset - the classic asset expressed as issuer and code.
404+
// DestinationMuxedId - If the event's destination was a muxed address, then include the that in the response as a string
404405
type AssetContractBalanceChange struct {
405406
base.Asset
406-
Type string `json:"type"`
407-
From string `json:"from,omitempty"`
408-
To string `json:"to,omitempty"`
409-
Amount string `json:"amount"`
407+
Type string `json:"type"`
408+
From string `json:"from,omitempty"`
409+
To string `json:"to,omitempty"`
410+
Amount string `json:"amount"`
411+
DestinationMuxedIdType string `json:"destination_muxed_id_type,omitempty"`
412+
DestinationMuxedId string `json:"destination_muxed_id,omitempty"`
410413
}
411414

412415
// Operation interface contains methods implemented by the operation types

services/horizon/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ In Protocol 23, Stellar Core removes in-memory mode and requires on-disk mode (u
1212

1313
### Added
1414
- Update default pubnet captive core configuration to replace Whalestack with Creit Technologies in the quorum set ([5564](https://github.com/stellar/go/pull/5564)).
15+
- Added 2 new optional string fields - `destination_muxed_id_type` and `destination_muxed_id`, in the `asset_balance_changes` section of the `/operations` endpoint. If operation is `InvokeHostFunction` and if the destination is a muxed address, then the `destination_muxed_id_type` represents the type of the muxed id - `uint64`,`string` or `bytes`, and `destination_muxed_id` contains the value (hex encoded string, if the type is bytes )
1516

1617
## 22.0.3
1718

0 commit comments

Comments
 (0)