Non-custodial Wallet interoperability

Hey Fireblocks team,

Playing around with the non custodial wallet SDK and have two questions:

  1. Will you be able to provide a code snippet to get the address of the wallet account generated? (front end, and backend if needed [routes etc.])
  2. Will you be able to provide a code snippet to sign a typed data transaction? (EIP712) I want to be able to pass in the domain, types, and data and receive back a signed string. Exactly like the _signTypedData method in ethers.

Looking forward to hearing back.

Hey @jbreite!

  1. For getting the wallet address you can use the example listed here:
    Retrieve asset addresses
const addresses = await fireblocks.NCW.getWalletAssetAddresses("walletId", "accountId", "assetId")
  1. For typed data signing, you can use our typed message API:
    Typed Message Signing
    You can use the example listed in the docs with a small change in the source param:
const { status, id } = await fireblocks.createTransaction({
        operation: TransactionOperation.TYPED_MESSAGE,
        assetId: "ETH",
        source: { 
            type: PeerType.END_USER_WALLET,
            id: <end_user_wallet_id>
        },
        amount: "0",
        note: "Test EIP-712 Message",
        extraParameters: {
            rawMessageData: {
                messages: [exampleSignRequest],
            },
        },
    });

And you can get the wallet ID by calling:

const wallets = await fireblocks.NCW.getWallets({})