Wire a plain object's methods to use services from the context.
Creates a Proxy that resolves services lazily on property access. Useful for creating "service bags" that group multiple services.
The context to resolve from.
A record of property names → service tokens.
A proxy object with lazy-resolved properties.
1.2.0
const services = autoWire(ctx, { rpc: Tokens.RPC, das: Tokens.DAS, programs: Tokens.PROGRAMS,});// Each property is resolved lazily:const balance = await services.rpc.getBalance(pubkey);const asset = await services.das.getAsset(assetId); Copy
const services = autoWire(ctx, { rpc: Tokens.RPC, das: Tokens.DAS, programs: Tokens.PROGRAMS,});// Each property is resolved lazily:const balance = await services.rpc.getBalance(pubkey);const asset = await services.das.getAsset(assetId);
Wire a plain object's methods to use services from the context.
Creates a Proxy that resolves services lazily on property access. Useful for creating "service bags" that group multiple services.