Skip to content

Get started with the Spanning Network

Follow the instructions below to install and use the Spanning Network library.

Install the Spanning Network

Install the Spanning Network library in your project:

npm install @spanning/contracts

Import the Spanning Network

Import the Spanning Network library:


import SpanningERC20 from '@spanning/contracts/token/ERC20/SpanningERC20.sol';

contract MultiChainContract is SpanningERC20 {
    ...your code here...
}

Use the Spanning Network

For example, sending a message to a program:

bytes32 payload = '0x' + sha3('Hello World');
bytes32 resolvedAddress = getAddressFromLegacy(targetLegacyProgram);
sendToAddress(resolvedAddress, payload);

Next steps