@gen3labs/futurepass-transact
Community fork of
@futureverse/transact.
Community fork (gen3labs)
Published under @gen3labs by markibanez as a post-Futureverse-winddown community continuation. Backed by the gen3labs-operated issuer at futurepass.gen3labs.tech and signer at fpsigner.gen3labs.tech. Surface area mirrors the upstream @futureverse/* package one-for-one — switch the import path; the code shape is the same. Register OAuth2 clients at https://futurepass.gen3labs.tech/manageclients.
- Version
0.8.0- Published
- 2026-04-28
- License
- n/a
- Status
fork-active- npm
- https://www.npmjs.com/package/@gen3labs/futurepass-transact
- Types
./index.d.ts- Maintainers
- markibanez
- Depends on
@gen3labs/futurepass-signer·@polkadot/api·@polkadot/util·@polkadot/util-crypto·@polkadot/types·@therootnetwork/api-types·ripple-binary-codec·viem- Recent versions
0.8.0
Why use it
Same TransactClient surface, maintained against TRN directly.
When to skip it
—
Pairs with
@gen3labs/futurepass-signer— signing
Alternatives
@futureverse/transact(fv-winddown) —
Gotchas
- As long as the TRN node and FuturePass pallet stay live, this fork is unaffected by fv-hosted services going dark — it composes pallets directly.
Upstream README
Futureverse Transact Library
An API to help facilitate transactions on The Root Network
Installation
NPM:
npm install @futureverse/transact --saveYarn:
yarn add @futureverse/transactDependancies
{
"@futureverse/signer": "0.6.6",
"@polkadot/api": "^10.13.1",
"@polkadot/util": "^12.6.2",
"@polkadot/util-crypto": "^12.6.2",
"@polkadot/types": "^10.13.1",
"@therootnetwork/api-types": "^1.0.3",
"viem": "^2.18.1"
}Usage
This example shows how to mint an NFT on a Root Network Collection
import { useAuth, useFutureverseSigner } from '@futureverse/auth-react';
import { TransactionBuilder } from '@futureverse/transact';
import { useTrnApi } from '@futureverse/transact-react';
const { userSession } = useAuth();
const [builder, setBuilder] = useState();
const signer = useFutureverseSigner();
const { trnApi } = useTrnApi();
const triggerInit = useCallback(async () => {
if (!trnApi || !signer || !userSession) {
return null;
}
const nftBuilder = await TransactionBuilder.nft(trnApi, signer, userSession.eoa, 709732).mint({ quantity: 1, walletAddress: userSession?.futurepass });
setBuilder(nftBuilder);
}, [trnApi, signer, userSession]);
const signExtrinsic = useCallback(async () => {
if (builder) {
const result = await builder?.signAndSend({ onSign, onSend });
setResult(result as ExtrinsicResult);
}
}, [builder, onSend, onSign, toSign]);
return (
<>
<button
onClick={() => {
triggerInit();
}}
>
Mint 1 Nft
</button>
<button
onClick={() => {
signExtrinsic();
}}
>
Sign & Send
</button>
</>
);This example shows how to transfer a token to an wallet address on a Root Network Collection, but minting using the Fee Proxy to pay for gas with a chosen token.
import { useAuth, useFutureverseSigner } from '@futureverse/auth-react';
import { TransactionBuilder } from '@futureverse/transact';
import { useTrnApi } from '@futureverse/transact-react';
const { userSession } = useAuth();
const [builder, setBuilder] = useState();
const signer = useFutureverseSigner();
const { trnApi } = useTrnApi();
const triggerInit = useCallback(async () => {
if (!trnApi || !signer || !userSession) {
return null;
}
const nftBuilder = await TransactionBuilder.transfer({ destinationAddress: userSession?.futurepass, amount: 1 }).addFeeProxy({ assetId: ROOT_TOKEN_ID, slippage: 5 });
setBuilder(nftBuilder);
}, [trnApi, signer, userSession]);
const signExtrinsic = useCallback(async () => {
if (builder) {
const result = await builder?.signAndSend({ onSign, onSend });
setResult(result as ExtrinsicResult);
}
}, [builder, onSend, onSign, toSign]);
return (
<>
<button
onClick={() => {
triggerInit();
}}
>
Mint 1 Nft
</button>
<button
onClick={() => {
signExtrinsic();
}}
>
Sign & Send
</button>
</>
);This example shows how to mint an NFT on a Root Network Collection, but minting using the FuturePass to pay the gas.
import { useAuth, useFutureverseSigner } from '@futureverse/auth-react';
import { TransactionBuilder } from '@futureverse/transact';
import { useTrnApi } from '@futureverse/transact-react';
const { userSession } = useAuth();
const [builder, setBuilder] = useState();
const signer = useFutureverseSigner();
const { trnApi } = useTrnApi();
const triggerInit = useCallback(async () => {
if (!trnApi || !signer || !userSession) {
return null;
}
const nftBuilder = await TransactionBuilder.nft(trnApi, signer, userSession.eoa, 709732).mint({ quantity: 1, walletAddress: userSession?.futurepass }).addFuturePass(userSession.futurepass);
setBuilder(nftBuilder);
}, [trnApi, signer, userSession]);
const signExtrinsic = useCallback(async () => {
if (builder) {
const result = await builder?.signAndSend({ onSign, onSend });
setResult(result as ExtrinsicResult);
}
}, [builder, onSend, onSign, toSign]);
return (
<>
<button
onClick={() => {
triggerInit();
}}
>
Mint 1 Nft
</button>
<button
onClick={() => {
signExtrinsic();
}}
>
Sign & Send
</button>
</>
);This example shows how to batch multiple transactions on The Root Network Collection together and send them using the FuturePass to pay the gas combined with the fee proxy to pay with a chosen token.
import { useAuth, useFutureverseSigner } from '@futureverse/auth-react';
import { TransactionBuilder } from '@futureverse/transact';
import { useTrnApi } from 'providers/TRNProvider';
const { userSession } = useAuth();
const [builder, setBuilder] = useState();
const signer = useFutureverseSigner();
const { trnApi } = useTrnApi();
const triggerInit = useCallback(async () => {
if (!trnApi || !signer || !userSession) {
return null;
}
const tx1 = trnApi?.tx?.nft.mint(709732, 1, eoa);
const tx2 = trnApi?.tx?.nft.mint(709732, 5, fp);
const tx3 = trnApi?.tx?.assetsExt.transfer(1, fp, 1, true);
const tx4 = trnApi?.tx?.assetsExt.transfer(2, fp, 10, true);
const tx5 = trnApi?.tx?.nft.mint(709732, 3, eoa);
const batchBuilder = await TransactionBuilder.batch(trnApi, signer, userSession.eoa).addExtrinsic(tx1).addExtrinsic(tx2).addExtrinsic(tx3).addExtrinsic(tx4).addExtrinsic(tx5).batchAll().addFuturePassAndFeeProxy({
futurePass: userSession.futurepass,
assetId: assetId,
slippage: 5,
});
setBuilder(nftBuilder);
}, [trnApi, signer, userSession]);
const signExtrinsic = useCallback(async () => {
if (builder) {
const result = await builder?.signAndSend({ onSign, onSend });
setResult(result as ExtrinsicResult);
}
}, [builder, onSend, onSign, toSign]);
return (
<>
<button
onClick={() => {
triggerInit();
}}
>
Mint 1 Nft
</button>
<button
onClick={() => {
signExtrinsic();
}}
>
Sign & Send
</button>
</>
);