Skip to content

WASM version bump + updated examples#1

Open
Gohlub wants to merge 14 commits intomainfrom
feat/wasm-module-version-bump
Open

WASM version bump + updated examples#1
Gohlub wants to merge 14 commits intomainfrom
feat/wasm-module-version-bump

Conversation

@Gohlub
Copy link
Collaborator

@Gohlub Gohlub commented Feb 26, 2026

Updated WASM module to the most recent version + updated examples to match the new APIs.

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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, input is LegacySignRawTxRequest, output is SignRawTxRequest

src/provider.ts Outdated
}): Promise<Uint8Array> {
async signRawTx(
params:
| SignRawTxParams
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants