All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Update peer depedency for
@concordium/web-sdk
to support any version above7
- Fixed circular dependency between
index
andWalletConnect
files.
WalletConnect
:signMessage
now supports passing binary message including schema to the wallet.- Added
createWalletConnectModalConfig
to create a configuration the modal shown when connecting to a walletconnect compatible wallet. The value returned can be passed toWalletConnectConnector.create
. - Added
CRYPTO_X_WALLET_MAINNET
andCONCORDIUM_WALLET_MAINNET
exports, which can be passedcreateWalletConnectModalConfig
for more control over which wallets are shown. - Added option to specify the methods and events to request permission for by walletconnect
WalletConnect
:signMessage
now requires the provided account address to match the connected account rather than silently ignoring it.- Changed the wallet connect modal dependency from
@walletconnect/qrcode-modal
(which is deprecated) to@walletconnect/modal
.
- Fixed serialization of parameters in
requestVerifiablePresentation
and parsing of the result of the request.
schemaAsBuffer
and therebytypeSchemaFromBase64
no longer requires a base64 encoded schema to be padded.
- Added a new method
requestVerifiablePresentation
to theWalletConnect
interface for requesting verifiable presentations from a wallet.
- (breaking) Make compatible with
@concordium/web-sdk@^7
, which is now a peer dependency. BrowserWalletConnector
(breaking): Change methodgetGrpcClient
togetGrpcTransport
and expose the transport object instead of a full client.- Build as ES module to facilitate tree-shaking.
WalletConnection
: The deprecated methodgetJsonRpcClient()
and related symbols have been removed in favor of the new gRPC client (ConcordiumGRPCClient
) for the Node API v2. Existing usage is migrated by simply constructing and using this client directly instead of using the one previously fetched withconnection.getJsonRpcClient
. Usage ofwithJsonRpcClient
, i.e.,may be directly replaced byif (connection) { const res = await withJsonRpcClient(connection, func); ... }
Theif (grpcClient) { const res = await func(grpcClient); ... }
Network
type has a fieldgrpcOpts
which may be used to construct the client (see its docstring for details). The field is optional, but present on the predefined constantsTESTNET
andMAINNET
. For users of@concordium/react-components
, this is all wrapped into the hookuseGrpcClient
.
- Bump dependency
@concordium/web-sdk
to v6.0.0+. This transitively bumps@concordium/common-sdk
to v9.0.0.
WalletConnect
: Fix schema object format conversion insignAndSendTransaction
in request payloads.WalletConnect
: Use standard string identifiers for transaction type in request payload.
- Standard values of
Network
for testnet and mainnet, exposed as constantsTESTNET
andMAINNET
.
WalletConnection
: Deprecate the methodgetJsonRpcClient
onWalletConnection
in favor of the gRPC Web clientConcordiumGRPCClient
for querying a Node via API version 2. The client should be managed independently of this library, e.g. usinguseGrpcClient
in@concordium/react-components
.Network
: Add fieldgrpcOpts
containing the initialization options for a gRPC Web clientConcordiumGRPCClient
to connect to the given network. If fieldjsonRpcUrl
is empty, the JSON-RPC client is not initialized for WalletConnect connections, and if so,getJsonRpcClient
will throw an exception.
WalletConnection
(breaking): Support both module and type/parameter schemas insignAndSendTransaction
. To migrate existing usage, wrap the schema string in the new functionmoduleSchemaFromBase64(...)
.WalletConnection
(breaking): Support both string and binary messages insignMessage
. To migrate existing usage, wrap the message string in the new functionstringMessage(...)
.
No changes. Had to bump version to fix NPM release.
- Added exported constant
CONCORDIUM_WALLET_CONNECT_PROJECT_ID
that dApps may use when connecting to a Concordium mobile wallet.
WalletConnect
: Removed incorrect stringification ofsignMessage
result.
WalletConnect
: Addedsign_message
torequiredNamespaces
in the call toconnect
.
WalletConnection
: Added method for pinging the remote end of the connection.
WalletConnectionDelegate
: AddedonConnected
event method and renamedonDisconnect
toonDisconnected
for consistency.WalletConnect
: Reordered constructor parameters to accommodate changes in@concordium/react-components
.WalletConnector
: MadegetConnections
non-async.WalletConnection
: RemovedgetConnectedAccount
(the implementation methods stay but are no longer forced to be async).
- Initial implementation.