Skip to content

Commit db9d865

Browse files
committed
update docs
1 parent 7c3304b commit db9d865

File tree

18 files changed

+72
-70
lines changed

18 files changed

+72
-70
lines changed

docs/content/docs/introduction/getting-started.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Learn more in [Clients](/docs/clients) and [Providers](/docs/clients/providers).
6666
### 4. Build a Transaction
6767
Construct your first payment:
6868
```ts twoslash
69-
import { createClient } from "@evolution-sdk/evolution";
69+
import { Core, createClient } from "@evolution-sdk/evolution";
7070

7171
const client = createClient({
7272
network: "preprod",
@@ -86,8 +86,8 @@ const client = createClient({
8686
const tx = await client
8787
.newTx()
8888
.payToAddress({
89-
address: "addr_test1qzrf9g3ea6hdc5vfujgrpjc0c0xq3qqkz8zkpwh3s6nqzhgey8k3eq73kr0gcqd7cyy75s0qqx0qqx0qqx0qqx0qx7e8pq",
90-
assets: { lovelace: 2000000n }
89+
address: Core.Address.fromBech32("addr_test1qzrf9g3ea6hdc5vfujgrpjc0c0xq3qqkz8zkpwh3s6nqzhgey8k3eq73kr0gcqd7cyy75s0qqx0qqx0qqx0qqx0qx7e8pq"),
90+
assets: Core.Assets.fromLovelace(2_000_000n)
9191
})
9292
.build();
9393
```
@@ -97,7 +97,7 @@ Details in [Transactions](/docs/transactions).
9797
### 5. Sign & Submit
9898
Sign with your wallet and send to the network:
9999
```ts twoslash
100-
import { createClient } from "@evolution-sdk/evolution";
100+
import { Core, createClient } from "@evolution-sdk/evolution";
101101

102102
const client = createClient({
103103
network: "preprod",
@@ -115,8 +115,8 @@ const client = createClient({
115115

116116
const tx = await client.newTx()
117117
.payToAddress({
118-
address: "addr_test1qzrf9g3ea6hdc5vfujgrpjc0c0xq3qqkz8zkpwh3s6nqzhgey8k3eq73kr0gcqd7cyy75s0qqx0qqx0qqx0qqx0qx7e8pq",
119-
assets: { lovelace: 2000000n }
118+
address: Core.Address.fromBech32("addr_test1qzrf9g3ea6hdc5vfujgrpjc0c0xq3qqkz8zkpwh3s6nqzhgey8k3eq73kr0gcqd7cyy75s0qqx0qqx0qqx0qqx0qx7e8pq"),
119+
assets: Core.Assets.fromLovelace(2_000_000n)
120120
})
121121
.build();
122122

docs/content/docs/introduction/migration-from-lucid.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ lucid
6565

6666
**Evolution SDK:**
6767
```ts twoslash
68-
import { createClient } from "@evolution-sdk/evolution";
68+
import { Core, createClient } from "@evolution-sdk/evolution";
6969

7070
const client = createClient({
7171
network: "preprod",
@@ -85,8 +85,8 @@ const client = createClient({
8585
const tx = await client
8686
.newTx()
8787
.payToAddress({
88-
address: "addr_test1qzrf9g3ea6hdc5vfujgrpjc0c0xq3qqkz8zkpwh3s6nqzhgey8k3eq73kr0gcqd7cyy75s0qqx0qqx0qqx0qqx0qx7e8pq",
89-
assets: { lovelace: 2000000n }
88+
address: Core.Address.fromBech32("addr_test1qzrf9g3ea6hdc5vfujgrpjc0c0xq3qqkz8zkpwh3s6nqzhgey8k3eq73kr0gcqd7cyy75s0qqx0qqx0qqx0qqx0qx7e8pq"),
89+
assets: Core.Assets.fromLovelace(2_000_000n)
9090
})
9191
.build();
9292
```

docs/content/docs/modules/sdk/builders/TransactionBuilder.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,13 +884,13 @@ export interface BuildOptions {
884884
* // Use different account for change
885885
* builder.build({ changeAddress: wallet.addresses[5] })
886886
*
887-
* // Custom address
888-
* builder.build({ changeAddress: "addr_test1..." })
887+
* // Custom Core Address
888+
* builder.build({ changeAddress: Core.Address.fromBech32("addr_test1...") })
889889
* ```
890890
*
891891
* @since 2.0.0
892892
*/
893-
readonly changeAddress?: string
893+
readonly changeAddress?: CoreAddress.Address
894894
895895
/**
896896
* Override the available UTxOs for this specific transaction build.

docs/content/docs/modules/sdk/builders/TxBuilderImpl.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ and calculates the exact size to determine the minimum lovelace required.
9797
9898
```ts
9999
export declare const calculateMinimumUtxoLovelace: (params: {
100-
address: string
100+
address: CoreAddress.Address
101101
assets: CoreAssets.Assets
102102
datum?: Datum.Datum
103103
scriptRef?: any
@@ -132,7 +132,7 @@ When unfracking is enabled:
132132
```ts
133133
export declare const createChangeOutput: (params: {
134134
leftoverAssets: CoreAssets.Assets
135-
changeAddress: string
135+
changeAddress: CoreAddress.Address
136136
coinsPerUtxoByte: bigint
137137
unfrackOptions?: UnfrackOptions
138138
}) => Effect.Effect<ReadonlyArray<TxOut.TransactionOutput>, TransactionBuilderError>
@@ -345,7 +345,7 @@ TransactionOutput represents an output being created in a transaction.
345345
346346
```ts
347347
export declare const makeTxOutput: (params: {
348-
address: string
348+
address: CoreAddress.Address
349349
assets: CoreAssets.Assets
350350
datum?: Datum.Datum
351351
scriptRef?: any

docs/content/docs/modules/sdk/builders/Unfrack.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ This ensures all outputs are always valid.
7474

7575
```ts
7676
export declare const createUnfrackedChangeOutputs: (
77-
changeAddress: string,
77+
changeAddress: CoreAddress.Address,
7878
changeAssets: CoreAssets.Assets,
7979
options: UnfrackOptions | undefined,
8080
coinsPerUtxoByte: bigint
@@ -157,7 +157,7 @@ Now calculates proper minUTxO for each bundle using CBOR
157157
export declare const calculateTokenBundles: (
158158
tokens: ReadonlyArray<TokenInfo>,
159159
options: UnfrackOptions,
160-
changeAddress: string,
160+
changeAddress: CoreAddress.Address,
161161
coinsPerUtxoByte: bigint
162162
) => Effect.Effect<ReadonlyArray<TokenBundle>, Error, never>
163163
```

docs/content/docs/modules/sdk/builders/operations/Operations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface MintTokensParams {
4848

4949
```ts
5050
export interface PayToAddressParams {
51-
readonly address: Address.Address // Mandatory: Recipient address
51+
readonly address: CoreAddress.Address // Mandatory: Recipient address (Core Address object)
5252
readonly assets: CoreAssets.Assets // Mandatory: ADA and/or native tokens to send
5353
readonly datum?: Datum.Datum // Optional: Datum to attach for script addresses
5454
readonly scriptRef?: Script.Script // Optional: Reference script to attach

docs/content/docs/modules/sdk/provider/Provider.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ export interface ProviderEffect {
8181
* Query UTxOs at a given address or by credential.
8282
*/
8383
readonly getUtxos: (
84-
addressOrCredential: Address.Address | Credential.Credential
84+
addressOrCredential: CoreAddress.Address | Credential.Credential
8585
) => Effect.Effect<Array<CoreUTxO.UTxO>, ProviderError>
8686
/**
8787
* Query UTxOs at a given address or credential filtered by specific unit.
8888
*/
8989
readonly getUtxosWithUnit: (
90-
addressOrCredential: Address.Address | Credential.Credential,
90+
addressOrCredential: CoreAddress.Address | Credential.Credential,
9191
unit: string
9292
) => Effect.Effect<Array<CoreUTxO.UTxO>, ProviderError>
9393
/**

docs/content/docs/modules/sdk/wallet/Derivation.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export declare class DerivationError
3535

3636
Result of deriving keys and addresses from a seed or Bip32 root
3737

38-
- address: bech32 payment address (addr... / addr_test...)
38+
- address: Core Address object (payment address)
3939
- rewardAddress: bech32 reward address (stake... / stake_test...)
4040
- paymentKey / stakeKey: ed25519e_sk bech32 private keys
4141
- keyStore: Map of KeyHash hex -> PrivateKey for signing operations
@@ -45,7 +45,7 @@ Result of deriving keys and addresses from a seed or Bip32 root
4545

4646
```ts
4747
export type SeedDerivationResult = {
48-
address: SdkAddress.Address
48+
address: CoreAddress.Address
4949
rewardAddress: SdkRewardAddress.RewardAddress | undefined
5050
paymentKey: string
5151
stakeKey: string | undefined
@@ -70,7 +70,7 @@ export declare function addressFromSeed(
7070
accountIndex?: number
7171
network?: "Mainnet" | "Testnet" | "Custom"
7272
} = {}
73-
): { address: SdkAddress.Address; rewardAddress: SdkRewardAddress.RewardAddress | undefined }
73+
): { address: CoreAddress.Address; rewardAddress: SdkRewardAddress.RewardAddress | undefined }
7474
```
7575

7676
## keysFromSeed

docs/content/docs/modules/sdk/wallet/WalletNew.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Useful for monitoring wallets and read-only operations without signing capabilit
5454
**Signature**
5555

5656
```ts
57-
export declare function makeWalletFromAddress(network: Network, address: Address.Address): ReadOnlyWallet
57+
export declare function makeWalletFromAddress(network: Network, address: CoreAddress.Address): ReadOnlyWallet
5858
```
5959

6060
Added in v2.0.0
@@ -142,7 +142,7 @@ export interface ApiWalletEffect extends ReadOnlyWalletEffect {
142142
context?: { utxos?: ReadonlyArray<CoreUTxO.UTxO> }
143143
) => Effect.Effect<TransactionWitnessSet.TransactionWitnessSet, WalletError>
144144
readonly signMessage: (
145-
address: Address.Address | RewardAddress.RewardAddress,
145+
address: CoreAddress.Address | RewardAddress.RewardAddress,
146146
payload: Payload
147147
) => Effect.Effect<SignedMessage, WalletError>
148148
/**
@@ -205,7 +205,7 @@ Suitable for read-only applications that need wallet address information.
205205

206206
```ts
207207
export interface ReadOnlyWalletEffect {
208-
readonly address: () => Effect.Effect<Address.Address, WalletError>
208+
readonly address: () => Effect.Effect<CoreAddress.Address, WalletError>
209209
readonly rewardAddress: () => Effect.Effect<RewardAddress.RewardAddress | null, WalletError>
210210
}
211211
```
@@ -262,7 +262,7 @@ export interface SigningWalletEffect extends ReadOnlyWalletEffect {
262262
context?: { utxos?: ReadonlyArray<CoreUTxO.UTxO> }
263263
) => Effect.Effect<TransactionWitnessSet.TransactionWitnessSet, WalletError>
264264
readonly signMessage: (
265-
address: Address.Address | RewardAddress.RewardAddress,
265+
address: CoreAddress.Address | RewardAddress.RewardAddress,
266266
payload: Payload
267267
) => Effect.Effect<SignedMessage, WalletError>
268268
}

docs/content/docs/transactions/first-transaction.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This guide walks through a complete payment transaction from client setup to on-
1414
Here'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
2020
const client = createClient({
@@ -35,8 +35,8 @@ const client = createClient({
3535
const tx = await client
3636
.newTx()
3737
.payToAddress({
38-
address: "addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63",
39-
assets: { lovelace: 2000000n }
38+
address: Core.Address.fromBech32("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
39+
assets: Core.Assets.fromLovelace(2_000_000n)
4040
})
4141
.build();
4242

@@ -76,7 +76,7 @@ const client = createClient({
7676
Chain 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

8181
const client = createClient({
8282
network: "preprod",
@@ -86,8 +86,8 @@ const client = createClient({
8686

8787
const tx = await client.newTx()
8888
.payToAddress({
89-
address: "addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63",
90-
assets: { lovelace: 2000000n }
89+
address: Core.Address.fromBech32("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
90+
assets: Core.Assets.fromLovelace(2_000_000n)
9191
})
9292
.build();
9393
```
@@ -99,7 +99,7 @@ The builder handles UTxO selection, fee calculation, and change outputs automati
9999
Authorize 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

104104
const client = createClient({
105105
network: "preprod",
@@ -108,7 +108,7 @@ const client = createClient({
108108
});
109109

110110
const tx = await client.newTx()
111-
.payToAddress({ address: "", assets: { lovelace: 2000000n } })
111+
.payToAddress({ address: Core.Address.fromBech32("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"), assets: Core.Assets.fromLovelace(2_000_000n) })
112112
.build();
113113

114114
const signed = await tx.sign();
@@ -119,7 +119,7 @@ const signed = await tx.sign();
119119
Broadcast 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

124124
const client = createClient({
125125
network: "preprod",
@@ -128,7 +128,7 @@ const client = createClient({
128128
});
129129

130130
const tx = await client.newTx()
131-
.payToAddress({ address: "", assets: { lovelace: 2000000n } })
131+
.payToAddress({ address: Core.Address.fromBech32("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"), assets: Core.Assets.fromLovelace(2_000_000n) })
132132
.build();
133133

134134
const signed = await tx.sign();

0 commit comments

Comments
 (0)