Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions content/documentation/ironfish-wasm.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Ironfish Wasm
---

Iron Fish WASM package that compiles native Iron Fish code to WebAssembly with TypeScript bindings. This package allows you to use Iron Fish cryptographic functionality in browser extensions, web applications, or any JavaScript environment.

## Installation

```bash
npm install @ironfish/ironfish-wasm
```

## Features

- Native Iron Fish code compiled to WebAssembly
- TypeScript bindings for better developer experience
- Compatible with browser extensions and web applications
- High-performance cryptographic operations
- Cross-platform compatibility

## Usage

```typescript
import { SaplingKey, Note, AssetIdentifier, UnsignedTransaction } from '@ironfish/ironfish-wasm';

// Generate new keys
const senderKey = SaplingKey.random();
const recipientKey = SaplingKey.random();

// Create a native asset note (IRON)
const note = Note.fromParts(
recipientKey.publicAddress,
BigInt(100), // Amount
"Transfer memo",
AssetIdentifier.native,
senderKey.publicAddress
);

// Create an unsigned transaction
const bytes = new Uint8Array([/* transaction bytes */]);
const unsignedTx = new UnsignedTransaction(bytes);

// Sign the transaction
const signedTx = unsignedTx.sign(senderKey);

// Get transaction details
console.log({
fee: signedTx.fee,
expiration: signedTx.expiration,
outputs: signedTx.outputs.length,
spends: signedTx.spends.length
});

// Export keys as hex for storage
const exportedKey = senderKey.toHex();

// Import key from hex
const importedKey = SaplingKey.fromHex(exportedKey);
```

## Requirements

- Node.js 20.0.0 or higher
- A JavaScript environment with WebAssembly support
12 changes: 0 additions & 12 deletions content/documentation/rpc/chain/get_transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ Gets a transaction from a block hash and transaction hash
RpcTransaction & {
noteSize: number
blockHash: string
/**
* @deprecated Please use `notes.length` instead
*/
notesCount: number
/**
* @deprecated Please use `spends.length` instead
*/
spendsCount: number
/**
* @deprecated Please use `notes` instead
*/
notesEncrypted: string[]
}
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: wallet/multisig/getParicipants
title: wallet/multisig/getAccountIdentities
description: RPC Multisig | Iron Fish Documentation
---

Retrieves all identities for a single account/group.
Retrieves all identities for a single account/group: one for each signer in the multisig group.

#### Request

Expand All @@ -21,4 +21,4 @@ Retrieves all identities for a single account/group.
}
```

###### [View on Github](https://github.com/iron-fish/ironfish/blob/master/ironfish/src/rpc/routes/wallet/multisig/getParticipants.ts)
###### [View on Github](https://github.com/iron-fish/ironfish/blob/master/ironfish/src/rpc/routes/wallet/multisig/getAccountIdentities.ts)
9 changes: 5 additions & 4 deletions content/documentation/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ export const sidebar: SidebarDefinition = [
},
],
},
"ironfish-wasm",
{
label: "Recipes",
items: [
Expand Down Expand Up @@ -448,12 +449,12 @@ export const sidebar: SidebarDefinition = [
label: "Multisig",
items: [
{
id: "rpc/wallet/multisig/get_participant",
label: "getParticipant",
id: "rpc/wallet/multisig/get_account_identities",
label: "getAccountIdentities",
},
{
id: "rpc/wallet/multisig/get_participants",
label: "getParticipants",
id: "rpc/wallet/multisig/get_participant",
label: "getParticipant",
},
{
id: "rpc/wallet/multisig/create_participant",
Expand Down
43 changes: 0 additions & 43 deletions content/get-started/get-started.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion content/get-started/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { SidebarDefinition } from "@/lib/markdown";

export const sidebar: SidebarDefinition = [
"mining",
// "ledger", // TODO: Uncomment after Ledger Live launch
"ledger",
];
Loading