Interface FilSnapMethods

The 'wallet_invokeSnap' RPC request handlers

Should always return a promise as this is on the metamask side

Hierarchy

  • FilSnapMethods

Properties

fil_configure: ((ctx, params) => Promise<ConfigureResponse>)

Type declaration

    • (ctx, params): Promise<ConfigureResponse>
    • Configures the snap with the provided configuration

      Parameters

      • ctx: SnapContext

        Snap context

      • params: Partial<{
            derivationPath: string;
            network: "mainnet" | "testnet";
            rpc: { url: string; token: string; };
            unit?: { symbol: "FIL" | "tFIL"; decimals: number; };
        }>

        overrides for the default configuration

      Returns Promise<ConfigureResponse>

fil_exportPrivateKey: ((ctx) => Promise<ExportPrivateKeyResponse>)

Type declaration

fil_getAccountInfo: ((ctx) => Promise<GetAccountInfoResponse>)

Type declaration

fil_getAddress: ((snap) => Promise<GetAddressResponse>)

Type declaration

fil_getBalance: ((ctx) => Promise<GetBalanceResponse>)

Type declaration

fil_getGasForMessage: ((ctx, params) => Promise<GasForMessageResponse>)

Type declaration

    • (ctx, params): Promise<GasForMessageResponse>
    • Get the gas estimate for a message

      Parameters

      • ctx: SnapContext

        Snap context

      • params: {
            maxFee?: string;
            message: {};
        }

        Estimate params

        • Optional maxFee?: string

          Max fee in attoFIL

          Default

          100000000000000000 - 0.1 FIL
          
        • message: {}

          Message to estimate gas for

        Returns Promise<GasForMessageResponse>

    fil_getPublicKey: ((snap) => Promise<GetPublicResponse>)

    Type declaration

    fil_sendMessage: ((ctx, params) => Promise<SendMessageResponse>)

    Type declaration

    fil_signMessage: ((ctx, params) => Promise<SignMessageResponse>)

    Type declaration

    fil_signMessageRaw: ((ctx, params) => Promise<SignMessageRawResponse>)

    Type declaration

    Generated using TypeDoc