# Module @wormhole-foundation/sdk-definitions - v0.3.0

# Definitions SDK

Replaces these files from old sdk:

- vaa/parser
- mock

## VAA

### Deserialization

    // decode VAA
    const vaaBytes = Buffer.from(testCase.vaa, "base64");
    // deserializes the base VAA details (emitterChain, emitterAddress, sequence, signatures, payload, hash, etc)
    const parsed = deserialize("Uint8Array", new Uint8Array(vaaBytes));
    // deserialize the payload, first argument denotes the type of payload
    const deserialized = deserializePayload("BAMessage", parsed.payload);

#### Available payload types

Token Bridge:

- "AttestMeta"
- "Transfer"
- "TransferWithPayload

Generic Relayer:

- "DeliveryInstruction"
- "RedeliveryInstruction"
- "DeliveryOverride"

Governance

- "WormholeCoreUpgradeContract"
- "WormholeCoreGuardianSetUpgrade"
- "WormholeCoreSetMessageFee"
- "WormholeCoreTransferFees"
- "WormholeCoreRecoverChainId"
- "TokenBridgeRegisterChain"
- "TokenBridgeUpgradeContract"
- "TokenBridgeRecoverChainId"
- "NftBridgeRegisterChain"
- "NftBridgeUpgradeContract"
- "NftBridgeRecoverChainId"
- "RelayerRegisterChain"
- "RelayerUpgradeContract"
- "RelayerUpdateDefaultProvider"

Circle

- "CircleTransferRelay"

BAM

- "BAMessage"

### Index

### Namespaces

AutomaticCircleBridge
AutomaticTokenBridge
CircleBridge
TokenBridge
layoutItems
testing

### Classes

ChainContext
PlatformContext
Signature
UniversalAddress

### Interfaces

Address
AutomaticCircleBridge
AutomaticTokenBridge
CircleBridge
GatewayIbcTransferMsg
GatewayMsg
GatewayTransferMsg
GatewayTransferWithPayloadMsg
IbcBridge
IbcTransferData
IbcTransferInfo
PlatformUtils
ProtocolInitializer
Relayer
SignAndSendSigner
SignOnlySigner
TokenBridge
UnsignedTransaction
VAA
WormholeCore

### Type Aliases

AccountAddress
Attestation
AttestationId
AttestationReceipt
Balances
ChainAddress
ChainConfig
ChainsConfig
CircleAttestation
CircleMessageId
CircleTransferDetails
CircleTransferMessage
Contracts
GatewayTransferDetails
IbcMessageId
MappedPlatforms
NamedPayloads
NativeAddress
Payload
PayloadDiscriminator
PayloadLiteral
ProtocolImplementation
ProtocolPayload
ProtocolVAA
RegisterPayloadTypes
RpcConnection
SequenceId
SignedTx
Signer
TokenAddress
TokenId
TokenTransferDetails
TransactionId
TxHash
UniversalOrNative
WormholeMessageId
getCircleAttestation
getWormholeAttestation

### Functions

ErrNotWrapped
blindDeserializePayload
buildConfig
create
createVAA
deserialize
deserializePayload
gatewayTransferMsg
getContracts
getPayloadLayout
getProtocolInitializer
isCircleMessageId
isCircleTransferDetails
isGatewayIbcTransferMsg
isGatewayTransferDetails
isGatewayTransferMsg
isGatewayTransferWithPayloadMsg
isIbcMessageId
isIbcTransferInfo
isSignAndSendSigner
isSignOnlySigner
isSigner
isTokenId
isTokenTransferDetails
isTransactionIdentifier
isWormholeMessageId
makeGatewayTransferMsg
nativeIsRegistered
payloadDiscriminator
protocolIsRegistered
registerNative
registerPayloadType
registerPayloadTypes
registerProtocol
serialize
serializePayload
toGatewayMsg
toNative
toUniversal

Generated using TypeDoc