The latest package ID for the provided state object
This function returns the object ID of the UpgradeCap
that belongs to the
given package and owner if it exists.
Structs created by the Sui framework such as UpgradeCap
s all have the same
type (e.g. 0x2::package::UpgradeCap
) and have a special field, package
,
we can use to differentiate them.
Sui RPC provider
Address of the current owner of the UpgradeCap
ID of the package that the UpgradeCap
was created for
The object ID of the UpgradeCap
if it exists, otherwise null
Get the fully qualified type of a wrapped asset published to the given package ID.
All wrapped assets that are registered with the token bridge must satisfy
the requirement that module name is coin
(source: https://github.com/wormhole-foundation/wormhole/blob/a1b3773ee42507122c3c4c3494898fbf515d0712/sui/token_bridge/sources/create_wrapped.move#L88).
As a result, all wrapped assets share the same module name and struct name,
since the struct name is necessarily COIN
since it is a OTW.
packageId of the wrapped asset
Fully qualified type of the wrapped asset
This method validates any Sui address, even if it's not 32 bytes long, i.e. "0x2". This differs from Mysten's implementation, which requires that the given address is 32 bytes long.
Address to check
If given address is a valid Sui address or not
Unlike trimSuiType
, this method does not modify nested types, it just pads
the top-level type.
This method removes leading zeroes for types in order to normalize them since some types returned from the RPC have leading zeroes and others don't.
Generated using TypeDoc
Core or token bridge state object ID