Send ADA/Token Transaction
Sending ada
const paymentTransactionResponse = await typhon.paymentTransaction({
outputs: [
{
address:
"addr_test1qz7jw975stagnvs00wsjny6y6gpazn86yvwcm2vy02j3up7mt68vuzvz4nzgs00x0shrgywvy674v6r2zcs8fxvvq27qfjq8np",
amount: "6000000",
},
],
});
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Sending Tokens
const paymentTransactionResponse = await typhon.paymentTransaction({
outputs: [
{
address:
"addr_test1qz7jw975stagnvs00wsjny6y6gpazn86yvwcm2vy02j3up7mt68vuzvz4nzgs00x0shrgywvy674v6r2zcs8fxvvq27qfjq8np",
tokens: [
{
assetName: "",
policyId: "6b8d07d69639e9413dd637a1a815a7323c69c86abbafb66dbfdb1aa7",
amount: "1",
},
{
assetName: "6e667430",
policyId: "b114e82e6939419eb702b167a4c039cc50feeaf29346c73443890abf",
amount: "1",
},
],
},
],
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Sending Metadata
Generating Metadata using typhonjsopen in new window
const auxiliaryDataCbor = typhonjs.utils
.createAuxiliaryDataCbor({
metadata: [
{
label: 674,
data: {
msg: ["This is a comment for the transaction xyz, thank you very much!"],
},
},
],
})
.toString("hex");
const paymentTransactionResponse = await typhon.paymentTransaction({
auxiliaryDataCbor: auxiliaryDataCbor,
outputs: [
{
address:
"addr_test1qz7jw975stagnvs00wsjny6y6gpazn86yvwcm2vy02j3up7mt68vuzvz4nzgs00x0shrgywvy674v6r2zcs8fxvvq27qfjq8np",
amount: "6000000",
},
],
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Transaction with PlutusData
Generating plutusDataCbor using typhonjsopen in new window
const plutusDataCbor = typhonjs.utils
.createPlutusDataCbor({
constructor: 0,
fields: [12, 12],
})
.toString("hex");
const paymentTransactionResponse = await typhon.paymentTransaction({
outputs: [
{
address:
"addr_test1qz7jw975stagnvs00wsjny6y6gpazn86yvwcm2vy02j3up7mt68vuzvz4nzgs00x0shrgywvy674v6r2zcs8fxvvq27qfjq8np",
amount: "6000000",
plutusDataCbor: plutusDataCbor,
},
],
});
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17