public function addParameter($type, $name) {

        if ( !in_array($type, self::$rpcvalues) ) throw new InvalidArgumentException("Invalid type for parameter $name");

        if ( empty($name) ) throw new InvalidArgumentException("Missing parameter name");

        $this->signatures[$this->current_signature]["PARAMETERS"][$name] = self::$rpcvalues[$type];

        return $this;

    }