Conversation
examples/app.ts
Outdated
| // 3. Query notes by address (0.2 API) | ||
| log('Querying notes from gRPC...'); | ||
| const balance = await grpcClient.getBalanceByFirstName(firstName.value); | ||
| const balance = await grpcClient.getBalanceByAddress(walletPkh); |
There was a problem hiding this comment.
ByAddres is a v0 tx-engine construct. You should stick with ByFirstName
src/compat.ts
Outdated
| throw new Error(`Invalid ${field}: unsupported value type`); | ||
| } | ||
|
|
||
| function toProtobufIfNeeded(v: unknown): unknown { |
There was a problem hiding this comment.
This will just never be true, because this is an old wasm version construct.
src/compat.ts
Outdated
| throw new Error('Invalid signRawTx params: notes and spendConditions must be non-empty arrays'); | ||
| } | ||
|
|
||
| const rawTxNative = guard.isRawTx(rawTx); |
There was a problem hiding this comment.
I must have miscommunicated things.
We currently will not support native rawTx on the API boundary.
We want this function to return SignRawTxParams, but we don't want to support RawTx. Input must always be protobuf for now.
Native format will change/break, we can't ship it at RPC boundary just yet.
There was a problem hiding this comment.
So, input is LegacySignRawTxRequest, output is SignRawTxRequest
src/provider.ts
Outdated
| }): Promise<Uint8Array> { | ||
| async signRawTx( | ||
| params: | ||
| | SignRawTxParams |
There was a problem hiding this comment.
For now, input is SignRawTxParams, but the RPC must send only LegacySignRawTxRequest
We do not support SignRawTxRequest for now.
Also, there's no reason to have this other unknown typed thing. Remove it.
Updated WASM module to the most recent version + updated examples to match the new APIs.