Skip to content

Commit c93797c

Browse files
authored
Add useUpgradedAuth simulation flag for CAP-71 v2 address credentials (#1568)
* feat(rpc): add useUpgradedAuth flag to simulateTransaction (CAP-71) * test(e2e): add temp CAP-71 useUpgradedAuth v2-credentials test * ci(e2e): bump quickstart to protocol 27 / rpc 27.1.1 for useUpgradedAuth
1 parent 52717e4 commit c93797c

10 files changed

Lines changed: 226 additions & 45 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ jobs:
1818
job: ["test:e2e"]
1919
services:
2020
rpc:
21-
# This image's core supports up to protocol 25. guides_pr.yml pins a
22-
# newer digest running protocol 27 (the guides document protocol-27
23-
# behavior) — when bumping either workflow's image, check the other.
24-
image: stellar/quickstart:testing@sha256:e09b46445243c966557073e4947642153e515bb3fa0c8b26d92ed3b7cdce3ba2
21+
# This image runs core v27.1.0 (protocol 27) and stellar-rpc 27.1.1,
22+
# which supports the `useUpgradedAuth` simulation flag (CAP-71) that
23+
# use-upgraded-auth.test.ts exercises. guides_pr.yml pins its own
24+
# digest — when bumping either workflow's image, check the other.
25+
image: stellar/quickstart:testing@sha256:c8f1a95e43f5c0ff0b3d2ce6c3db008ccb0754ffa50175c4e0ef06b9d643b490
2526
ports:
2627
- 8000:8000
2728
env:
2829
ENABLE_LOGS: true
2930
NETWORK: local
3031
ENABLE_SOROBAN_RPC: true
31-
PROTOCOL_VERSION: 25
32+
PROTOCOL_VERSION: 27
3233
options: >-
3334
--health-cmd "curl --no-progress-meter --fail-with-body -X POST
3435
\"http://localhost:8000/soroban/rpc\" -H 'Content-Type:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ A breaking change will get clearly marked in this log.
55
## Unreleased
66

77
### Added
8+
- `rpc.Server.simulateTransaction` accepts an optional `useUpgradedAuth` flag, and `contract.AssembledTransaction` accepts it as a method option (`useUpgradedAuth`) or per-call (`tx.simulate({ useUpgradedAuth: true })`). When set, RPC simulation records v2 address credentials (CAP-71) instead of the legacy v1 credentials. It only affects the recording auth modes and is silently ignored on hosts that cannot emit v2 credentials. The flag is deprecated from the start: it is transitional and becomes a no-op once the network returns v2 credentials by default (protocol 28) ([#1562](https://github.com/stellar/js-stellar-sdk/issues/1562)).
89
- `@stellar/stellar-sdk/base` subpath export: import offline primitives like `StrKey` and `Keypair` without loading Horizon, RPC, or the SEP helpers and their networking dependencies([#1550](https://github.com/stellar/js-stellar-sdk/pull/1550)).
910
- `authorizeEntry` / `authorizeInvocation` signing callbacks now receive the 32-byte signing payload (`hash(preimage.toXDR())`) as a second argument alongside the preimage, so signers — including HSMs and remote signers that only accept a digest — never have to re-derive it. Existing single-argument callbacks are unaffected ([#1532](https://github.com/stellar/js-stellar-sdk/issues/1532)).
1011
- `authorizeEntry` / `authorizeInvocation` now support non-Ed25519 signers: the signing callback may return `{ signatureScVal: xdr.ScVal, address?: string }`, and the given `ScVal` is written verbatim as the credentials' signature — no Ed25519 verification, no `{public_key, signature}` map, no `scvVec` wrapping. This lets smart-wallet / custom-account contracts (whose `__check_auth` expects its own signature structure) use the helper instead of hand-rolling preimage construction and credential assembly. The optional `address` routes the signature to a specific credential node, like `forAddress` ([#1530](https://github.com/stellar/js-stellar-sdk/issues/1530)).

docs/reference/contracts-client.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class AssembledTransaction<T> {
230230
sign(__namedParameters: { force?: boolean; signTransaction?: SignTransactionLike } = {}): Promise<void>;
231231
signAndSend(__namedParameters: { force?: boolean; signTransaction?: SignTransactionLike; watcher?: Watcher } = {}): Promise<SentTransaction<T>>;
232232
signAuthEntries(__namedParameters: { address?: string; authorizeEntry?: (entry: SorobanAuthorizationEntry, signer: Keypair | SigningCallback, validUntilLedgerSeq: number, networkPassphrase: string, forAddress?: string) => Promise<SorobanAuthorizationEntry>; expiration?: number | Promise<number>; signAuthEntry?: SignAuthEntryLike } = {}): Promise<void>;
233-
simulate(__namedParameters: { restore?: boolean } = {}): Promise<AssembledTransaction<T>>;
233+
simulate(__namedParameters: { restore?: boolean; useUpgradedAuth?: boolean } = {}): Promise<AssembledTransaction<T>>;
234234
toJSON(): string;
235235
toXDR(): string;
236236
}
@@ -423,23 +423,23 @@ returns `false`, then you need to call `signAndSend` on this transaction.
423423
readonly isReadCall: boolean;
424424
```
425425

426-
**Source:** [src/contract/assembled_transaction.ts:1108](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L1108)
426+
**Source:** [src/contract/assembled_transaction.ts:1117](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L1117)
427427

428428
### `assembledTransaction.result`
429429

430430
```ts
431431
readonly result: T;
432432
```
433433

434-
**Source:** [src/contract/assembled_transaction.ts:742](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L742)
434+
**Source:** [src/contract/assembled_transaction.ts:751](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L751)
435435

436436
### `assembledTransaction.simulationData`
437437

438438
```ts
439439
readonly simulationData: { result: SimulateHostFunctionResult; transactionData: SorobanTransactionData };
440440
```
441441

442-
**Source:** [src/contract/assembled_transaction.ts:699](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L699)
442+
**Source:** [src/contract/assembled_transaction.ts:708](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L708)
443443

444444
### `assembledTransaction.needsNonInvokerSigningBy(__namedParameters)`
445445

@@ -469,7 +469,7 @@ needsNonInvokerSigningBy(__namedParameters: { includeAlreadySigned?: boolean } =
469469

470470
- **`__namedParameters`**`{ includeAlreadySigned?: boolean }` (optional) (default: `{}`)
471471

472-
**Source:** [src/contract/assembled_transaction.ts:935](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L935)
472+
**Source:** [src/contract/assembled_transaction.ts:944](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L944)
473473

474474
### `assembledTransaction.restoreFootprint(restorePreamble, account)`
475475

@@ -504,7 +504,7 @@ Client initialization.
504504
- - Throws a custom error if the
505505
restore transaction fails, providing the details of the failure.
506506

507-
**Source:** [src/contract/assembled_transaction.ts:1137](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L1137)
507+
**Source:** [src/contract/assembled_transaction.ts:1146](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L1146)
508508

509509
### `assembledTransaction.send(watcher)`
510510

@@ -521,7 +521,7 @@ send(watcher?: Watcher): Promise<SentTransaction<T>>;
521521

522522
- **`watcher`**`Watcher` (optional)
523523

524-
**Source:** [src/contract/assembled_transaction.ts:860](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L860)
524+
**Source:** [src/contract/assembled_transaction.ts:869](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L869)
525525

526526
### `assembledTransaction.sign(__namedParameters)`
527527

@@ -536,7 +536,7 @@ sign(__namedParameters: { force?: boolean; signTransaction?: SignTransactionLike
536536

537537
- **`__namedParameters`**`{ force?: boolean; signTransaction?: SignTransactionLike }` (optional) (default: `{}`)
538538

539-
**Source:** [src/contract/assembled_transaction.ts:770](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L770)
539+
**Source:** [src/contract/assembled_transaction.ts:779](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L779)
540540

541541
### `assembledTransaction.signAndSend(__namedParameters)`
542542

@@ -555,7 +555,7 @@ signAndSend(__namedParameters: { force?: boolean; signTransaction?: SignTransact
555555

556556
- **`__namedParameters`**`{ force?: boolean; signTransaction?: SignTransactionLike; watcher?: Watcher }` (optional) (default: `{}`)
557557

558-
**Source:** [src/contract/assembled_transaction.ts:878](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L878)
558+
**Source:** [src/contract/assembled_transaction.ts:887](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L887)
559559

560560
### `assembledTransaction.signAuthEntries(__namedParameters)`
561561

@@ -582,17 +582,17 @@ signAuthEntries(__namedParameters: { address?: string; authorizeEntry?: (entry:
582582

583583
- **`__namedParameters`**`{ address?: string; authorizeEntry?: (entry: SorobanAuthorizationEntry, signer: Keypair | SigningCallback, validUntilLedgerSeq: number, networkPassphrase: string, forAddress?: string) => Promise<SorobanAuthorizationEntry>; expiration?: number | Promise<number>; signAuthEntry?: SignAuthEntryLike }` (optional) (default: `{}`)
584584

585-
**Source:** [src/contract/assembled_transaction.ts:996](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L996)
585+
**Source:** [src/contract/assembled_transaction.ts:1005](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L1005)
586586

587587
### `assembledTransaction.simulate(__namedParameters)`
588588

589589
```ts
590-
simulate(__namedParameters: { restore?: boolean } = {}): Promise<AssembledTransaction<T>>;
590+
simulate(__namedParameters: { restore?: boolean; useUpgradedAuth?: boolean } = {}): Promise<AssembledTransaction<T>>;
591591
```
592592

593593
**Parameters**
594594

595-
- **`__namedParameters`**`{ restore?: boolean }` (optional) (default: `{}`)
595+
- **`__namedParameters`**`{ restore?: boolean; useUpgradedAuth?: boolean }` (optional) (default: `{}`)
596596

597597
**Source:** [src/contract/assembled_transaction.ts:646](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/assembled_transaction.ts#L646)
598598

@@ -825,7 +825,7 @@ _before_ transaction signing.
825825
const DEFAULT_TIMEOUT: number
826826
```
827827
828-
**Source:** [src/contract/types.ts:298](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L298)
828+
**Source:** [src/contract/types.ts:311](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L311)
829829
830830
## contract.KeypairSigner
831831
@@ -915,7 +915,7 @@ An impossible account on the Stellar network
915915
const NULL_ACCOUNT: "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"
916916
```
917917
918-
**Source:** [src/contract/types.ts:304](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L304)
918+
**Source:** [src/contract/types.ts:317](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L317)
919919
920920
## contract.SentTransaction
921921
@@ -1582,7 +1582,7 @@ basicNodeSigner(keypair: Keypair, networkPassphrase: string): { signAuthEntry: S
15821582
type AssembledTransactionOptions<T = string> = MethodOptions & ClientOptions & { address?: string; args?: any[]; method: string; parseResultXdr: (xdr: xdr.ScVal) => T; submit?: boolean; submitUrl?: string }
15831583
```
15841584
1585-
**Source:** [src/contract/types.ts:266](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L266)
1585+
**Source:** [src/contract/types.ts:279](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L279)
15861586
15871587
### contract.ClientOptions
15881588
@@ -1633,7 +1633,7 @@ message: string;
16331633
Options for a smart contract method invocation.
16341634

16351635
```ts
1636-
type MethodOptions = { fee?: string; publicKey?: string; restore?: boolean; signAuthEntry?: SignAuthEntryLike; signTransaction?: SignTransactionLike; simulate?: boolean; timeoutInSeconds?: number }
1636+
type MethodOptions = { fee?: string; publicKey?: string; restore?: boolean; signAuthEntry?: SignAuthEntryLike; signTransaction?: SignTransactionLike; simulate?: boolean; timeoutInSeconds?: number; useUpgradedAuth?: boolean }
16371637
```
16381638
16391639
**Source:** [src/contract/types.ts:207](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L207)

docs/reference/network-rpc.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class Server {
110110
_getTransaction(hash: string): Promise<RawGetTransactionResponse>;
111111
_getTransactions(request: GetTransactionsRequest): Promise<RawGetTransactionsResponse>;
112112
_sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise<RawSendTransactionResponse>;
113-
_simulateTransaction(transaction: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise<RawSimulateTransactionResponse>;
113+
_simulateTransaction(transaction: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode, useUpgradedAuth?: boolean): Promise<RawSimulateTransactionResponse>;
114114
fundAddress(address: string, friendbotUrl?: string): Promise<GetSuccessfulTransactionResponse>;
115115
getAccount(address: string): Promise<Account>;
116116
getAccountEntry(address: string): Promise<AccountEntry>;
@@ -139,7 +139,7 @@ class Server {
139139
queryContract<T = any>(contractId: string, method: string, args: Record<string, unknown> = {}, networkPassphrase?: string): Promise<{ isReadCall: boolean; result: T }>;
140140
requestAirdrop(address: string | Pick<Account, "accountId">, friendbotUrl?: string): Promise<Account>;
141141
sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise<SendTransactionResponse>;
142-
simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise<SimulateTransactionResponse>;
142+
simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode, useUpgradedAuth?: boolean): Promise<SimulateTransactionResponse>;
143143
}
144144
```
145145

@@ -236,7 +236,7 @@ _getLedgers(request: GetLedgersRequest): Promise<RawGetLedgersResponse>;
236236

237237
- **`request`** — `GetLedgersRequest` (required)
238238

239-
**Source:** [src/rpc/server.ts:1773](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1773)
239+
**Source:** [src/rpc/server.ts:1788](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1788)
240240

241241
### `server._getTransaction(hash)`
242242

@@ -272,21 +272,22 @@ _sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise<RawSend
272272

273273
- **`transaction`** — `Transaction | FeeBumpTransaction` (required)
274274

275-
**Source:** [src/rpc/server.ts:1409](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1409)
275+
**Source:** [src/rpc/server.ts:1424](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1424)
276276

277-
### `server._simulateTransaction(transaction, addlResources, authMode)`
277+
### `server._simulateTransaction(transaction, addlResources, authMode, useUpgradedAuth)`
278278

279279
```ts
280-
_simulateTransaction(transaction: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise<RawSimulateTransactionResponse>;
280+
_simulateTransaction(transaction: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode, useUpgradedAuth?: boolean): Promise<RawSimulateTransactionResponse>;
281281
```
282282

283283
**Parameters**
284284

285285
- **`transaction`** — `Transaction | FeeBumpTransaction` (required)
286286
- **`addlResources`** — `ResourceLeeway` (optional)
287287
- **`authMode`** — `SimulationAuthMode` (optional)
288+
- **`useUpgradedAuth`** — `boolean` (optional)
288289

289-
**Source:** [src/rpc/server.ts:1256](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1256)
290+
**Source:** [src/rpc/server.ts:1269](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1269)
290291

291292
### `server.fundAddress(address, friendbotUrl)`
292293

@@ -339,7 +340,7 @@ console.log("Contract funded! Hash:", tx.txHash);
339340

340341
- `Friendbot docs`
341342

342-
**Source:** [src/rpc/server.ts:1532](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1532)
343+
**Source:** [src/rpc/server.ts:1547](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1547)
343344

344345
### `server.getAccount(address)`
345346

@@ -775,7 +776,7 @@ the fee stats
775776

776777
- https://developers.stellar.org/docs/data/rpc/api-reference/methods/getFeeStats
777778

778-
**Source:** [src/rpc/server.ts:1578](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1578)
779+
**Source:** [src/rpc/server.ts:1593](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1593)
779780

780781
### `server.getHealth()`
781782

@@ -961,7 +962,7 @@ const nextPage = await server.getLedgers({
961962

962963
- `getLedgers docs`
963964

964-
**Source:** [src/rpc/server.ts:1757](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1757)
965+
**Source:** [src/rpc/server.ts:1772](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1772)
965966

966967
### `server.getNetwork()`
967968

@@ -1049,7 +1050,7 @@ console.log(
10491050
- - getLedgerEntries
10501051
- https://developers.stellar.org/docs/tokens/stellar-asset-contract
10511052

1052-
**Source:** [src/rpc/server.ts:1642](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1642)
1053+
**Source:** [src/rpc/server.ts:1657](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1657)
10531054

10541055
### `server.getTransaction(hash)`
10551056

@@ -1180,7 +1181,7 @@ the version info
11801181

11811182
- https://developers.stellar.org/docs/data/rpc/api-reference/methods/getVersionInfo
11821183

1183-
**Source:** [src/rpc/server.ts:1592](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1592)
1184+
**Source:** [src/rpc/server.ts:1607](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1607)
11841185

11851186
### `server.pollTransaction(hash, opts)`
11861187

@@ -1309,7 +1310,7 @@ server.sendTransaction(transaction).then(result => {
13091310
- - module:rpc.assembleTransaction
13101311
- `simulateTransaction docs`
13111312

1312-
**Source:** [src/rpc/server.ts:1348](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1348)
1313+
**Source:** [src/rpc/server.ts:1363](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1363)
13131314

13141315
### `server.queryContract(contractId, method, args, networkPassphrase)`
13151316

@@ -1417,7 +1418,7 @@ server
14171418
- - `Friendbot docs`
14181419
- `Friendbot.Api.Response`
14191420

1420-
**Source:** [src/rpc/server.ts:1454](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1454)
1421+
**Source:** [src/rpc/server.ts:1469](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1469)
14211422

14221423
### `server.sendTransaction(transaction)`
14231424

@@ -1478,15 +1479,15 @@ server.sendTransaction(transaction).then((result) => {
14781479
- - `transaction docs`
14791480
- `sendTransaction docs`
14801481

1481-
**Source:** [src/rpc/server.ts:1403](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1403)
1482+
**Source:** [src/rpc/server.ts:1418](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1418)
14821483

1483-
### `server.simulateTransaction(tx, addlResources, authMode)`
1484+
### `server.simulateTransaction(tx, addlResources, authMode, useUpgradedAuth)`
14841485

14851486
Submit a trial contract invocation to get back return values, expected
14861487
ledger footprint, expected authorizations, and expected costs.
14871488

14881489
```ts
1489-
simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise<SimulateTransactionResponse>;
1490+
simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode, useUpgradedAuth?: boolean): Promise<SimulateTransactionResponse>;
14901491
```
14911492

14921493
**Parameters**
@@ -1503,6 +1504,15 @@ simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: Resour
15031504
auth mode to use for simulation: `enforce` for enforcement mode,
15041505
`record` for recording mode, or `record_allow_nonroot` for recording
15051506
mode that allows non-root authorization
1507+
- **`useUpgradedAuth`** — `boolean` (optional) — (optional) opt simulation into recording
1508+
v2 address credentials (CAP-71) instead of the legacy v1 address
1509+
credentials. Best-effort: it only affects the recording auth modes and
1510+
is silently ignored on protocol versions whose host cannot emit v2
1511+
credentials.
1512+
1513+
**Deprecated**: this flag is transitional. Once the network returns v2
1514+
credentials by default (protocol 28), it becomes a no-op — do not rely
1515+
on omitting it to keep receiving the legacy v1 format.
15061516

15071517
**Returns**
15081518

@@ -1544,7 +1554,7 @@ server.simulateTransaction(transaction).then((sim) => {
15441554
- module:rpc.Server#prepareTransaction
15451555
- module:rpc.assembleTransaction
15461556

1547-
**Source:** [src/rpc/server.ts:1246](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1246)
1557+
**Source:** [src/rpc/server.ts:1255](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L1255)
15481558

15491559
## rpc.assembleTransaction
15501560

0 commit comments

Comments
 (0)