Before you can send transaction on the Tezos blockchain, you'll need to acquire some test XTZ (Tezos' native cryptocurrency for test network).
- Go to our Tezos Faucet****
- Type in your email and click the "Sign Up / Login" button
- Go to your email and click on the magic link to login
- Once you are logged in, you will get 10 test XTZ
- Now you can use your test XTZ in our example app****
Note that the Magic Tezos extension follows the method names and conventions by ConceilJS (link to documentation). To send a standard Tezos blockchain transaction, you can call the magic.tezos.sendTransactionOperation
method.
{% tabs %} {% tab title="ES Modules/TypeScript" %}
import { Magic } from 'magic-sdk';
import { TezosExtension } from '@magic-ext/tezos';
const magic = new Magic('YOUR_API_KEY', {
extensions: [
new TezosExtension({
rpcUrl: 'TEZOS_RPC_NODE_URL'
})
]
});
const result = await magic.tezos.sendTransactionOperation(
'tz1RVcUP9nUurgEJMDou8eW3bVDs6qmP5Lnc', // to address
500000, // amount
1500, // fee
'' // derivation path
);
console.log(`Injected operation group ID: ${result.operationGroupID}`);
{% endtab %} {% endtabs %}