v13.0.0-rc.2
Pre-release
Pre-release
v13.0.0-rc.2
Breaking Changes
- The
ClientOptions.signTransaction
type has been updated to reflect the latest SEP-43 protocol, which matches the latest major version of Freighter and other wallets. It now acceptsaddress
,submit
, andsubmitUrl
options, and it returns a promise containing thesignedTxXdr
and thesignerAddress
. It now also returns anError
type if an error occurs during signing.basicNodeSigner
has been updated to reflect the new type.
ClientOptions.signAuthEntry
type has also been updated to reflect the SEP-43 protocol, which also returns a promise containing thesignerAddress
in addition to thesignAuthEntry
that was returned previously. It also can return anError
type.
Added
contract.Client
now has a staticdeploy
method that can be used to deploy a contract instance from an existing uploaded/"installed" Wasm hash. The first arguments to this method are the arguments for the contract's__constructor
method in accordance with CAP-42 (#1086).
For example, using the increment
test contract as modified in https://github.com/stellar/soroban-test-examples/pull/2/files#diff-8734809100be3803c3ce38064730b4578074d7c2dc5fb7c05ca802b2248b18afR10-R45:
const tx = await contract.Client.deploy(
{ counter: 42 },
{
networkPassphrase,
rpcUrl,
wasmHash: uploadedWasmHash,
publicKey: someKeypair.publicKey(),
...basicNodeSigner(someKeypair, networkPassphrase),
},
);
const { result: client } = await tx.signAndSend();
const t = await client.get();
expect(t.result, 42);
Horizon.ServerApi
now has anEffectType
exported so that you can compare and infer effect types directly (#1099).Horizon.ServerApi.Trade
type now has atype_i
field for type inference.- All effects now expose their type as an exact string (#947).
stellartoml-Resolver.resolve
now has aallowedRedirects
option to configure the number of allowed redirects to follow when resolving a stellar toml file.