App
typeValue
transfer.App
PortID
untyped stringValue
"transfer"
V1
untyped stringValue
"ics20-1"
EncodingProtobuf
untyped stringValue
"application/x-protobuf"
denomPrefix
untyped stringValue
"ibc"
escrowAddressVersion
untyped stringValue
"ics20-1"
init.6
func()- OID
- 0ab808…9bb6:3
init.6 details
consumePendingVoucherSend
func(sender string, sourceClient string, denom string, amount int64) .uverse.error- OID
- 0ab808…9bb6:5
consumePendingVoucherSend details
consumePendingGRC20Send
func(sender string, sourceClient string, denom string, amount int64) .uverse.error- OID
- 0ab808…9bb6:6
consumePendingGRC20Send details
validatePendingSend
func(expected *transfer.pendingSend, sender string, sourceClient string, denom string, amount int64) .uverse.error- OID
- 0ab808…9bb6:7
validatePendingSend details
validateBaseDenomNoSlash
func(token transfer.Token) .uverse.errorvalidateBaseDenomNoSlash rejects base denominations containing a slash. IBC v2 packets do not carry channel identifiers, so denomination traces cannot be unambiguously separated from a slashed base denomination.
- OID
- 0ab808…9bb6:8
validateBaseDenomNoSlash details
unmarshalPayload
func(bz []uint8) (transfer.FungibleTokenPacketData, transfer.Token, .uverse.error)- OID
- 0ab808…9bb6:9
unmarshalPayload details
Denom
typeDenom holds the base denom of a Token and a trace of the chains it was sent through.
Value
transfer.Denom
NewDenom
func(base string, trace []transfer.Hop) transfer.DenomNewDenom creates a new Denom instance given the base denomination and a variable number of hops.
- OID
- 0ab808…9bb6:10
NewDenom details
ExtractDenomFromPath
func(fullPath string) transfer.DenomExtractDenomFromPath returns the denom from the full path.
- OID
- 0ab808…9bb6:12
ExtractDenomFromPath details
Hop
typeHop defines a port ID, client ID pair specifying a unique "hop" in a trace
Value
transfer.Hop
NewHop
func(portID string, clientID string) transfer.HopNewHop creates a Hop with the given port ID and client ID.
- OID
- 0ab808…9bb6:13
NewHop details
EventTypeTimeout
untyped stringIBC transfer events
Value
"timeout"
EventTypePacket
untyped stringIBC transfer events
Value
"fungible_token_packet"
EventTypeTransfer
untyped stringIBC transfer events
Value
"ibc_transfer"
EventTypeDenom
untyped stringIBC transfer events
Value
"denomination"
AttributeKeySender
untyped stringIBC transfer events
Value
"sender"
AttributeKeyReceiver
untyped stringIBC transfer events
Value
"receiver"
AttributeKeyDenom
untyped stringIBC transfer events
Value
"denom"
AttributeKeyDenomHash
untyped stringIBC transfer events
Value
"denom_hash"
AttributeKeyAmount
untyped stringIBC transfer events
Value
"amount"
AttributeKeyRefundReceiver
untyped stringIBC transfer events
Value
"refund_receiver"
AttributeKeyRefundTokens
untyped stringIBC transfer events
Value
"refund_tokens"
AttributeKeyAckSuccess
untyped stringIBC transfer events
Value
"success"
AttributeKeyAck
untyped stringIBC transfer events
Value
"acknowledgement"
AttributeKeyAckError
untyped stringIBC transfer events
Value
"error"
AttributeKeyMemo
untyped stringIBC transfer events
Value
"memo"
FungibleTokenPacketData
typeFungibleTokenPacketData defines a struct for the packet payload See FungibleTokenPacketData spec: [https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures](https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures)
Value
transfer.FungibleTokenPacketData
NewFungibleTokenPacketData
func(denom string, amount string, sender string, receiver string, memo string) transfer.FungibleTokenPacketDataNewFungibleTokenPacketData constructs a new FungibleTokenPacketData instance
- OID
- 0ab808…9bb6:14
NewFungibleTokenPacketData details
transferRealmPath
untyped stringtransferRealmPath is the package path of this realm; used to compute per-voucher GRC20 registry keys. Hardcoded because we cannot read it from runtime.CurrentRealm() in v2 without the unsafe package, and Render needs it from a non-crossing render handler.
Value
"gno.land/r/aib/ibc/apps/transfer"
Render
func(path string) string- OID
- 0ab808…9bb6:16
Render details
renderHome
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:18
renderHome details
renderDenoms
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:19
renderDenoms details
renderDenom
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:20
renderDenom details
renderTotalEscrowForDenom
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:21
renderTotalEscrowForDenom details
renderVouchers
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:22
renderVouchers details
renderVoucher
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:23
renderVoucher details
renderVoucherBalance
func(w *v0.ResponseWriter, r *v0.Request)- OID
- 0ab808…9bb6:24
renderVoucherBalance details
denomsByClientOrder
func() []transfer.DenomdenomsByClientOrder returns the stored voucher denoms ordered to match the "Pick the client" listing (core.ClientIDs() order): each voucher is grouped under its source client (Trace\[0].ClientId), following the same client order as the client list, so the vouchers table lines up with it. Within a client, the underlying b+tree order is preserved. Denoms whose source client is not (or no longer) registered are appended last, in b+tree order, so nothing is dropped. Every stored denom is a minted voucher with a non-empty trace, so Trace\[0] is always safe to read.
- OID
- 0ab808…9bb6:25
denomsByClientOrder details
renderTransferLinks
func() stringrenderTransferLinks returns the "## Transfer" section: a set of txlinks that wallets can turn into MsgCalls to Transfer. Each link leaves at least one argument empty so the user fills it in their wallet.
- OID
- 0ab808…9bb6:26
renderTransferLinks details
newVoucherSendLink
func(ibcDenom string) *txlink.TxBuildernewVoucherSendLink builds a txlink to VoucherSend with the ibc denom pre-filled. The user fills \`to\` and \`amount\` in their wallet.
- OID
- 0ab808…9bb6:27
newVoucherSendLink details
newVoucherApproveLink
func(ibcDenom string) *txlink.TxBuildernewVoucherApproveLink builds a txlink to VoucherApprove with the ibc denom pre-filled. The user fills \`spender\` and \`amount\` in their wallet.
- OID
- 0ab808…9bb6:28
newVoucherApproveLink details
newTransferLink
func(clientID string, receiver string, denom string) *txlink.TxBuildernewTransferLink builds a txlink to the Transfer function with the given pre-filled arguments. Empty values are left wallet-settable. timeoutTimestamp defaults to one hour from now (in unix seconds), matching what the e2e tests use; the user can still override it in their wallet.
- OID
- 0ab808…9bb6:29
newTransferLink details
stripDomain
func(path string) stringstripDomain removes the domain from a gno pkg path for use in URLs. "gno.land/r/demo/foo" → "/r/demo/foo"
- OID
- 0ab808…9bb6:30
stripDomain details
shortDenom
func(ibcDenom string) stringshortDenom shortens an IBC denom hash for display. "ibc/CAEF9CABC…9D0F" (ibc/ + first 4 + … + last 4)
- OID
- 0ab808…9bb6:31
shortDenom details
renderNode
func(w *v0.ResponseWriter, n *json.Node)- OID
- 0ab808…9bb6:32
renderNode details
grc20regKey
func(ibcDenom string) stringgrc20regKey returns the grc20reg key for a voucher ibc denom. e.g. "ibc/CAEF9C..." → "gno.land/r/aib/ibc/apps/transfer.CAEF9C..."
- OID
- 0ab808…9bb6:33
grc20regKey details
nodeError
func(msg string, args []interface{...}) *json.Node- OID
- 0ab808…9bb6:34
nodeError details
denoms
*v0.BPTree// ibcDenom:Denom
- OID
- 0ab808…9bb6:69
denoms details
totalEscrow
*v0.BPTree// denom:chain.Coin
- OID
- 0ab808…9bb6:71
totalEscrow details
voucherTokens
*v0.BPTree// ibcDenom:\*voucher
- OID
- 0ab808…9bb6:73
voucherTokens details
nextVoucherID
v0.IDValue
<zero>
voucher
typevoucher holds a voucher token and its private ledger for mint/burn.
Value
transfer.voucher
init.58
func()- OID
- 0ab808…9bb6:39
init.58 details
hasDenom
func(voucherDenom string) bool- OID
- 0ab808…9bb6:41
hasDenom details
setDenom
func(denom transfer.Denom)- OID
- 0ab808…9bb6:42
setDenom details
getDenom
func(ibcDenom string) (transfer.Denom, bool)- OID
- 0ab808…9bb6:43
getDenom details
addEscrowForDenom
func(c chain.Coin)- OID
- 0ab808…9bb6:44
addEscrowForDenom details
subEscrowForDenom
func(c chain.Coin)- OID
- 0ab808…9bb6:45
subEscrowForDenom details
VoucherSymbol
func(ibcDenom string) stringVoucherSymbol returns the grc20 token symbol for an IBC voucher denom: the IBC hash truncated to grc20's MaxSymbolLen. The full voucherDenom ("ibc/\<64-hex- hash>") can't be a symbol because v2 grc20 enforces MaxSymbolLen and \[A-Za-z0-9\_-] only. Since grc20reg keys tokens by rlmpath.symbol, this is also the symbol component of a voucher's registry key, so callers locate a voucher via grc20reg.Get(\<this realm's pkgpath> + "." + VoucherSymbol(ibcDenom)).
- OID
- 0ab808…9bb6:46
VoucherSymbol details
getOrCreateVoucher
func(int, rlm .uverse.realm, baseDenom string, voucherDenom string) *transfer.vouchergetOrCreateVoucher returns the existing voucher instance for the given IBC denom, or creates a new one and registers it in grc20reg for DeFi discoverability. Non-crossing helper; rlm is needed to issue the cross call into grc20reg.Register from this realm's frame. The token symbol is a truncated IBC hash (see VoucherSymbol); its name is the base denom, and nextVoucherID keeps each token's grc20 id distinct. grc20reg keys the token by rlmpath.symbol (not the slug), so the full-hash slug is retained only as event metadata. Because the key is the truncated symbol, two vouchers whose hashes share an 11-char prefix would collide on the registry key (astronomically unlikely, but no longer guarded by the slug).
- OID
- 0ab808…9bb6:47
getOrCreateVoucher details
getVoucher
func(ibcDenom string) *transfer.vouchergetVoucher returns the voucher instance for the given IBC denom, or nil if not found.
- OID
- 0ab808…9bb6:48
getVoucher details
VoucherBalanceOf
func(ibcDenom string, addr .uverse.address) int64VoucherBalanceOf returns the balance of a voucher token for a given address. Returns 0 if the token does not exist.
- OID
- 0ab808…9bb6:49
VoucherBalanceOf details
GRC20Alias
func(grc20regKey string) stringGRC20Alias returns a slash-free alias for a GRC20 denom (grc20reg key) by replacing "/" with ":". This is safe because grc20reg slugs are alphanumeric (enforced by grc20reg.Register), so colons never appear in grc20reg keys, making the replacement reversible. Examples: "gno.land/r/demo/foo" → "gno.land:r:demo:foo" "gno.land/r/demo/foo.FOO" → "gno.land:r:demo:foo.FOO"
- OID
- 0ab808…9bb6:50
GRC20Alias details
resolveGRC20Alias
func(alias string) stringresolveGRC20Alias converts a GRC20 alias back to the grc20reg key by replacing ":" with "/".
- OID
- 0ab808…9bb6:51
resolveGRC20Alias details
isGRC20Alias
func(denom string) boolisGRC20Alias returns true if the denom is a GRC20 alias. GRC20 aliases always start with "gno.land:" (the colon form of "gno.land/").
- OID
- 0ab808…9bb6:52
isGRC20Alias details
Token
typeToken defines a struct which represents a token to be transferred.
Value
transfer.Token
NewToken
func(baseDenom string, amount string) transfer.TokenNewToken constructs a Token with the given native base denom and amount (no trace, no prefix hops). Provided so external callers — which cannot construct foreign-stamped composite literals under v2 borrow rule #1 — can still build Token values for tests and packet assembly.
- OID
- 0ab808…9bb6:53
NewToken details
Transfer
func(clientID string, receiver string, denom string, amount int64, timeoutTimestamp uint64, memo string) (packet types.MsgSendPacket, sequence uint64)Transfer is the entry point for sending tokens to another chain using the IBC protocol. It supports three token types, detected automatically from the denom argument: - IBC voucher (denom starts with "ibc/"): burns the voucher GRC20 token. - Non-IBC GRC20 token (registered in grc20reg): escrows via TransferFrom. - Native coin (everything else): the coin must be sent with the transaction via the send field, and must match denom and amount. memo is included in the IBC packet payload.
- OID
- 0ab808…9bb6:55
Transfer details
VoucherSend
func(ibcDenom string, to .uverse.address, amount int64)VoucherSend is a convenience helper to send an IBC voucher token from the caller to the provided recipient.
- OID
- 0ab808…9bb6:57
VoucherSend details
VoucherApprove
func(ibcDenom string, spender .uverse.address, amount int64)VoucherApprove is a convenience helper to set a spender allowance for an IBC voucher token on behalf of the caller.
- OID
- 0ab808…9bb6:58
VoucherApprove details
transfer
func(clientID string, receiver string, denom string, amount int64, timeoutTimestamp uint64, memo string) (packet types.MsgSendPacket, sequence uint64)- OID
- 0ab808…9bb6:59
transfer details
refundPacketToken
func(int, rlm .uverse.realm, sourcePort string, sourceClient string, sender string, token transfer.Token) .uverse.errorrefundPacketToken is a non-crossing helper; rlm is the caller's live cur, needed only by unescrowNative which constructs a Banker.
- OID
- 0ab808…9bb6:60
refundPacketToken details
unescrowGRC20
func(int, rlm .uverse.realm, receiver string, coin chain.Coin) .uverse.errorunescrowGRC20 resolves the GRC20 alias and transfers the escrowed tokens back to the receiver via the token's RealmTeller. Non-crossing helper; rlm is needed by the grc20 teller API.
- OID
- 0ab808…9bb6:61
unescrowGRC20 details
unescrowNative
func(int, rlm .uverse.realm, receiver string, coin chain.Coin) .uverse.errorunescrowNative sends the escrowed native coins back to the receiver via the banker. Non-crossing helper; rlm is the caller's live cur (transfer realm's own frame), needed to construct a Banker.
- OID
- 0ab808…9bb6:62
unescrowNative details
pendingSend
typependingSend records the token send that Transfer authorized for OnSendPacket.
Value
transfer.pendingSend
pendingNativeEscrow
*chain.CoinGno persists package-level vars to the realm store at end of tx. These pending values must be cleared before Transfer returns to avoid leaking state into the next tx. Transfer uses defers to guarantee the reset on every exit path.
Value
<zero>
pendingVoucherSend
*transfer.pendingSendGno persists package-level vars to the realm store at end of tx. These pending values must be cleared before Transfer returns to avoid leaking state into the next tx. Transfer uses defers to guarantee the reset on every exit path.
Value
<zero>
pendingGRC20Send
*transfer.pendingSendGno persists package-level vars to the realm store at end of tx. These pending values must be cleared before Transfer returns to avoid leaking state into the next tx. Transfer uses defers to guarantee the reset on every exit path.
Value
<zero>