Skip to content

Commit 7ba2e5f

Browse files
committed
taprpc: add label field to AssetTransfer and SendEvent
1 parent 13d4eaa commit 7ba2e5f

File tree

5 files changed

+680
-634
lines changed

5 files changed

+680
-634
lines changed

rpcserver.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3662,6 +3662,7 @@ func marshalOutboundParcel(
36623662
AnchorTxBlockHeight: parcel.AnchorTxBlockHeight,
36633663
Inputs: rpcInputs,
36643664
Outputs: rpcOutputs,
3665+
Label: parcel.Label,
36653666
}, nil
36663667
}
36673668

@@ -4178,6 +4179,7 @@ func marshalSendEvent(event fn.Event) (*taprpc.SendEvent, error) {
41784179
SendState: e.SendState.String(),
41794180
VirtualPackets: make([][]byte, len(e.VirtualPackets)),
41804181
PassiveVirtualPackets: make([][]byte, len(e.PassivePackets)),
4182+
TransferLabel: e.TransferLabel,
41814183
}
41824184

41834185
if e.Error != nil {

taprpc/assetwalletrpc/assetwallet.swagger.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,10 @@
926926
"type": "integer",
927927
"format": "int64",
928928
"description": "The block height of the blockchain block that contains the anchor\ntransaction. If the anchor transaction is still unconfirmed, this value\nwill be 0."
929+
},
930+
"label": {
931+
"type": "string",
932+
"description": "An optional short label for the transfer. This label can be used to track\nthe progress of the transfer via the logs or an event subscription.\nMultiple transfers can share the same label."
929933
}
930934
}
931935
},

0 commit comments

Comments
 (0)