@@ -14,7 +14,7 @@ This guide walks through a complete payment transaction from client setup to on-
1414Here's a full transaction workflow—configure once, then build, sign, and submit:
1515
1616``` ts twoslash
17- import { createClient } from " @evolution-sdk/evolution" ;
17+ import { Core , createClient } from " @evolution-sdk/evolution" ;
1818
1919// 1. Configure your client
2020const client = createClient ({
@@ -35,8 +35,8 @@ const client = createClient({
3535const tx = await client
3636 .newTx ()
3737 .payToAddress ({
38- address: " addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63" ,
39- assets: { lovelace: 2000000 n }
38+ address: Core . Address . fromBech32 ( " addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63" ) ,
39+ assets: Core . Assets . fromLovelace ( 2_000_000 n )
4040 })
4141 .build ();
4242
@@ -76,7 +76,7 @@ const client = createClient({
7676Chain operations to specify what the transaction should do. Call ` .build() ` when ready to finalize:
7777
7878``` ts twoslash
79- import { createClient } from " @evolution-sdk/evolution" ;
79+ import { Core , createClient } from " @evolution-sdk/evolution" ;
8080
8181const client = createClient ({
8282 network: " preprod" ,
@@ -86,8 +86,8 @@ const client = createClient({
8686
8787const tx = await client .newTx ()
8888 .payToAddress ({
89- address: " addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63" ,
90- assets: { lovelace: 2000000 n }
89+ address: Core . Address . fromBech32 ( " addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63" ) ,
90+ assets: Core . Assets . fromLovelace ( 2_000_000 n )
9191 })
9292 .build ();
9393```
@@ -99,7 +99,7 @@ The builder handles UTxO selection, fee calculation, and change outputs automati
9999Authorize the transaction with your wallet's private keys:
100100
101101``` ts twoslash
102- import { createClient } from " @evolution-sdk/evolution" ;
102+ import { Core , createClient } from " @evolution-sdk/evolution" ;
103103
104104const client = createClient ({
105105 network: " preprod" ,
@@ -108,7 +108,7 @@ const client = createClient({
108108});
109109
110110const tx = await client .newTx ()
111- .payToAddress ({ address: " " , assets: { lovelace: 2000000 n } })
111+ .payToAddress ({ address: Core . Address . fromBech32 ( " addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63 " ) , assets: Core . Assets . fromLovelace ( 2_000_000 n ) })
112112 .build ();
113113
114114const signed = await tx .sign ();
@@ -119,7 +119,7 @@ const signed = await tx.sign();
119119Broadcast the signed transaction to the blockchain and get the transaction hash:
120120
121121``` ts twoslash
122- import { createClient } from " @evolution-sdk/evolution" ;
122+ import { Core , createClient } from " @evolution-sdk/evolution" ;
123123
124124const client = createClient ({
125125 network: " preprod" ,
@@ -128,7 +128,7 @@ const client = createClient({
128128});
129129
130130const tx = await client .newTx ()
131- .payToAddress ({ address: " " , assets: { lovelace: 2000000 n } })
131+ .payToAddress ({ address: Core . Address . fromBech32 ( " addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63 " ) , assets: Core . Assets . fromLovelace ( 2_000_000 n ) })
132132 .build ();
133133
134134const signed = await tx .sign ();
0 commit comments