Usage with TypeScript
Extract types of methods exposed by SDK
import { walletDetector } from '@aeternity/aepp-sdk';
type WDCallback = Parameters<typeof walletDetector>[1];
type Wallet = Parameters<WDCallback>[0]['newWallet'];
let wallet: Wallet | null = null;
const stop = walletDetector(connection, ({ newWallet }) => {
wallet = newWallet;
stop();
});import { unpackDelegation } from '@aeternity/aepp-sdk';
type DlgUnpacked = ReturnType<typeof unpackDelegation>;
let delegation: DlgUnpacked | null = null;
delegation = unpackDelegation(
'ba_+EYDAaEBXXFtZp9YqbY4KdW8Nolf9Hjp0VZcNWnQOKjgCb8Br9mhBV1xbWafWKm2OCnVvDaJX/R46dFWXDVp0Dio4Am/Aa/Z2vgCEQ==',
);Initialize parameters with specific types
Functions to assert types of user-provided data
AENS name validation
Check types of contract methods
Last updated
Was this helpful?